Пример #1
0
        void CListview_ItemCheck(object objSender, ItemCheckEventArgs objArgs)
        {
            if (_selecting || _handleAll) return;

            try
            {
                //this.Visible = false;
                //this.SuspendLayout();
                _checking = true;

                foreach (ListViewItem item in this.Items)
                {
                    if (item.Checked != item.Selected)
                    {
                        item.Selected = item.Checked;
                    }
                }
            }
            finally
            {
                _checking = false;
                //this.Visible = true;
            }
        }
Пример #2
0
 private void OnItemCheck(object sender, ItemCheckEventArgs e)
 {
     UpdateSubFolderOptions(e);
 }
Пример #3
0
        /// <summary>
        /// Handle any checking/unchecking of the Select All option, and keep
        /// its checkedness in sync with everything else that is checked.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="checkedList"></param>
        /// <param name="selectAllIndex"></param>
        virtual protected void HandleSelectAllItem(ItemCheckEventArgs e, ToolStripCheckedListBox checkedList, int selectAllIndex)
        {
            // Did they check/uncheck the "Select All"?
            if (e.Index == selectAllIndex)
            {
                if (e.NewValue == CheckState.Checked)
                {
                    checkedList.CheckAll();
                }
                if (e.NewValue == CheckState.Unchecked)
                {
                    checkedList.UncheckAll();
                }
                return;
            }

            // OK. The user didn't check/uncheck SelectAll. Now we have to update it's
            // checkedness to reflect the state of everything else
            // If all clusters are checked, we check the Select All.
            // If no clusters are checked, the uncheck the Select All.
            // For everything else, Select All is set to indeterminate.

            // How many items are currenty checked?
            int count = checkedList.CheckedItems.Count;

            // First complication.
            // The value of the Select All itself doesn't count
            if (checkedList.GetItemCheckState(selectAllIndex) != CheckState.Unchecked)
            {
                count -= 1;
            }

            // Another complication.
            // CheckedItems does not yet know about the item the user has just
            // clicked, so we have to adjust the count of checked items to what
            // it is going to be
            if (e.NewValue != e.CurrentValue)
            {
                if (e.NewValue == CheckState.Checked)
                {
                    count += 1;
                }
                else
                {
                    count -= 1;
                }
            }

            // Update the state of the Select All item
            if (count == 0)
            {
                checkedList.SetItemState(selectAllIndex, CheckState.Unchecked);
            }
            else if (count == checkedList.Items.Count - 1)
            {
                checkedList.SetItemState(selectAllIndex, CheckState.Checked);
            }
            else
            {
                checkedList.SetItemState(selectAllIndex, CheckState.Indeterminate);
            }
        }
Пример #4
0
 private void lbCategorySet_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     isModified = true;
 }
Пример #5
0
 private void TypesOfInsulationChekedBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
 }
Пример #6
0
 private void SlideChose_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     broi[e.Index] = (e.NewValue == CheckState.Checked);
 }
Пример #7
0
        // ビューアーに表示されるメッシュを指定するフラグの更新
        private void UpdataMeshesFlag(ItemCheckEventArgs e)
        {
            meshes_flag.Clear();

            int checkList_index = 0;
            int tso_num         = 0;

            foreach (TSOFile tso in fig.TSOList)
            {
                switch (group_flag)
                {
                case 0:
                    for (int script_num = 0; script_num < tso.sub_scripts.Length; script_num++)
                    {
                        bool flag;
                        if (checkList_index == e.Index)
                        {
                            flag = !(checkedListBox1.CheckedIndices.IndexOf(checkList_index++) >= 0);    // チェックが変更された後の状態を反映する
                        }
                        else
                        {
                            flag = (checkedListBox1.CheckedIndices.IndexOf(checkList_index++) >= 0);
                        }

                        foreach (TSOMesh mesh in tso.meshes)
                        {
                            foreach (TSOSubMesh sub_mesh in mesh.sub_meshes)
                            {
                                if (sub_mesh.spec == script_num)
                                {
                                    meshes_flag.Add(flag);
                                }
                            }
                        }
                    }
                    break;

                case 1:
                    for (int script_num = 0; script_num < tso.sub_scripts.Length; script_num++)
                    {
                        int tmp_checkList_index = checkList_index;
                        foreach (TSOMesh mesh in tso.meshes)
                        {
                            bool flag;
                            if (checkList_index == e.Index)
                            {
                                flag = !(checkedListBox1.CheckedIndices.IndexOf(checkList_index++) >= 0);    // チェックが変更された後の状態を反映する
                            }
                            else
                            {
                                flag = (checkedListBox1.CheckedIndices.IndexOf(checkList_index++) >= 0);
                            }

                            foreach (TSOSubMesh sub_mesh in mesh.sub_meshes)
                            {
                                if (sub_mesh.spec == script_num)
                                {
                                    meshes_flag.Add(flag);
                                }
                            }
                        }
                        if (script_num < tso.sub_scripts.Length - 1)
                        {
                            checkList_index = tmp_checkList_index;
                        }
                    }
                    break;

                case 2:
                    for (int script_num = 0; script_num < tso.sub_scripts.Length; script_num++)
                    {
                        int tmp_checkList_index = checkList_index;
                        foreach (TSOMesh mesh in tso.meshes)
                        {
                            foreach (TSOSubMesh sub_mesh in mesh.sub_meshes)
                            {
                                bool flag;
                                if (checkList_index == e.Index)
                                {
                                    flag = !(checkedListBox1.CheckedIndices.IndexOf(checkList_index++) >= 0);// チェックが変更された後の状態を反映する
                                }
                                else
                                {
                                    flag = (checkedListBox1.CheckedIndices.IndexOf(checkList_index++) >= 0);
                                }

                                if (sub_mesh.spec == script_num)
                                {
                                    meshes_flag.Add(flag);
                                }
                            }
                        }
                        if (script_num < tso.sub_scripts.Length - 1)
                        {
                            checkList_index = tmp_checkList_index;
                        }
                    }
                    break;
                }
                tso_num++;
            }
        }
 private void listView1_ItemCheck(object objSender, ItemCheckEventArgs objArgs)
 {
 }
Пример #9
0
        private void clbCardType_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            int       CardTypeID = ((TCardType)clbCardType.Items[e.Index]).id;
            DataTable dt         = null;

            try
            {
                if (IsAllowanceDownSelect)
                {
                    if (e.NewValue == CheckState.Checked)
                    {
                        if (dtData.Rows.Count == 0)
                        {
                            if (SystemInfo.IsDimission)
                            {
                                dtData = db.GetDataTable(Pub.GetSQL(DBCode.DB_004006, new string[] { "107", CardTypeID.ToString() }));
                            }
                            else if (SystemInfo.IsDelDimission)
                            {
                                dtData = db.GetDataTable(Pub.GetSQL(DBCode.DB_004006, new string[] { "108", CardTypeID.ToString() }));
                            }
                            else
                            {
                                dtData = db.GetDataTable(Pub.GetSQL(DBCode.DB_004006, new string[] { "102", CardTypeID.ToString(), otherCoin,
                                                                                                     OprtInfo.DepartPower }));
                            }
                        }
                        else
                        {
                            if (SystemInfo.IsDimission)
                            {
                                dt = db.GetDataTable(Pub.GetSQL(DBCode.DB_004006, new string[] { "107", CardTypeID.ToString() }));
                            }
                            if (SystemInfo.IsDelDimission)
                            {
                                dt = db.GetDataTable(Pub.GetSQL(DBCode.DB_004006, new string[] { "108", CardTypeID.ToString() }));
                            }
                            else
                            {
                                dt = db.GetDataTable(Pub.GetSQL(DBCode.DB_004006, new string[] { "102", CardTypeID.ToString(), otherCoin,
                                                                                                 OprtInfo.DepartPower }));
                            }
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                if (!FindSelectedEmp(dt.Rows[i]["EmpSysID"].ToString()))
                                {
                                    dtData.Rows.Add(dt.Rows[i].ItemArray);
                                }
                            }
                        }
                    }
                    else
                    {
                        for (int i = dtData.Rows.Count - 1; i >= 0; i--)
                        {
                            if (dtData.Rows[i]["CardTypeID"].ToString() == CardTypeID.ToString())
                            {
                                dtData.Rows.RemoveAt(i);
                            }
                        }
                    }
                }
                else
                {
                    if (e.NewValue == CheckState.Checked)
                    {
                        if (dtData.Rows.Count == 0)
                        {
                            if (SystemInfo.IsDimission)
                            {
                                dtData = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "244", CardTypeID.ToString() }));
                            }
                            else if (SystemInfo.IsDelDimission)
                            {
                                dtData = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "245", CardTypeID.ToString() }));
                            }
                            else
                            {
                                dtData = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "219", CardTypeID.ToString(), otherCoin,
                                                                                                     OprtInfo.DepartPower }));
                            }
                        }
                        else
                        {
                            if (SystemInfo.IsDelDimission)
                            {
                                dt = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "244", CardTypeID.ToString() }));
                            }
                            else if (SystemInfo.IsDimission)
                            {
                                dt = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "245", CardTypeID.ToString() }));
                            }
                            else
                            {
                                dt = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "219", CardTypeID.ToString(), otherCoin,
                                                                                                 OprtInfo.DepartPower }));
                            }
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                if (!FindSelectedEmp(dt.Rows[i]["EmpSysID"].ToString()))
                                {
                                    dtData.Rows.Add(dt.Rows[i].ItemArray);
                                }
                            }
                        }
                    }
                    else
                    {
                        for (int i = dtData.Rows.Count - 1; i >= 0; i--)
                        {
                            if (dtData.Rows[i]["CardTypeID"].ToString() == CardTypeID.ToString())
                            {
                                dtData.Rows.RemoveAt(i);
                            }
                        }
                    }
                }
            }
            catch (Exception E)
            {
                Pub.ShowErrorMsg(E);
            }
            finally
            {
                if (dt != null)
                {
                    dt.Clear();
                    dt.Reset();
                }
            }
            bindingSource.DataSource = dtData;
        }
 private void checkedListBoxColumnName_ItemCheck(object sender, ItemCheckEventArgs e)
 {
 }
Пример #11
0
        private void chkAndereKalender_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            try
            {
                switch (e.Index)
                {
                //Felix
                case 0:
                    User felix = ModelManager.UserService.GetUser("FD", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(felix))
                    {
                        myUsersToShow.Remove(felix);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(felix))
                        {
                            myUsersToShow.Add(felix);
                            if (!calFelixAdded)
                            {
                                myTerminliste.AddRange(felix.Terminliste);
                                calFelixAdded = true;
                            }
                        }
                    }
                    break;

                // Matthias
                case 1:
                    User matthias = ModelManager.UserService.GetUser("MD", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(matthias))
                    {
                        myUsersToShow.Remove(matthias);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(matthias))
                        {
                            myUsersToShow.Add(matthias);
                            if (!calMatthiasAdded)
                            {
                                myTerminliste.AddRange(matthias.Terminliste);
                                calMatthiasAdded = true;
                            }
                        }
                    }
                    break;

                // Johannes
                case 2:
                    User johannes = ModelManager.UserService.GetUser("JD", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(johannes))
                    {
                        myUsersToShow.Remove(johannes);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(johannes))
                        {
                            myUsersToShow.Add(johannes);
                            if (!calJohannesAdded)
                            {
                                myTerminliste.AddRange(johannes.Terminliste);
                                calJohannesAdded = true;
                            }
                        }
                    }
                    break;

                // Markus Sprehe
                case 3:
                    User markus = ModelManager.UserService.GetUser("MS", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(markus))
                    {
                        myUsersToShow.Remove(markus);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(markus))
                        {
                            myUsersToShow.Add(markus);
                            if (!calMarkusSAdded)
                            {
                                myTerminliste.AddRange(markus.Terminliste);
                                calMarkusSAdded = true;
                            }
                        }
                    }
                    break;

                // Markus Roggenkamp
                case 4:
                    User rogge = ModelManager.UserService.GetUser("MR", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(rogge))
                    {
                        myUsersToShow.Remove(rogge);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(rogge))
                        {
                            myUsersToShow.Add(rogge);
                            if (!calRoggeAdded)
                            {
                                myTerminliste.AddRange(rogge.Terminliste);
                                calRoggeAdded = true;
                            }
                        }
                    }
                    break;

                // Axel
                case 5:
                    User axel = ModelManager.UserService.GetUser("AU", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(axel))
                    {
                        myUsersToShow.Remove(axel);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(axel))
                        {
                            myUsersToShow.Add(axel);
                            if (!calAxelAdded)
                            {
                                myTerminliste.AddRange(axel.Terminliste);
                                calAxelAdded = true;
                            }
                        }
                    }
                    break;

                // Tanja
                case 6:
                    User tanja = ModelManager.UserService.GetUser("TT", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(tanja))
                    {
                        myUsersToShow.Remove(tanja);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(tanja))
                        {
                            myUsersToShow.Add(tanja);
                            if (!calTanjaAdded)
                            {
                                myTerminliste.AddRange(tanja.Terminliste);
                                calTanjaAdded = true;
                            }
                        }
                    }
                    break;

                // Saskia
                case 7:
                    User saskia = ModelManager.UserService.GetUser("SP", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(saskia))
                    {
                        myUsersToShow.Remove(saskia);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(saskia))
                        {
                            myUsersToShow.Add(saskia);
                            if (!calSaskiaAdded)
                            {
                                myTerminliste.AddRange(saskia.Terminliste);
                                calSaskiaAdded = true;
                            }
                        }
                    }
                    break;

                // Sezen
                case 8:
                    User sezen = ModelManager.UserService.GetUser("SC", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(sezen))
                    {
                        myUsersToShow.Remove(sezen);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(sezen))
                        {
                            myUsersToShow.Add(sezen);
                            if (!calSezenAdded)
                            {
                                myTerminliste.AddRange(sezen.Terminliste);
                                calSezenAdded = true;
                            }
                        }
                    }
                    break;

                // Julian
                case 9:
                    User julian = ModelManager.UserService.GetUser("JZ", Model.Services.UserService.UserSearchParamType.SageLoginName);
                    if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked && myUsersToShow.Contains(julian))
                    {
                        myUsersToShow.Remove(julian);
                    }
                    else
                    {
                        if (!myUsersToShow.Contains(julian))
                        {
                            myUsersToShow.Add(julian);
                            if (!calJulianAdded)
                            {
                                myTerminliste.AddRange(julian.Terminliste);
                                calJulianAdded = true;
                            }
                        }
                    }
                    break;

                default:
                    break;
                }
                dayView.Invalidate();
                Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                string msg = string.Format("{0}/n{1}", ex.Message, ex.InnerException.Message);
                MessageBox.Show(ex.Message);
            }
        }
Пример #12
0
 private void checkedListBoxNG_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     snd.Play();
 }
Пример #13
0
 private void checkedListBoxOK_ItemCheck(object sender, ItemCheckEventArgs e)
 {
 }
Пример #14
0
 // Thủ tục trong Listviews
 private void lsvAcout_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     lsvAcout.Items[e.Index].Selected = true;
 }
 private void Frequencies_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     Update_Graph(this, null);
 }
		private void OnItemCheck(object sender, ItemCheckEventArgs e)
		{
			buttonXReset.Enabled = checkedListBoxControlOutputItems.CheckedItems.Count > 0;
		}
 private void privCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     rolePrivilegeListWrapper.set_field(new NodeIdWrapper(e.Index), (int)RolePrivilegeListWrapper.Columns.Enabled,
                                        e.NewValue == CheckState.Checked ? 1: 0);
 }
 private void copySources_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     doCopy.Enabled = copySources.CheckedItemsCount > 0;
 }
 protected void checkedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     this.bands[e.Index].Visible = e.NewValue == CheckState.Checked;
     this.visibility[e.Index]    = e.NewValue == CheckState.Checked;
 }
Пример #20
0
 private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     this.BeginInvoke((MethodInvoker)(
                          () => UpdateChart()));
 }
Пример #21
0
 private void sharesListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     UpdateControlStatus();
 }
Пример #22
0
 private void ProjectCheckList_ItemCheck(object sender, ItemCheckEventArgs e)
 {
 }
Пример #23
0
 private void ListPersonColumns_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     fTempColumns.OrderedColumns[e.Index].CurActive = e.NewValue;
 }
Пример #24
0
 private void TrackListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     trackSelectionManager.ToggleTrackActivation(!(e.CurrentValue == CheckState.Checked), e.Index);
 }
Пример #25
0
 private void ObjectBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     this.BeginInvoke(new MethodInvoker(CheckList), null);
 }
Пример #26
0
        private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            if (e.NewValue == CheckState.Checked)
            {
                switch (e.Index)
                {
                case 0:

                    GetHtmlTags(document.DocumentNode.SelectSingleNode("//html"), ref tagList);
                    listBox1.Items.AddRange(tagList.ToArray());
                    break;

                case 2:

                    GetAttributes(document.DocumentNode, ref idList, "id");
                    listBox1.Items.AddRange(idList.ToArray());
                    break;

                case 1:

                    GetAttributes(document.DocumentNode.SelectSingleNode("//html"), ref classList, "class");
                    listBox1.Items.AddRange(classList.ToArray());
                    break;

                case 3:
                    var   ch = (CheckedListBox)sender;
                    int   y  = ch.GetItemHeight(0) * (e.Index + 1);
                    int   y1 = ch.GetItemHeight(0) * (e.Index + 2);
                    Point p1 = new Point(0, y1);

                    TextBox tb = new TextBox
                    {
                        Name        = "tbox",
                        Height      = ch.GetItemHeight(e.Index),
                        Width       = splitContainer1.Panel1.Width,
                        MaximumSize = new Size(300, 18),
                        AutoSize    = false,
                        Location    = p1
                    };
                    ch.Controls.Add(tb);
                    Label lbl = new Label
                    {
                        Name     = "lbl",
                        AutoSize = true,
                        Text     = "Custom Selector",
                        Location = new Point(0, y)
                    };
                    ch.Controls.Add(lbl);
                    Button btn = new Button
                    {
                        Name      = "btn",
                        Width     = this.splitContainer1.Panel1.Width,
                        Height    = 24,
                        Text      = "Add Custom Selector",
                        BackColor = Color.YellowGreen,
                        Location  = new Point(0, ch.GetItemHeight(0) * (e.Index + 3))
                    };
                    btn.Click += Btn_Click;
                    ch.Controls.Add(btn);

                    break;
                }
            }
            else if (e.NewValue == CheckState.Unchecked)
            {
                switch (e.Index)
                {
                case 0:
                    foreach (var item in tagList)
                    {
                        listBox1.Items.Remove(item);
                    }
                    tagList.Clear();
                    break;

                case 2:
                    foreach (var item in idList)
                    {
                        listBox1.Items.Remove(item);
                    }
                    idList.Clear();
                    break;

                case 1:
                    foreach (var item in classList)
                    {
                        listBox1.Items.Remove(item);
                    }
                    classList.Clear();
                    break;

                case 3:
                    checkedListBox1.Controls.RemoveByKey("tbox");
                    checkedListBox1.Controls.RemoveByKey("lbl");
                    checkedListBox1.Controls.RemoveByKey("btn");
                    foreach (var item in customselector)
                    {
                        listBox1.Items.Remove(item);
                    }
                    customselector.Clear();
                    break;
                }
                if (listBox1.Items.Count == 1 && listBox1.SelectedIndex != 0)
                {
                    splitContainer2.Panel2Collapsed = true;
                }
            }
        }
Пример #27
0
 private void lbHyperLinks_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     btnToText.Enabled = lbHyperLinks.CheckedItems.Count > 0;
 }
Пример #28
0
 private void cclb_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     _ccbParent.OnItemCheck(sender, e);
 }
Пример #29
0
 private void UpdateOptions(object sender, ItemCheckEventArgs e)
 {
     Config.UpdateBool(YGOProOptionsControl.SelectedItem.ToString(), e.NewValue == CheckState.Checked);
     Config.SaveConfig();
 }
Пример #30
0
 private void TranslatorsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (e.CurrentValue == CheckState.Indeterminate)
     {
         e.NewValue = e.CurrentValue;
     }
 }
Пример #31
0
 private void chlbSelDepart_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     ItemChanged = true;
 }
Пример #32
0
 private void lbAttributes_ItemCheck(object sender, ItemCheckEventArgs e)
 {
 }
Пример #33
0
 /// <summary>
 /// Handle when a tab in the listbox is checked or unchecked.
 /// Make the actual tab visible or invisible.
 /// </summary>
 private void HandleTabListBoxItemCheck(object sender, ItemCheckEventArgs e)
 {
     Tabs[e.Index].Visible = (e.NewValue == CheckState.Checked);
 }
Пример #34
0
    private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
    {
        //Should always be true,lt in logic though to allow for a option to control the box itself in case
        Transformation t = (Transformation) 0x0;

        List<int> indexes = new List<int>();
        foreach (int index in this.checkedListBox1.CheckedIndices)
        {
            indexes.Add(index);
        }

        if (e.NewValue == CheckState.Checked)
        {
            indexes.Add(e.Index);
        }else if( e.NewValue == CheckState.Unchecked)
        {
            indexes.Remove(e.Index);
        }

        foreach (int index in indexes)
        {
            string s = this.checkedListBox1.Items[index].ToString();
            t |= UAUtilities.GetTransformationFromString(s);
        }

        view.ApplyFilter(delegate(ResponseResult rr) { return ((rr.Transformation) & t) > 0; });
        this.refreshBindings();
    }
Пример #35
0
 // When user checks / unchecks a checkbox, the related column visibility is
 // switched.
 void mCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     mDataGridView.Columns[e.Index].Visible = (e.NewValue == CheckState.Checked);
 }
Пример #36
0
 private void docTypes_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     receiptLimitContainer.Visibility = Kinds.Contains(StatementKind.Receipt) ? LayoutVisibility.Always : LayoutVisibility.Never;
     ok.Enabled = docTypes.CheckedItems.Count > 0;
 }
Пример #37
0
 void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
 {
 }
Пример #38
0
 private void statuses_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     List<string> statusList = new List<string>();
     foreach(var item in statuses.CheckedItems)
     {
         var status = item as EnumWrapper<PipeTestResultStatus>;
         if(status != null)
             statusList.Add(status.Value.ToString());
     }
     viewModel.SearchStatuses = statusList;
 }
Пример #39
0
 private void FormBItemChecked(object sender, ItemCheckEventArgs e)
 {
     controls.FormA.Enabled   = false;
     controls.IsFormB.Checked = true;
 }