private void dockPanel1_ActiveDocumentChanged(object sender, EventArgs e) { if (!(((DockPanel)sender).ActiveContent is frmTick)) { return; } frmTick tickForm = (frmTick)((DockPanel)sender).ActiveContent; if (tickForm != null) { Util.OrderSettingForm.ChangeInfo(tickForm.Tick); Util.OrderRPTForm.ChangeProduct(tickForm.Tick); Util.SummaryForm.ChangeProduct(tickForm.Tick); } }
private void tsConnect_Click(object sender, EventArgs e) { switch ((sender as ToolStripItem).Name) { case nameof(tsConnect): if (Util.PATS.isConnected) { return; } tsConnect.Enabled = false; Util.PATS.Connect(); break; case nameof(tsDisconnect): if (!Util.PATS.isConnected) { return; } tsConnect.Enabled = true; Util.PATS.Disconnect(); break; case nameof(tsOrder): frmTick tick = new frmTick(Util.TickSeqNo.NextNumber()); tick.Show(dockPanel1); break; case nameof(tsConnectSetting): Util.SettingForm.Show(dockPanel1, DockState.DockRight); break; case nameof(tsOrderSetting): Util.OrderSettingForm.Show(dockPanel1, DockState.DockRight); break; case nameof(tsProductSetting): Util.ProdFilterForm.ShowDialog(this); break; case nameof(tsOrderReport): Util.OrderRPTForm.Show(dockPanel1); break; case nameof(tsDealReport): Util.DealRPTForm.Show(dockPanel1); break; case nameof(tsCancelReport): Util.CancelRPTForm.Show(dockPanel1); break; case nameof(tsErrReport): Util.ErrRPTForm.Show(dockPanel1); break; case nameof(tsSummary): Util.SummaryForm.Show(dockPanel1); break; } }