diff --git a/FSI.BT.Tools/Admin.cs b/FSI.BT.Tools/Admin.cs index bf72525..1bafd2c 100644 --- a/FSI.BT.Tools/Admin.cs +++ b/FSI.BT.Tools/Admin.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using FSI.Lib.Helpers; namespace FSI.BT.Tools @@ -8,14 +9,14 @@ namespace FSI.BT.Tools { public static bool CheckSuperAdminRight() { - if (Global.Settings.SuperAdmin == null) + if (Global.AppSettings.SuperAdmin == null) { return false; } System.Security.Principal.WindowsIdentity windowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent(); - if (string.Equals(Global.Settings.SuperAdmin, windowsIdentity.ShortName(), StringComparison.OrdinalIgnoreCase)) + if (string.Equals(Lib.DeEncryptString.DeEncrypt.DecryptString(Lib.DeEncryptString.DeEncrypt.DecryptString(Global.AppSettings.SuperAdmin, AppDomain.CurrentDomain.FriendlyName), AppDomain.CurrentDomain.FriendlyName), windowsIdentity.ShortName(), StringComparison.OrdinalIgnoreCase)) return true; return false; @@ -23,18 +24,18 @@ namespace FSI.BT.Tools public static bool CheckAdminRight() { - if (Global.Settings.Admins == null) + if (Global.AppSettings.Admins == null) { return false; } - List admins = new List(Global.Settings.Admins); + List users = Global.AppSettings.Admins.ToList(); System.Security.Principal.WindowsIdentity windowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent(); - foreach (string admin in admins) + foreach (var user in users) { - if (string.Equals(admin, windowsIdentity.ShortName(), StringComparison.OrdinalIgnoreCase)) + if (string.Equals(Lib.DeEncryptString.DeEncrypt.DecryptString(user.Value, AppDomain.CurrentDomain.FriendlyName), windowsIdentity.ShortName(), StringComparison.OrdinalIgnoreCase)) return true; } @@ -43,18 +44,18 @@ namespace FSI.BT.Tools public static bool CheckUserRight() { - if (Global.Settings.Users == null) + if (Global.AppSettings.Users == null) { return false; } - List users = new List(Global.Settings.Users); + List users = Global.AppSettings.Users.ToList(); System.Security.Principal.WindowsIdentity windowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent(); - foreach (string user in users) + foreach (var user in users) { - if (string.Equals(user, windowsIdentity.ShortName(), StringComparison.OrdinalIgnoreCase)) + if (string.Equals(Lib.DeEncryptString.DeEncrypt.DecryptString(user.Value, AppDomain.CurrentDomain.FriendlyName), windowsIdentity.ShortName(), StringComparison.OrdinalIgnoreCase)) return true; } diff --git a/FSI.BT.Tools/App.xaml.cs b/FSI.BT.Tools/App.xaml.cs index 513cecd..cb7e4d5 100644 --- a/FSI.BT.Tools/App.xaml.cs +++ b/FSI.BT.Tools/App.xaml.cs @@ -7,6 +7,9 @@ using FSI.Lib.CompareNetObjects; using Config.Net.Stores; using System.IO; using Config.Net; +using System.Collections.Generic; +using System.Linq; +using System; namespace FSI.BT.Tools { @@ -15,18 +18,15 @@ namespace FSI.BT.Tools /// public partial class App : System.Windows.Application { - private static readonly KeyGesture RadialMenu = new KeyGesture(Key.OemBackslash, ModifierKeys.Control); - private static readonly KeyGesture TimeStamp = new KeyGesture(Key.C, ModifierKeys.Control | ModifierKeys.Alt); - + private static readonly KeyGesture RadialMenu = new(Key.OemBackslash, ModifierKeys.Control); + private static readonly KeyGesture TimeStamp = new(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(); - + // App-Settings JsonConfigStore _store = new JsonConfigStore(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "config.json"), true); Global.AppSettings = new ConfigurationBuilder() .UseConfigStore(_store) @@ -42,24 +42,18 @@ namespace FSI.BT.Tools HotkeyManager.Current.AddOrReplace("TimeStampToClipboard", TimeStamp, TimeStampToClipboard); Global.FrmRadialMenu = new FrmRadialMenu(); + + Global.WinCC = new Lib.Guis.SieTiaWinCCMsgMgt.ViewModel() + { + Data = Global.AppSettings.WinCC + }; + Global.WinCC.Init(); - Global.WinCC = new Lib.Guis.SieTiaWinCCMsgMgt.ViewModel.ViewModelWinCC( - Global.Settings.SieTiaWinCCMsgMgtAutostart, - Global.Settings.SieTiaWinCCMsgMgtUpdateIntervall, - Global.Settings.SieTiaWinCCMsgMgtWindowsName, - Global.Settings.SieTiaWinCCMsgMgtClassName, - Global.Settings.SieTiaWinCCMsgMgtBtnName - ); - - Global.Iba = new Lib.Guis.IbaDirSync.ViewModel.ViewModelIba( - Global.Settings.IbaRecordDestinationath, - Global.Settings.IbaRecordSourcePath, - Global.Settings.IbaAutoSync - ); - - Global.WindowMgt = new Lib.Guis.SetSizePosExWindow.ViewModel.ViewModelWindow(); - Global.WindowMgt.AutoStart = Global.Settings.WindowMgtAutostart; - Global.WindowMgt.UpdateIntervall = Global.Settings.WindowMgtUpdateInterval; + Global.Iba = new Lib.Guis.IbaDirSync.ViewModel() + { + Data = Global.AppSettings.IbaDirSync + }; + Global.Iba.Init(); } @@ -81,17 +75,17 @@ namespace FSI.BT.Tools e.Handled = true; } + private void DeCrypt(ref IEnumerable values) + { + var valuesToDeCrypt = values.ToList(); + + foreach (var value in valuesToDeCrypt.ToList()) + value.ValueDeCrypt = Lib.DeEncryptString.DeEncrypt.DecryptString(value.Value, AppDomain.CurrentDomain.FriendlyName); + + } + private void Application_Exit(object sender, ExitEventArgs e) { - AppSettings tmpSetting = new AppSettings(Global.Settings.FileName); - tmpSetting.Load(); - - CompareLogic compareLogic = new CompareLogic(); - ComparisonResult result = compareLogic.Compare(Global.Settings, tmpSetting); - if (!result.AreEqual) - { - Global.Settings.Save(); - } if (Global.Iba.RoboCopy != null) { @@ -99,6 +93,6 @@ namespace FSI.BT.Tools Global.Iba.RoboCopy.Dispose(); } } - + } } \ No newline at end of file diff --git a/FSI.BT.Tools/AppSettings.cs b/FSI.BT.Tools/AppSettings.cs deleted file mode 100644 index 7eebf7a..0000000 --- a/FSI.BT.Tools/AppSettings.cs +++ /dev/null @@ -1,78 +0,0 @@ -using FSI.Lib.WinSettings; -using System.Collections.ObjectModel; - -namespace FSI.BT.Tools -{ - public class AppSettings : XmlSettings - { - - public AppSettings(string fileName) : base(fileName) - { - - SuperAdmin = "maier_s"; - } - - [EncryptedSetting] - public string[] Users { get; set; } - [EncryptedSetting] - 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[] 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 bool SieTiaWinCCMsgMgtAutostart { get; set; } - public int SieTiaWinCCMsgMgtUpdateIntervall { get; set; } - public string SieTiaWinCCMsgMgtWindowsName { get; set; } - public string SieTiaWinCCMsgMgtClassName { get; set; } - public string SieTiaWinCCMsgMgtBtnName { get; set; } - public bool IbaAutoSync { get; set; } - public string IbaRecordSourcePath { get; set; } - public string IbaRecordDestinationath { get; set; } - public int WindowMgtUpdateInterval { get; set; } - public bool WindowMgtAutostart { 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; } - } -} diff --git a/FSI.BT.Tools/Commands/CmdCommand.cs b/FSI.BT.Tools/Commands/CmdCommand.cs new file mode 100644 index 0000000..d7964b1 --- /dev/null +++ b/FSI.BT.Tools/Commands/CmdCommand.cs @@ -0,0 +1,308 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading; +using System.Windows; +using static FSI.BT.Tools.Settings.Cmd; +using static FSI.BT.Tools.Settings.Exe; + +namespace FSI.BT.Tools.Commands +{ + /// + /// Shows the main window. + /// + public class CmdCommand : CommandBase + { + public override void Execute(object parameter) + { + if (parameter is not string) + { + Global.Log.Error("Parameter ist kein String"); + return; + } + + var cmds = Global.AppSettings.Cmds.ToList(); + ICmd selectedCmd = null; + + // IEnumerable files = new List(); + IExe selectedFile; + + switch ((string)parameter) + { + + case "EplPrj": + //selectedFile = GetApp(Global.AppSettings.Apps.Epl); + //Lib.Guis.Prj.Mgt.FrmMain frmMainEplPrj = new() + //{ + // ShowPdf = false, + // CloseAtLostFocus = true, + // WindowStartupLocation = WindowStartupLocation.CenterScreen, + // Path = FSI.BT.Tools.Settings.AppSettings.GetFolderByName(Global.AppSettings.Folders, "EplPrj").path, + // EplExe = selectedFile.ExePath, + //}; + //frmMainEplPrj.Show(); + return; + + case "EplPdf": + Lib.Guis.Prj.Mgt.FrmMain frmMainEplPdf = new() + { + ShowPdf = true, + CloseAtLostFocus = true, + WindowStartupLocation = WindowStartupLocation.CenterScreen, + Path = FSI.BT.Tools.Settings.AppSettings.GetFolderByName(Global.AppSettings.Folders, "EplPdf").path + }; + frmMainEplPdf.Show(); + return; + + case "EplPdfMgt": + Lib.Guis.Pdf.Mgt.FrmMain frmMainEplPdfMgt = new() + { + CloseAtLostFocus = true + }; + frmMainEplPdfMgt.Show(); + return; + + case "DeEncrypt": + Lib.Guis.DeEncryptMessage.FrmMain frmMainDeEnCrypt = new() + { + Password = AppDomain.CurrentDomain.FriendlyName, + CloseAtLostFocus = true, + WindowStartupLocation = WindowStartupLocation.CenterScreen, + }; + frmMainDeEnCrypt.Show(); + return; + + case "StarterCsvExporter": + Lib.Guis.SieStarterCsvExporter.FrmMain frmMain = new(); + frmMain.Show(); + return; + + case "Folder": + Lib.Guis.Folder.Mgt.FrmMain frmFolderMgtMain = new() + { + CloseAtLostFocus = true, + Data = Global.AppSettings.Folders + }; + frmFolderMgtMain.Show(); + return; + + case "TxtToClip": + Lib.Guis.TxtToClip.Mgt.FrmMain frmTxtToClipMain = new() + { + CloseAtLostFocus = true, + InputData = Global.AppSettings.TxtToClip + }; + frmTxtToClipMain.Show(); + return; + + default: + foreach (ICmd cmd in cmds) + { + if (String.Equals(parameter.ToString().ToLower(), cmd.Cmd.ToLower())) + { + selectedCmd = cmd; + } + } + break; + } + + if (selectedCmd == null) + return; + + OpenExe(selectedCmd); + OpenUrl(selectedCmd); + } + + public override bool CanExecute(object parameter) + { + var cmds = Global.AppSettings.Cmds.ToList(); + ICmd selectedCmd = null; + + switch ((string)parameter) + { + case "EplPrj": + return true; + + case "EplPdf": + return true; + + case "EplPdfMgt": + return Global.AdminRights; + + case "DeEncrypt": + return Global.AdminRights; + + case "StarterCsvExporter": + return Global.AdminRights; + + case "Folder": + return Global.AppSettings.Folders != null; + + case "TxtToClip": + return Global.AppSettings.TxtToClip != null; + + default: + foreach (ICmd cmd in cmds) + { + if (String.Equals(parameter.ToString().ToLower(), cmd.Cmd.ToLower())) + { + selectedCmd = cmd; + } + } + break; + + } + + if (selectedCmd == null) + return false; + + foreach (var file in selectedCmd.Exe.ToList()) + { + if (File.Exists(Environment.ExpandEnvironmentVariables(file.ExePath.Trim()))) + { + return true; + } + } + + foreach (var url in selectedCmd.Urls) + { + if (url != String.Empty) + { + return true; + } + } + + return false; + } + + + private static void OpenExe(ICmd selectedCmd) + { + IExe selectedFile = GetApp(selectedCmd.Exe); + + if (selectedFile == null) + return; + + if (selectedFile.ExePath == String.Empty) + return; + + if (ProgramIsRunning(selectedFile.ExePath)) + { + ProgramToFront(selectedFile.ExePath); + Global.Log.Info("Anwendung \"{0}\" wurde in den Vordergrund gebracht", selectedFile.ExePath); + } + else + { + Process process = new(); + process.StartInfo.FileName = selectedFile.ExePath; + process.StartInfo.WorkingDirectory = selectedFile.Path == null ? selectedFile.Path : Path.GetDirectoryName(selectedFile.ExePath); + 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) + { + try + { + 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); + } + } + } + } + + private static void OpenUrl(ICmd selectedCmd) + { + + foreach (var url in selectedCmd.Urls) + { + + if (url == String.Empty) + return; + + Process.Start(new ProcessStartInfo(url.Replace("&", "^&")) { UseShellExecute = true }); + Global.Log.Info("Link \"{0}\" wurde geföffnet.", url.Replace("&", "^&")); + Thread.Sleep(100); + } + } + + private static bool ProgramIsRunning(string FullPath) + { + string FilePath = Path.GetDirectoryName(FullPath); + string FileName = Path.GetFileNameWithoutExtension(FullPath).ToLower(); + bool isRunning = false; + + Process[] pList = Process.GetProcessesByName(FileName); + + foreach (Process p in pList) + { + if (p.MainModule.FileName.StartsWith(FilePath, StringComparison.InvariantCultureIgnoreCase)) + { + isRunning = true; + break; + } + } + + return isRunning; + } + + private static IExe GetApp(IEnumerable files) + { + if(files.ToList().Count == 0) + return null; + + var selectedFile = files.ToList()[0]; + + foreach (var file in files.ToList()) + { + if (File.Exists(Environment.ExpandEnvironmentVariables(file.ExePath.Trim()))) + selectedFile = (IExe)file; + else + continue; + } + + return selectedFile; + } + + [System.Runtime.InteropServices.DllImport("User32.dll")] + private static extern bool SetForegroundWindow(IntPtr handle); + [System.Runtime.InteropServices.DllImport("User32.dll")] + private static extern bool ShowWindow(IntPtr handle, int nCmdShow); + [System.Runtime.InteropServices.DllImport("User32.dll")] + private static extern bool IsIconic(IntPtr handle); + + private static void ProgramToFront(string FullPath) + { + string FilePath = Path.GetDirectoryName(FullPath); + string FileName = Path.GetFileNameWithoutExtension(FullPath).ToLower(); + + Process[] pList = Process.GetProcessesByName(FileName); + + foreach (Process p in pList) + { + if (p.MainModule.FileName.StartsWith(FilePath, StringComparison.InvariantCultureIgnoreCase)) + { + IntPtr handle = p.MainWindowHandle; + if (IsIconic(handle)) + { + ShowWindow(handle, 9); + } + SetForegroundWindow(handle); + break; + } + } + } + } +} \ No newline at end of file diff --git a/FSI.BT.Tools/Commands/OpenAppCommand.cs b/FSI.BT.Tools/Commands/OpenAppCommand.cs deleted file mode 100644 index 66a86f6..0000000 --- a/FSI.BT.Tools/Commands/OpenAppCommand.cs +++ /dev/null @@ -1,449 +0,0 @@ -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 -{ - /// - /// Shows the main window. - /// - public class OpenAppCommand : CommandBase - { - public override void Execute(object parameter) - { - IEnumerable files = new List(); - (string ExePath, string Path, string Arguments) selectedFile = (string.Empty, string.Empty, string.Empty); - - switch ((string)parameter) - { - case "SimaticManager": - files = Global.AppSettings.Apps.SieSimaticManager; - break; - - case "TIAv13": - files = Global.AppSettings.Apps.SieTiaV13; - break; - - case "TIAv14": - files = Global.AppSettings.Apps.SieTiaV14; - break; - - case "TIAv15": - files = Global.AppSettings.Apps.SieTiaV15; - break; - - case "TIAv16": - files = Global.AppSettings.Apps.SieTiaV16; - break; - - case "TIAv17": - files = Global.AppSettings.Apps.SieTiaV17; - break; - - case "Starter": - files = Global.AppSettings.Apps.SieTiaVStarter; - break; - - case "Epl": - 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 = FSI.BT.Tools.Settings.AppSettings.GetFolderByName(Global.AppSettings.Folders, "EplPrj").path, - EplExe = selectedFile.ExePath, - }; - frmMainEplPrj.Show(); - return; - - case "EplPdf": - Lib.Guis.Prj.Mgt.FrmMain frmMainEplPdf = new Lib.Guis.Prj.Mgt.FrmMain() - { - ShowPdf = true, - CloseAtLostFocus = true, - WindowStartupLocation = WindowStartupLocation.CenterScreen, - Path = FSI.BT.Tools.Settings.AppSettings.GetFolderByName(Global.AppSettings.Folders, "EplPdf").path - }; - frmMainEplPdf.Show(); - return; - - case "EplPdfMgt": - Lib.Guis.Pdf.Mgt.FrmMain frmMainEplPdfMgt = new Lib.Guis.Pdf.Mgt.FrmMain() - { - CloseAtLostFocus = true - }; - frmMainEplPdfMgt.Show(); - return; - - case "Npp": - files = Global.AppSettings.Apps.Npp; - break; - - case "TotalCmd": - files = Global.AppSettings.Apps.TotalCmd; - break; - - case "TeXstudio": - files = Global.AppSettings.Apps.TeXstudio; - break; - - case "VS": - files = Global.AppSettings.Apps.Vs; - break; - - case "VS.Code": - files = Global.AppSettings.Apps.VsCode; - break; - - case "Rdp": - files = Global.AppSettings.Apps.Rdp; - break; - - case "DeEncrypt": - Lib.Guis.DeEncryptMessage.FrmMain frmMainDeEnCrypt = new Lib.Guis.DeEncryptMessage.FrmMain() - { - Password = GetType().Namespace.ToString(), - CloseAtLostFocus = true, - WindowStartupLocation = WindowStartupLocation.CenterScreen, - }; - frmMainDeEnCrypt.Show(); - return; - - case "StarterCsvExporter": - Lib.Guis.SieStarterCsvExporter.FrmMain frmMain = new Lib.Guis.SieStarterCsvExporter.FrmMain(); - frmMain.Show(); - return; - - case "Admin": - Gui.FrmAdmin frmAdmin = new Gui.FrmAdmin() - { - Admins = Global.Settings.Admins, - Users = Global.Settings.Users, - }; - frmAdmin.ShowDialog(); - - if (frmAdmin.DialogResult.HasValue && frmAdmin.DialogResult.Value) - { - Global.Settings.Admins = frmAdmin.Admins; - Global.Settings.Users = frmAdmin.Users; - } - 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 = true, - InputData = Global.AppSettings.TxtToClip - }; - frmTxtToClipMain.Show(); - return; - - case "Outlook": - files = Global.AppSettings.Apps.Outlook; - break; - - case "Teams": - files = Global.AppSettings.Apps.Teams; - break; - - case "Excel": - files = Global.AppSettings.Apps.Excel; - break; - - case "Word": - files = Global.AppSettings.Apps.Word; - break; - - case "PaintNet": - files = Global.AppSettings.Apps.PaintNet; - break; - - case "Gimp": - files = Global.AppSettings.Apps.Gimp; - break; - - case "Vnc": - files = Global.AppSettings.Apps.Vnc; - break; - - case "VncAdrBook": - files = Global.AppSettings.Apps.VncAdrBook; - break; - - case "IbaAnalyzer": - files = Global.AppSettings.Apps.IbaAnalyzer; - break; - } - - selectedFile = GetApp(files); - - if (ProgramIsRunning(selectedFile.ExePath)) - { - ProgramToFront(selectedFile.ExePath); - Global.Log.Info("Anwendung \"{0}\" wurde in den Vordergrund gebracht", selectedFile.ExePath); - } - else - { - Process process = new Process(); - 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) - { - try - { - 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); - } - } - } - } - - public override bool CanExecute(object parameter) - { - IEnumerable files = new List(); - switch ((string)parameter) - { - case "SimaticManager": - files = Global.AppSettings.Apps.SieSimaticManager; - break; - - case "TIAv13": - files = Global.AppSettings.Apps.SieTiaV13; - break; - - case "TIAv14": - files = Global.AppSettings.Apps.SieTiaV14; - break; - - case "TIAv15": - files = Global.AppSettings.Apps.SieTiaV15; - break; - - case "TIAv16": - files = Global.AppSettings.Apps.SieTiaV16; - break; - - case "TIAv17": - files = Global.AppSettings.Apps.SieTiaV17; - break; - - case "Starter": - files = Global.AppSettings.Apps.SieTiaVStarter; - break; - - case "Epl": - files = Global.AppSettings.Apps.Epl; - break; - - case "EplPrj": - return true; - - case "EplPdf": - return true; - - case "EplPdfMgt": - return Global.AdminRights; - - case "Npp": - files = Global.AppSettings.Apps.Npp; - break; - - case "TotalCmd": - files = Global.AppSettings.Apps.TotalCmd; - break; - - case "TeXstudio": - files = Global.AppSettings.Apps.TeXstudio; - break; - - case "VS": - files = Global.AppSettings.Apps.Vs; - break; - - case "VS.Code": - files = Global.AppSettings.Apps.VsCode; - break; - - case "Rdp": - files = Global.AppSettings.Apps.Rdp; - break; - - case "DeEncrypt": - return Global.AdminRights; - - case "StarterCsvExporter": - return Global.AdminRights; - - case "Admin": - return Global.SuperAdminRights; - - case "Folder": - return Global.AppSettings.Folders != null; - - case "TxtToClip": - return Global.AppSettings.TxtToClip != null; - - case "Outlook": - files = Global.AppSettings.Apps.Outlook; - break; - - case "Teams": - files = Global.AppSettings.Apps.Teams; - break; - - case "Excel": - files = Global.AppSettings.Apps.Excel; - break; - - case "Word": - files = Global.AppSettings.Apps.Word; - break; - - case "PaintNet": - files = Global.AppSettings.Apps.PaintNet; - break; - - case "Gimp": - files = Global.AppSettings.Apps.Gimp; - break; - - case "Vnc": - files = Global.AppSettings.Apps.Vnc; - break; - - case "VncAdrBook": - files = Global.AppSettings.Apps.VncAdrBook; - break; - - case "IbaAnalyzer": - files = Global.AppSettings.Apps.IbaAnalyzer; - break; - - default: return false; - - } - - foreach (var file in files) - { - if (File.Exists(Environment.ExpandEnvironmentVariables(file.ExePath.Trim()))) - { - return true; - } - } - - return false; - } - - private bool ProgramIsRunning(string FullPath) - { - string FilePath = Path.GetDirectoryName(FullPath); - string FileName = Path.GetFileNameWithoutExtension(FullPath).ToLower(); - bool isRunning = false; - - Process[] pList = Process.GetProcessesByName(FileName); - - foreach (Process p in pList) - { - if (p.MainModule.FileName.StartsWith(FilePath, StringComparison.InvariantCultureIgnoreCase)) - { - isRunning = true; - break; - } - } - - return isRunning; - } - - private (string ExePath, string Path, string Arguments) GetApp(IEnumerable 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")] - private static extern bool ShowWindow(IntPtr handle, int nCmdShow); - [System.Runtime.InteropServices.DllImport("User32.dll")] - private static extern bool IsIconic(IntPtr handle); - - private void ProgramToFront(string FullPath) - { - string FilePath = Path.GetDirectoryName(FullPath); - string FileName = Path.GetFileNameWithoutExtension(FullPath).ToLower(); - - Process[] pList = Process.GetProcessesByName(FileName); - - foreach (Process p in pList) - { - if (p.MainModule.FileName.StartsWith(FilePath, StringComparison.InvariantCultureIgnoreCase)) - { - IntPtr handle = p.MainWindowHandle; - if (IsIconic(handle)) - { - ShowWindow(handle, 9); - } - SetForegroundWindow(handle); - break; - } - } - } - } -} \ No newline at end of file diff --git a/FSI.BT.Tools/Commands/OpenLinkCommand.cs b/FSI.BT.Tools/Commands/OpenLinkCommand.cs deleted file mode 100644 index d85fa57..0000000 --- a/FSI.BT.Tools/Commands/OpenLinkCommand.cs +++ /dev/null @@ -1,83 +0,0 @@ -using FSI.Lib; -using System; -using System.Diagnostics; - -namespace FSI.BT.Tools.Commands -{ - /// - /// Shows the main window. - /// - public class OpenLinkCommand : CommandBase - { - public override void Execute(object parameter) - { - string url = String.Empty; - - switch ((string)parameter) - { - case "ZentralWeb": - url = Global.AppSettings.Urls.ZentralWeb; - break; - - case "Schichtbuch": - url = Global.AppSettings.Urls.Schichtbuch; - break; - - case "SPS": - url = Global.AppSettings.Urls.SPS; - break; - - case "PL1.Pls": - url = Global.AppSettings.Urls.Pl1Pls; - break; - - case "PL2.Pls": - url = Global.AppSettings.Urls.Pl2Pls; - break; - - case "PL2.Als": - url = Global.AppSettings.Urls.Pl2Als; - break; - - case "PL3.Pls": - url = Global.AppSettings.Urls.Pl3Pls; - break; - - case "FSI.Gitea": - url = Global.AppSettings.Urls.Gitea; - break; - - case "FSI.Wiki": - url = Global.AppSettings.Urls.Wiki; - break; - - case "Erp": - url = Global.AppSettings.Urls.Erp; - break; - } - - if (url == String.Empty) - return; - - 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) - { - string url = String.Empty; - switch ((string)parameter) - { - case "FSI.Gitea": - return Global.AdminRights; - - case "FSI.Wiki": - return Global.AdminRights; - - default: - return true; - } - } - } -} \ No newline at end of file diff --git a/FSI.BT.Tools/Commands/ProcessCommand.cs b/FSI.BT.Tools/Commands/ProcessCommand.cs index d348b29..4b03e79 100644 --- a/FSI.BT.Tools/Commands/ProcessCommand.cs +++ b/FSI.BT.Tools/Commands/ProcessCommand.cs @@ -1,7 +1,4 @@ -using System.Windows; -using System.Windows.Data; - -namespace FSI.BT.Tools.Commands +namespace FSI.BT.Tools.Commands { /// /// Shows the main window. @@ -10,32 +7,15 @@ namespace FSI.BT.Tools.Commands { public override void Execute(object parameter) { - Gui.FrmProcesses frm = new Gui.FrmProcesses(); - frm.WinCC = Global.WinCC; + Gui.FrmProcesses frm = new Gui.FrmProcesses() + { + WinCC = Global.WinCC + }; +; frm.Iba = Global.Iba; Global.Window.Load(); - frm.WindowMgt = Global.WindowMgt; - frm.Closed += Frm_Closed; - frm.ShowDialog(); - } - private void Frm_Closed(object sender, System.EventArgs e) - { - Global.WinCC = ((Gui.FrmProcesses)sender).WinCC; - - Global.Settings.SieTiaWinCCMsgMgtAutostart = Global.WinCC.WinCC.AutoStart; - Global.Settings.SieTiaWinCCMsgMgtUpdateIntervall = Global.WinCC.WinCC.UpdateIntervall; - Global.Settings.SieTiaWinCCMsgMgtWindowsName = Global.WinCC.WinCC.WindowsName; - Global.Settings.SieTiaWinCCMsgMgtClassName = Global.WinCC.WinCC.WindowsClassName; - Global.Settings.SieTiaWinCCMsgMgtBtnName = Global.WinCC.WinCC.ButtonName; - - Global.Iba = ((Gui.FrmProcesses)sender).Iba; - Global.Settings.IbaRecordDestinationath = Global.Iba.Iba.Destination; - Global.Settings.IbaRecordSourcePath = Global.Iba.Iba.Source; - Global.Settings.IbaAutoSync = Global.Iba.Iba.AutoStart; - - Global.WindowMgt = ((Gui.FrmProcesses)sender).WindowMgt; - Global.Window.Save(); + frm.ShowDialog(); } public override bool CanExecute(object parameter) diff --git a/FSI.BT.Tools/Commands/RadialMenuCommand.cs b/FSI.BT.Tools/Commands/RadialMenuCommand.cs index 703e027..db95492 100644 --- a/FSI.BT.Tools/Commands/RadialMenuCommand.cs +++ b/FSI.BT.Tools/Commands/RadialMenuCommand.cs @@ -18,13 +18,9 @@ namespace FSI.BT.Tools.Commands } if (Global.FrmRadialMenu.Visibility == Visibility.Hidden) - { Global.FrmRadialMenu.Visibility = Visibility.Visible; - } else - { - Global.FrmRadialMenu.Visibility = Visibility.Hidden; - } + Global.FrmRadialMenu.Visibility = Visibility.Hidden; Global.FrmRadialMenu.ActivateCenteredToMouse(); } diff --git a/FSI.BT.Tools/FSI.BT.Tools.csproj b/FSI.BT.Tools/FSI.BT.Tools.csproj index 19375b4..774aaa7 100644 --- a/FSI.BT.Tools/FSI.BT.Tools.csproj +++ b/FSI.BT.Tools/FSI.BT.Tools.csproj @@ -62,10 +62,6 @@ - - - - @@ -76,7 +72,9 @@ - + + Never + @@ -121,9 +119,6 @@ Always - - Always - Always diff --git a/FSI.BT.Tools/FSI.BT.Tools.xml b/FSI.BT.Tools/FSI.BT.Tools.xml deleted file mode 100644 index 712c5a3..0000000 --- a/FSI.BT.Tools/FSI.BT.Tools.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - +I945AMzKKYBAAAAB21haWVyX3M= - e+Dt7FRUDDoBAAAAB21haWVyX3M= - - _yyyyMMdd_HHmmss - - C:\Program Files (x86)\Siemens\Step7\S7BIN\S7tgtopx.exe - C:\Program Files (x86)\Siemens\Automation\Portal V13\Bin\Siemens.Automation.Portal.exe - C:\Program Files\Siemens\Automation\Portal V14\Bin\Siemens.Automation.Portal.exe - C:\Program Files\Siemens\Automation\Portal V15\Bin\Siemens.Automation.Portal.exe,c:\Program Files\Siemens\Automation\Portal V15_1\Bin\Siemens.Automation.Portal.exe - C:\Program Files\Siemens\Automation\Portal V16\Bin\Siemens.Automation.Portal.exe - C:\Program Files\Siemens\Automation\Portal V17\Bin\Siemens.Automation.Portal.exe - C:\Program Files (x86)\Siemens\Step7\S7BIN\u7wdrfax.exe - C:\Program Files\EPLAN\Platform\2.9.4\Bin\EPLAN.exe,C:\Program Files\EPLAN\Platform\2022.0.3\Bin\Eplan.exe - /Variant:"Electric P8" - C:\Windows\system32\notepad.exe,c:\Program Files\Notepad++\notepad++.exe - C:\Program Files\totalcmd\TOTALCMD.EXE,C:\Program Files\totalcmd\TOTALCMD64.EXE,C:\totalcmd\TOTALCMD64.EXE,C:\totalcmd\TOTALCMD.EXE - C:\Program Files\texstudio\texstudio.exe - C:\Program Files\texstudio\dictionaries - C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe - %USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\Code.exe - %windir%\system32\mstsc.exe - C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE - C:\Users\maier_s\AppData\Local\Microsoft\Teams\Update.exe - --processStart ""Teams.exe"" - C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE - C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE - C:\Program Files\paint.net\paintdotnet.exe - C:\Program Files\GIMP 2\bin\gimp-2.10.exe - 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 - C:\Program Files\RealVNC\VNC Viewer\vncaddrbook.exe - C:\Program Files\iba\ibaAnalyzer\ibaAnalyzer.exe - - http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1 - http://10.10.1.42/SKSchichtbuchWeb/de-DE/Plugin/ShiftBook/ShiftBook/IR - http://10.10.1.42/SKChangeTrackerWeb/de-DE/Plugin/ChangeTracker - http://10.10.200.2/SKPL1Web/index.aspx - http://10.10.213.4/SKPL2Web/index.aspx - http://10.10.213.234:84/emb_1/index.html - http://10.10.202.10/SKPL3Web/index.aspx - http://desiaugetc7-088:3000/ - http://desiaugetc7-088:3001/en/home - https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd - - \\10.10.1.40\Betriebstechnik\Eplan - \\fondium.org\DESI$\AUG_Abteilung\Betriebstechnik\EPL\P8\Data\Projekte\FSI\ - - true - 10 - - #32770 - Zur Kenntnis genommen - - true - d:\tmp - c:\tmp - - false - 10 - Starter Trace - Signalauswahl Trace - #32770 - 10 - 10 - 800 - 1000 - \ No newline at end of file diff --git a/FSI.BT.Tools/FrmRadialMenu.xaml b/FSI.BT.Tools/FrmRadialMenu.xaml index 9a9a5fd..d00d865 100644 --- a/FSI.BT.Tools/FrmRadialMenu.xaml +++ b/FSI.BT.Tools/FrmRadialMenu.xaml @@ -8,26 +8,28 @@ ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent" - Deactivated="Window_Deactivated"> + Deactivated="Window_Deactivated" + Loaded="Window_Loaded"> + + @@ -50,21 +52,6 @@ - - - - - - - - - Eplan - - - - - - - - - - - - - Siemens - - - - - - - - - - - - - Total CMD - - - - - + + + + + + + + Eplan + + + + + + + + + + + + + Siemens + + + + + + + + + + + + + Total CMD + + + + + - - - - - - - - - + @@ -316,7 +318,7 @@ - - - - - - - - - - - Admin - - - - - - - + @@ -428,7 +414,7 @@ - - - - - - - - + @@ -587,7 +573,7 @@ - - - + @@ -635,8 +621,8 @@ - + @@ -665,8 +651,8 @@ - + @@ -681,8 +667,68 @@ - + + + + + + + + + PL1 + + + + + + + + + + + + + PL2 + + + + + + + + + + + + + PL3 + + + + + + + + + + + + + + + + + + + @@ -697,8 +743,56 @@ - + + + + + + + + + PL1Leistungsdaten + + + + + + + + + + + + + + + + + + + + + + + + + + + PL2Links + + + + + + @@ -713,8 +807,8 @@ - + @@ -729,8 +823,71 @@ - + + + + + + + + + PL2Leistungsdaten + + + + + + + + + + + + + PL2 NC + + + + + + + + + + + + + PL2Keymanager + + + + + + + + + + + + + + + + + + + @@ -745,6 +902,22 @@ + + + + + + + + + PL3Leistungsdaten + + + + @@ -760,7 +933,7 @@ - - - - - - - - + + - + @@ -886,7 +1059,7 @@ - - - + + + + + + + + diff --git a/FSI.BT.Tools/FrmRadialMenu.xaml.cs b/FSI.BT.Tools/FrmRadialMenu.xaml.cs index d563003..2bd562c 100644 --- a/FSI.BT.Tools/FrmRadialMenu.xaml.cs +++ b/FSI.BT.Tools/FrmRadialMenu.xaml.cs @@ -1,9 +1,13 @@ -using System; +using FSI.BT.Tools.Commands; +using System; using System.ComponentModel; +using System.Drawing; using System.Reflection; using System.Runtime.CompilerServices; using System.Windows; +using System.Windows.Controls; using System.Windows.Input; +using System.Windows.Media; namespace FSI.BT.Tools { @@ -12,13 +16,15 @@ namespace FSI.BT.Tools /// public partial class FrmRadialMenu : Window, INotifyPropertyChanged { + private CmdCommand _cmd; public FrmRadialMenu() { InitializeComponent(); DataContext = this; _isOpenHome = true; - //tbversion.Text = "v" + Assembly.GetExecutingAssembly().GetName().Version.Major + "." + Assembly.GetExecutingAssembly().GetName().Version.Minor + "b"; + tbversion.Text = "v" + Assembly.GetExecutingAssembly().GetName().Version.Major + "." + Assembly.GetExecutingAssembly().GetName().Version.Minor + "b"; + _cmd = new (); } #region Home @@ -55,6 +61,9 @@ namespace FSI.BT.Tools IsOpenTools = IsOpenSie = IsOpenApps = + IsOpenPlantLinksPl1 = + IsOpenPlantLinksPl2 = + IsOpenPlantLinksPl3 = IsOpenAppsVncRdp = IsOpenLinks = false; }); @@ -206,6 +215,9 @@ namespace FSI.BT.Tools return new RelayCommand(() => { IsOpenPlantLinks = true; + IsOpenPlantLinksPl1 = + IsOpenPlantLinksPl2 = + IsOpenPlantLinksPl3 = IsOpenLinks = false; }); } @@ -213,6 +225,99 @@ namespace FSI.BT.Tools #endregion + #region Anlagen Links Pl1 + + private bool _isOpenPlantLinksPl1 = false; + public bool IsOpenPlantLinksPl1 + { + get + { + return _isOpenPlantLinksPl1; + } + set + { + _isOpenPlantLinksPl1 = value; + RaisePropertyChanged(); + } + } + + public ICommand OpenRadialMenuPlantLinksPl1 + { + get + { + return new RelayCommand(() => + { + IsOpenPlantLinksPl1 = true; + IsOpenPlantLinks = false; + + }); + } + } + + #endregion + + #region Anlagen Links Pl2 + + private bool _isOpenPlantLinksPl2 = false; + public bool IsOpenPlantLinksPl2 + { + get + { + return _isOpenPlantLinksPl2; + } + set + { + _isOpenPlantLinksPl2 = value; + RaisePropertyChanged(); + } + } + + public ICommand OpenRadialMenuPlantLinksPl2 + { + get + { + return new RelayCommand(() => + { + IsOpenPlantLinksPl2 = true; + IsOpenPlantLinks = false; + + }); + } + } + + #endregion + + #region Anlagen Links Pl3 + + private bool _isOpenPlantLinksPl3 = false; + public bool IsOpenPlantLinksPl3 + { + get + { + return _isOpenPlantLinksPl3; + } + set + { + _isOpenPlantLinksPl3 = value; + RaisePropertyChanged(); + } + } + + public ICommand OpenRadialMenuPlantLinksPl3 + { + get + { + return new RelayCommand(() => + { + IsOpenPlantLinksPl3 = true; + IsOpenPlantLinks = false; + + }); + } + } + + #endregion + #region Apps private bool _isOpenApps = false; @@ -283,6 +388,8 @@ namespace FSI.BT.Tools private void Window_Deactivated(object sender, EventArgs e) { + tbCmd.Text = String.Empty; + tbCmd.Focus(); Visibility = Visibility.Hidden; IsOpenHome = true; @@ -291,8 +398,32 @@ namespace FSI.BT.Tools IsOpenSie = IsOpenLinks = IsOpenApps = + IsOpenPlantLinksPl1 = + IsOpenPlantLinksPl2 = + IsOpenPlantLinksPl3 = IsOpenAppsVncRdp = IsOpenPlantLinks = false; } + + private void Window_Loaded(object sender, RoutedEventArgs e) + { + tbCmd.Focus(); + } + + private void tbCmd_KeyDown(object sender, KeyEventArgs e) + { + if (e.Key == Key.Enter && _cmd.CanExecute(((TextBox)sender).Text)) + { + _cmd.Execute(((TextBox)sender).Text); + } + } + + private void tbCmd_TextChanged(object sender, TextChangedEventArgs e) + { + if (_cmd.CanExecute(((TextBox)sender).Text)) + ((TextBox)sender).Background = new SolidColorBrush(Colors.Green); + else + ((TextBox)sender).Background = new SolidColorBrush(Colors.White); + } } } diff --git a/FSI.BT.Tools/Global.cs b/FSI.BT.Tools/Global.cs index 4eb0f3b..65f03b4 100644 --- a/FSI.BT.Tools/Global.cs +++ b/FSI.BT.Tools/Global.cs @@ -1,9 +1,4 @@ -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 Hardcodet.Wpf.TaskbarNotification; using NLog; namespace FSI.BT.Tools @@ -11,15 +6,14 @@ namespace FSI.BT.Tools internal static class Global { public static Logger Log = LogManager.GetCurrentClassLogger(); - public static FrmRadialMenu FrmRadialMenu { get; set; } + 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 Lib.Guis.SieTiaWinCCMsgMgt.ViewModel WinCC { get; set; } + public static Settings.AppSettings.IAppSettings AppSettings { get; set; } - public static ViewModelIba Iba { get; set; } - public static ViewModelWindow WindowMgt { get; set; } + public static Lib.Guis.IbaDirSync.ViewModel Iba { get; set; } + public static Lib.Guis.SetSizePosExWindow.ViewModel WindowMgt { get; set; } public static bool UserRights { get; set; } public static bool AdminRights { get; set; } public static bool SuperAdminRights { get; set; } @@ -28,33 +22,27 @@ namespace FSI.BT.Tools { public static void Load() { - 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 = 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]), - }); - } + //for (int i = 0; i < Global.Settings.WindowMgtBezeichnung.Length; i++) + //{ + // WindowMgt.Windows.Add(new Lib.Guis.SetSizePosExWindow.IInterface() + // { + // Bezeichnung = "" + // }); + //} } 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.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(); - } + //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.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(); + //} } } diff --git a/FSI.BT.Tools/Gui/FrmProcesses.xaml b/FSI.BT.Tools/Gui/FrmProcesses.xaml index 079335b..1b26a56 100644 --- a/FSI.BT.Tools/Gui/FrmProcesses.xaml +++ b/FSI.BT.Tools/Gui/FrmProcesses.xaml @@ -25,7 +25,7 @@ @@ -38,7 +38,7 @@ @@ -50,7 +50,7 @@ @@ -63,7 +63,7 @@ @@ -112,7 +112,7 @@ @@ -125,7 +125,7 @@ diff --git a/FSI.BT.Tools/Gui/FrmProcesses.xaml.cs b/FSI.BT.Tools/Gui/FrmProcesses.xaml.cs index 7a9c802..cf3a6ea 100644 --- a/FSI.BT.Tools/Gui/FrmProcesses.xaml.cs +++ b/FSI.BT.Tools/Gui/FrmProcesses.xaml.cs @@ -1,19 +1,4 @@ -using FSI.Lib.Guis.IbaDirSync.ViewModel; -using FSI.Lib.Guis.SetSizePosExWindow.ViewModel; -using FSI.Lib.Guis.SieTiaWinCCMsgMgt.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; +using System.Windows; namespace FSI.BT.Tools.Gui { @@ -22,15 +7,14 @@ namespace FSI.BT.Tools.Gui /// public partial class FrmProcesses : Window { - public ViewModelWinCC WinCC { get; set; } - public ViewModelIba Iba { get; set; } - - public ViewModelWindow WindowMgt { get; set; } + public FSI.Lib.Guis.SieTiaWinCCMsgMgt.ViewModel WinCC { get; set; } + public FSI.Lib.Guis.IbaDirSync.ViewModel Iba { get; set; } + public FSI.Lib.Guis.SetSizePosExWindow.ViewModel WindowMgt { get; set; } public FrmProcesses() { InitializeComponent(); - DataContext = this; - } + DataContext = this; + } } } diff --git a/FSI.BT.Tools/Settings/IAppSettings.cs b/FSI.BT.Tools/Settings/IAppSettings.cs index 08d708c..0cd0ce7 100644 --- a/FSI.BT.Tools/Settings/IAppSettings.cs +++ b/FSI.BT.Tools/Settings/IAppSettings.cs @@ -1,9 +1,4 @@ -using Config.Net; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace FSI.BT.Tools.Settings { @@ -11,17 +6,24 @@ namespace FSI.BT.Tools.Settings { public interface IAppSettings { - StringValue.IStringValue TimeStampFormat { get; set; } - Apps.IApps Apps { get; } + IEnumerable Users { get; } + IEnumerable Admins { get; } - Urls.IUrls Urls { get; } + string SuperAdmin { get; } + + StringValue.IStringValue Pw { get; set; } + + StringValue.IStringValue TimeStampFormat { get; set; } + + IEnumerable Cmds { get; } IEnumerable Folders { get; } IEnumerable TxtToClip { get; } - //[Option(Alias = "Folders")] - //string GetFolderByName(string fodlerName, string keyName); + Lib.Guis.SieTiaWinCCMsgMgt.IInterface WinCC { get; set; } + + Lib.Guis.IbaDirSync.IInterface IbaDirSync { get; set; } } public static (string path, string description) GetFolderByName(IEnumerable folders, string name) @@ -29,7 +31,7 @@ namespace FSI.BT.Tools.Settings foreach (var folder in folders) { if (folder.Name.Equals(name)) - { + { return (folder.Path, folder.Description); } } diff --git a/FSI.BT.Tools/Settings/IApps.cs b/FSI.BT.Tools/Settings/IApps.cs deleted file mode 100644 index 76babbc..0000000 --- a/FSI.BT.Tools/Settings/IApps.cs +++ /dev/null @@ -1,39 +0,0 @@ -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 SieSimaticManager { get; } - IEnumerable SieTiaV13 { get; } - IEnumerable SieTiaV14 { get; } - IEnumerable SieTiaV15 { get; } - IEnumerable SieTiaV16 { get; } - IEnumerable SieTiaV17 { get; } - IEnumerable SieTiaVStarter { get; } - IEnumerable Epl { get; } - IEnumerable Npp { get; } - IEnumerable TotalCmd { get; } - IEnumerable TeXstudio { get; } - IEnumerable Vs { get; } - IEnumerable VsCode { get; } - IEnumerable Rdp { get; } - IEnumerable Outlook { get; } - IEnumerable Teams { get; } - IEnumerable Excel { get; } - IEnumerable Word { get; } - IEnumerable PaintNet { get; } - IEnumerable Gimp { get; } - IEnumerable Vnc { get; } - IEnumerable VncAdrBook { get; } - IEnumerable IbaAnalyzer { get; } - } - - } -} diff --git a/FSI.BT.Tools/Settings/ICmd.cs b/FSI.BT.Tools/Settings/ICmd.cs new file mode 100644 index 0000000..9be295e --- /dev/null +++ b/FSI.BT.Tools/Settings/ICmd.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FSI.BT.Tools.Settings +{ + public class Cmd + { + public interface ICmd + { + string Cmd { get; set; } + + IEnumerable Exe { get; } + IEnumerable Urls { get; } + } + + } +} diff --git a/FSI.BT.Tools/Settings/IStringValue.cs b/FSI.BT.Tools/Settings/IStringValue.cs index a42d4b5..d467bc9 100644 --- a/FSI.BT.Tools/Settings/IStringValue.cs +++ b/FSI.BT.Tools/Settings/IStringValue.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FSI.BT.Tools.Settings +namespace FSI.BT.Tools.Settings { public class StringValue { - public interface IStringValue + public interface IStringValue { string Value { get; set; } } + + public interface IStringValueCrypt + { + string Value { get; set; } + string ValueDeCrypt { get; set; } + } } } diff --git a/FSI.BT.Tools/Settings/IUrls.cs b/FSI.BT.Tools/Settings/IUrls.cs deleted file mode 100644 index d8017b4..0000000 --- a/FSI.BT.Tools/Settings/IUrls.cs +++ /dev/null @@ -1,25 +0,0 @@ -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; } - } - } -} diff --git a/FSI.BT.Tools/config.json b/FSI.BT.Tools/config.json index e0d529b..a7c5794 100644 --- a/FSI.BT.Tools/config.json +++ b/FSI.BT.Tools/config.json @@ -1,174 +1,362 @@ { + "SuperAdmin": "QlYbjwG0MLE49l71iEav9DnCfzBlWYFtURfS4px/PB1kcePPLtByt4U7hHOPCcaLf4XhzfAz/KJ2Ud7iexbD/w==", + "Admins": [ + { + "Value": "0AZTYgTy5qkhLFmi9O9taw==" + } + ], + "USers": [ + { + "Value": "0AZTYgTy5qkhLFmi9O9taw==" + } + ], "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" - }, + "Cmds": [ + { + "Cmd": "StartUp", + "Urls": [ + "https://www.rockantenne.de/webradio/80er-rock?utm_id=streams&utm_medium=webplayer&utm_campaign=streamlist&utm_term=mountpoint-80er-rock&utm_content=alias-80er-rock", + "http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1", + "http://10.10.1.42/SKSchichtbuchWeb/de-DE/Plugin/ShiftBook/ShiftBook/IR", + "http://10.10.1.42/SKChangeTrackerWeb/de-DE/Plugin/ChangeTracker" + ] + }, + { + "Cmd": "S7", + "Exe": [ + { + "ExePath": "C:\\Program Files (x86)\\Siemens\\STEP7\\S7BIN\\S7tgtopx.exe" + } + ] + }, + { + "Cmd": "TiaV13", + "Exe": [ + { + "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" + } + ] + }, + { + "Cmd": "TiaV14", + "Exe": [ + { + "ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V14\\Bin\\Siemens.Automation.Portal.exe" + }, + { + "ExePath": "C:\\Program Files\\Portal V14\\Bin\\Siemens.Automation.Portal.exe" + } + ] + }, + { + "Cmd": "TiaV15", + "Exe": [ + { + "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" + } + ] + }, + { + "Cmd": "TiaV16", + "Exe": [ + { + "ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V16\\Bin\\Siemens.Automation.Portal.exe" + }, + { + "ExePath": "C:\\Program Files\\Portal V16\\Bin\\Siemens.Automation.Portal.exe" + } + ] + }, + { + "Cmd": "TiaV17", + "Exe": [ + { + "ExePath": "C:\\Program Files\\Siemens\\Automation\\Portal V17\\Bin\\Siemens.Automation.Portal.exe" + } + ] + }, + { + "Cmd": "Starter", + "Exe": [ + { + "ExePath": "C:\\Program Files (x86)\\Siemens\\Step7\\S7BIN\\u7wdrfax.exe" + } + ] + }, + { + "Cmd": "Epl", + "Exe": [ + { + "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\"" + } + ] + }, + { + "Cmd": "NPP", + "Exe": [ + { + "ExePath": "C:\\Windows\\system32\\notepad.exe" + }, + { + "ExePath": "c:\\Program Files\\Notepad++\\notepad++.exe" + } + ] + }, + { + "Cmd": "Epl", + "Exe": [ + { + "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\"" + } + ] + }, + { + "Cmd": "TotalCmd", + "Exe": [ + { + "ExePath": "C:\\Program Files\\totalcmd\\TOTALCMD.EXE" + }, + { + "ExePath": "C:\\Program Files\\totalcmd\\TOTALCMD64.EXE" + }, + { + "ExePath": "C:\\totalcmd\\TOTALCMD64.EXE" + }, + { + "ExePath": "C:\\totalcmd\\TOTALCMD.EXE" + } + ] + }, + { + "Cmd": "TeXstudio", + "Exe": [ + { + "ExePath": "C:\\Program Files\\texstudio\\texstudio.exe" + } + ] + }, + { + "Cmd": "VS", + "Exe": [ + { + "ExePath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe" + } + ] + }, + { + "Cmd": "VsCode", + "Exe": [ + { + "ExePath": "%USERPROFILE%\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe" + } + ] + }, + { + "Cmd": "Rdp", + "Exe": [ + { + "ExePath": "%windir%\\system32\\mstsc.exe" + } + ] + }, + { + "Cmd": "Outlook", + "Exe": [ + { + "ExePath": "C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE" + } + + ] + }, + { + "Cmd": "Teams", + "Exe": [ + { + "ExePath": "C:\\Users\\maier_s\\AppData\\Local\\Microsoft\\Teams\\Update.exe", + "Arguments": "--processStart \"Teams.exe\"" + } + ] + }, + { + "Cmd": "Excel", + "Exe": [ + { + "ExePath": "C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\EXCEL.EXE" + } + ] + }, + { + "Cmd": "Word", + "Exe": [ + { + "ExePath": "C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\WINWORD.EXE" + } + ] + }, + { + "Cmd": "PaintNet", + "Exe": [ + { + "ExePath": "C:\\Program Files\\paint.net\\paintdotnet.exe" + } + ] + }, + { + "Cmd": "Gimp", + "Exe": [ + { + "ExePath": "C:\\Program Files\\GIMP 2\\bin\\gimp-2.10.exe" + } + ] + }, + { + "Cmd": "Vnc", + "Exe": [ + { + "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" + } + ] + }, + { + "Cmd": "VncAdrBook", + "Exe": [ + { + "ExePath": "C:\\Program Files\\RealVNC\\VNC Viewer\\vncaddrbook.exe" + } + + ] + }, + { + "Cmd": "IbaAnalyzer", + "Exe": [ + { + "ExePath": "C:\\Program Files\\iba\\ibaAnalyzer\\ibaAnalyzer.exe" + } + ] + }, + { + "Cmd": "ZtrlWeb", + "Urls": [ + "http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1" + ] + }, + { + "Cmd": "Schichtbuch", + "Urls": [ + "http://10.10.1.42/SKSchichtbuchWeb/de-DE/Plugin/ShiftBook/ShiftBook/IR" + ] + }, + { + "Cmd": "SPS", + "Urls": [ + "http://10.10.1.42/SKChangeTrackerWeb/de-DE/Plugin/ChangeTracker" + ] + }, + { + "Cmd": "Pl1Pls", + "Urls": [ + "http://10.10.200.2/SKPL1Web/index.aspx" + ] + }, + { + "Cmd": "Pl1Lst", + "Urls": [ + "http://desiaugetwf.fondium.org/web/Seiten/Leistungsdaten_FuG.aspx?Fkt=PL1" + ] + }, + { + "Cmd": "Pl2Als", + "Urls": [ + "http://10.10.213.234:84/emb_1/index.html" + ] + }, + { + "Cmd": "Pl2Pls", + "Urls": [ + "http://10.10.213.4/SKPL2Web/index.aspx" + ] + }, + { + "Cmd": "Pl2Lst", + "Urls": [ + "http://desiaugetwf/web/Seiten/Leistungsdaten_PL2.aspx" + ] + }, + { + "Cmd": "Pl2Nc", + "Urls": [ + "http://10.10.213.4/SKPL2Web/Seiten/Taktzeiten_PopUp.aspx" + ] + }, + { + "Cmd": "Pl2Key", + "Urls": [ + "http://10.10.213.4/skkeymanager-pl2" + ] + }, + { + "Cmd": "Pl2Alg", + "Urls": [ + "http://10.10.213.4/SKPL2Web/index.aspx", + "http://10.10.213.234:84/emb_1/index.html", + "http://desiaugetwf/web/Seiten/Leistungsdaten_PL2.aspx" + ] + }, + { + "Cmd": "Pl3Pls", + "Urls": [ + "http://10.10.202.10/SKPL3Web/index.asp" + ] + }, + { + "Cmd": "Pl3Lst", + "Urls": [ + "http://desiaugetwf.fondium.org/web/Seiten/Leistungsdaten_FuG.aspx?Fkt=PL3" + ] + }, + { + "Cmd": "Gitea", + "Urls": [ + "http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1" + ] + }, + { + "Cmd": "Wiki", + "Urls": [ + "http://desiaugetc7-088:3001/en/home" + ] + }, + { + "Cmd": "Erp", + "Urls": [ + "https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd" + ] + } + ], "Folders": [ { "Plant": "Alg", @@ -191,12 +379,35 @@ "Description": "Eplan Projekt Ablage", "Path": "\\\\fondium.org\\DESI$\\AUG_Abteilung\\Betriebstechnik\\EPL\\P8\\Data\\Projekte\\FSI\\" }, + { + "Plant": "PL1", + "SubPlant": "Alg", + "Description": "PL1 Backupverzeichnis", + "Path": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL1" + }, { "Plant": "PL2", "SubPlant": "Alg", - "Name": "PL2 Backup", - "Description": "PL2 Backupverzeichnis", + "Description": "Backupverzeichnis", "Path": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL2" + }, + { + "Plant": "PL2", + "SubPlant": "SA", + "Description": "Backupverzeichnis", + "Path": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL2\\SA" + }, + { + "Plant": "PL2", + "SubPlant": "FA", + "Description": "Backupverzeichnis", + "Path": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL2\\FA" + }, + { + "Plant": "PL3", + "SubPlant": "Alg", + "Description": "Backupverzeichnis", + "Path": "\\\\10.10.1.40\\Betriebstechnik\\Datensicherung\\1_IuR_Giesserei\\PL3" } ], "TxtToClip": [ @@ -211,12 +422,18 @@ "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" } - ] + ], + "WinCC": { + "AutoStart": false, + "UpdateIntervall": 10, + "WindowsName": "", + "WindowsClassName": "#32770", + "ButtonName": "Zur Kenntnis genommen" + }, + "IbaDirSync": { + "AutoStart": false, + "Source": "d:\\tmp", + "Destination": "c:\\tmp" + } } diff --git a/FSI.BT.Tools/nlog.config b/FSI.BT.Tools/nlog.config index 37879c3..1dc30e9 100644 --- a/FSI.BT.Tools/nlog.config +++ b/FSI.BT.Tools/nlog.config @@ -1,23 +1,36 @@  - - + throwExceptions="false"> + + - - - + + + + - + + + \ No newline at end of file