Пример #1
0
 public LoginWindow()
 {
     InitializeComponent();
     globalInitial();
     initializeComponentContents();
     LanguageChangedNotifier.getInstance().addListener(this);
 }
Пример #2
0
 public MainWindow(String userName, OperationLevelEnum operationLevel)
 {
     MainWindow.userName       = userName;
     MainWindow.operationLevel = operationLevel;
     try
     {
         InitializeComponent();
         // 窗体所有文字初始化与监听注册
         initializeComponentContents();
         LanguageChangedNotifier.getInstance().addListener(this);
         // 插件加载
         pluginManager.loadPlugins();
         // 报警模块初始化
         AlarmModuleInit();
         // “系统”菜单初始化(菜单中的系统选项)
         SysMenuInit();
         // 界面窗体大小设置
         this.Width  = SystemParameters.WorkArea.Size.Width / 1.25;
         this.Height = SystemParameters.WorkArea.Size.Height / 1.25;
     }
     catch (Exception er)
     {
         FrontFramework.Log.LogUtil.writeFuncErrorLog("主界面初始化异常", er);
         System.Environment.Exit(0);
     }
 }
 public PluginManageWindow(MainWindow father)
 {
     InitializeComponent();
     initializeComponentContents();
     this.father = father;
     LanguageChangedNotifier.getInstance().addListener(this);
 }
 public AboutBox(Window father)
 {
     InitializeComponent();
     initializeComponentContents();
     this.Left = father.Left + father.Width / 2 - this.Width / 2;
     this.Top  = father.Top + father.Height / 2 - this.Height / 2;
     LanguageChangedNotifier.getInstance().addListener(this);
 }
Пример #5
0
 public ViewSetting(MainWindow father)
 {
     InitializeComponent();
     this.father = father;
     this.Left   = father.Left + father.Width / 2 - this.Width / 2;
     this.Top    = father.Top + father.Height / 2 - this.Height / 2;
     initializeComponentContents();
     LanguageChangedNotifier.getInstance().addListener(this);
 }
Пример #6
0
 public void pluginInitial()
 {
     // 监听线程初始化
     listeningThread      = new Thread(new ThreadStart(this.observeBasEventQueue));
     listeningThread.Name = "Thread: " + getPluginId();
     listeningThread.Start();
     //
     LanguageChangedNotifier.getInstance().addListener(this);
 }
 public DeleteVerify(PluginManageWindow father)
 {
     InitializeComponent();
     initializeComponentContents();
     this.father = father;
     this.Left   = father.Left + father.ActualWidth / 2 - this.ActualWidth / 2;
     this.Top    = father.Top + father.ActualHeight / 2 - this.ActualHeight / 2;
     LanguageChangedNotifier.getInstance().addListener(this);
 }
Пример #8
0
 public Add(DictionaryEditor father)
 {
     InitializeComponent();
     initializeComponentContents();
     this.father = father;
     this.Left   = father.Left + father.Width / 2 - this.Width / 2;
     this.Top    = father.Top + father.Height / 2 - this.Height / 2;
     LanguageChangedNotifier.getInstance().addListener(this);
 }
 public DictionaryEditor(Window father)
 {
     InitializeComponent();
     initializeComponentContents();
     loadData();
     dataGrid.ItemsSource = gridData;
     dataGrid.IsReadOnly  = true;
     this.Left            = father.Left + father.Width / 2 - this.Width / 2;
     this.Top             = father.Top + father.Height / 2 - this.Height / 2;
     LanguageChangedNotifier.getInstance().addListener(this);
 }
Пример #10
0
 private void languageComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (languageComboBox.SelectedValue != null)
     {
         if ((LanguageEnum)languageComboBox.SelectedValue == LanguageEnum.ENGLISH)
         {
             translator.setLanguage(LanguageEnum.CHINESE, LanguageEnum.ENGLISH);
         }
         else
         {
             translator.setLanguage(LanguageEnum.ENGLISH, LanguageEnum.CHINESE);
         }
         LanguageChangedNotifier.getInstance().notifyAll();
     }
 }
Пример #11
0
 public Delete(DictionaryEditor father)
 {
     InitializeComponent();
     initializeComponentContents();
     this.father = father;
     this.Left   = father.Left + father.Width / 2 - this.Width / 2;
     this.Top    = father.Top + father.Height / 2 - this.Height / 2;
     LanguageChangedNotifier.getInstance().addListener(this);
     if (father.dataGrid.SelectedCells.Count != 0)
     {
         chInput.Text = ((TransDataModel)father.dataGrid.SelectedCells[0].Item).chinese;
         enInput.Text = ((TransDataModel)father.dataGrid.SelectedCells[0].Item).english;
         id           = ((TransDataModel)father.dataGrid.SelectedCells[0].Item).id;
     }
     else
     {
         new Alert(
             translator.getComponentTranslation(new String[] { "Please", "Choose", "One", "Row" }) + "!",
             father).ShowDialog();
         this.Close();
     }
 }
 public AlarmDetails()
 {
     InitializeComponent();
     initializeComponentContents();
     LanguageChangedNotifier.getInstance().addListener(this);
 }