private void NotifyOnPropertyChanged(PhaseControl phaseControl, string propertyName) { var tmp = PropertyChanged; if (tmp != null) { tmp(phaseControl, new PropertyChangedEventArgs(propertyName)); } }
private void CurrentPhaseChanged(object o, PropertyChangedEventArgs e) { if (o != null) { currentControl = (PhaseControl)o; this.Controls.Add(currentControl); currentControl.BringToFront(); currentControl.Show(); } }
private void buttonEnter_Click(object sender, EventArgs e) { PhaseControl phaseControl = new PhaseControl(this.viewModel.survey); phaseControl.Visible = false; phaseControl.Dock = System.Windows.Forms.DockStyle.Fill; phaseControl.AutoScaleMode = AutoScaleMode.None; phaseControl.Name = "projectContextView"; NotifyOnPropertyChanged(phaseControl, ""); }
private void ModelInfo_VisibleChanged(object sender, EventArgs e) { if (!this.Visible) { if (this.currentControl != null) { this.Controls.Remove(currentControl); currentControl.Dispose(); currentControl = null; } } }