예제 #1
0
 void IActiveTaskDialog.SetButtonEnabledState(int buttonId, bool enabled)
 {
     if (NormalButtons.Any(b => b.ID == buttonId))
     {
         NormalButtons.First(b => b.ID == buttonId).IsEnabled = enabled;
     }
     else if (CommandLinks.Any(cl => cl.ID == buttonId))
     {
         CommandLinks.First(b => b.ID == buttonId).IsEnabled = enabled;
     }
     else if (RadioButtons.Any(rb => rb.ID == buttonId))
     {
         RadioButtons.First(b => b.ID == buttonId).IsEnabled = enabled;
     }
 }
예제 #2
0
        bool IActiveTaskDialog.ClickButton(int buttonId)
        {
            if (NormalButtons.Any(b => b.ID == buttonId))
            {
                NormalButtonCommand.Execute(buttonId);
                return(true);
            }
            else if (CommandLinks.Any(cl => cl.ID == buttonId))
            {
                CommandLinkCommand.Execute(buttonId);
                return(true);
            }
            else if (RadioButtons.Any(rb => rb.ID == buttonId))
            {
                RadioButtonCommand.Execute(buttonId);
                return(true);
            }

            return(false);
        }
예제 #3
0
 /// <summary>
 /// Checks that all buttons in the set are invisible.
 /// Not equivelent to !AllVisible()
 /// </summary>
 /// <returns></returns>
 public bool AllInvisible()
 {
     return(!RadioButtons.Any(rb => rb.Displayed == true));
 }
예제 #4
0
 /// <summary>
 /// Checks that all buttons in the set are visible.
 /// Not equivelent to !AllInvisible()
 /// </summary>
 /// <returns></returns>
 public bool AllVisible()
 {
     return(!RadioButtons.Any(rb => rb.Displayed == false));
 }