예제 #1
0
 private void UnCheckAllDecorButton_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < DecorCheckedListBox.Items.Count; i++)
     {
         DecorCheckedListBox.SetItemChecked(i, false);
     }
 }
예제 #2
0
        private void DecorCheckedListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            int actualcount = listBox2_selectionhistory.Count;

            if (actualcount == 1)
            {
                if (Control.ModifierKeys == Keys.Shift)
                {
                    int lastindex    = listBox2_selectionhistory[0];
                    int currentindex = DecorCheckedListBox.SelectedIndex;
                    int upper        = Math.Max(lastindex, currentindex);
                    int lower        = Math.Min(lastindex, currentindex);
                    for (int i = lower; i <= upper; i++)
                    {
                        DecorCheckedListBox.SetItemCheckState(i, CheckState.Checked);
                    }
                }
                listBox2_selectionhistory.Clear();
                listBox2_selectionhistory.Add(DecorCheckedListBox.SelectedIndex);
            }
            else
            {
                listBox2_selectionhistory.Clear();
                listBox2_selectionhistory.Add(DecorCheckedListBox.SelectedIndex);
            }
        }
예제 #3
0
        private void ArchDecorButton_CheckedChanged(object sender, EventArgs e)
        {
            int ProductID = 0;

            for (int i = 0; i < DecorCheckedListBox.Items.Count; i++)
            {
                DataRowView castedItem = (DataRowView)DecorCheckedListBox.Items[i];
                ProductID = Convert.ToInt32(castedItem["ProductID"]);
                if (ProductID == 31 || ProductID == 4 || ProductID == 32 ||
                    ProductID == 24 || ProductID == 18 || ProductID == 19 ||
                    ProductID == 27 || ProductID == 28 || ProductID == 26 ||
                    ProductID == 11 || ProductID == 12)
                {
                    continue;
                }
                else
                {
                    DecorCheckedListBox.SetItemChecked(i, ArchDecorButton.Checked);
                }
            }
        }