コード例 #1
0
 private void txtBalance_Enter(object sender, EventArgs e)
 {
     if (FormState != FormStates.fsView)
     {
         IAppHandler.SetLabelColorOnEnter(lblBalance);
     }
 }
コード例 #2
0
 private void txtConfirmPassword_Enter(object sender, EventArgs e)
 {
     if (FormState != FormStates.fsView)
     {
         IAppHandler.SetLabelColorOnEnter(lblConfirmPassword);
     }
 }
コード例 #3
0
        //this procedure will assign the color of its corresponding label
        //when its corresponding control has been focused
        private void SetLabelsColor()
        {
            if (!LabelColorsEventAssigned)
            {
                foreach (JkMasterColumn column in MasterColumns)
                {
                    if (!String.IsNullOrWhiteSpace(column.LabelName) &&
                        !String.IsNullOrWhiteSpace(column.ControlName))
                    {
                        Control label   = splitContainer.Panel2.Controls.Find(column.LabelName, true).First();
                        Control control = splitContainer.Panel2.Controls.Find(column.ControlName, true).First();

                        if (label != null &&
                            control != null)
                        {
                            control.Enter += (obj, e) =>
                            {
                                if (FormState != FormStates.fsView)
                                {
                                    IAppHandler.SetLabelColorOnEnter(label as Label);
                                }
                            };

                            control.Leave += (obj, e) =>
                            {
                                IAppHandler.SetLabelColorOnLeave(label as Label);
                            };
                        }
                    }
                }
                LabelColorsEventAssigned = true;
            }
        }
コード例 #4
0
 private void txtPassword_Enter(object sender, EventArgs e)
 {
     IAppHandler.SetLabelColorOnEnter(lblPassword);
 }
コード例 #5
0
 private void txtUsername_Enter(object sender, EventArgs e)
 {
     IAppHandler.SetLabelColorOnEnter(lblUsername);
 }