Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public MainFrame(LocalInformationConfigData localInfo, MachineLocalInformationConfig machineLocalInfo)
        {
            InitializeComponent();

            this.InitializeMainFrameControl();

            this._ControlCenter = new ControlCenter(localInfo, machineLocalInfo);
            this._ControlCenter.MessageEvent += new EventHandler<EventBaseInfo<string>>(ControlCenter_MessageEvent);
            this._ControlCenter.FunctionFormShowEvent += new EventHandler<EventBaseInfo<string>>(ControlCenter_FunctionFormShowEvent);
            this._ControlCenter.ServiceConnectionStatusChangeEvent += new EventHandler<EventBaseInfo<CommonDefine.ConnectionStatus>>(ControlCenter_ServiceConnectionStatusChangeEvent);
            this._ControlCenter.DinnerEvent += new EventHandler<EventBaseInfo<bool>>(ControlCenter_DinnerEvent);
            this._ControlCenter.MachineConnectionStatusChangeEvent += new EventHandler<EventBaseInfo<CommonDefine.ConnectionStatus>>(ControlCenter_MachineConnectionStatusChangeEvent);
            this._ControlCenter.GotoHomePageEvent += new EventHandler(ControlCenter_GotoHomePageEvent);
            this._ControlCenter.ExceptionEventInformation += new EventHandler<EventBaseInfo<ExceptionInformation>>(ControlCenter_ExceptionEventInformation);

            this._datatimeShowTimer = new System.Timers.Timer();
            this._datatimeShowTimer.Interval = 1000;
            this._datatimeShowTimer.Enabled = true;
            this._datatimeShowTimer.Elapsed += new System.Timers.ElapsedEventHandler(DatatimeShowTimer_Elapsed);

            this._isOpenKeyBoard = false;
            this._isExitSystem = false;
            this._mainFrameBase.ExceptionMessageLabel.Text = "";
        }
Esempio n. 3
0
        private bool SetLocalInfoConfigData()
        {
            bool isSuccessed = false;
            try
            {
                this._localInformationConfigData = this._stateMonitorManager.GetLocalInfoConfigData();
            }
            catch (Exception ex)
            {
                this.ShowErrorMessage(ex);

                return isSuccessed;
            }

            if (this._localInformationConfigData != null && this._localInformationConfigData.MachineInfos != null && this._localInformationConfigData.MachineInfos.Count > 0)
            {
                isSuccessed = true;
            }

            return isSuccessed;
        }
Esempio n. 4
0
        private void RegisterMachineID_Load(object sender, EventArgs e)
        {
            GetCommInfo();

            if (this._isRegisterNewMachine)
            {
                this.SetScreenSizeType();

                //初始設置
                this._machineSetting = new LocalInformationConfigData();
                this._machineSetting.MachineInfos = new List<MachineLocalInformationConfig>();
                UnLockUISetting();

            }
            else
            {
                base.StartAutoCloseTimer(5);

                try
                {
                    //讀取設置
                    this._machineSetting = this._stateMonitorManager.GetLocalInfoConfigData();

                    if (this._machineSetting != null)
                    {
                        this.txtPPCName.Text = this._machineSetting.PPCMark;
                        this.txtDepartment.Text = this._machineSetting.Department;
                        this.lvwMain.SetDataSource(this._machineSetting.MachineInfos);
                    }
                    else
                    {
                        this._machineSetting = new LocalInformationConfigData();
                        this._machineSetting.MachineInfos = new List<MachineLocalInformationConfig>();
                    }

                    LockUISetting();
                }
                catch (Exception Ex)
                {

                    ShowErrorMessage(Ex.Message);
                }
            }

            FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(Application.ExecutablePath);
            this.lblSystemVersion.Text ="系統版本:"+ fileVersion.FileVersion.ToString();
        }
 /// <summary>
 /// 保存本地設置信息
 /// </summary>
 /// <param name="configData">信息設置數據</param>
 /// <returns></returns>
 public abstract Model.General.ReturnValueInfo SaveLocalInformationConfigData(LocalInformationConfigData configData);