상속: System.Windows.Forms.UserControl
예제 #1
0
        public CoolCatItem(CoolCat parentCoolCat)
        {
            ParentCoolCat = parentCoolCat;

            InitializeComponent();

            btnOK.Text = Localization.GetString("OK_Button");
            btnCancel.Text = Localization.GetString("Cancel_Button");

            EnterEditingMode();
            SetCategoryExistenceIcon(false);

            toolTips.SetToolTip(btnRemove, Localization.GetString("RemoveCategory_Tooltip"));
            toolTips.SetToolTip(btnModify, Localization.GetString("ModifyCategory_Tooltip"));
            //toolTips.SetToolTip(btnParentCat, "Explore parent categories");
            //toolTips.SetToolTip(btnSubCat, "Explore subcategories");
        }
예제 #2
0
        public CoolCatItem(CoolCat parentCoolCat)
        {
            ParentCoolCat = parentCoolCat;

            InitializeComponent();

            btnOK.Text     = Localization.GetString("OK_Button");
            btnCancel.Text = Localization.GetString("Cancel_Button");

            EnterEditingMode();
            SetCategoryExistenceIcon(false);

            toolTips.SetToolTip(btnRemove, Localization.GetString("RemoveCategory_Tooltip"));
            toolTips.SetToolTip(btnModify, Localization.GetString("ModifyCategory_Tooltip"));
            //toolTips.SetToolTip(btnParentCat, "Explore parent categories");
            //toolTips.SetToolTip(btnSubCat, "Explore subcategories");
        }
예제 #3
0
        private void FinishCategoryAutoComplete(string[] results, string extraResult)
        {
            // This code causes hangs under Mono. Need to fix
            if (PlatformSpecific.IsMono())
            {
                return;
            }

            string text = cboCatName.Text;

            cboCatName.Items.Clear();
            if (results.Length > 0)
            {
                //Array.Sort(results);
                int numResultsToUse = Math.Min(results.Length, MaxAutoCompleteItems - (extraResult == null ? 1 : 0));
                for (int i = 0; i < numResultsToUse; i++)
                {
                    cboCatName.Items.Add(results[i].Substring("Category:".Length));
                }
            }
            if (extraResult != null)
            {
                cboCatName.Items.Add(CoolCat.NormalizeCatName(extraResult));
            }

            if (cboCatName.Items.Count == 0)
            {
                cboCatName.Items.Add("");
            }

            if (!cboCatName.DroppedDown && cboCatName.Visible)
            {
                cboCatName.DroppedDown = true;
                cboCatName.Text        = text;
            }
            cboCatName.SelectionStart = text.Length;
        }