Beispiel #1
0
 private void SurveysControl_VisibleChanged(object sender, EventArgs e)
 {
     if (!this.Visible)
     {
         if (this.currentControl != null)
         {
             this.Controls.Remove(currentControl);
             currentControl.Dispose();
             currentControl = null;
         }
     }
 }
Beispiel #2
0
 private void PropretyChanged(object o, PropertyChangedEventArgs e)
 {
     if(e.PropertyName != null)
     {
         if (o != null)
         {
             currentControl = (ResultsControl)o;
             this.Controls.Add(currentControl);
             currentControl.BringToFront();
             currentControl.Show();
         }
         else
         {
             OnNotifyPropertyChanged(e.PropertyName);
         }
     }
 }