public MachineFrame() { InitializeComponent(); this._stateMonitorManager = new StateMonitorManager(); this._dataObjectRealTimeBackupManager = new DataObjectRealTimeBackupManager(); this._msmqServiceMessage = "MSMQ啟動中,請稍等!"; this._localInformationConfigData = null; this._machineFrameBase = null; this._initializeTimer = new System.Timers.Timer(); this._isInitializing = false; this._initializeTimer.Enabled = false; this._initializeTimer.Interval = 5000; this._initializeTimer.Elapsed += new System.Timers.ElapsedEventHandler(InitializeTimer_Elapsed); }
private void InitializeMachineInfo() { if (this._localInformationConfigData == null || this._localInformationConfigData.MachineInfos == null || this._localInformationConfigData.MachineInfos.Count < 1) { return; } switch (this._localInformationConfigData.ScreenSize) { case ScreenSizeType.Size1024X768: this.Width = 1024; this.Height = 730; break; case ScreenSizeType.Size800X600: this.Width = 800; this.Height = 600; break; default: break; } ScreenSizeFactory.ScreenSize = this._localInformationConfigData.ScreenSize; this._machineFrameBase = ScreenSizeFactory.GetMachineFrame(); this._machineFrameBase.SettingClickEvent += new EventHandler(pbxSetting_Click); this._machineFrameBase.Dock = System.Windows.Forms.DockStyle.Fill; this._machineFrameBase.Location = new System.Drawing.Point(0, 0); this.Controls.Add(this._machineFrameBase); this._machineFrameBase.LocalInformationConfigData = this._localInformationConfigData; this._machineFrameBase.InitialzeData(); }