Sicherung

This commit is contained in:
maier_S
2022-03-23 14:16:48 +01:00
parent fef3fa4274
commit ede0ae35bd
16 changed files with 152 additions and 89 deletions

View File

@@ -11,8 +11,8 @@ namespace FSI.BT.Tools
/// </summary> /// </summary>
public partial class App : System.Windows.Application public partial class App : System.Windows.Application
{ {
private static readonly KeyGesture RadialMenu = new(Key.OemBackslash, ModifierKeys.Control); private static readonly KeyGesture RadialMenu = new KeyGesture(Key.OemBackslash, ModifierKeys.Control);
private static readonly KeyGesture TimeStamp = new(Key.C, ModifierKeys.Control | ModifierKeys.Alt); private static readonly KeyGesture TimeStamp = new KeyGesture(Key.C, ModifierKeys.Control | ModifierKeys.Alt);
public void Application_Startup(object sender, StartupEventArgs e) public void Application_Startup(object sender, StartupEventArgs e)
{ {
@@ -20,7 +20,6 @@ namespace FSI.BT.Tools
Global.Settings = new AppSettings(GetType().Namespace.ToString() + ".xml"); Global.Settings = new AppSettings(GetType().Namespace.ToString() + ".xml");
Global.Settings.Load(); Global.Settings.Load();
Global.TaskbarIcon = (TaskbarIcon)FindResource("FSINotifyIcon"); Global.TaskbarIcon = (TaskbarIcon)FindResource("FSINotifyIcon");
Global.AdminRights = Admin.CheckAdminRight(); Global.AdminRights = Admin.CheckAdminRight();
@@ -28,19 +27,17 @@ namespace FSI.BT.Tools
Global.UserRights = Admin.CheckUserRight(); Global.UserRights = Admin.CheckUserRight();
HotkeyManager.Current.AddOrReplace("RadialMenu", RadialMenu, ShowRadialMenu); HotkeyManager.Current.AddOrReplace("RadialMenu", RadialMenu, ShowRadialMenu);
HotkeyManager.Current.AddOrReplace("TimeStampToClipboard", TimeStamp, TimeStampToClipboard); HotkeyManager.Current.AddOrReplace("TimeStampToClipboard", TimeStamp, TimeStampToClipboard);
Global.FrmRadialMenu = new(); Global.FrmRadialMenu = new FrmRadialMenu();
Global.WinCC = new() Global.WinCC = new Lib.Guis.SieTiaWinCCMsgMgt.WinCC(
{ Global.Settings.SieTiaWinCCMsgMgtAutostart,
AutoStart = Global.Settings.SieTiaWinCCMsgMgtAutostart, Global.Settings.SieTiaWinCCMsgMgtUpdateIntervall,
UpdateIntervall = Global.Settings.SieTiaWinCCMsgMgtUpdateIntervall, Global.Settings.SieTiaWinCCMsgMgtWindowsName,
WindowsName = Global.Settings.SieTiaWinCCMsgMgtWindowsName, Global.Settings.SieTiaWinCCMsgMgtClassName,
WindowsClassName = Global.Settings.SieTiaWinCCMsgMgtClassName, Global.Settings.SieTiaWinCCMsgMgtBtnName
ButtonName = Global.Settings.SieTiaWinCCMsgMgtBtnName, );
};
} }
private void ShowRadialMenu(object sender, HotkeyEventArgs e) private void ShowRadialMenu(object sender, HotkeyEventArgs e)

View File

@@ -13,52 +13,54 @@ namespace FSI.BT.Tools
} }
[EncryptedSetting] [EncryptedSetting]
public string[]? Users { get; set; } public string[] Users { get; set; }
[EncryptedSetting] [EncryptedSetting]
public string[]? Admins{ get; set; } public string[] Admins{ get; set; }
public string? SuperAdmin{ get; set; } [EncryptedSetting]
public string? TimeStampFormat { get; set; } public string SuperAdmin{ get; set; }
public string[]? SieSimaticManagerExe { get; set; } public string TimeStampFormat { get; set; }
public string[]? SieTiaV13Exe { get; set; } public string[] SieSimaticManagerExe { get; set; }
public string[]? SieTiaV14Exe { get; set; } public string[] SieTiaV13Exe { get; set; }
public string[]? SieTiaV15Exe { get; set; } public string[] SieTiaV14Exe { get; set; }
public string[]? SieTiaV16Exe { get; set; } public string[] SieTiaV15Exe { get; set; }
public string[]? SieTiaV17Exe { get; set; } public string[] SieTiaV16Exe { get; set; }
public string[]? SieTiaVStarterExe { get; set; } public string[] SieTiaV17Exe { get; set; }
public string[]? EplExe { get; set; } public string[] SieTiaVStarterExe { get; set; }
public string? EplArguments { get; set; } public string[] EplExe { get; set; }
public string[]? NppExe { get; set; } public string EplArguments { get; set; }
public string[]? TotalCmdExe { get; set; } public string[] NppExe { get; set; }
public string[]? TeXstudioExe { get; set; } public string[] TotalCmdExe { get; set; }
public string[]? TeXstudioPath { get; set; } public string[] TeXstudioExe { get; set; }
public string[]? VsExe { get; set; } public string[] TeXstudioPath { get; set; }
public string[]? VsCodeExe { get; set; } public string[] VsExe { get; set; }
public string[]? RdpExe { get; set; } public string[] VsCodeExe { get; set; }
public string[]? OutlookExe { get; set; } public string[] RdpExe { get; set; }
public string[]? TeamsExe { get; set; } public string[] OutlookExe { get; set; }
public string? TeamsArg { get; set; } public string[] TeamsExe { get; set; }
public string[]? ExcelExe { get; set; } public string TeamsArg { get; set; }
public string[]? WordExe { get; set; } public string[] ExcelExe { get; set; }
public string[]? PaintNetExe { get; set; } public string[] WordExe { get; set; }
public string[]? GimpExe { get; set; } public string[] PaintNetExe { get; set; }
public string[]? VncExe { get; set; } public string[] GimpExe { get; set; }
public string[]? VncAdrBookExe { get; set; } public string[] VncExe { get; set; }
public string? ZentralWebUrl { get; set; } public string[] VncAdrBookExe { get; set; }
public string? SchichtbuchUrl { get; set; } public string[] IbaAnalyzerExe { get; set; }
public string? SPSUrl { get; set; } public string ZentralWebUrl { get; set; }
public string? Pl1PlsUrl { get; set; } public string SchichtbuchUrl { get; set; }
public string? Pl2PlsUrl { get; set; } public string SPSUrl { get; set; }
public string? Pl2Als { get; set; } public string Pl1PlsUrl { get; set; }
public string? Pl3PlsUrl { get; set; } public string Pl2PlsUrl { get; set; }
public string? GiteaUrl { get; set; } public string Pl2Als { get; set; }
public string? WikiUrl { get; set; } public string Pl3PlsUrl { get; set; }
public string? ErpUrl { get; set; } public string GiteaUrl { get; set; }
public string? EplPdfPath { get; set; } public string WikiUrl { get; set; }
public string? EplPrjPath { get; set; } public string ErpUrl { get; set; }
public string EplPdfPath { get; set; }
public string EplPrjPath { get; set; }
public bool SieTiaWinCCMsgMgtAutostart { get; set; } public bool SieTiaWinCCMsgMgtAutostart { get; set; }
public int SieTiaWinCCMsgMgtUpdateIntervall { get; set; } public int SieTiaWinCCMsgMgtUpdateIntervall { get; set; }
public string? SieTiaWinCCMsgMgtWindowsName { get; set; } public string SieTiaWinCCMsgMgtWindowsName { get; set; }
public string? SieTiaWinCCMsgMgtClassName { get; set; } public string SieTiaWinCCMsgMgtClassName { get; set; }
public string? SieTiaWinCCMsgMgtBtnName { get; set; } public string SieTiaWinCCMsgMgtBtnName { get; set; }
} }
} }

View File

@@ -19,7 +19,7 @@ namespace FSI.BT.Tools.Commands
/// <summary> /// <summary>
/// A singleton instance. /// A singleton instance.
/// </summary> /// </summary>
private static T? command; private static T command;
/// <summary> /// <summary>
/// Gets a shared command instance. /// Gets a shared command instance.
@@ -83,7 +83,7 @@ namespace FSI.BT.Tools.Commands
/// </summary> /// </summary>
/// <param name="commandParameter"></param> /// <param name="commandParameter"></param>
/// <returns>Window</returns> /// <returns>Window</returns>
protected Window? GetTaskbarWindow(object commandParameter) protected Window GetTaskbarWindow(object commandParameter)
{ {
if (IsDesignMode) if (IsDesignMode)
return null; return null;
@@ -104,7 +104,7 @@ namespace FSI.BT.Tools.Commands
/// <returns>The first parent item that matches the submitted /// <returns>The first parent item that matches the submitted
/// type parameter. If not matching item can be found, a null /// type parameter. If not matching item can be found, a null
/// reference is being returned.</returns> /// reference is being returned.</returns>
public static TParent? TryFindParent<TParent>(DependencyObject child) where TParent : DependencyObject public static TParent TryFindParent<TParent>(DependencyObject child) where TParent : DependencyObject
{ {
//get parent item //get parent item
DependencyObject parentObject = GetParentObject(child); DependencyObject parentObject = GetParentObject(child);
@@ -131,7 +131,7 @@ namespace FSI.BT.Tools.Commands
/// <param name="child">The item to be processed.</param> /// <param name="child">The item to be processed.</param>
/// <returns>The submitted item's parent, if available. Otherwise /// <returns>The submitted item's parent, if available. Otherwise
/// null.</returns> /// null.</returns>
public static DependencyObject? GetParentObject(DependencyObject child) public static DependencyObject GetParentObject(DependencyObject child)
{ {
if (child == null) return null; if (child == null) return null;
@@ -140,7 +140,7 @@ namespace FSI.BT.Tools.Commands
DependencyObject parent = ContentOperations.GetParent(contentElement); DependencyObject parent = ContentOperations.GetParent(contentElement);
if (parent != null) return parent; if (parent != null) return parent;
FrameworkContentElement? fce = contentElement as FrameworkContentElement; FrameworkContentElement fce = contentElement as FrameworkContentElement;
return fce?.Parent; return fce?.Parent;
} }

View File

@@ -9,7 +9,7 @@ namespace FSI.BT.Tools.Commands
{ {
public override void Execute(object parameter) public override void Execute(object parameter)
{ {
Lib.Guis.AutoPw.FrmMain frmMain = new() Lib.Guis.AutoPw.FrmMain frmMain = new Lib.Guis.AutoPw.FrmMain()
{ {
CloseAtLostFocus = false, CloseAtLostFocus = false,
WindowStartupLocation = WindowStartupLocation.CenterOwner, WindowStartupLocation = WindowStartupLocation.CenterOwner,

View File

@@ -53,7 +53,7 @@ namespace FSI.BT.Tools.Commands
break; break;
case "EplPrj": case "EplPrj":
Lib.Guis.Prj.Mgt.FrmMain frmMainEplPrj = new() Lib.Guis.Prj.Mgt.FrmMain frmMainEplPrj = new Lib.Guis.Prj.Mgt.FrmMain()
{ {
ShowPdf = false, ShowPdf = false,
CloseAtLostFocus = true, CloseAtLostFocus = true,
@@ -65,7 +65,7 @@ namespace FSI.BT.Tools.Commands
return; return;
case "EplPdf": case "EplPdf":
Lib.Guis.Prj.Mgt.FrmMain frmMainEplPdf = new() Lib.Guis.Prj.Mgt.FrmMain frmMainEplPdf = new Lib.Guis.Prj.Mgt.FrmMain()
{ {
ShowPdf = true, ShowPdf = true,
CloseAtLostFocus = true, CloseAtLostFocus = true,
@@ -76,7 +76,7 @@ namespace FSI.BT.Tools.Commands
return; return;
case "EplPdfMgt": case "EplPdfMgt":
Lib.Guis.Pdf.Mgt.FrmMain frmMainEplPdfMgt = new() Lib.Guis.Pdf.Mgt.FrmMain frmMainEplPdfMgt = new Lib.Guis.Pdf.Mgt.FrmMain()
{ {
CloseAtLostFocus = true CloseAtLostFocus = true
}; };
@@ -110,7 +110,7 @@ namespace FSI.BT.Tools.Commands
break; break;
case "DeEncrypt": case "DeEncrypt":
Lib.Guis.DeEncryptMessage.FrmMain frmMainDeEnCrypt = new() Lib.Guis.DeEncryptMessage.FrmMain frmMainDeEnCrypt = new Lib.Guis.DeEncryptMessage.FrmMain()
{ {
Password = GetType().Namespace.ToString(), Password = GetType().Namespace.ToString(),
CloseAtLostFocus = true, CloseAtLostFocus = true,
@@ -120,12 +120,12 @@ namespace FSI.BT.Tools.Commands
return; return;
case "StarterCsvExporter": case "StarterCsvExporter":
Lib.Guis.SieStarterCsvExporter.FrmMain frmMain = new(); Lib.Guis.SieStarterCsvExporter.FrmMain frmMain = new Lib.Guis.SieStarterCsvExporter.FrmMain();
frmMain.Show(); frmMain.Show();
return; return;
case "Admin": case "Admin":
Gui.FrmAdmin frmAdmin = new() Gui.FrmAdmin frmAdmin = new Gui.FrmAdmin()
{ {
Admins = Global.Settings.Admins, Admins = Global.Settings.Admins,
Users = Global.Settings.Users, Users = Global.Settings.Users,
@@ -172,6 +172,10 @@ namespace FSI.BT.Tools.Commands
files = Global.Settings.VncAdrBookExe; files = Global.Settings.VncAdrBookExe;
break; break;
case "IbaAnalyzer":
files = Global.Settings.VncAdrBookExe;
break;
} }
string fileName = string.Empty; string fileName = string.Empty;
@@ -179,10 +183,15 @@ namespace FSI.BT.Tools.Commands
for (int i = 0; i <= files.Length - 1; i++) for (int i = 0; i <= files.Length - 1; i++)
{ {
var test = Environment.ExpandEnvironmentVariables(files[i].Trim());
if (File.Exists(Environment.ExpandEnvironmentVariables(files[i].Trim()))) if (File.Exists(Environment.ExpandEnvironmentVariables(files[i].Trim())))
{ {
fileName = Environment.ExpandEnvironmentVariables(files[i].Trim()); fileName = Environment.ExpandEnvironmentVariables(files[i].Trim());
} }
else
{
continue;
}
if (pathes.Length == 0) if (pathes.Length == 0)
{ {
@@ -200,7 +209,7 @@ namespace FSI.BT.Tools.Commands
} }
else else
{ {
Process process = new(); Process process = new Process();
process.StartInfo.FileName = fileName; process.StartInfo.FileName = fileName;
process.StartInfo.WorkingDirectory = path; process.StartInfo.WorkingDirectory = path;
process.StartInfo.Arguments = arguments; process.StartInfo.Arguments = arguments;
@@ -334,6 +343,10 @@ namespace FSI.BT.Tools.Commands
files = Global.Settings.VncAdrBookExe; files = Global.Settings.VncAdrBookExe;
break; break;
case "IbaAnalyzer":
files = Global.Settings.VncAdrBookExe;
break;
default: return false; default: return false;
} }

View File

@@ -9,7 +9,7 @@ namespace FSI.BT.Tools.Commands
{ {
public override void Execute(object parameter) public override void Execute(object parameter)
{ {
Gui.FrmProcesses frm = new(); Gui.FrmProcesses frm = new Gui.FrmProcesses();
frm.ShowDialog(); frm.ShowDialog();
} }

View File

@@ -31,7 +31,7 @@ namespace FSI.BT.Tools.Commands
public override bool CanExecute(object parameter) public override bool CanExecute(object parameter)
{ {
return Global.AdminRights || Global.UserRights; return Global.UserRights || Global.AdminRights;
} }
} }
} }

View File

@@ -4,13 +4,21 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFrameworks>net472;net6.0-windows</TargetFrameworks> <TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets> <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<ApplicationIcon>Icons\FondiumU.ico</ApplicationIcon> <ApplicationIcon>Icons\FondiumU.ico</ApplicationIcon>
<AssemblyVersion>1.1</AssemblyVersion> <AssemblyVersion>2.0</AssemblyVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<None Remove="Icons\Iba.jpg" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Remove="Icons\Admin.jpg" /> <Resource Remove="Icons\Admin.jpg" />
<Resource Remove="Icons\Apps.png" /> <Resource Remove="Icons\Apps.png" />
@@ -71,6 +79,7 @@
<Resource Include="Icons\FU.png" /> <Resource Include="Icons\FU.png" />
<Resource Include="Icons\Gimp.png" /> <Resource Include="Icons\Gimp.png" />
<Resource Include="Icons\Gitea.png" /> <Resource Include="Icons\Gitea.png" />
<Resource Include="Icons\Iba.jpg" />
<Resource Include="Icons\Info.png" /> <Resource Include="Icons\Info.png" />
<Resource Include="Icons\Links.png" /> <Resource Include="Icons\Links.png" />
<Resource Include="Icons\NPP.png" /> <Resource Include="Icons\NPP.png" />

View File

@@ -2,7 +2,6 @@
<Settings> <Settings>
<Users>+I945AMzKKYBAAAAB21haWVyX3M=</Users> <Users>+I945AMzKKYBAAAAB21haWVyX3M=</Users>
<Admins>e+Dt7FRUDDoBAAAAB21haWVyX3M=</Admins> <Admins>e+Dt7FRUDDoBAAAAB21haWVyX3M=</Admins>
<SuperAdmin>maier_s</SuperAdmin>
<TimeStampFormat>_yyyyMMdd_HHmmss</TimeStampFormat> <TimeStampFormat>_yyyyMMdd_HHmmss</TimeStampFormat>
<SieSimaticManagerExe>C:\Program Files (x86)\Siemens\Step7\S7BIN\S7tgtopx.exe</SieSimaticManagerExe> <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> <SieTiaV13Exe>C:\Program Files (x86)\Siemens\Automation\Portal V13\Bin\Siemens.Automation.Portal.exe</SieTiaV13Exe>
@@ -29,6 +28,7 @@
<GimpExe>C:\Program Files\GIMP 2\bin\gimp-2.10.exe</GimpExe> <GimpExe>C:\Program Files\GIMP 2\bin\gimp-2.10.exe</GimpExe>
<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> <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> <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> <ZentralWebUrl>http://desiaugetwf/web/?AspxAutoDetectCookieSupport=1</ZentralWebUrl>
<SchichtbuchUrl>http://10.10.1.42/SKSchichtbuchWeb/de-DE/Plugin/ShiftBook/ShiftBook/IR</SchichtbuchUrl> <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> <SPSUrl>http://10.10.1.42/SKChangeTrackerWeb/de-DE/Plugin/ChangeTracker</SPSUrl>
@@ -43,7 +43,7 @@
<EplPrjPath>\\fondium.org\DESI$\AUG_Abteilung\Betriebstechnik\EPL\P8\Data\Projekte\FSI\</EplPrjPath> <EplPrjPath>\\fondium.org\DESI$\AUG_Abteilung\Betriebstechnik\EPL\P8\Data\Projekte\FSI\</EplPrjPath>
<SieTiaWinCCMsgMgtAutostart>true</SieTiaWinCCMsgMgtAutostart> <SieTiaWinCCMsgMgtAutostart>true</SieTiaWinCCMsgMgtAutostart>
<SieTiaWinCCMsgMgtUpdateIntervall>10</SieTiaWinCCMsgMgtUpdateIntervall> <SieTiaWinCCMsgMgtUpdateIntervall>10</SieTiaWinCCMsgMgtUpdateIntervall>
<SieTiaWinCCMsgMgtWindowsName>#32770</SieTiaWinCCMsgMgtWindowsName> <SieTiaWinCCMsgMgtWindowsName></SieTiaWinCCMsgMgtWindowsName>
<SieTiaWinCCMsgMgtClassName>10</SieTiaWinCCMsgMgtClassName> <SieTiaWinCCMsgMgtClassName>#32770</SieTiaWinCCMsgMgtClassName>
<SieTiaWinCCMsgMgtBtnName>Zur Kenntnis genommen</SieTiaWinCCMsgMgtBtnName> <SieTiaWinCCMsgMgtBtnName>Zur Kenntnis genommen</SieTiaWinCCMsgMgtBtnName>
</Settings> </Settings>

View File

@@ -806,6 +806,22 @@
</WrapPanel> </WrapPanel>
</RadialMenu:RadialMenuItem> </RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="IbaAnalyzer">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/Iba.jpg" />
</Rectangle.Fill>
</Rectangle>
<TextBlock FontSize="14"
TextAlignment="Center">
Iba<LineBreak />Analyser
</TextBlock>
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{Binding OpenRadialMenuAppsVncRdp}"> <RadialMenu:RadialMenuItem Command="{Binding OpenRadialMenuAppsVncRdp}">
<WrapPanel Orientation="Vertical"> <WrapPanel Orientation="Vertical">
<Rectangle Width="30" <Rectangle Width="30"

View File

@@ -2,9 +2,7 @@
using System.ComponentModel; using System.ComponentModel;
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows; using System.Windows;
using System.Windows.Forms;
using System.Windows.Input; using System.Windows.Input;
namespace FSI.BT.Tools namespace FSI.BT.Tools
@@ -277,7 +275,7 @@ namespace FSI.BT.Tools
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
void RaisePropertyChanged([CallerMemberName] string? propertyName = null) void RaisePropertyChanged([CallerMemberName] string propertyName = null)
{ {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
} }

View File

@@ -6,10 +6,10 @@ namespace FSI.BT.Tools
{ {
internal static class Global internal static class Global
{ {
public static FrmRadialMenu? FrmRadialMenu { get; set; } public static FrmRadialMenu FrmRadialMenu { get; set; }
public static TaskbarIcon? TaskbarIcon { get; set; } public static TaskbarIcon TaskbarIcon { get; set; }
public static WinCC WinCC { get; set; } public static WinCC WinCC { get; set; }
public static AppSettings? Settings { get; set; } public static AppSettings Settings { get; set; }
public static bool UserRights { get; set; } public static bool UserRights { get; set; }
public static bool AdminRights { get; set; } public static bool AdminRights { get; set; }
public static bool SuperAdminRights { get; set; } public static bool SuperAdminRights { get; set; }

View File

@@ -30,8 +30,13 @@ namespace FSI.BT.Tools.Gui
private void btnOk_Click(object sender, RoutedEventArgs e) private void btnOk_Click(object sender, RoutedEventArgs e)
{ {
#if NET472
Admins = tbAdmins.Text.Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
Users = tbUsers.Text.Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
#elif NET6_0
Admins = tbAdmins.Text.Split(Environment.NewLine); Admins = tbAdmins.Text.Split(Environment.NewLine);
Users = tbUsers.Text.Split(Environment.NewLine); Users = tbUsers.Text.Split(Environment.NewLine);
#endif
DialogResult = true; DialogResult = true;
Close(); Close();
} }

BIN
FSI.BT.Tools/Icons/Iba.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -59,6 +59,25 @@ namespace FSI.Lib.Guis.SieTiaWinCCMsgMgt
backgroundWorker.DoWork += BackgroundWorker_DoWork; backgroundWorker.DoWork += BackgroundWorker_DoWork;
backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged; backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
}
public WinCC(bool autoStart, int updateIntervall, string windowsName, string windowsClassName, string buttonName)
{
AutoStart = autoStart;
UpdateIntervall = updateIntervall;
WindowsName = windowsName;
WindowsClassName = windowsClassName;
ButtonName = buttonName;
backgroundWorker = new BackgroundWorker
{
WorkerReportsProgress = true,
WorkerSupportsCancellation = true
};
backgroundWorker.DoWork += BackgroundWorker_DoWork;
backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
if (AutoStart) if (AutoStart)
{ {
Start(); Start();

View File

@@ -18,6 +18,10 @@
<Product>NotifyIcon WPF</Product> <Product>NotifyIcon WPF</Product>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="D:\WrkDir\FSI.BT.Tools\NotifyIconWpf\\icon.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Diagrams\TaskbarIcon Overview.cd" /> <None Include="Diagrams\TaskbarIcon Overview.cd" />
</ItemGroup> </ItemGroup>