Ejemplo n.º 1
0
        protected void ToggleObscureFeatures()
        {
            this.shouldHideObscureItems = this.obscureFeaturesCheckbox.Checked.Value;
            var newState = TreeGridUtilities.FilterByObscurity(this.providedSelectionState, this.shouldHideObscureItems,
                                                               this.mainRow.GetCurrentData());

            this.mainRow.viewForm.DataStore = newState;
            this.mainRow.viewForm.ReloadData();
        }
Ejemplo n.º 2
0
        public BaseForm(TreeGridItemCollection providedSelectableItems, string formTitle, bool hideObscure)
        {
            this.providedSelectionState = providedSelectableItems;
            this.shouldHideObscureItems = hideObscure;

            this.Padding   = padding;
            this.Title     = formTitle;
            this.Resizable = true;
            this.Topmost   = true; // Put form atop Grasshopper (MacOS)


            this.mainRow = new TableStrip(TreeGridUtilities.FilterByObscurity(
                                              this.providedSelectionState, this.shouldHideObscureItems));

            this.topButtons = new DynamicLayout();
            this.topButtons.BeginHorizontal();
            AddCustomButtonsToTop();
            this.topButtons.Add(null);
            this.topButtons.Add(ControlStrip.GetExpandAll(buttonWidth - 90, buttonHeight, ExpandAll));
            this.topButtons.Add(new Label()
            {
                Width = 10
            });
            this.topButtons.Add(ControlStrip.GetCollapseAll(buttonWidth - 90, buttonHeight, CollapseAll));
            this.topButtons.Add(new Label()
            {
                Width = 10
            });
            this.topButtons.Add(ControlStrip.GetSelectAll(buttonWidth - 90, buttonHeight, SelectAll));
            this.topButtons.Add(new Label()
            {
                Width = 10
            });
            this.topButtons.Add(ControlStrip.GetSelectNone(buttonWidth - 90, buttonHeight, SelectNone));
            this.topButtons.EndHorizontal();

            this.bottomButtons = new DynamicLayout();
            this.bottomButtons.BeginHorizontal();
            this.bottomButtons.Add(null);
            this.bottomButtons.Add(ConfirmStrip.GetUpdate(buttonWidth, buttonHeight, UpdateAndClose));
            this.bottomButtons.Add(new Label()
            {
                Width = 10
            });
            this.bottomButtons.Add(ConfirmStrip.GetCancel(buttonWidth, buttonHeight, CancelAndClose));
            this.bottomButtons.EndHorizontal();

            FinishTableLayout();
        }