internal void CheckBox_Click(object sender, RoutedEventArgs e)
        {
            List <string> list      = new List <string>();
            string        str       = string.Empty;
            CheckBox      checkBox1 = (CheckBox)sender;

            if (checkBox1.Name == "checkAll")
            {
                for (int index = 1; index < this.Combo.Items.Count; ++index)
                {
                    ((ToggleButton)this.Combo.Items[index]).IsChecked = checkBox1.IsChecked;
                }
            }
            for (int index = 1; index < this.Combo.Items.Count; ++index)
            {
                CheckBox checkBox2 = (CheckBox)this.Combo.Items[index];
                bool?    isChecked = checkBox2.IsChecked;
                int      num;
                if (isChecked.HasValue)
                {
                    isChecked = checkBox2.IsChecked;
                    num       = !isChecked.Value ? 1 : 0;
                }
                else
                {
                    num = 1;
                }
                if (num == 0)
                {
                    str = checkBox2.Content.ToString();
                    list.Add(str);
                }
            }
            if (list.Count == 0)
            {
                this.Combo.Text = AppResources.OPTION_NONE;
            }
            else if (list.Count == 1)
            {
                this.Combo.Text = str;
            }
            else if (list.Count == this.Combo.Items.Count - 1)
            {
                this.Combo.Text = AppResources.OPTION_ALL;
            }
            else if (list.Count > 1)
            {
                this.Combo.Text = AppResources.OPTION_MULTIPLE;
            }
            CheckedComboEventArgs e1 = new CheckedComboEventArgs(list.ToArray());

            if (this.CheckedComboClickEvent == null)
            {
                return;
            }
            this.CheckedComboClickEvent((object)this, e1);
        }
예제 #2
0
 private void selectedReport_CheckedComboClickEvent(object sender, CheckedComboEventArgs e)
 {
     this.controller.ReportTypes = e.Names;
     if (!this.controller.AutoRefresh)
     {
         return;
     }
     this.controller.Refresh();
     this.InitializeStatusBar();
 }
예제 #3
0
 private void selectedScans_CheckedComboClickEvent(object sender, CheckedComboEventArgs e)
 {
     this.controller.ScanNames = e.Names;
       if (!this.controller.AutoRefresh)
     return;
       this.controller.Refresh();
       this.InitializeStatusBar();
 }
 internal void CheckBox_Click(object sender, RoutedEventArgs e)
 {
     List<string> list = new List<string>();
       string str = string.Empty;
       CheckBox checkBox1 = (CheckBox) sender;
       if (checkBox1.Name == "checkAll")
       {
     for (int index = 1; index < this.Combo.Items.Count; ++index)
       ((ToggleButton) this.Combo.Items[index]).IsChecked = checkBox1.IsChecked;
       }
       for (int index = 1; index < this.Combo.Items.Count; ++index)
       {
     CheckBox checkBox2 = (CheckBox) this.Combo.Items[index];
     bool? isChecked = checkBox2.IsChecked;
     int num;
     if (isChecked.HasValue)
     {
       isChecked = checkBox2.IsChecked;
       num = !isChecked.Value ? 1 : 0;
     }
     else
       num = 1;
     if (num == 0)
     {
       str = checkBox2.Content.ToString();
       list.Add(str);
     }
       }
       if (list.Count == 0)
     this.Combo.Text = AppResources.OPTION_NONE;
       else if (list.Count == 1)
     this.Combo.Text = str;
       else if (list.Count == this.Combo.Items.Count - 1)
     this.Combo.Text = AppResources.OPTION_ALL;
       else if (list.Count > 1)
     this.Combo.Text = AppResources.OPTION_MULTIPLE;
       CheckedComboEventArgs e1 = new CheckedComboEventArgs(list.ToArray());
       if (this.CheckedComboClickEvent == null)
     return;
       this.CheckedComboClickEvent((object) this, e1);
 }