|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using BPASmartClient.CustomResource.Pages.Enums;
- using BPASmartClient.CustomResource.Pages.Model;
- using BPASmartClient.CustomResource.Pages.View;
- using BPASmartClient.Helper;
- using BPASmartClient.Model;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Configuration;
- using System.Data;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows;
- using BPASmart.Server;
- using BPASmartClient.CustomResource.Pages.ViewModel;
-
- namespace BPASmart.DataServer
- {
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : Application
- {
- public static Window MainWindow;
- protected override void OnStartup(StartupEventArgs e)
- {
- base.OnStartup(e);
- AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
- MenuInit();
- MainView mv = new MainView();
- mv.WindowState = WindowState.Normal;
- MainWindow = mv;
- mv.Show();
- BPASmart.Server.Main.GetInstance.Init();
- }
-
- private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
- {
- //数据服务中心异常退出后自动重启
- }
-
- protected override void OnExit(ExitEventArgs e)
- {
- base.OnExit(e);
- }
-
- private void MenuInit()
- {
- #region 消息中心
- ObservableCollection<SubMenumodel> InfoLog = new ObservableCollection<SubMenumodel>();
-
- InfoLog.Add(new SubMenumodel()
- {
- SubMenuName = "消息日志",
- AssemblyName = "BPASmartClient.CustomResource",
- ToggleWindowPath = "Pages.View.DebugLogView",
- SubMenuVisibility = Visibility.Visible,
- });
-
- MenuManage.GetInstance.menuModels.Add(new MenuModel()
- {
- MainMenuIcon = "",
- MainMenuName = "消息中心",
- Alias = "Device Management",
- subMenumodels = InfoLog,
- });
- #endregion
-
-
-
- }
-
- private SubMenumodel AddSubMenuModel(string s)
- {
- return new SubMenumodel()
- {
- SubMenuName = s,
- AssemblyName = "BPASmart.VariableManager",
- ToggleWindowPath = "Views.VariableConfig",
- SubMenuVisibility = Visibility.Visible,
- };
- }
-
- private void DataSave()
- {
- }
-
-
- private void DataRead()
- {
- Json<CommunicationPar>.Read();
- }
- }
- }
|