update 20241210
This commit is contained in:
@@ -97,13 +97,14 @@ namespace OnDoc.Diverses
|
||||
|
||||
foreach (FileInfo file in directoryInfo.GetFiles())
|
||||
{
|
||||
if (file.Exists && file.Name!="klassifizierung.txt")
|
||||
if (file.Exists && file.Name!="Klassifizierung.txt")
|
||||
{
|
||||
|
||||
ext = System.IO.Path.GetExtension(file.Name);
|
||||
TreeNode tnnew = new TreeNode();
|
||||
tnnew.Text = file.Name;
|
||||
tnnew.Tag = file.FullName;
|
||||
Logging.Logging.Debug("Load Nativ: " + file.FullName,"OnDoc","");
|
||||
tnnew.ImageIndex = 4;
|
||||
|
||||
if (ext.Length > 2)
|
||||
@@ -257,55 +258,72 @@ namespace OnDoc.Diverses
|
||||
catch { }
|
||||
try
|
||||
{
|
||||
|
||||
string tempfilename = treeNode.Tag.ToString();
|
||||
Logging.Logging.Debug("Nativ-Vorlage: " + tempfilename, "OnDoc", "");
|
||||
if (tempfilename == "") { return; }
|
||||
|
||||
//string tempdir = AppParams.tempdir + "\nativdoks";
|
||||
|
||||
string ext = System.IO.Path.GetExtension(tempfilename);
|
||||
Logging.Logging.Debug("Native-Vorlage erstellen", "OnDoc", tempfilename);
|
||||
if (ext.Length > 2)
|
||||
{
|
||||
ext = ext.Substring(0, 2).ToUpper();
|
||||
string tempfilename1 = "";
|
||||
switch (ext)
|
||||
{
|
||||
case ".D":
|
||||
DOCGEN.Klassen.SyncFWord sf = new DOCGEN.Klassen.SyncFWord("","");
|
||||
tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
sf.create_nativ("Klassifizierung", klassifizierung, "", tempfilename, tempfilename1);
|
||||
System.Diagnostics.Process.Start("winword.exe", " /t" + tempfilename1);
|
||||
string tempfilename1 = "";
|
||||
tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
|
||||
//System.Diagnostics.Process.Start("winword.exe", " /t" + tempfilename);
|
||||
break;
|
||||
case ".X":
|
||||
DOCGEN.Klassen.SyncFExcel ef = new DOCGEN.Klassen.SyncFExcel();
|
||||
tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
System.IO.File.Copy(tempfilename, tempfilename1, true);
|
||||
Process.Start(tempfilename1);
|
||||
// if (ext.Length > 2)
|
||||
// {
|
||||
// ext = ext.Substring(0, 2).ToUpper();
|
||||
// string tempfilename1 = "";
|
||||
// switch (ext)
|
||||
// {
|
||||
// case ".D":
|
||||
//// DOCGEN.Klassen.SyncFWord sf = new DOCGEN.Klassen.SyncFWord("","");
|
||||
// tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
// tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
// System.IO.File.Copy(tempfilename,tempfilename1,true);
|
||||
|
||||
ef.create_nativ("Klassifizierung", klassifizierung, "", tempfilename, tempfilename1);
|
||||
// // Logging.Logging.Debug("sfcreate.native", "OnDoc", tempfilename1);
|
||||
// // sf.create_nativ("Klassifizierung", klassifizierung, "", tempfilename, tempfilename1);
|
||||
// System.Diagnostics.Process.Start("winword.exe", " /t" + tempfilename1);
|
||||
|
||||
System.Diagnostics.Process.Start("excel.exe", " /t " + tempfilename1);
|
||||
break;
|
||||
case ".P":
|
||||
DOCGEN.Klassen.SyncFPowerPoint pf = new DOCGEN.Klassen.SyncFPowerPoint();
|
||||
tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
pf.create_nativ("Klassifizierung", klassifizierung,"",tempfilename,tempfilename1);
|
||||
System.Diagnostics.Process.Start("POWERPNT.EXE", " /N " + tempfilename1);
|
||||
break;
|
||||
default:
|
||||
tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
tempfilename1 = AppParams.tempdir+ "" + DateTime.Now.ToString("yyyyMMddhhmmss") +tempfilename1;
|
||||
System.IO.File.Copy(tempfilename,tempfilename1, true);
|
||||
Process.Start(tempfilename1);
|
||||
break;
|
||||
}
|
||||
// //System.Diagnostics.Process.Start("winword.exe", " /t" + tempfilename);
|
||||
// break;
|
||||
// case ".X":
|
||||
// //DOCGEN.Klassen.SyncFExcel ef = new DOCGEN.Klassen.SyncFExcel();
|
||||
// tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
// tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
// System.IO.File.Copy(tempfilename,tempfilename1,true);
|
||||
|
||||
}
|
||||
// //ef.create_nativ("Klassifizierung", klassifizierung, "", tempfilename, tempfilename1);
|
||||
|
||||
// System.Diagnostics.Process.Start("excel.exe", " /t " + tempfilename1);
|
||||
// break;
|
||||
// case ".P":
|
||||
|
||||
// //DOCGEN.Klassen.SyncFPowerPoint pf = new DOCGEN.Klassen.SyncFPowerPoint();
|
||||
// tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
// tempfilename1 = AppParams.tempdir + "" + DateTime.Now.ToString("yyyyMMddhhmmss") + tempfilename1;
|
||||
// System.IO.File.Copy(tempfilename, tempfilename1,true);
|
||||
// //pf.create_nativ("Klassifizierung", klassifizierung,"",tempfilename,tempfilename1);
|
||||
// System.Diagnostics.Process.Start("POWERPNT.EXE", " /N " + tempfilename1);
|
||||
// break;
|
||||
// default:
|
||||
// tempfilename1 = System.IO.Path.GetFileName(tempfilename);
|
||||
// tempfilename1 = AppParams.tempdir+ "" + DateTime.Now.ToString("yyyyMMddhhmmss") +tempfilename1;
|
||||
|
||||
// System.IO.File.Copy(tempfilename,tempfilename1, true);
|
||||
// Process.Start(tempfilename1);
|
||||
// break;
|
||||
// }
|
||||
|
||||
// }
|
||||
}
|
||||
catch (Exception e) {
|
||||
Logging.Logging.Debug("Start Nativ: " + e.Message, "OnDoc", "");
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user