private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
        {
            _isDirty = true;

            toolTipCategories.SetToolTip(this, CategoryContext.FormattedCategoryList);
            Invalidate();
            Update();
        }
Beispiel #2
0
 private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
 {
     if (e.ChangeType == CategoryContext.ChangeType.Category || e.ChangeType == CategoryContext.ChangeType.SelectionMode)
     {
         BlogPostCategory[] selectedCategories = GetCurrentlySelectedCategories();
         LayoutControls(_categoryContext, false, true);
         UpdateSelectedCategories(selectedCategories);
         RefreshParentCombo();
         Invalidate();
     }
 }
        private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
        {
            if (!CategoryListsAreEqual(_lastSelectedCategories, CategoryContext.SelectedCategories))
            {
                _isDirty = true;
            }

            // always record last selected categories
            _lastSelectedCategories = CategoryContext.SelectedCategories;

            toolTipCategories.SetToolTip(this, CategoryContext.FormattedCategoryList);
            Invalidate();
            Update();
        }
        private void ctx_Changed(object sender, CategoryContext.CategoryChangedEventArgs eventArgs)
        {
            switch (eventArgs.ChangeType)
            {
            case CategoryContext.ChangeType.Category:
                lblNone.Visible = ctx.Categories.Length == 0;
                selector.LoadCategories();

                // Fix bug 611888: Funny grey box in category control when adding a category to an empty category list
                // Yes, this does need to happen in a BeginInvoke--invalidating doesn't work
                // properly until some other (unknown) message gets consumed
                BeginInvoke(new System.Threading.ThreadStart(delegate { ((Control)selector).Invalidate(true); }));

                break;

            case CategoryContext.ChangeType.SelectionMode:
                Close();
                break;
            }
        }