Sicherung
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using NHotkey;
|
||||
using NHotkey.Wpf;
|
||||
using System.Collections;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using FSI.Lib.Helpers;
|
||||
using FSI.Lib.CompareNetObjects;
|
||||
using FSI.Lib.Guis.SetSizePosExWindow;
|
||||
using Config.Net.Stores;
|
||||
using System.IO;
|
||||
using Config.Net;
|
||||
|
||||
namespace FSI.BT.Tools
|
||||
{
|
||||
@@ -17,13 +17,21 @@ namespace FSI.BT.Tools
|
||||
{
|
||||
private static readonly KeyGesture RadialMenu = new KeyGesture(Key.OemBackslash, ModifierKeys.Control);
|
||||
private static readonly KeyGesture TimeStamp = new KeyGesture(Key.C, ModifierKeys.Control | ModifierKeys.Alt);
|
||||
|
||||
|
||||
public void Application_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
|
||||
Global.Log.Info("Anwendung wurde gestartet!");
|
||||
|
||||
Global.Settings = new AppSettings(GetType().Namespace.ToString() + ".xml");
|
||||
Global.Settings.Load();
|
||||
|
||||
JsonConfigStore _store = new JsonConfigStore(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "config.json"), true);
|
||||
Global.AppSettings = new ConfigurationBuilder<Settings.AppSettings.IAppSettings>()
|
||||
.UseConfigStore(_store)
|
||||
.Build();
|
||||
|
||||
Global.TaskbarIcon = (TaskbarIcon)FindResource("FSINotifyIcon");
|
||||
|
||||
Global.AdminRights = Admin.CheckAdminRight();
|
||||
|
||||
@@ -8,8 +8,7 @@ namespace FSI.BT.Tools
|
||||
|
||||
public AppSettings(string fileName) : base(fileName)
|
||||
{
|
||||
TimeStampFormat = "_yyyyMMdd_HHmmss";
|
||||
EplArguments = "/Variant:\"Electric P8\"";
|
||||
|
||||
SuperAdmin = "maier_s";
|
||||
}
|
||||
|
||||
@@ -19,45 +18,45 @@ namespace FSI.BT.Tools
|
||||
public string[] Admins { get; set; }
|
||||
[EncryptedSetting]
|
||||
public string SuperAdmin { get; set; }
|
||||
public string TimeStampFormat { get; set; }
|
||||
public string[] SieSimaticManagerExe { get; set; }
|
||||
public string[] SieTiaV13Exe { get; set; }
|
||||
public string[] SieTiaV14Exe { get; set; }
|
||||
public string[] SieTiaV15Exe { get; set; }
|
||||
public string[] SieTiaV16Exe { get; set; }
|
||||
public string[] SieTiaV17Exe { get; set; }
|
||||
public string[] SieTiaVStarterExe { get; set; }
|
||||
//public string TimeStampFormat { get; set; }
|
||||
//public string[] SieSimaticManagerExe { get; set; }
|
||||
//public string[] SieTiaV13Exe { get; set; }
|
||||
//public string[] SieTiaV14Exe { get; set; }
|
||||
//public string[] SieTiaV15Exe { get; set; }
|
||||
//public string[] SieTiaV16Exe { get; set; }
|
||||
//public string[] SieTiaV17Exe { get; set; }
|
||||
//public string[] SieTiaVStarterExe { get; set; }
|
||||
public string[] EplExe { get; set; }
|
||||
public string EplArguments { get; set; }
|
||||
public string[] NppExe { get; set; }
|
||||
public string[] TotalCmdExe { get; set; }
|
||||
public string[] TeXstudioExe { get; set; }
|
||||
public string[] TeXstudioPath { get; set; }
|
||||
public string[] VsExe { get; set; }
|
||||
public string[] VsCodeExe { get; set; }
|
||||
public string[] RdpExe { get; set; }
|
||||
public string[] OutlookExe { get; set; }
|
||||
public string[] TeamsExe { get; set; }
|
||||
public string TeamsArg { get; set; }
|
||||
public string[] ExcelExe { get; set; }
|
||||
public string[] WordExe { get; set; }
|
||||
public string[] PaintNetExe { get; set; }
|
||||
public string[] GimpExe { get; set; }
|
||||
public string[] VncExe { get; set; }
|
||||
public string[] VncAdrBookExe { get; set; }
|
||||
public string[] IbaAnalyzerExe { get; set; }
|
||||
public string ZentralWebUrl { get; set; }
|
||||
public string SchichtbuchUrl { get; set; }
|
||||
public string SPSUrl { get; set; }
|
||||
public string Pl1PlsUrl { get; set; }
|
||||
public string Pl2PlsUrl { get; set; }
|
||||
public string Pl2Als { get; set; }
|
||||
public string Pl3PlsUrl { get; set; }
|
||||
public string GiteaUrl { get; set; }
|
||||
public string WikiUrl { get; set; }
|
||||
public string ErpUrl { get; set; }
|
||||
public string EplPdfPath { get; set; }
|
||||
public string EplPrjPath { get; set; }
|
||||
//public string EplArguments { get; set; }
|
||||
//public string[] NppExe { get; set; }
|
||||
//public string[] TotalCmdExe { get; set; }
|
||||
//public string[] TeXstudioExe { get; set; }
|
||||
//public string[] TeXstudioPath { get; set; }
|
||||
//public string[] VsExe { get; set; }
|
||||
//public string[] VsCodeExe { get; set; }
|
||||
//public string[] RdpExe { get; set; }
|
||||
//public string[] OutlookExe { get; set; }
|
||||
//public string[] TeamsExe { get; set; }
|
||||
//public string TeamsArg { get; set; }
|
||||
//public string[] ExcelExe { get; set; }
|
||||
//public string[] WordExe { get; set; }
|
||||
//public string[] PaintNetExe { get; set; }
|
||||
//public string[] GimpExe { get; set; }
|
||||
//public string[] VncExe { get; set; }
|
||||
//public string[] VncAdrBookExe { get; set; }
|
||||
//public string[] IbaAnalyzerExe { get; set; }
|
||||
//public string ZentralWebUrl { get; set; }
|
||||
//public string SchichtbuchUrl { get; set; }
|
||||
//public string SPSUrl { get; set; }
|
||||
//public string Pl1PlsUrl { get; set; }
|
||||
//public string Pl2PlsUrl { get; set; }
|
||||
//public string Pl2Als { get; set; }
|
||||
//public string Pl3PlsUrl { get; set; }
|
||||
//public string GiteaUrl { get; set; }
|
||||
//public string WikiUrl { get; set; }
|
||||
//public string ErpUrl { get; set; }
|
||||
//public string EplPdfPath { get; set; }
|
||||
//public string EplPrjPath { get; set; }
|
||||
public bool SieTiaWinCCMsgMgtAutostart { get; set; }
|
||||
public int SieTiaWinCCMsgMgtUpdateIntervall { get; set; }
|
||||
public string SieTiaWinCCMsgMgtWindowsName { get; set; }
|
||||
@@ -66,13 +65,14 @@ namespace FSI.BT.Tools
|
||||
public bool IbaAutoSync { get; set; }
|
||||
public string IbaRecordSourcePath { get; set; }
|
||||
public string IbaRecordDestinationath { get; set; }
|
||||
public string[] WindowMgtName { get; set; }
|
||||
public string[] WindowMgtClassName { get; set; }
|
||||
public int WindowMgtUpdateInterval { get; set; }
|
||||
public bool WindowMgtAutostart { get; set; }
|
||||
public int[] WindowMgtX { get; set; }
|
||||
public int[] WindowMgtY { get; set; }
|
||||
public int[] WindowMgtHeight { get; set; }
|
||||
public int[] WindowMgtWight { get; set; }
|
||||
public string[] WindowMgtBezeichnung { get; set; }
|
||||
public string[] WindowMgtName { get; set; }
|
||||
public string[] WindowMgtClassName { get; set; }
|
||||
public string[] WindowMgtX { get; set; }
|
||||
public string[] WindowMgtY { get; set; }
|
||||
public string[] WindowMgtHeight { get; set; }
|
||||
public string[] WindowMgtWight { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace FSI.BT.Tools.Commands
|
||||
{
|
||||
public override void Execute(object parameter)
|
||||
{
|
||||
Global.Log.Info("Anwendung wurde beendet!");
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,15 @@ namespace FSI.BT.Tools.Commands
|
||||
|
||||
Global.UserRights =
|
||||
Global.AdminRights = frmMain.PwOk;
|
||||
|
||||
if (frmMain.PwOk)
|
||||
{
|
||||
Global.Log.Info("Admin-Passowrt wurde korrekt eingegben.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.Log.Info("Anmeldung wurde vom Benutzer abgebrochen.");
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanExecute(object parameter)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using FSI.Lib;
|
||||
using FSI.BT.Tools.Settings;
|
||||
using FSI.Lib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace FSI.BT.Tools.Commands
|
||||
@@ -13,53 +16,52 @@ namespace FSI.BT.Tools.Commands
|
||||
{
|
||||
public override void Execute(object parameter)
|
||||
{
|
||||
string[] files = new string[] { };
|
||||
string[] pathes = new string[] { };
|
||||
string arguments = string.Empty;
|
||||
IEnumerable<Settings.Exe.IExe> files = new List<Settings.Exe.IExe>();
|
||||
(string ExePath, string Path, string Arguments) selectedFile = (string.Empty, string.Empty, string.Empty);
|
||||
|
||||
switch ((string)parameter)
|
||||
{
|
||||
case "SimaticManager":
|
||||
files = Global.Settings.SieSimaticManagerExe;
|
||||
files = Global.AppSettings.Apps.SieSimaticManager;
|
||||
break;
|
||||
|
||||
case "TIAv13":
|
||||
files = Global.Settings.SieTiaV13Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV13;
|
||||
break;
|
||||
|
||||
case "TIAv14":
|
||||
files = Global.Settings.SieTiaV14Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV14;
|
||||
break;
|
||||
|
||||
case "TIAv15":
|
||||
files = Global.Settings.SieTiaV15Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV15;
|
||||
break;
|
||||
|
||||
case "TIAv16":
|
||||
files = Global.Settings.SieTiaV16Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV16;
|
||||
break;
|
||||
|
||||
case "TIAv17":
|
||||
files = Global.Settings.SieTiaV17Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV17;
|
||||
break;
|
||||
|
||||
case "Starter":
|
||||
files = Global.Settings.SieTiaVStarterExe;
|
||||
files = Global.AppSettings.Apps.SieTiaVStarter;
|
||||
break;
|
||||
|
||||
case "Epl":
|
||||
files = Global.Settings.EplExe;
|
||||
arguments = Global.Settings.EplArguments;
|
||||
files = Global.AppSettings.Apps.Epl;
|
||||
break;
|
||||
|
||||
case "EplPrj":
|
||||
selectedFile = GetApp(Global.AppSettings.Apps.Epl);
|
||||
Lib.Guis.Prj.Mgt.FrmMain frmMainEplPrj = new Lib.Guis.Prj.Mgt.FrmMain()
|
||||
{
|
||||
ShowPdf = false,
|
||||
CloseAtLostFocus = true,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||
Path = Global.Settings.EplPrjPath,
|
||||
EplExes = Global.Settings.EplExe,
|
||||
Path = FSI.BT.Tools.Settings.AppSettings.GetFolderByName(Global.AppSettings.Folders, "EplPrj").path,
|
||||
EplExe = selectedFile.ExePath,
|
||||
};
|
||||
frmMainEplPrj.Show();
|
||||
return;
|
||||
@@ -70,7 +72,7 @@ namespace FSI.BT.Tools.Commands
|
||||
ShowPdf = true,
|
||||
CloseAtLostFocus = true,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||
Path = Global.Settings.EplPdfPath,
|
||||
Path = FSI.BT.Tools.Settings.AppSettings.GetFolderByName(Global.AppSettings.Folders, "EplPdf").path
|
||||
};
|
||||
frmMainEplPdf.Show();
|
||||
return;
|
||||
@@ -84,29 +86,28 @@ namespace FSI.BT.Tools.Commands
|
||||
return;
|
||||
|
||||
case "Npp":
|
||||
files = Global.Settings.NppExe;
|
||||
files = Global.AppSettings.Apps.Npp;
|
||||
break;
|
||||
|
||||
case "TotalCmd":
|
||||
files = Global.Settings.TotalCmdExe;
|
||||
files = Global.AppSettings.Apps.TotalCmd;
|
||||
break;
|
||||
|
||||
case "TeXstudio":
|
||||
files = Global.Settings.TeXstudioExe;
|
||||
pathes = Global.Settings.TeXstudioPath;
|
||||
files = Global.AppSettings.Apps.TeXstudio;
|
||||
break;
|
||||
|
||||
case "VS":
|
||||
files = Global.Settings.VsExe;
|
||||
files = Global.AppSettings.Apps.Vs;
|
||||
break;
|
||||
|
||||
case "VS.Code":
|
||||
files = Global.Settings.VsCodeExe;
|
||||
files = Global.AppSettings.Apps.VsCode;
|
||||
break;
|
||||
|
||||
|
||||
case "Rdp":
|
||||
files = Global.Settings.RdpExe;
|
||||
files = Global.AppSettings.Apps.Rdp;
|
||||
break;
|
||||
|
||||
case "DeEncrypt":
|
||||
@@ -139,84 +140,80 @@ namespace FSI.BT.Tools.Commands
|
||||
}
|
||||
return;
|
||||
|
||||
case "Folder":
|
||||
Lib.Guis.Folder.Mgt.FrmMain frmFolderMgtMain = new Lib.Guis.Folder.Mgt.FrmMain()
|
||||
{
|
||||
CloseAtLostFocus = true,
|
||||
Data = Global.AppSettings.Folders
|
||||
};
|
||||
frmFolderMgtMain.Show();
|
||||
return;
|
||||
|
||||
//case "TxtToClip":
|
||||
// Lib.Guis.TxtToClip.Mgt.FrmMain frmTxtToClipMain = new Lib.Guis.TxtToClip.Mgt.FrmMain()
|
||||
// {
|
||||
// CloseAtLostFocus = false,
|
||||
// Data = Global.AppSettings.TxtToClip
|
||||
// };
|
||||
// frmTxtToClipMain.Show();
|
||||
// return;
|
||||
|
||||
case "Outlook":
|
||||
files = Global.Settings.OutlookExe;
|
||||
files = Global.AppSettings.Apps.Outlook;
|
||||
break;
|
||||
|
||||
case "Teams":
|
||||
files = Global.Settings.TeamsExe;
|
||||
arguments = Global.Settings.TeamsArg;
|
||||
files = Global.AppSettings.Apps.Teams;
|
||||
break;
|
||||
|
||||
case "Excel":
|
||||
files = Global.Settings.ExcelExe;
|
||||
files = Global.AppSettings.Apps.Excel;
|
||||
break;
|
||||
|
||||
case "Word":
|
||||
files = Global.Settings.WordExe;
|
||||
files = Global.AppSettings.Apps.Word;
|
||||
break;
|
||||
|
||||
case "PaintNet":
|
||||
files = Global.Settings.PaintNetExe;
|
||||
files = Global.AppSettings.Apps.PaintNet;
|
||||
break;
|
||||
|
||||
case "Gimp":
|
||||
files = Global.Settings.GimpExe;
|
||||
files = Global.AppSettings.Apps.Gimp;
|
||||
break;
|
||||
|
||||
case "Vnc":
|
||||
files = Global.Settings.VncExe;
|
||||
files = Global.AppSettings.Apps.Vnc;
|
||||
break;
|
||||
|
||||
case "VncAdrBook":
|
||||
files = Global.Settings.VncAdrBookExe;
|
||||
files = Global.AppSettings.Apps.VncAdrBook;
|
||||
break;
|
||||
|
||||
case "IbaAnalyzer":
|
||||
files = Global.Settings.VncAdrBookExe;
|
||||
files = Global.AppSettings.Apps.IbaAnalyzer;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
string fileName = string.Empty;
|
||||
string path = string.Empty;
|
||||
selectedFile = GetApp(files);
|
||||
|
||||
for (int i = 0; i <= files.Length - 1; i++)
|
||||
if (ProgramIsRunning(selectedFile.ExePath))
|
||||
{
|
||||
var test = Environment.ExpandEnvironmentVariables(files[i].Trim());
|
||||
if (File.Exists(Environment.ExpandEnvironmentVariables(files[i].Trim())))
|
||||
{
|
||||
fileName = Environment.ExpandEnvironmentVariables(files[i].Trim());
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pathes.Length == 0)
|
||||
{
|
||||
path = Path.GetDirectoryName(fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = Environment.ExpandEnvironmentVariables(pathes[i].Trim());
|
||||
}
|
||||
}
|
||||
|
||||
if (ProgramIsRunning(fileName))
|
||||
{
|
||||
ProgramToFront(fileName);
|
||||
ProgramToFront(selectedFile.ExePath);
|
||||
Global.Log.Info("Anwendung \"{0}\" wurde in den Vordergrund gebracht", selectedFile.ExePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Process process = new Process();
|
||||
process.StartInfo.FileName = fileName;
|
||||
process.StartInfo.WorkingDirectory = path;
|
||||
process.StartInfo.Arguments = arguments;
|
||||
process.StartInfo.FileName = selectedFile.ExePath;
|
||||
process.StartInfo.WorkingDirectory = selectedFile.Path;
|
||||
process.StartInfo.Arguments = selectedFile.Arguments;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
process.Start();
|
||||
Global.Log.Info("Anwendung \"{0}\" wurde gestartet", selectedFile.ExePath);
|
||||
}
|
||||
catch (System.ComponentModel.Win32Exception ex) when (ex.NativeErrorCode == 740)
|
||||
{
|
||||
@@ -225,47 +222,51 @@ namespace FSI.BT.Tools.Commands
|
||||
process.StartInfo.UseShellExecute = true;
|
||||
process.StartInfo.Verb = "runas";
|
||||
process.Start();
|
||||
Global.Log.Info("Anwendung \"{0}\" wurde als Admin gestartet", selectedFile.ExePath);
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
Global.Log.Info("Anwendung konnte durch folgenden Fehler \"{0}\" nicht gestartet werden.", ex2.Message);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanExecute(object parameter)
|
||||
{
|
||||
string[] files = new string[] { };
|
||||
IEnumerable<Settings.Exe.IExe> files = new List<Settings.Exe.IExe>();
|
||||
switch ((string)parameter)
|
||||
{
|
||||
case "SimaticManager":
|
||||
files = Global.Settings.SieSimaticManagerExe;
|
||||
files = Global.AppSettings.Apps.SieSimaticManager;
|
||||
break;
|
||||
|
||||
case "TIAv13":
|
||||
files = Global.Settings.SieTiaV13Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV13;
|
||||
break;
|
||||
|
||||
case "TIAv14":
|
||||
files = Global.Settings.SieTiaV14Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV14;
|
||||
break;
|
||||
|
||||
case "TIAv15":
|
||||
files = Global.Settings.SieTiaV13Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV15;
|
||||
break;
|
||||
|
||||
case "TIAv16":
|
||||
files = Global.Settings.SieTiaV16Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV16;
|
||||
break;
|
||||
|
||||
case "TIAv17":
|
||||
files = Global.Settings.SieTiaV17Exe;
|
||||
files = Global.AppSettings.Apps.SieTiaV17;
|
||||
break;
|
||||
|
||||
case "Starter":
|
||||
files = Global.Settings.SieTiaVStarterExe;
|
||||
files = Global.AppSettings.Apps.SieTiaVStarter;
|
||||
break;
|
||||
|
||||
case "Epl":
|
||||
files = Global.Settings.EplExe;
|
||||
files = Global.AppSettings.Apps.Epl;
|
||||
break;
|
||||
|
||||
case "EplPrj":
|
||||
@@ -278,28 +279,27 @@ namespace FSI.BT.Tools.Commands
|
||||
return Global.AdminRights;
|
||||
|
||||
case "Npp":
|
||||
files = Global.Settings.NppExe;
|
||||
files = Global.AppSettings.Apps.Npp;
|
||||
break;
|
||||
|
||||
case "TotalCmd":
|
||||
files = Global.Settings.TotalCmdExe;
|
||||
files = Global.AppSettings.Apps.TotalCmd;
|
||||
break;
|
||||
|
||||
case "TeXstudio":
|
||||
files = Global.Settings.TeXstudioExe;
|
||||
files = Global.AppSettings.Apps.TeXstudio;
|
||||
break;
|
||||
|
||||
case "VS":
|
||||
files = Global.Settings.VsExe;
|
||||
files = Global.AppSettings.Apps.Vs;
|
||||
break;
|
||||
|
||||
case "VS.Code":
|
||||
files = Global.Settings.VsCodeExe;
|
||||
files = Global.AppSettings.Apps.VsCode;
|
||||
break;
|
||||
|
||||
|
||||
case "Rdp":
|
||||
files = Global.Settings.RdpExe;
|
||||
files = Global.AppSettings.Apps.Rdp;
|
||||
break;
|
||||
|
||||
case "DeEncrypt":
|
||||
@@ -311,49 +311,55 @@ namespace FSI.BT.Tools.Commands
|
||||
case "Admin":
|
||||
return Global.SuperAdminRights;
|
||||
|
||||
case "Folder":
|
||||
return Global.AppSettings.Folders != null;
|
||||
|
||||
//case "TxtToClip":
|
||||
// return Global.AppSettings.TxtToClip != null;
|
||||
|
||||
case "Outlook":
|
||||
files = Global.Settings.OutlookExe;
|
||||
files = Global.AppSettings.Apps.Outlook;
|
||||
break;
|
||||
|
||||
case "Teams":
|
||||
files = Global.Settings.TeamsExe;
|
||||
files = Global.AppSettings.Apps.Teams;
|
||||
break;
|
||||
|
||||
case "Excel":
|
||||
files = Global.Settings.ExcelExe;
|
||||
files = Global.AppSettings.Apps.Excel;
|
||||
break;
|
||||
|
||||
case "Word":
|
||||
files = Global.Settings.WordExe;
|
||||
files = Global.AppSettings.Apps.Word;
|
||||
break;
|
||||
|
||||
case "PaintNet":
|
||||
files = Global.Settings.PaintNetExe;
|
||||
files = Global.AppSettings.Apps.PaintNet;
|
||||
break;
|
||||
|
||||
case "Gimp":
|
||||
files = Global.Settings.GimpExe;
|
||||
files = Global.AppSettings.Apps.Gimp;
|
||||
break;
|
||||
|
||||
case "Vnc":
|
||||
files = Global.Settings.VncExe;
|
||||
files = Global.AppSettings.Apps.Vnc;
|
||||
break;
|
||||
|
||||
case "VncAdrBook":
|
||||
files = Global.Settings.VncAdrBookExe;
|
||||
files = Global.AppSettings.Apps.VncAdrBook;
|
||||
break;
|
||||
|
||||
case "IbaAnalyzer":
|
||||
files = Global.Settings.VncAdrBookExe;
|
||||
files = Global.AppSettings.Apps.IbaAnalyzer;
|
||||
break;
|
||||
|
||||
default: return false;
|
||||
|
||||
}
|
||||
|
||||
foreach (string file in files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (File.Exists(Environment.ExpandEnvironmentVariables(file.Trim())))
|
||||
if (File.Exists(Environment.ExpandEnvironmentVariables(file.ExePath.Trim())))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -382,6 +388,36 @@ namespace FSI.BT.Tools.Commands
|
||||
return isRunning;
|
||||
}
|
||||
|
||||
private (string ExePath, string Path, string Arguments) GetApp(IEnumerable<Settings.Exe.IExe> files)
|
||||
{
|
||||
(string ExePath, string Path, string Arguments) selectedFile = (string.Empty, string.Empty, string.Empty);
|
||||
|
||||
for (int i = 0; i < files.ToList().Count; i++)
|
||||
{
|
||||
if (File.Exists(Environment.ExpandEnvironmentVariables(files.ToList()[i].ExePath.Trim())))
|
||||
{
|
||||
selectedFile.ExePath = Environment.ExpandEnvironmentVariables(files.ToList()[i].ExePath.Trim());
|
||||
selectedFile.Arguments = files.ToList()[i].Arguments;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (selectedFile.Path == String.Empty)
|
||||
{
|
||||
selectedFile.Path = Path.GetDirectoryName(selectedFile.ExePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedFile.Path = Path.GetDirectoryName(files.ToList()[i].ExePath.Trim());
|
||||
//selectedFile.Path = Environment.ExpandEnvironmentVariables(files.ToList()[i].ExePath.Trim());
|
||||
}
|
||||
}
|
||||
|
||||
return selectedFile;
|
||||
}
|
||||
|
||||
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
||||
private static extern bool SetForegroundWindow(IntPtr handle);
|
||||
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
||||
|
||||
@@ -16,43 +16,43 @@ namespace FSI.BT.Tools.Commands
|
||||
switch ((string)parameter)
|
||||
{
|
||||
case "ZentralWeb":
|
||||
url = Global.Settings.ZentralWebUrl;
|
||||
url = Global.AppSettings.Urls.ZentralWeb;
|
||||
break;
|
||||
|
||||
case "Schichtbuch":
|
||||
url = Global.Settings.SchichtbuchUrl;
|
||||
url = Global.AppSettings.Urls.Schichtbuch;
|
||||
break;
|
||||
|
||||
case "SPS":
|
||||
url = Global.Settings.SPSUrl;
|
||||
url = Global.AppSettings.Urls.SPS;
|
||||
break;
|
||||
|
||||
case "PL1.Pls":
|
||||
url = Global.Settings.Pl1PlsUrl;
|
||||
url = Global.AppSettings.Urls.Pl1Pls;
|
||||
break;
|
||||
|
||||
case "PL2.Pls":
|
||||
url = Global.Settings.Pl2PlsUrl;
|
||||
url = Global.AppSettings.Urls.Pl2Pls;
|
||||
break;
|
||||
|
||||
case "PL2.Als":
|
||||
url = Global.Settings.Pl2Als;
|
||||
url = Global.AppSettings.Urls.Pl2Als;
|
||||
break;
|
||||
|
||||
case "PL3.Pls":
|
||||
url = Global.Settings.Pl3PlsUrl;
|
||||
url = Global.AppSettings.Urls.Pl3Pls;
|
||||
break;
|
||||
|
||||
case "FSI.Gitea":
|
||||
url = Global.Settings.GiteaUrl;
|
||||
url = Global.AppSettings.Urls.Gitea;
|
||||
break;
|
||||
|
||||
case "FSI.Wiki":
|
||||
url = Global.Settings.WikiUrl;
|
||||
url = Global.AppSettings.Urls.Wiki;
|
||||
break;
|
||||
|
||||
case "Erp":
|
||||
url = Global.Settings.ErpUrl;
|
||||
url = Global.AppSettings.Urls.Erp;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace FSI.BT.Tools.Commands
|
||||
|
||||
url = url.Replace("&", "^&");
|
||||
Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });
|
||||
Global.Log.Info("Link \"{0}\" wurde geföffnet.", url);
|
||||
}
|
||||
|
||||
public override bool CanExecute(object parameter)
|
||||
|
||||
@@ -10,13 +10,16 @@ namespace FSI.BT.Tools.Commands
|
||||
{
|
||||
public override void Execute(object parameter)
|
||||
{
|
||||
System.Windows.Forms.Clipboard.SetDataObject(DateTime.Now.ToString(Global.Settings.TimeStampFormat));
|
||||
var timeStampFormat = Global.AppSettings.TimeStampFormat.Value;
|
||||
System.Windows.Forms.Clipboard.SetDataObject(DateTime.Now.ToString(timeStampFormat));
|
||||
Global.Log.Debug("Zeitstempel \"{0}\" wurde in die Zwischenablage kopiert.", DateTime.Now.ToString(timeStampFormat));
|
||||
|
||||
var balloon = new ToolTip()
|
||||
{
|
||||
BalloonText = "Zeitstempel",
|
||||
BalloonDesc = "Der aktuelle Zeitstempel wurde in die Zwischenablage kopiert."
|
||||
};
|
||||
Global.TaskbarIcon.ShowCustomBalloon(balloon, PopupAnimation.Slide, 2000);
|
||||
Global.TaskbarIcon.ShowCustomBalloon(balloon, PopupAnimation.Slide, 2000);
|
||||
}
|
||||
|
||||
public override bool CanExecute(object parameter)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
@@ -13,9 +12,9 @@
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Icons\Folders.png" />
|
||||
<None Remove="Icons\Iba.jpg" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -59,10 +58,16 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Config.Net\Config.Net.csproj" />
|
||||
<ProjectReference Include="..\FSI.Lib\FSI.Lib\FSI.Lib.csproj" />
|
||||
<ProjectReference Include="..\NHotkey\NHotkey.Wpf\NHotkey.Wpf.csproj" />
|
||||
<ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf\NotifyIconWpf.csproj" />
|
||||
<ProjectReference Include="..\RadialMenu\RadialMenu.csproj" />
|
||||
<ProjectReference Include="..\RoboSharp\RoboSharp.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -75,6 +80,7 @@
|
||||
<Resource Include="Icons\EplP8.png" />
|
||||
<Resource Include="Icons\Erp.png" />
|
||||
<Resource Include="Icons\Excel.png" />
|
||||
<Resource Include="Icons\Folders.png" />
|
||||
<Resource Include="Icons\FondiumU.ico" />
|
||||
<Resource Include="Icons\FU.png" />
|
||||
<Resource Include="Icons\Gimp.png" />
|
||||
@@ -107,9 +113,17 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="config.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="FSI.BT.Tools.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ProjectExtensions><VisualStudio><UserProperties config_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<Settings>
|
||||
<Users>+I945AMzKKYBAAAAB21haWVyX3M=</Users>
|
||||
<Admins>e+Dt7FRUDDoBAAAAB21haWVyX3M=</Admins>
|
||||
|
||||
|
||||
<TimeStampFormat>_yyyyMMdd_HHmmss</TimeStampFormat>
|
||||
|
||||
|
||||
<SieSimaticManagerExe>C:\Program Files (x86)\Siemens\Step7\S7BIN\S7tgtopx.exe</SieSimaticManagerExe>
|
||||
<SieTiaV13Exe>C:\Program Files (x86)\Siemens\Automation\Portal V13\Bin\Siemens.Automation.Portal.exe</SieTiaV13Exe>
|
||||
<SieTiaV14Exe>C:\Program Files\Siemens\Automation\Portal V14\Bin\Siemens.Automation.Portal.exe</SieTiaV14Exe>
|
||||
@@ -31,7 +31,7 @@
|
||||
<VncExe>C:\Program Files\RealVNC\VNC Viewer\vncviewer.exe,c:\Users\maier_s\OneDrive - Fondium Group GmbH\Documents\Apps\VNC-Viewer-6.20.113-Windows-64bit.exe</VncExe>
|
||||
<VncAdrBookExe>C:\Program Files\RealVNC\VNC Viewer\vncaddrbook.exe</VncAdrBookExe>
|
||||
<IbaAnalyzerExe>C:\Program Files\iba\ibaAnalyzer\ibaAnalyzer.exe</IbaAnalyzerExe>
|
||||
|
||||
|
||||
<ZentralWebUrl>http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1</ZentralWebUrl>
|
||||
<SchichtbuchUrl>http://10.10.1.42/SKSchichtbuchWeb/de-DE/Plugin/ShiftBook/ShiftBook/IR</SchichtbuchUrl>
|
||||
<SPSUrl>http://10.10.1.42/SKChangeTrackerWeb/de-DE/Plugin/ChangeTracker</SPSUrl>
|
||||
@@ -42,17 +42,27 @@
|
||||
<GiteaUrl>http://desiaugetc7-088:3000/</GiteaUrl>
|
||||
<WikiUrl>http://desiaugetc7-088:3001/en/home</WikiUrl>
|
||||
<ErpUrl>https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd</ErpUrl>
|
||||
|
||||
|
||||
<EplPdfPath>\\10.10.1.40\Betriebstechnik\Eplan</EplPdfPath>
|
||||
<EplPrjPath>\\fondium.org\DESI$\AUG_Abteilung\Betriebstechnik\EPL\P8\Data\Projekte\FSI\</EplPrjPath>
|
||||
|
||||
|
||||
<SieTiaWinCCMsgMgtAutostart>true</SieTiaWinCCMsgMgtAutostart>
|
||||
<SieTiaWinCCMsgMgtUpdateIntervall>10</SieTiaWinCCMsgMgtUpdateIntervall>
|
||||
<SieTiaWinCCMsgMgtWindowsName></SieTiaWinCCMsgMgtWindowsName>
|
||||
<SieTiaWinCCMsgMgtClassName>#32770</SieTiaWinCCMsgMgtClassName>
|
||||
<SieTiaWinCCMsgMgtBtnName>Zur Kenntnis genommen</SieTiaWinCCMsgMgtBtnName>
|
||||
|
||||
|
||||
<IbaAutoSync>true</IbaAutoSync>
|
||||
<IbaRecordSourcePath>d:\tmp</IbaRecordSourcePath>
|
||||
<IbaRecordDestinationath>c:\tmp</IbaRecordDestinationath>
|
||||
|
||||
<WindowMgtAutostart>false</WindowMgtAutostart>
|
||||
<WindowMgtUpdateInterval>10</WindowMgtUpdateInterval>
|
||||
<WindowMgtBezeichnung>Starter Trace</WindowMgtBezeichnung>
|
||||
<WindowMgtName>Signalauswahl Trace</WindowMgtName>
|
||||
<WindowMgtClassName>#32770</WindowMgtClassName>
|
||||
<WindowMgtX>10</WindowMgtX>
|
||||
<WindowMgtY>10</WindowMgtY>
|
||||
<WindowMgtHeight>800</WindowMgtHeight>
|
||||
<WindowMgtWight>1000</WindowMgtWight>
|
||||
</Settings>
|
||||
@@ -363,6 +363,39 @@
|
||||
</WrapPanel>
|
||||
</RadialMenu:RadialMenuItem>
|
||||
|
||||
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
|
||||
CommandParameter="Folder">
|
||||
<WrapPanel Orientation="Vertical">
|
||||
<Rectangle Width="40"
|
||||
Height="40">
|
||||
<Rectangle.Fill>
|
||||
<ImageBrush ImageSource="../../Icons/Folders.png" />
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<TextBlock FontSize="14"
|
||||
TextAlignment="Center">
|
||||
Verzeichnisse
|
||||
</TextBlock>
|
||||
</WrapPanel>
|
||||
</RadialMenu:RadialMenuItem>
|
||||
|
||||
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
|
||||
CommandParameter="TxtToClip">
|
||||
<WrapPanel Orientation="Vertical">
|
||||
<Rectangle Width="40"
|
||||
Height="40">
|
||||
<Rectangle.Fill>
|
||||
<ImageBrush ImageSource="../../Icons/Folders.png" />
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<TextBlock FontSize="14"
|
||||
TextAlignment="Center">
|
||||
Verzeichnisse
|
||||
</TextBlock>
|
||||
</WrapPanel>
|
||||
</RadialMenu:RadialMenuItem>
|
||||
|
||||
|
||||
</RadialMenu:RadialMenu>
|
||||
|
||||
<RadialMenu:RadialMenu IsOpen="{Binding IsOpenSie}">
|
||||
|
||||
@@ -1,50 +1,59 @@
|
||||
using FSI.Lib.Guis.IbaDirSync.ViewModel;
|
||||
using Config.Net.Stores;
|
||||
using FSI.Lib.Guis.IbaDirSync.ViewModel;
|
||||
using FSI.Lib.Guis.SetSizePosExWindow.ViewModel;
|
||||
using FSI.Lib.Guis.SieTiaWinCCMsgMgt.ViewModel;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog;
|
||||
|
||||
namespace FSI.BT.Tools
|
||||
{
|
||||
internal static class Global
|
||||
{
|
||||
public static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
public static FrmRadialMenu FrmRadialMenu { get; set; }
|
||||
public static TaskbarIcon TaskbarIcon { get; set; }
|
||||
public static ViewModelWinCC WinCC { get; set; }
|
||||
public static AppSettings Settings { get; set; }
|
||||
|
||||
public static Settings.AppSettings.IAppSettings AppSettings { get; set; }
|
||||
|
||||
public static ViewModelIba Iba { get; set; }
|
||||
public static ViewModelWindow WindowMgt { get; set; }
|
||||
public static bool UserRights { get; set; }
|
||||
public static bool AdminRights { get; set; }
|
||||
public static bool SuperAdminRights { get; set; }
|
||||
|
||||
|
||||
public static class Window
|
||||
{
|
||||
public static void Load()
|
||||
{
|
||||
for (int i = 0; i < Global.Settings.WindowMgtName.Length; i++)
|
||||
for (int i = 0; i < Global.Settings.WindowMgtBezeichnung.Length; i++)
|
||||
{
|
||||
WindowMgt.Windows.Add(new Lib.Guis.SetSizePosExWindow.Model.Window
|
||||
{
|
||||
Bezeichnung = Global.Settings.WindowMgtBezeichnung[i],
|
||||
Name = Global.Settings.WindowMgtName[i],
|
||||
ClassName = Global.Settings.WindowMgtClassName[i],
|
||||
Height = Global.Settings.WindowMgtHeight[i],
|
||||
Width = Global.Settings.WindowMgtWight[i],
|
||||
X = Global.Settings.WindowMgtX[i],
|
||||
Y = Global.Settings.WindowMgtY[i],
|
||||
Height = int.Parse(Global.Settings.WindowMgtHeight[i]),
|
||||
Width = int.Parse(Global.Settings.WindowMgtWight[i]),
|
||||
X = int.Parse(Global.Settings.WindowMgtX[i]),
|
||||
Y = int.Parse(Global.Settings.WindowMgtY[i]),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Save()
|
||||
{
|
||||
for (int i = 0; i < Global.WindowMgt.Windows.Count; i++)
|
||||
{
|
||||
Global.Settings.WindowMgtBezeichnung[i] = Global.WindowMgt.Windows[i].Bezeichnung;
|
||||
Global.Settings.WindowMgtName[i] = Global.WindowMgt.Windows[i].Name;
|
||||
Global.Settings.WindowMgtClassName[i] = Global.WindowMgt.Windows[i].ClassName;
|
||||
Global.Settings.WindowMgtHeight[i] = Global.WindowMgt.Windows[i].Height;
|
||||
Global.Settings.WindowMgtWight[i] = Global.WindowMgt.Windows[i].Width;
|
||||
Global.Settings.WindowMgtX[i] = Global.WindowMgt.Windows[i].X;
|
||||
Global.Settings.WindowMgtY[i] = Global.WindowMgt.Windows[i].Y;
|
||||
Global.Settings.WindowMgtHeight[i] = Global.WindowMgt.Windows[i].Height.ToString();
|
||||
Global.Settings.WindowMgtWight[i] = Global.WindowMgt.Windows[i].Width.ToString();
|
||||
Global.Settings.WindowMgtX[i] = Global.WindowMgt.Windows[i].X.ToString();
|
||||
Global.Settings.WindowMgtY[i] = Global.WindowMgt.Windows[i].Y.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,8 +174,8 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Fenster:"
|
||||
Margin="5 5 5 5" />
|
||||
<ComboBox ItemsSource="{Binding Plcs}"
|
||||
SelectedItem="{Binding SelectedPlc, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
<ComboBox ItemsSource="{Binding Windows}"
|
||||
SelectedItem="{Binding SelectedWindow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectedIndex="0"
|
||||
Grid.Column="1"
|
||||
@@ -186,16 +186,28 @@
|
||||
Background="Transparent" />
|
||||
<Button Content="neu"
|
||||
Name="ABC"
|
||||
Command="{Binding CmdCreatNewConnection}"
|
||||
Command="{Binding CmdNew}"
|
||||
Grid.Column="3"
|
||||
MinWidth="50"
|
||||
Margin="5 5 5 5"/>
|
||||
<Button Content="löschen"
|
||||
Command="{Binding CmdDelConnection}"
|
||||
Command="{Binding CmdDelDel}"
|
||||
Grid.Column="4"
|
||||
Margin="5 5 5 5"
|
||||
MinWidth="50" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"
|
||||
SharedSizeGroup="a" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Bezeichnung:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding SelectedWindow.Bezeichnung, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"
|
||||
@@ -205,7 +217,7 @@
|
||||
<TextBlock Text="Fenster Name:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Iba.Destination, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding SelectedWindow.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
@@ -217,7 +229,7 @@
|
||||
<TextBlock Text="Klassen Name:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Iba.Destination, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding SelectedWindow.ClassName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
@@ -229,7 +241,7 @@
|
||||
<TextBlock Text="Fenster Höhe:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Iba.Destination, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding SelectedWindow.Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
@@ -241,7 +253,7 @@
|
||||
<TextBlock Text="Fenster Breite:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Iba.Destination, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding SelectedWindow.Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
@@ -253,7 +265,7 @@
|
||||
<TextBlock Text="X-Position:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Iba.Destination, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding SelectedWindow.X, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
@@ -265,7 +277,7 @@
|
||||
<TextBlock Text="Y-Position:"
|
||||
Margin="5 5 5 5" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Iba.Destination, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding SelectedWindow.Y, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5 5 5 5" />
|
||||
</Grid>
|
||||
<Grid Margin="0 5">
|
||||
|
||||
BIN
FSI.BT.Tools/Icons/Folders.png
Normal file
BIN
FSI.BT.Tools/Icons/Folders.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
43
FSI.BT.Tools/Settings/IAppSettings.cs
Normal file
43
FSI.BT.Tools/Settings/IAppSettings.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Config.Net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public static class AppSettings
|
||||
{
|
||||
public interface IAppSettings
|
||||
{
|
||||
StringValue.IStringValue TimeStampFormat { get; set; }
|
||||
Apps.IApps Apps { get; }
|
||||
|
||||
Urls.IUrls Urls { get; }
|
||||
|
||||
IEnumerable<Folder.IFolder> Folders { get; }
|
||||
|
||||
// IEnumerable<TxtToClip.ITxtToClip> TxtToClip { get; }
|
||||
|
||||
[Option(Alias = "Folders")]
|
||||
string GetFolderByName(string fodlerName, string keyName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static (string path, string description) GetFolderByName(IEnumerable<Folder.IFolder> folders, string name)
|
||||
{
|
||||
foreach (var folder in folders)
|
||||
{
|
||||
if (folder.Name.Equals(name))
|
||||
{
|
||||
return (folder.Path, folder.Description);
|
||||
}
|
||||
}
|
||||
|
||||
return (null, null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
39
FSI.BT.Tools/Settings/IApps.cs
Normal file
39
FSI.BT.Tools/Settings/IApps.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class Apps
|
||||
{
|
||||
public interface IApps
|
||||
{
|
||||
IEnumerable<Exe.IExe> SieSimaticManager { get; }
|
||||
IEnumerable<Exe.IExe> SieTiaV13 { get; }
|
||||
IEnumerable<Exe.IExe> SieTiaV14 { get; }
|
||||
IEnumerable<Exe.IExe> SieTiaV15 { get; }
|
||||
IEnumerable<Exe.IExe> SieTiaV16 { get; }
|
||||
IEnumerable<Exe.IExe> SieTiaV17 { get; }
|
||||
IEnumerable<Exe.IExe> SieTiaVStarter { get; }
|
||||
IEnumerable<Exe.IExe> Epl { get; }
|
||||
IEnumerable<Exe.IExe> Npp { get; }
|
||||
IEnumerable<Exe.IExe> TotalCmd { get; }
|
||||
IEnumerable<Exe.IExe> TeXstudio { get; }
|
||||
IEnumerable<Exe.IExe> Vs { get; }
|
||||
IEnumerable<Exe.IExe> VsCode { get; }
|
||||
IEnumerable<Exe.IExe> Rdp { get; }
|
||||
IEnumerable<Exe.IExe> Outlook { get; }
|
||||
IEnumerable<Exe.IExe> Teams { get; }
|
||||
IEnumerable<Exe.IExe> Excel { get; }
|
||||
IEnumerable<Exe.IExe> Word { get; }
|
||||
IEnumerable<Exe.IExe> PaintNet { get; }
|
||||
IEnumerable<Exe.IExe> Gimp { get; }
|
||||
IEnumerable<Exe.IExe> Vnc { get; }
|
||||
IEnumerable<Exe.IExe> VncAdrBook { get; }
|
||||
IEnumerable<Exe.IExe> IbaAnalyzer { get; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
18
FSI.BT.Tools/Settings/IExe.cs
Normal file
18
FSI.BT.Tools/Settings/IExe.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class Exe
|
||||
{
|
||||
public interface IExe
|
||||
{
|
||||
string ExePath { get; set; }
|
||||
string Path { get; set; }
|
||||
string Arguments { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
13
FSI.BT.Tools/Settings/IFolder.cs
Normal file
13
FSI.BT.Tools/Settings/IFolder.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class Folder
|
||||
{
|
||||
public interface IFolder : Lib.Guis.Folder.Mgt.IInterface { }
|
||||
}
|
||||
}
|
||||
16
FSI.BT.Tools/Settings/IStringValue.cs
Normal file
16
FSI.BT.Tools/Settings/IStringValue.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class StringValue
|
||||
{
|
||||
public interface IStringValue
|
||||
{
|
||||
string Value { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
13
FSI.BT.Tools/Settings/ITxtToClip.cs
Normal file
13
FSI.BT.Tools/Settings/ITxtToClip.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class TxtToClip
|
||||
{
|
||||
// public interface ITxtToClip : Lib.Guis.TxtToClip.Mgt.Model.IInterface { }
|
||||
}
|
||||
}
|
||||
25
FSI.BT.Tools/Settings/IUrls.cs
Normal file
25
FSI.BT.Tools/Settings/IUrls.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class Urls
|
||||
{
|
||||
public interface IUrls
|
||||
{
|
||||
string ZentralWeb { get; }
|
||||
string Schichtbuch { get; }
|
||||
string SPS { get; }
|
||||
string Pl1Pls { get; }
|
||||
string Pl2Pls { get; }
|
||||
string Pl2Als { get; }
|
||||
string Pl3Pls { get; }
|
||||
string Gitea { get; }
|
||||
string Wiki { get; }
|
||||
string Erp { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ namespace FSI.BT.Tools
|
||||
InitializeComponent();
|
||||
TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// By subscribing to the <see cref="TaskbarIcon.BalloonClosingEvent"/>
|
||||
/// and setting the "Handled" property to true, we suppress the popup
|
||||
@@ -73,7 +74,6 @@ namespace FSI.BT.Tools
|
||||
isClosing = true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resolves the <see cref="TaskbarIcon"/> that displayed
|
||||
/// the balloon and requests a close action.
|
||||
|
||||
215
FSI.BT.Tools/config.json
Normal file
215
FSI.BT.Tools/config.json
Normal file
@@ -0,0 +1,215 @@
|
||||
{
|
||||
"TimeStampFormat": {
|
||||
"Value": "_yyyyMMdd_HHmmss"
|
||||
},
|
||||
"Apps": {
|
||||
"SieSimaticManager": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Siemens\\STEP7\\S7BIN\\S7tgtopx.exe",
|
||||
"Path": "",
|
||||
"Arguments": ""
|
||||
}
|
||||
],
|
||||
"SieTiaV13": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Siemens\\Automation\\Portal V13\\Bin\\Siemens.Automation.Portal.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Portal V13\\Bin\\Siemens.Automation.Portal.exe"
|
||||
}
|
||||
],
|
||||
"SieTiaV14": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V14\\Bin\\Siemens.Automation.Portal.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Portal V14\\Bin\\Siemens.Automation.Portal.exe"
|
||||
}
|
||||
],
|
||||
"SieTiaV15": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V15\\Bin\\Siemens.Automation.Portal.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "c:\\Program Files\\Siemens\\Automation\\Portal V15_1\\Bin\\Siemens.Automation.Portal.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Portal V15_1\\Bin\\Siemens.Automation.Portal.exe"
|
||||
}
|
||||
],
|
||||
"SieTiaV16": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V16\\Bin\\Siemens.Automation.Portal.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Portal V16\\Bin\\Siemens.Automation.Portal.exe"
|
||||
}
|
||||
],
|
||||
"SieTiaV17": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V17\\Bin\\Siemens.Automation.Portal.exe"
|
||||
}
|
||||
],
|
||||
"SieTiaVStarter": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Siemens\\Step7\\S7BIN\\u7wdrfax.exe"
|
||||
}
|
||||
],
|
||||
"Epl": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\EPLAN\\Platform\\2.9.4\\Bin\\EPLAN.exe",
|
||||
"Arguments": "/Variant:\"Electric P8\""
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\EPLAN\\Platform\\2022.0.3\\Bin\\Eplan.exe",
|
||||
"Arguments": "/Variant:\"Electric P8\""
|
||||
}
|
||||
],
|
||||
"Npp": [
|
||||
{
|
||||
"ExePath": "C:\\Windows\\system32\\notepad.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "c:\\Program Files\\Notepad++\\notepad++.exe"
|
||||
}
|
||||
],
|
||||
"TotalCmd": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\totalcmd\\TOTALCMD.EXE"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\totalcmd\\TOTALCMD64.EXE"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\totalcmd\\TOTALCMD64.EXE"
|
||||
},
|
||||
{
|
||||
"ExePath": "C:\\totalcmd\\TOTALCMD.EXE"
|
||||
}
|
||||
],
|
||||
"TeXstudio": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\texstudio\\texstudio.exe"
|
||||
}
|
||||
],
|
||||
"Vs": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe"
|
||||
}
|
||||
],
|
||||
"VsCode": [
|
||||
{
|
||||
"ExePath": "%USERPROFILE%\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
|
||||
}
|
||||
],
|
||||
"Rdp": [
|
||||
{
|
||||
"ExePath": "%windir%\\system32\\mstsc.exe"
|
||||
}
|
||||
],
|
||||
"Outlook": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE"
|
||||
}
|
||||
],
|
||||
"Teams": [
|
||||
{
|
||||
"ExePath": "C:\\Users\\maier_s\\AppData\\Local\\Microsoft\\Teams\\Update.exe",
|
||||
"Arguments": "--processStart \"Teams.exe\""
|
||||
}
|
||||
],
|
||||
"Excel": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\EXCEL.EXE"
|
||||
}
|
||||
],
|
||||
"Word": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\WINWORD.EXE"
|
||||
}
|
||||
],
|
||||
"PaintNet": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\paint.net\\paintdotnet.exe"
|
||||
}
|
||||
],
|
||||
"Gimp": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\GIMP 2\\bin\\gimp-2.10.exe"
|
||||
}
|
||||
],
|
||||
"Vnc": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\RealVNC\\VNC Viewer\\vncviewer.exe"
|
||||
},
|
||||
{
|
||||
"ExePath": "c:\\Users\\maier_s\\OneDrive - Fondium Group GmbH\\Documents\\Apps\\VNC-Viewer-6.20.113-Windows-64bit.exe"
|
||||
}
|
||||
],
|
||||
"VncAdrBook": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\RealVNC\\VNC Viewer\\vncaddrbook.exe"
|
||||
}
|
||||
],
|
||||
"IbaAnalyzer": [
|
||||
{
|
||||
"ExePath": "C:\\Program Files\\iba\\ibaAnalyzer\\ibaAnalyzer.exe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Urls": {
|
||||
"ZentralWeb": "http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1",
|
||||
"Schichtbuch": "http://10.10.1.42/SKSchichtbuchWeb/de-DE/Plugin/ShiftBook/ShiftBook/IR",
|
||||
"SPS": "http://10.10.1.42/SKChangeTrackerWeb/de-DE/Plugin/ChangeTracker",
|
||||
"Pl1Pls": "http://10.10.200.2/SKPL1Web/index.aspx",
|
||||
"Pl2Pls": "http://10.10.213.4/SKPL2Web/index.aspx",
|
||||
"Pl2Als": "http://10.10.213.234:84/emb_1/index.html",
|
||||
"Pl3Pls": "http://10.10.202.10/SKPL3Web/index.aspx",
|
||||
"Gitea": "http://desiaugetc7-088:3000/",
|
||||
"Wiki": "http://desiaugetc7-088:3001/en/home",
|
||||
"Erp": "https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd"
|
||||
},
|
||||
"Folders": [
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Name": "EplPdf",
|
||||
"Description": "Eplan PDF Ablage",
|
||||
"Path": "\\\\10.10.1.40\\Betriebstechnik\\Eplan"
|
||||
},
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Name": "EplPrj",
|
||||
"Description": "Eplan Projekt Ablage",
|
||||
"Path": "\\\\fondium.org\\DESI$\\AUG_Abteilung\\Betriebstechnik\\EPL\\P8\\Data\\Projekte\\FSI\\"
|
||||
},
|
||||
{
|
||||
"Plant": "PL2",
|
||||
"SubPlant": "Alg",
|
||||
"Name": "PL2 Backup",
|
||||
"Description": "PL2 Backupverzeichnis",
|
||||
"Path": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL2"
|
||||
}
|
||||
],
|
||||
"TxtToClip": [
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "Siehe Prg.-Änderungen",
|
||||
"Txt": "Siehe Prg.-Änderungen"
|
||||
},
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "Eplan Projekt Ablage",
|
||||
"Txt": "\\\\fondium.org\\DESI$\\AUG_Abteilung\\Betriebstechnik\\EPL\\P8\\Data\\Projekte\\FSI\\"
|
||||
},
|
||||
{
|
||||
"Plant": "PL2",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "PL2 Backupverzeichnis",
|
||||
"Txt": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL2"
|
||||
}
|
||||
]
|
||||
}
|
||||
23
FSI.BT.Tools/nlog.config
Normal file
23
FSI.BT.Tools/nlog.config
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema-->
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
autoReload="true"
|
||||
internalLogFile="c:\temp\console-example-internal.log"
|
||||
internalLogLevel="Info" >
|
||||
|
||||
<!-- the targets to write to -->
|
||||
<targets>
|
||||
<!-- write logs to file -->
|
||||
<target xsi:type="File" name="logfile" fileName="logs/log.log" archiveFileName ="logs/{#}_log.log" archiveNumbering ="Date" archiveEvery="Day" archiveDateFormat="yyyyMMdd"
|
||||
layout="${longdate}|${level}|${message} |${all-event-properties} ${exception:format=tostring}" />
|
||||
<target xsi:type="Console" name="logconsole"
|
||||
layout="${longdate}|${level}|${message} |${all-event-properties} ${exception:format=tostring}" />
|
||||
|
||||
</targets>
|
||||
|
||||
<!-- rules to map from logger name to target -->
|
||||
<rules>
|
||||
<logger name="*" minlevel="Trace" writeTo="logfile,logconsole,console" />
|
||||
</rules>
|
||||
</nlog>
|
||||
Reference in New Issue
Block a user