public override DesignerActionItemCollection GetSortedActionItems()
        {
            var designerActionItemCollection = new DesignerActionItemCollection();

            designerActionItemCollection.Add(new DesignerActionTextItem("HMI Professional Edition",
                                                                        "HMI Professional Edition"));
            designerActionItemCollection.Add(new DesignerActionMethodItem(this, "ShowTagListForm", "Choose Tag"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("BorderStyle", "BorderStyle"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("BackColor", "BackColor"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("ForeColor", "ForeColor"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("Font", "Font"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("TextAlign", "TextAlign"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("AutoSize", "AutoSize"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("PLCAddressValue", "PLCAddressValue"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("DataType", "DataType"));
            return(designerActionItemCollection);
        }
Example #2
0
        void SetDesignerActionItemObjects()
        {
            actionItemCollection = new DesignerActionItemCollection();
            // Görünüm
            actionItemCollection.Add(new DesignerActionHeaderItem(APPEARANCE));
            actionItemCollection.Add(new DesignerActionTextItem("Properties that are related to the controls appearance.", APPEARANCE));
            actionItemCollection.Add(new DesignerActionPropertyItem("ColorTable", "Select Color Table", APPEARANCE, "Change color table navigation pane."));
            actionItemCollection.Add(new DesignerActionMethodItem(this, "ResetColorTable", "Reset Color Table", APPEARANCE, "Return system colors."));
            actionItemCollection.Add(new DesignerActionPropertyItem("RightToLeft", "Right To Left", APPEARANCE, "Change RightToLeft by the control."));
            actionItemCollection.Add(new DesignerActionPropertyItem("Dock", "Dock", APPEARANCE, "Change Dock by the control."));

            // Buttons
            actionItemCollection.Add(new DesignerActionHeaderItem(BUTTONS));
            actionItemCollection.Add(new DesignerActionTextItem("Add a new button or remove a exist button from navigation pane.", BUTTONS));
            actionItemCollection.Add(new DesignerActionMethodItem(this, "AddButton", "Add Button", BUTTONS, "Add a new button.", true));
            actionItemCollection.Add(new DesignerActionMethodItem(this, "RemoveButton", "Remove Button", BUTTONS, "Remove last button.", true));
        }
        /// <summary>
        /// Returns the collection of DesignerActionItem objects contained in the list.
        /// </summary>
        /// <returns>A DesignerActionItem array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            // Create a new collection for holding the single item we want to create
            DesignerActionItemCollection actions = new DesignerActionItemCollection();

            // This can be null when deleting a control instance at design time
            if (_ribbon != null)
            {
                // Add the list of button specific actions
                actions.Add(new DesignerActionHeaderItem("Design"));
                actions.Add(new DesignerActionPropertyItem("InDesignHelperMode", "Design Helpers", "Design", "Show design time helpers for creating items."));
                actions.Add(new DesignerActionHeaderItem("Visuals"));
                actions.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals", "Palette applied to drawing"));
            }

            return(actions);
        }
Example #4
0
            // Get the sorted list of Action items
            public override DesignerActionItemCollection GetSortedActionItems()
            {
                if (items == null)
                {
                    // Create the collection
                    items = new DesignerActionItemCollection();

                    // Add a header to the list
                    items.Add(new DesignerActionHeaderItem("Select a Style:"));

                    // Add three commands
                    items.Add(new DesignerActionMethodItem(this, "FormatWide", "Format Wide", true));
                    items.Add(new DesignerActionMethodItem(this, "FormatMedium", "Format Medium", true));
                    items.Add(new DesignerActionMethodItem(this, "FormatNarrow", "Format Narrow", true));
                }
                return(items);
            }
Example #5
0
        /// <summary>
        /// Returns the collection of DesignerActionItem objects contained in the list.
        /// </summary>
        /// <returns>A DesignerActionItem array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            // Create a new collection for holding the single item we want to create
            DesignerActionItemCollection actions = new DesignerActionItemCollection();

            // This can be null when deleting a control instance at design time
            if (_comboBox != null)
            {
                // Add the list of label specific actions
                actions.Add(new DesignerActionHeaderItem("Appearance"));
                actions.Add(new DesignerActionPropertyItem("InputControlStyle", "Style", "Appearance", "ComboBox display style."));
                actions.Add(new DesignerActionHeaderItem("Visuals"));
                actions.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals", "Palette applied to drawing"));
            }

            return(actions);
        }
        /// <summary>
        /// Returns the collection of <see cref="T:System.ComponentModel.Design.DesignerActionItem" /> objects contained in the list.
        /// </summary>
        /// <returns>A <see cref="T:System.ComponentModel.Design.DesignerActionItem" /> array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection designerActionItemCollection = new DesignerActionItemCollection();

            designerActionItemCollection.Add(new DesignerActionHeaderItem("Effekte"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("ShowEffect", "ShowEffect:", "Effekte", "Gibt an, ob ein Glanzeffekt gezeichnet werden soll."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("ShowDonutEffect", "ShowDonutEffect:", "Effekte", "Gibt an, ob ein Donuteffekt gezeichnet werden soll."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("SeperateSegments", "SeperateSegments:", "Effekte", "Gibt an, ob die Segmente getrennt werden sollen."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("EffectSize", "EffectSize:", "Effekt", "Gibt an, wie dick der Glanzeffect sein soll.."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("DonutEffectSize", "DonutEffectSize:", "Effekt", "Gibt an, wie gro� der Donuteffekt sein soll."));
            designerActionItemCollection.Add(new DesignerActionHeaderItem("Stil und Farben"));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("Style", "Style:", "Stil und Farben", "Der Style des MetroCharts."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("UseDynamicFillColors", "UseDynamicFillColors:", "Stil und Farben", "Gibt an, ob die F�llfarbe der Segmente generiert werden soll. Funktioniert nur, wenn zu den Segmente einen Umrandungsfarbe zugeordnet wurde."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("UseDynamicBorderColors", "UseDynamicBorderColors:", "Stil und Farben", "Gibt an, ob die Umrandungsfarbe der Segmente generiert werden soll."));
            designerActionItemCollection.Add(new DesignerActionPropertyItem("DynamicColorOffset", "DynamicColorOffset:", "Stil und Farben", "Gibt an, wie stark die F�llfarbe verdunkelt werden soll, wenn \"UseDynamicFillColors\"= True entspricht."));
            return(designerActionItemCollection);
        }
Example #7
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Appearance"));
            items.Add(new DesignerActionPropertyItem("SeriesNames",
                                                     "SeriesNames", "Appearance",
                                                     "Set the names of series."));
            items.Add(new DesignerActionPropertyItem("SeriesColor",
                                                     "SeriesColor", "Appearance",
                                                     "Set the color of series."));
            items.Add(new DesignerActionMethodItem(this, "OpenProperty", "property"));


            return(items);
        }
Example #8
0
        // This method creates and populates the
        // DesignerActionItemCollection which is used to
        // display smart tag items.
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items =
                new DesignerActionItemCollection();

            // Add a descriptive header.
            items.Add(new DesignerActionHeaderItem("Anchor Styles"));

            // Add a DesignerActionPropertyItem for the Anchor
            // property. This will be displayed in a panel using
            // the AnchorStyles UI Type Editor.
            items.Add(new DesignerActionPropertyItem(
                          "Anchor",
                          "Anchor Style"));

            return(items);
        }
        public void DesignerActionItemCollection_Item_Set_GetReturnsExpected()
        {
            var collection = new DesignerActionItemCollection();
            var value1     = new SubDesignerActionItem("displayName", "category", "description");
            var value2     = new SubDesignerActionItem("displayName", "category", "description");

            collection.Add(value1);
            Assert.Same(value1, Assert.Single(collection));

            collection[0] = value2;
            Assert.Same(value2, Assert.Single(collection));
            Assert.Same(value2, collection[0]);
            Assert.False(collection.Contains(value1));
            Assert.Equal(-1, collection.IndexOf(value1));
            Assert.True(collection.Contains(value2));
            Assert.Equal(0, collection.IndexOf(value2));
        }
Example #10
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items      = new DesignerActionItemCollection();
            PropertyDescriptor           descriptor = TypeDescriptor.GetProperties(this._controlDesigner.Component)["DataSourceID"];

            if ((descriptor != null) && descriptor.IsBrowsable)
            {
                items.Add(new DesignerActionPropertyItem("DataSourceID", System.Design.SR.GetString("BaseDataBoundControl_ConfigureDataVerb"), System.Design.SR.GetString("BaseDataBoundControl_DataActionGroup"), System.Design.SR.GetString("BaseDataBoundControl_ConfigureDataVerbDesc")));
            }
            ControlDesigner designer = this._dataSourceDesigner as ControlDesigner;

            if (designer != null)
            {
                ((DesignerActionPropertyItem)items[0]).RelatedComponent = designer.Component;
            }
            return(items);
        }
        /// <summary>
        /// Returns the collection of DesignerActionItem objects contained in the list.
        /// </summary>
        /// <returns>A DesignerActionItem array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            // Create a new collection for holding the single item we want to create
            DesignerActionItemCollection actions = new DesignerActionItemCollection();

            // This can be null when deleting a component instance at design time
            if (_palette != null)
            {
                // Add the list of panel specific actions
                actions.Add(new KryptonDesignerActionItem(new DesignerVerb("Reset to Defaults", new EventHandler(OnResetClick)), "Actions"));
                actions.Add(new KryptonDesignerActionItem(new DesignerVerb("Populate from Base", new EventHandler(OnPopulateClick)), "Actions"));
                actions.Add(new KryptonDesignerActionItem(new DesignerVerb("Import from Xml file...", new EventHandler(OnImportClick)), "Actions"));
                actions.Add(new KryptonDesignerActionItem(new DesignerVerb("Export to Xml file...", new EventHandler(OnExportClick)), "Actions"));
            }

            return(actions);
        }
Example #12
0
        private void AddConstantActions(DesignerActionItemCollection actions)
        {
            actions.Add(new DesignerActionHeaderItem("Actions"));
            actions.Add(new DesignerActionMethodItem(this, "AddPage", "Add Page", "Actions"));

            // Can only remove a page if one if selected
            if (_navigator.SelectedPage != null)
            {
                actions.Add(new DesignerActionMethodItem(this, "RemovePage", "Remove Page", "Actions"));
            }

            // Are there any pages to be removed
            if (_navigator.Pages.Count > 0)
            {
                actions.Add(new DesignerActionMethodItem(this, "ClearPages", "Clear Pages", "Actions"));
            }
        }
        /// <summary>
        /// Returns the collection of <see cref="T:System.ComponentModel.Design.DesignerActionItem" /> objects contained in the list.
        /// </summary>
        /// <returns>A <see cref="T:System.ComponentModel.Design.DesignerActionItem" /> array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Appearance"));

            items.Add(new DesignerActionPropertyItem("Animate",
                                                     "Animate", "Appearance",
                                                     "Sets the control to automatically animate."));

            items.Add(new DesignerActionPropertyItem("BackColor",
                                                     "Back Color", "Appearance",
                                                     "Selects the background color."));

            items.Add(new DesignerActionPropertyItem("ForeColor",
                                                     "Fore Color", "Appearance",
                                                     "Selects the foreground color."));

            items.Add(new DesignerActionPropertyItem("IndicatorColor",
                                                     "Indicator Color", "Appearance",
                                                     "Sets the color of the indicator."));

            items.Add(new DesignerActionPropertyItem("ControlHeight",
                                                     "Control Height", "Appearance",
                                                     "Sets the control height."));

            items.Add(new DesignerActionPropertyItem("RefreshRate",
                                                     "Refresh Rate", "Appearance",
                                                     "Sets the animation speed."));

            //Create entries for static Information section.
            StringBuilder location = new StringBuilder("Product: ");

            location.Append(colUserControl.ProductName);
            StringBuilder size = new StringBuilder("Version: ");

            size.Append(colUserControl.ProductVersion);
            items.Add(new DesignerActionTextItem(location.ToString(),
                                                 "Information"));
            items.Add(new DesignerActionTextItem(size.ToString(),
                                                 "Information"));

            return(items);
        }
        /// <summary>
        /// Returns the collection of <see cref="T:System.ComponentModel.Design.DesignerActionItem" /> objects contained in the list.
        /// </summary>
        /// <returns>A <see cref="T:System.ComponentModel.Design.DesignerActionItem" /> array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Appearance"));

            items.Add(new DesignerActionPropertyItem("BackColor",
                                                     "Back Color", "Appearance",
                                                     "Selects the background color."));
            items.Add(new DesignerActionPropertyItem("ForeColor",
                                                     "Fore Color", "Appearance",
                                                     "Selects the foreground color."));

            items.Add(new DesignerActionPropertyItem("BorderColor",
                                                     "BorderColor", "Appearance",
                                                     "Sets the border color."));

            items.Add(new DesignerActionPropertyItem("BoxColor",
                                                     "BoxColor", "Appearance",
                                                     "Sets the box color."));

            items.Add(new DesignerActionPropertyItem("FillColor",
                                                     "FillColor", "Appearance",
                                                     "Sets the fill color."));

            items.Add(new DesignerActionPropertyItem("Style",
                                                     "Style", "Appearance",
                                                     "Sets the style of the checkbox."));


            //Create entries for static Information section.
            StringBuilder location = new StringBuilder("Product: ");

            location.Append(colUserControl.ProductName);
            StringBuilder size = new StringBuilder("Version: ");

            size.Append(colUserControl.ProductVersion);
            items.Add(new DesignerActionTextItem(location.ToString(),
                                                 "Information"));
            items.Add(new DesignerActionTextItem(size.ToString(),
                                                 "Information"));

            return(items);
        }
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Appearance"));

            items.Add(new DesignerActionPropertyItem("BackColor",
                                                     "Back Color", "Appearance",
                                                     "Selects the background color."));

            items.Add(new DesignerActionPropertyItem("ForeColor",
                                                     "Fore Color", "Appearance",
                                                     "Selects the foreground color."));

            items.Add(new DesignerActionPropertyItem("DashLength",
                                                     "Dash Length", "Appearance",
                                                     "Type few characters to filter Cities."));

            items.Add(new DesignerActionPropertyItem("MoveButtonBorder",
                                                     "Move Button Border", "Appearance",
                                                     "Type few characters to filter Cities."));

            items.Add(new DesignerActionPropertyItem("PenWidth",
                                                     "Pen Width", "Appearance",
                                                     "Type few characters to filter Cities."));

            items.Add(new DesignerActionPropertyItem("TimerInterval",
                                                     "Timer Interval", "Appearance",
                                                     "Type few characters to filter Cities."));

            //Create entries for static Information section.
            StringBuilder location = new StringBuilder("Product: ");

            location.Append(colUserControl.ProductName);
            StringBuilder size = new StringBuilder("Version: ");

            size.Append(colUserControl.ProductVersion);
            items.Add(new DesignerActionTextItem(location.ToString(),
                                                 "Information"));
            items.Add(new DesignerActionTextItem(size.ToString(),
                                                 "Information"));

            return(items);
        }
Example #16
0
 /// <summary>
 /// Create the ActionItem collection and add one command
 /// </summary>
 /// <returns>Action designer collection</returns>
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     if (_items == null)
     {
         _items = new DesignerActionItemCollection();
         _items.Add(new DesignerActionHeaderItem("Behavior"));
         _items.Add(new DesignerActionPropertyItem(
                        "TargetControlID", "Target Control ID", "Behavior",
                        "The ID of the target control id."));
         _items.Add(new DesignerActionPropertyItem(
                        "ConnectionStringExtensionName", "Connection String Extension Name", "Behavior",
                        "The configuration connection string extension name, used to connect to the database."));
         _items.Add(new DesignerActionPropertyItem(
                        "UrlAction", "Url Action", "Behavior",
                        "The URL action reference."));
     }
     return(_items);
 }
        //以下这一部分的代码是可以写可以不写的地方,这部分主要是来排序,拍出在快速设计视窗中的显示的属性的顺序来用的。
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Switch Array (1D)"));
            items.Add(new DesignerActionPropertyItem("Dimension", "Dimention Of the Array", "Appearance", "Get/Set the rank of the Array"));
            items.Add(new DesignerActionPropertyItem("Direction", "Horizontal/Vertical display(true for Vertical)", "Appearance", "Order of the Array"));
            items.Add(new DesignerActionPropertyItem("ControlWidth", "Width the width of the Swich", "Appearance", "Width of the switch(apply to all)"));
            items.Add(new DesignerActionPropertyItem("ControlHeight", "Height of the Swich", "Appearance", "Height of the switch(apply to all)"));

            items.Add(new DesignerActionHeaderItem("Template Style"));
            items.Add(new DesignerActionPropertyItem("Style", "Style of the Switch", "Template Style", "Style of the Industry Switch"));



            return(items);
        }
        /*
         * GetSortedActionItems
         */

        /// <summary>
        /// Returns the collection of <see cref="T:System.ComponentModel.Design.DesignerActionItem"></see> objects contained in the list.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.ComponentModel.Design.DesignerActionItem"></see> array that contains the items in this list.
        /// </returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection collection = new DesignerActionItemCollection();

            collection.Add(new DesignerActionMethodItem(
                               this,
                               "AddNavigationPane",
                               designProps.Resources.ActionList_NavigationBar_AddNavigationPane)
                           );

            collection.Add(new DesignerActionMethodItem(
                               this,
                               "RemoveNavigationPane",
                               designProps.Resources.ActionList_NavigationBar_RemoveNavigationPane)
                           );

            return(collection);
        }
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection actionItems = new DesignerActionItemCollection();

            actionItems.Add(new DesignerActionHeaderItem("Appearance"));
            actionItems.Add(new DesignerActionPropertyItem("PanelBackStyle", "Back style", "Appearance"));
            actionItems.Add(new DesignerActionPropertyItem("TransparentBackground", "Transparent background", "Appearance"));

            actionItems.Add(new DesignerActionHeaderItem("Visuals"));
            actionItems.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals"));

            actionItems.Add(new DesignerActionMethodItem(this, "AddTab", "Add tab", "Actions", true));
            actionItems.Add(new DesignerActionMethodItem(this, "RemoveTab", "Remove tab", "Actions", true));

            actionItems.Add(new DesignerActionMethodItem(this, "ToggleDockStyle", GetDockStyleText()));

            return(actionItems);
        }
        /// <summary>
        /// Returns the collection of DesignerActionItem objects contained in the list.
        /// </summary>
        /// <returns>A DesignerActionItem array that contains the items in this list.</returns>
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            // Create a new collection for holding the single item we want to create
            DesignerActionItemCollection actions = new DesignerActionItemCollection();

            // This can be null when deleting a control instance at design time
            if (_group != null)
            {
                // Add the list of panel specific actions
                actions.Add(new DesignerActionHeaderItem("Appearance"));
                actions.Add(new DesignerActionPropertyItem("GroupBackStyle", "Back style", "Appearance", "Background style"));
                actions.Add(new DesignerActionPropertyItem("GroupBorderStyle", "Border style", "Appearance", "Border style"));
                actions.Add(new DesignerActionHeaderItem("Visuals"));
                actions.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals", "Palette applied to drawing"));
            }

            return(actions);
        }
Example #21
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            items.Add(new DesignerActionHeaderItem("Spoke Color"));
            items.Add(new DesignerActionPropertyItem("SpokeColor", "Spoke Color", "Spoke Color"));
            items.Add(new DesignerActionPropertyItem("HotSpokeColor", "Hot Spoke Color", "Spoke Color"));

            items.Add(new DesignerActionHeaderItem("Spoke Style"));
            items.Add(new DesignerActionPropertyItem("StartCap", "Start Cap", "Spoke Style"));
            items.Add(new DesignerActionPropertyItem("EndCap", "End Cap", "Spoke Style"));

            items.Add(new DesignerActionHeaderItem("About"));
            items.Add(new DesignerActionMethodItem(this, "OnSendMail", "Send Mail:[email protected]", "About"));
            items.Add(new DesignerActionTextItem("Copyright(C)", "About"));

            return(items);
        }
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            var items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Layout"));
            items.Add(new DesignerActionPropertyItem("Text", "Text", "Layout"));
            items.Add(new DesignerActionPropertyItem("RightToLeft", "RightToLeft", "Layout"));
            items.Add(new DesignerActionPropertyItem("Anchor", "Anchor", "Layout"));
            items.Add(new DesignerActionHeaderItem("Action"));
            items.Add(new DesignerActionPropertyItem("ContextMenuStrip", "ContextMenuStrip", "Action"));

            IamWindows.UIDesigner.Menu.Designer_Docking_Setup(items, _Component);                // Docking menu items
            IamWindows.UIDesigner.Menu.Designer_AutoSize_Setup(items, _Component);               // Auto size items (Remember to paste properties)
            IamWindows.UIDesigner.Menu.Designer_GroupBox_FileStructure_Setup(items, _Component); // Custom menu items

            return(items);
        }
Example #23
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection
            {
                new DesignerActionHeaderItem("MetroSet Framework"),
                new DesignerActionPropertyItem("StyleManager", "StyleManager", "MetroSet Framework", "Gets or sets the stylemanager for the control."),
                new DesignerActionPropertyItem("Style", "Style", "MetroSet Framework", "Gets or sets the style."),

                new DesignerActionHeaderItem("Informations"),
                new DesignerActionPropertyItem("ThemeName", "ThemeName", "Informations", "Gets or sets the The Theme name associated with the theme."),
                new DesignerActionPropertyItem("ThemeAuthor", "ThemeAuthor", "Informations", "Gets or sets the The Author name associated with the theme."),

                new DesignerActionHeaderItem("Appearance"),
                new DesignerActionPropertyItem("Text", "Text", "Appearance", "Gets or sets the The text associated with the control."),
                new DesignerActionPropertyItem("Font", "Font", "Appearance", "Gets or sets the The font associated with the control.")
            };

            return(items);
        }
        private void AddHeadersActions(DesignerActionItemCollection actions,
                                       bool includeHeaderPrimary,
                                       bool includeHeaderSecondary,
                                       bool includeHeaderBar)
        {
            // Get the current visible state of the headers
            bool headerBarVisible       = _navigator.Header.HeaderVisibleBar;
            bool headerPrimaryVisible   = _navigator.Header.HeaderVisiblePrimary;
            bool headerSecondaryVisible = _navigator.Header.HeaderVisibleSecondary;

            // Decide on the initial text values
            _headerBarText       = (headerBarVisible ? "Hide bar header" : "Show bar header");
            _headerPrimaryText   = (headerPrimaryVisible ? "Hide primary header" : "Show primary header");
            _headerSecondaryText = (headerSecondaryVisible ? "Hide secondary header" : "Show secondary header");

            // Create the two verbs for toggling the header visibility
            _headerBarVisible       = new DesignerVerb(_headerBarText, new EventHandler(OnVisibleClick));
            _headerPrimaryVisible   = new DesignerVerb(_headerPrimaryText, new EventHandler(OnVisibleClick));
            _headerSecondaryVisible = new DesignerVerb(_headerSecondaryText, new EventHandler(OnVisibleClick));

            actions.Add(new DesignerActionHeaderItem("Header"));

            if (includeHeaderBar)
            {
                actions.Add(new DesignerActionPropertyItem("BarHeaderStyle", "Bar Style", "Header", "Bar header style."));
                actions.Add(new DesignerActionPropertyItem("BarHeaderPosition", "Bar Position", "Header", "Bar header position."));
                actions.Add(new KryptonDesignerActionItem(_headerBarVisible, "Header"));
            }

            if (includeHeaderPrimary)
            {
                actions.Add(new DesignerActionPropertyItem("PrimaryHeaderStyle", "Primary Style", "Header", "Primary header style."));
                actions.Add(new DesignerActionPropertyItem("PrimaryHeaderPosition", "Primary Position", "Header", "Primary header position."));
                actions.Add(new KryptonDesignerActionItem(_headerPrimaryVisible, "Header"));
            }

            if (includeHeaderSecondary)
            {
                actions.Add(new DesignerActionPropertyItem("SecondaryHeaderStyle", "Secondary Style", "Header", "Secondary header style."));
                actions.Add(new DesignerActionPropertyItem("SecondaryHeaderPosition", "Secondary Position", "Header", "Secondary header position."));
                actions.Add(new KryptonDesignerActionItem(_headerSecondaryVisible, "Header"));
            }
        }
Example #25
0
            /// <summary>
            ///     Returns the collection of <see cref="T:System.ComponentModel.Design.DesignerActionItem"></see> objects contained in the list.
            /// </summary>
            /// <returns>
            ///     A <see cref="T:System.ComponentModel.Design.DesignerActionItem"></see> array that contains the items in this list.
            /// </returns>
            public override DesignerActionItemCollection GetSortedActionItems()
            {
                DesignerActionItemCollection items = new DesignerActionItemCollection();

                items.Add(new DesignerActionHeaderItem("Appearence", "Appearence"));
                items.Add(new DesignerActionMethodItem(this, "ResetAppearence", "Reset Appearence", "Appearence", true));
                if (WizardStep is StartStep)
                {
                    items.Add(new DesignerActionPropertyItem("StartTitle", "Title", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("StartSubTitle", "SubTitle", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("StartBindingImage", "BindingImage", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("StartIcon", "Icon", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("StartLeftPair", "Left pane appearence", "Appearence"));
                }

                if (WizardStep is LicenceStep)
                {
                    items.Add(new DesignerActionPropertyItem("LicenceTitle", "Title", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("LicenceSubTitle", "SubTitle", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("LicenceBindingImage", "BindingImage", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("LicenceHeaderPair", "HeaderPair", "Appearence"));
                    items.Add(new DesignerActionHeaderItem("Licence", "Licence"));
                    items.Add(new DesignerActionPropertyItem("LicenceAccepted", "Licence Accepted", "Licence"));
                    items.Add(new DesignerActionPropertyItem("LicenceAcceptText", "Licence AcceptText", "Licence"));
                    items.Add(new DesignerActionPropertyItem("LicenceDeclineText", "Licence DeclineText", "Licence"));
                    items.Add(new DesignerActionPropertyItem("LicenceLicenseFile", "License File", "Licence"));
                }

                if (WizardStep is IntermediateStep)
                {
                    items.Add(new DesignerActionPropertyItem("IntermediateTitle", "Title", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("IntermediateSubTitle", "SubTitle", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("IntermediateBindingImage", "BindingImage", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("IntermediateHeaderPair", "HeaderPair", "Appearence"));
                }

                if (WizardStep is FinishStep)
                {
                    items.Add(new DesignerActionPropertyItem("FinishBindingImage", "BindingImage", "Appearence"));
                    items.Add(new DesignerActionPropertyItem("FinishPair", "Pair", "Appearence"));
                }
                return(items);
            }
Example #26
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection
            {
                new DesignerActionHeaderItem("MetroSet Framework"),
                new DesignerActionPropertyItem("StyleManager", "StyleManager", "MetroSet Framework", "Gets or sets the stylemanager for the control."),
                new DesignerActionPropertyItem("Style", "Style", "MetroSet Framework", "Gets or sets the style."),

                new DesignerActionHeaderItem("Informations"),
                new DesignerActionPropertyItem("ThemeName", "ThemeName", "Informations", "Gets or sets the The Theme name associated with the theme."),
                new DesignerActionPropertyItem("ThemeAuthor", "ThemeAuthor", "Informations", "Gets or sets the The Author name associated with the theme."),

                new DesignerActionHeaderItem("Appearance"),
                new DesignerActionPropertyItem("MaximizeBox", "Enable MaximizeBox", "Appearance", "Gets or sets a value indicating whether the Maximize button is Enabled in the caption bar of the form."),
                new DesignerActionPropertyItem("MinimizeBox", "Enable MinimizeBox", "Appearance", "Gets or sets a value indicating whether the Minimize button is Enabled in the caption bar of the form.")
            };

            return(items);
        }
Example #27
0
        public void DesignerActionItemCollection_Insert_DesignerActionItem_Success()
        {
            var collection = new DesignerActionItemCollection();

            var value1 = new SubDesignerActionItem("displayName", "category", "description");

            collection.Insert(0, value1);
            Assert.Same(value1, Assert.Single(collection));
            Assert.Same(value1, collection[0]);
            Assert.True(collection.Contains(value1));
            Assert.Equal(0, collection.IndexOf(value1));

            var value2 = new SubDesignerActionItem("displayName", "category", "description");

            collection.Insert(0, value2);
            Assert.Equal(new object[] { value2, value1 }, collection.Cast <object>());
            Assert.True(collection.Contains(value2));
            Assert.Equal(0, collection.IndexOf(value2));
        }
            // Provide the list of sorted action items for the host.
            public override DesignerActionItemCollection GetSortedActionItems()
            {
                DesignerActionItemCollection items = new DesignerActionItemCollection();

                items.Add(new DesignerActionTextItem("Add Control", "Add"));
                items.Add(new DesignerActionMethodItem(this,
                                                       "AddButton",
                                                       "Add a Button",
                                                       "Add",
                                                       String.Empty,
                                                       false));
                items.Add(new DesignerActionMethodItem(this,
                                                       "AddNewButton",
                                                       "Add a custom Button",
                                                       "Add",
                                                       String.Empty,
                                                       false));
                return(items);
            }
Example #29
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            items.Add(new DesignerActionHeaderItem("Properties", "Properties"));

            items.Add(new DesignerActionPropertyItem("Items",
                                                     "Items", "Properties",
                                                     "Коллекция элементов"));

            //-------------------------------
            items.Add(new DesignerActionHeaderItem("Methods", "Methods"));

            items.Add(new DesignerActionMethodItem(this, "OnDesigner",
                                                   "Run Designer", "Methods",
                                                   "Show designer"));

            return(items);
        }
            public override DesignerActionItemCollection GetSortedActionItems()
            {
                if (this._parent.InTemplateMode)
                {
                    return(new DesignerActionItemCollection());
                }
                DesignerActionItemCollection items = new DesignerActionItemCollection();

                if (!this._parent.Templated)
                {
                    items.Add(new DesignerActionMethodItem(this, "ConvertToTemplate", System.Design.SR.GetString("WebControls_ConvertToTemplate"), string.Empty, System.Design.SR.GetString("WebControls_ConvertToTemplateDescription"), true));
                }
                else
                {
                    items.Add(new DesignerActionMethodItem(this, "Reset", System.Design.SR.GetString("WebControls_Reset"), string.Empty, System.Design.SR.GetString("WebControls_ResetDescription"), true));
                }
                items.Add(new DesignerActionMethodItem(this, "LaunchWebAdmin", System.Design.SR.GetString("Login_LaunchWebAdmin"), string.Empty, System.Design.SR.GetString("Login_LaunchWebAdminDescription"), true));
                return(items);
            }
Example #31
0
 /// <summary>
 /// Poulates the list of available actions of the Filmstrip Control.
 /// </summary>
 /// <returns>The list of availabe actions for the Filmstrip Control</returns>
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionPropertyItem("ControlBackground", "Control background colour", "Filmstrip properties"));
     items.Add(new DesignerActionPropertyItem("SelectedHighlight", "Selected highlight colour", "Filmstrip properties"));
     items.Add(new DesignerActionPropertyItem("MainImageLayout", "Main image layout style", "Filmstrip properties"));
     items.Add(new DesignerActionPropertyItem("ThumbsStripLocation", "Thumbs strip location", "Filmstrip properties"));
     items.Add(new DesignerActionPropertyItem("Dock", "Dock style", "Base properties"));
     return items;
 }
Example #32
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new DesignerActionHeaderItem("Appearance"));
            items.Add(new DesignerActionHeaderItem("Information"));

            //Boolean property for locking color selections.
            items.Add(new DesignerActionPropertyItem("LockColors",
                             "Lock Colors", "Appearance",
                             "Locks the color properties."));
            if (!LockColors)
            {
                items.Add(new DesignerActionPropertyItem("BackColor",
                                 "Back Color", "Appearance",
                                 "Selects the background color."));
                items.Add(new DesignerActionPropertyItem("ForeColor",
                                 "Fore Color", "Appearance",
                                 "Selects the foreground color."));

                //This next method item is also added to the context menu 
                // (as a designer verb).

                items.Add(new DesignerActionMethodItem(this,
                                 "InvertColors", "Invert 4 Colors",
                                 "Appearance",
                                 "Inverts the fore and background colors.",
                                  true));
                items.Add(new DesignerActionMethodItem(this,
                                 "InvertColors", "Invert Colors 3",
                                 "Appearance",
                                 "Inverts the fore and background colors.",
                                  true));
            }
            items.Add(new DesignerActionPropertyItem("Text",
                             "Text String", "Appearance",
                             "Sets the display text."));

            //Create entries for static Information section.
            StringBuilder location = new StringBuilder("Location: ");
            location.Append(colLabel.Location);
            StringBuilder size = new StringBuilder("Size: ");
            size.Append(colLabel.Size);
            items.Add(new DesignerActionTextItem(location.ToString(),
                             "Information"));
            items.Add(new DesignerActionTextItem(size.ToString(),
                             "Information"));

            return items;
        }