public void Dispose() { if (Container == null) { if (fView != null) { SignalsPanel.Visible = !fView.IsDisposed; if (!fView.IsDisposed) { fView.Close(); fView = null; } } } else { if (ucSignals != null) { ucSignals.SavePanels(); ucSignals.Dispose(); ucSignals = null; } } SavePanels(signalPars0); SavePanels(signalPars1); Stop(); ResetAll(); }
public void Show() { if (Container == null) { if (fView == null) { fView = new FView(L_WindowLPars.CurrentWins, this, SignalsPanel); } else if (fView.IsDisposed) { fView = new FView(L_WindowLPars.CurrentWins, this, SignalsPanel); } fView.Show(); } else { if (ucSignals == null) { ucSignals = new UCSignals(); ucSignals.IsAlive = SignalsPanel.Alive; ucSignals.Init(this, SignalsPanel.PanelWidth, SignalsPanel.PanelsDefault); ucSignals.Dock = DockStyle.Fill; if (Container is Form) { (Container as Form).Controls.Add(ucSignals); } else if (Container is Panel) { (Container as Panel).Controls.Add(ucSignals); } } } }