63 lines
2.7 KiB
C#
63 lines
2.7 KiB
C#
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.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]),
|
|
});
|
|
}
|
|
}
|
|
|
|
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();
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|