예제 #1
0
        /// <summary>
        /// switch to the base control
        /// </summary>
        /// <param name="show"></param>
        /// <param name="baseCtrl"></param>
        public void ShowBaseCtrl(bool show, BaseCtrl baseCtrl)
        {
            this.baseCtrl.Visible = false;
            this.baseCtrl.Enabled = false;

            this.baseCtrl = baseCtrl;
            this.Controls.SetChildIndex(this.baseCtrl, 0);

            this.baseCtrl.Visible = show;
            this.baseCtrl.Enabled = show;
        }
예제 #2
0
 /// <summary>
 /// show laser control
 /// </summary>
 /// <param name="show"></param>
 public void ShowBaseCtrl(bool show, int index)
 {
     for (int i = 0; i < this.controls.Count; i++)
     {
         if (this.controls[i].ShowIndex == index)
         {
             this.baseCtrl = controls[index];
             this.Controls.SetChildIndex(this.baseCtrl, 0);
             this.baseCtrl.Visible = show;
             this.baseCtrl.Enabled = show;
             EnableAppearanceButton();
         }
         else
         {
             this.controls[i].Visible = !show;
             this.controls[i].Enabled = !show;
         }
     }
 }