| | |
| | | //}); |
| | | |
| | | m_deserializeMenuFrm = new DeserializeDockContent(GetMenuFromPersistString); |
| | | LoadLayoutFromXML(m_deserializeMenuFrm); |
| | | |
| | | m_deserializeDeviceRunFrm = new DeserializeDockContent(GetAllFormPersistString); |
| | | _allMenuLoadDoneHandle.Set(); |
| | | |
| | | //LoadLayoutFromXML(m_deserializeMenuFrm); |
| | | //_allMenuLoadDoneHandle.Set(); |
| | | |
| | | Text = SettingHelper.GetProgramDescription(); |
| | | string iconPath = SettingHelper.GetProgramIcon(); |
| | |
| | | private void RegisterEvent(MenuFrmBase dockFrm) |
| | | { |
| | | dockFrm.OnUploadProcess = DockFrm_OnUploadProcess; |
| | | dockFrm.OnLogMsgOutput = DockFrm_OnLogMsgOutput; |
| | | |
| | | dockFrm.OnLogMsgOutput -= DockFrm_OnLogMsgOutput; |
| | | dockFrm.OnLogMsgOutput += DockFrm_OnLogMsgOutput; |
| | | |
| | | //if (dockFrm is FrmDevices) |
| | | //{ |
| | |
| | | CloseAllDeviceFrm(); |
| | | LoadDevices(); |
| | | |
| | | foreach (var dock in dockPanelMain.Contents) |
| | | try |
| | | { |
| | | MenuFrmBase m = dock as MenuFrmBase; |
| | | |
| | | if (m != null && m.Id != frmId) |
| | | foreach (var dock in dockPanelMain.Contents) |
| | | { |
| | | m.DownloadProcess(process); |
| | | MenuFrmBase m = dock as MenuFrmBase; |
| | | |
| | | if (m != null && m.Id != frmId) |
| | | { |
| | | m.DownloadProcess(process); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void Process_OnAlarmUpdate(string alarmMsg) |
| | | private async void Process_OnAlarmUpdate(string alarmMsg) |
| | | { |
| | | tsslWarning.Text = alarmMsg; |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | tsslWarning.Text = alarmMsg; |
| | | })); |
| | | |
| | | await Task.Delay(100); |
| | | } |
| | | |
| | | private ToolStripMenuItem GetMatchNode(ToolStripItemCollection items, string parentMenuCode) |
| | |
| | | |
| | | private void MainFrm_Load(object sender, EventArgs e) |
| | | { |
| | | LoadLayoutFromXML(m_deserializeMenuFrm); |
| | | _allMenuLoadDoneHandle.Set(); |
| | | |
| | | AdvancedPwdFrm.OnLoginOK = OnLoginOK; |
| | | |
| | | SpinWait wait = new SpinWait(); |
| | | while (_process == null) |
| | | { |
| | | wait.SpinOnce(); |
| | | } |
| | | //SpinWait wait = new SpinWait(); |
| | | //while (_process == null) |
| | | //{ |
| | | // wait.SpinOnce(); |
| | | //} |
| | | LoadLayoutFromXML(m_deserializeDeviceRunFrm); |
| | | } |
| | | |
| | |
| | | |
| | | private void OnLoginOK(bool isLogin) |
| | | { |
| | | IsLogin = true; |
| | | IsLogin = isLogin; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | |
| | | dockFrm.Text = desc[2]; |
| | | |
| | | if (_process != null) |
| | | { |
| | | dockFrm.DownloadProcess(_process); |
| | | } |
| | | //if (_process != null) |
| | | //{ |
| | | // dockFrm.DownloadProcess(_process); |
| | | //} |
| | | |
| | | dockFrm.SetLoginStatus(IsLogin); |
| | | |
| | |
| | | |
| | | dockFrm.Text = desc[2]; |
| | | |
| | | if (_process != null) |
| | | { |
| | | dockFrm.DownloadProcess(_process); |
| | | } |
| | | //if (_process != null) |
| | | //{ |
| | | // dockFrm.DownloadProcess(_process); |
| | | //} |
| | | |
| | | dockFrm.SetLoginStatus(IsLogin); |
| | | |