public void listRoles_ItemChecking(object sender, ItemCheckingEventArgs e) { if (listRoles.Items[e.Index].Value.ToString() == "CheckUserName" && e.NewValue == CheckState.Unchecked) { e.NewValue = CheckState.Checked; } }
protected override ItemCheckingResult OnJigControlChecking(ItemCheckingEventArgs e) { ItemCheckingResult result = new ItemCheckingResult(); result.HasError = true; result.WarningMessage = "WARNING I'm DB"; return(result); }
protected override ItemCheckingResult OnJigControlChecking(ItemCheckingEventArgs e) { ItemCheckingResult result = new ItemCheckingResult(); result.HasError = false; result.WarningMessage = " "; result.ErrorMessage = ""; return(result); }
/// <summary> /// 最大勾選數量判斷 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void listBox_ItemChecking(object sender, ItemCheckingEventArgs e) { var editor = sender as CheckedListBoxControl; if (e.NewValue == CheckState.Unchecked) { return; } e.Cancel = editor.CheckedItemsCount >= maxCheckedItemNumber ? true : false; }
private void checkedListBoxAdNotes_ItemChecking(object sender, ItemCheckingEventArgs e) { e.Cancel = false; if (e.NewValue == CheckState.Checked) { if (checkedListBoxAdNotes.CheckedItems.Count > 3) { Utilities.Instance.ShowWarning("You can select only up to 4 Ad-Notes"); e.Cancel = true; } } }
public ItemCheckingResult JigToolChecking(ItemCheckingEventArgs e) { //JigControl jigControl = new JigControlWB(); //string str = jigControl.Test(); //ItemCheckingResult result = new ItemCheckingResult { HasError = false, WarningMessage = str }; //return result; return(null); string jigType = ""; //Get type from store procedure JigControl jigControl = null; switch (jigType) { case "Kanagata": jigControl = new JigControlKanagata(); break; case "Preform": break; case "Frame": break; case "HP": break; case "PP": break; case "Cappillary": break; default: break; } jigControl.JigControlChecking(e); }
public ItemCheckingResult JigControlChecking(ItemCheckingEventArgs e) { return(null); }
protected abstract ItemCheckingResult OnJigControlChecking(ItemCheckingEventArgs e);
private void checkedListBoxControl1_ItemChecking(object sender, ItemCheckingEventArgs e) { if (uCmFunctionTree1.FocusedNode.Checked == false) e.Cancel = true; }
private void OnCategoriesListBoxItemChecking(object sender, ItemCheckingEventArgs e) { if (_loading || MainController.Instance.Lists.SearchTags.MaxTags <= 0 || e.NewValue != CheckState.Checked) return; var totalTags = _searchGroups.SelectMany(g => g.ListBox.Items) .Count(item => item.CheckState != CheckState.Unchecked); if (totalTags < MainController.Instance.Lists.SearchTags.MaxTags) return; MainController.Instance.PopupMessages.ShowWarning(String.Format("Only {0} Search Tags are ALLOWED", MainController.Instance.Lists.SearchTags.MaxTags)); e.Cancel = true; }