Пример #1
0
 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);
    }
Пример #4
0
        /// <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;
        }
Пример #5
0
 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;
         }
     }
 }
Пример #6
0
    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);
    }
Пример #7
0
		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;
				}
			}
		}
Пример #8
0
 public ItemCheckingResult JigControlChecking(ItemCheckingEventArgs e)
 {
     return(null);
 }
Пример #9
0
 protected abstract ItemCheckingResult OnJigControlChecking(ItemCheckingEventArgs e);
Пример #10
0
 private void checkedListBoxControl1_ItemChecking(object sender, ItemCheckingEventArgs e) {
     if (uCmFunctionTree1.FocusedNode.Checked == false) e.Cancel = true;
 }
Пример #11
0
		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;
		}