public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionMethodItem(this, "InvokeNodesDialog", System.Design.SR.GetString("InvokeNodesDialogDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("InvokeNodesDialogDescription"), true));
     items.Add(new DesignerActionPropertyItem("ImageList", System.Design.SR.GetString("ImageListDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ImageListDescription")));
     return items;
 }
예제 #2
0
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionHeaderItem("API Key"));
     items.Add(new DesignerActionTextItem("To use reCAPTCHA, you need an API key from http://admin.recaptcha.net/", string.Empty));
     return items;
 }
예제 #3
0
        //private bool SetDataSourceIDCallback(object context)
        //{
        //    Designer.DataSourceID = (string)context;

        //    return true;
        //}
        #endregion

        #region 重载
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            //PropertyDescriptor descriptor = TypeDescriptor.GetProperties(Designer.Component)["DataSourceID"];
            //if ((descriptor != null) && descriptor.IsBrowsable)
            //{
            //    DesignerActionPropertyItem dpitem = new DesignerActionPropertyItem("DataSourceID", SR.GetString("BaseDataBoundControl_ConfigureDataVerb"), SR.GetString("BaseDataBoundControl_DataActionGroup"), SR.GetString("BaseDataBoundControl_ConfigureDataVerbDesc"));
            //    items.Add(dpitem);

            //    ControlDesigner designer = Designer.DataSourceDesigner as ControlDesigner;
            //    if (designer != null)
            //    {
            //        ((DesignerActionPropertyItem)items[0]).RelatedComponent = designer.Component;
            //    }
            //}

            items.Add(new DesignerActionHeaderItem("方法栏"));
            items.Add(new DesignerActionMethodItem(this, "Test", "测试方法"));

            items.Add(new DesignerActionHeaderItem("属性栏"));
            //items.Add(new DesignerActionPropertyItem("DataSourceID", SR.GetString("BaseDataBoundControl_ConfigureDataVerb"), SR.GetString("BaseDataBoundControl_DataActionGroup"), SR.GetString("BaseDataBoundControl_ConfigureDataVerbDesc")));

            return items;
        }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionMethodItem(this, "ChooseImage", System.Design.SR.GetString("ChooseImageDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ChooseImageDescription"), true));
     items.Add(new DesignerActionPropertyItem("SizeMode", System.Design.SR.GetString("SizeModeDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("SizeModeDescription")));
     return items;
 }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this._listControlDesigner.Component);
     PropertyDescriptor descriptor = properties["DataSourceID"];
     if ((descriptor != null) && descriptor.IsBrowsable)
     {
         items.Add(new DesignerActionMethodItem(this, "ConnectToDataSource", System.Design.SR.GetString("ListControl_ConfigureDataVerb"), System.Design.SR.GetString("BaseDataBoundControl_DataActionGroup"), System.Design.SR.GetString("BaseDataBoundControl_ConfigureDataVerbDesc")));
     }
     ControlDesigner designer = this._dataSourceDesigner as ControlDesigner;
     if (designer != null)
     {
         ((DesignerActionMethodItem) items[0]).RelatedComponent = designer.Component;
     }
     descriptor = properties["Items"];
     if ((descriptor != null) && descriptor.IsBrowsable)
     {
         items.Add(new DesignerActionMethodItem(this, "EditItems", System.Design.SR.GetString("ListControl_EditItems"), "Actions", System.Design.SR.GetString("ListControl_EditItemsDesc")));
     }
     descriptor = properties["AutoPostBack"];
     if ((descriptor != null) && descriptor.IsBrowsable)
     {
         items.Add(new DesignerActionPropertyItem("AutoPostBack", System.Design.SR.GetString("ListControl_EnableAutoPostBack"), "Behavior", System.Design.SR.GetString("ListControl_EnableAutoPostBackDesc")));
     }
     return items;
 }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     if (!this.IsReadOnly)
     {
         items.Add(new DesignerActionMethodItem(this, "InvokeEmbedVerb", System.Design.SR.GetString("ToolStripDesignerEmbedVerb"), "", System.Design.SR.GetString("ToolStripDesignerEmbedVerbDesc"), true));
     }
     if (this.CanAddItems)
     {
         if (!(this._toolStrip is StatusStrip))
         {
             items.Add(new DesignerActionMethodItem(this, "InvokeInsertStandardItemsVerb", System.Design.SR.GetString("ToolStripDesignerStandardItemsVerb"), "", System.Design.SR.GetString("ToolStripDesignerStandardItemsVerbDesc"), true));
         }
         items.Add(new DesignerActionPropertyItem("RenderMode", System.Design.SR.GetString("ToolStripActionList_RenderMode"), System.Design.SR.GetString("ToolStripActionList_Layout"), System.Design.SR.GetString("ToolStripActionList_RenderModeDesc")));
     }
     if (!(this._toolStrip.Parent is ToolStripPanel))
     {
         items.Add(new DesignerActionPropertyItem("Dock", System.Design.SR.GetString("ToolStripActionList_Dock"), System.Design.SR.GetString("ToolStripActionList_Layout"), System.Design.SR.GetString("ToolStripActionList_DockDesc")));
     }
     if (!(this._toolStrip is StatusStrip))
     {
         items.Add(new DesignerActionPropertyItem("GripStyle", System.Design.SR.GetString("ToolStripActionList_GripStyle"), System.Design.SR.GetString("ToolStripActionList_Layout"), System.Design.SR.GetString("ToolStripActionList_GripStyleDesc")));
     }
     return items;
 }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionPropertyItem("ImageSize", System.Design.SR.GetString("ImageListActionListImageSizeDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ImageListActionListImageSizeDescription")));
     items.Add(new DesignerActionPropertyItem("ColorDepth", System.Design.SR.GetString("ImageListActionListColorDepthDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ImageListActionListColorDepthDescription")));
     items.Add(new DesignerActionMethodItem(this, "ChooseImages", System.Design.SR.GetString("ImageListActionListChooseImagesDisplayName"), System.Design.SR.GetString("LinksCategoryName"), System.Design.SR.GetString("ImageListActionListChooseImagesDescription"), true));
     return items;
 }
            // Create the ActionItem collection and add one command
            public override DesignerActionItemCollection GetSortedActionItems()
            {
                // fixme -- I can't get this to open up automatically (
                DesignerActionItemCollection items = new DesignerActionItemCollection();
                items.Add(new DesignerActionHeaderItem("API Key"));
                items.Add(new DesignerActionTextItem("To use reCAPTCHA, you need an API key from https://www.google.com/recaptcha/admin/create", string.Empty));

                return items;
            }
            // Create the ActionItem collection and add one command
            public override DesignerActionItemCollection GetSortedActionItems()
            {
                // fixme -- I can't get this to open up automatically (
                DesignerActionItemCollection items = new DesignerActionItemCollection();
                items.Add(new DesignerActionHeaderItem("API Key"));
                items.Add(new DesignerActionTextItem("To use Brandcaptcha, you need an API key", string.Empty));

                return items;
            }
		public override DesignerActionItemCollection GetSortedActionItems()
		{
			DesignerActionItemCollection actions = new DesignerActionItemCollection();
			actions.Add (new DesignerActionPropertyItem ("DrawBorder","DrawBorder","Appearance"));
			actions.Add (new DesignerActionPropertyItem ("Font","Font","Appearance"));
			actions.Add (new DesignerActionPropertyItem ("ContentAlignment","ContentAlignment","Appearance"));
			actions.Add (new DesignerActionPropertyItem ("StringTrimming","StringTrimming","Appearance"));
			actions.Add (new DesignerActionPropertyItem ("FormatString","FormatString","Appearance"));
			return actions;
		}
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionHeaderItem("Apariencia"));
     items.Add(new DesignerActionHeaderItem("Comportamiento"));
     items.Add(new DesignerActionPropertyItem("CajaTexto", "Caja de Texto", "Comportamiento", "Permite establecer una Caja de Texto al boton"));
     items.Add(new DesignerActionPropertyItem("CajaTextoConBoton", "Caja de Texto con Boton", "Comportamiento", "Permite establecer un ButtonEdit al boton"));
     items.Add(new DesignerActionPropertyItem("Imagen", "Imagen del boton", "Apariencia", "Permite colocar una imagen estandar al boton"));
     return items;
 }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionMethodItem(this, "EditFields", System.Design.SR.GetString("DetailsView_EditFieldsVerb"), "Action", System.Design.SR.GetString("DetailsView_EditFieldsDesc")));
     items.Add(new DesignerActionMethodItem(this, "AddNewField", System.Design.SR.GetString("DetailsView_AddNewFieldVerb"), "Action", System.Design.SR.GetString("DetailsView_AddNewFieldDesc")));
     if (this.AllowMoveUp)
     {
         items.Add(new DesignerActionMethodItem(this, "MoveFieldUp", System.Design.SR.GetString("DetailsView_MoveFieldUpVerb"), "Action", System.Design.SR.GetString("DetailsView_MoveFieldUpDesc")));
     }
     if (this.AllowMoveDown)
     {
         items.Add(new DesignerActionMethodItem(this, "MoveFieldDown", System.Design.SR.GetString("DetailsView_MoveFieldDownVerb"), "Action", System.Design.SR.GetString("DetailsView_MoveFieldDownDesc")));
     }
     if (this.AllowRemoveField)
     {
         items.Add(new DesignerActionMethodItem(this, "RemoveField", System.Design.SR.GetString("DetailsView_RemoveFieldVerb"), "Action", System.Design.SR.GetString("DetailsView_RemoveFieldDesc")));
     }
     if (this.AllowPaging)
     {
         items.Add(new DesignerActionPropertyItem("EnablePaging", System.Design.SR.GetString("DetailsView_EnablePaging"), "Behavior", System.Design.SR.GetString("DetailsView_EnablePagingDesc")));
     }
     if (this.AllowInserting)
     {
         items.Add(new DesignerActionPropertyItem("EnableInserting", System.Design.SR.GetString("DetailsView_EnableInserting"), "Behavior", System.Design.SR.GetString("DetailsView_EnableInsertingDesc")));
     }
     if (this.AllowEditing)
     {
         items.Add(new DesignerActionPropertyItem("EnableEditing", System.Design.SR.GetString("DetailsView_EnableEditing"), "Behavior", System.Design.SR.GetString("DetailsView_EnableEditingDesc")));
     }
     if (this.AllowDeleting)
     {
         items.Add(new DesignerActionPropertyItem("EnableDeleting", System.Design.SR.GetString("DetailsView_EnableDeleting"), "Behavior", System.Design.SR.GetString("DetailsView_EnableDeletingDesc")));
     }
     return items;
 }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionPropertyItem("RenderMode", System.Design.SR.GetString("ToolStripActionList_RenderMode"), System.Design.SR.GetString("ToolStripActionList_Layout"), System.Design.SR.GetString("ToolStripActionList_RenderModeDesc")));
     if (this._toolStripDropDown is ToolStripDropDownMenu)
     {
         items.Add(new DesignerActionPropertyItem("ShowImageMargin", System.Design.SR.GetString("ContextMenuStripActionList_ShowImageMargin"), System.Design.SR.GetString("ToolStripActionList_Layout"), System.Design.SR.GetString("ContextMenuStripActionList_ShowImageMarginDesc")));
         items.Add(new DesignerActionPropertyItem("ShowCheckMargin", System.Design.SR.GetString("ContextMenuStripActionList_ShowCheckMargin"), System.Design.SR.GetString("ToolStripActionList_Layout"), System.Design.SR.GetString("ContextMenuStripActionList_ShowCheckMarginDesc")));
     }
     return items;
 }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     if (this.AllowDynamicData)
     {
         items.Add(new DesignerActionPropertyItem("EnableDynamicData", System.Design.SR.GetString("FormView_EnableDynamicData"), "Behavior", System.Design.SR.GetString("FormView_EnableDynamicDataDesc")));
     }
     if (this.AllowPaging)
     {
         items.Add(new DesignerActionPropertyItem("EnablePaging", System.Design.SR.GetString("FormView_EnablePaging"), "Behavior", System.Design.SR.GetString("FormView_EnablePagingDesc")));
     }
     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;
        }
        // Implementation of this abstract method creates smart tag
        // items, associates their targets, and collects into list.
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();

            items.Add(new DesignerActionHeaderItem("Behavior"));
            items.Add(new DesignerActionPropertyItem("SelectedPage", "Selected Page", "Behavior", "Select a page."));

            //Create entries for static Information section.
            StringBuilder location = new StringBuilder("Location: ");
            location.Append(multiPanel.Location);
            StringBuilder size = new StringBuilder("Size: ");
            size.Append(multiPanel.Size);

            items.Add(new DesignerActionMethodItem(this, "AddPage", "Add page", "Behavior", "Add a new page.", true));
            items.Add(new DesignerActionMethodItem(this, "RemovePage", "Remove page", "Behavior", "Remove the selected page.", true));

            return items;
        }
예제 #17
0
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionMethodItem(
         this,
         "InvokeItemDialog",
         "编辑项...",
         true));
     return items;
 }
예제 #18
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;
        }
예제 #19
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items = new DesignerActionItemCollection();
            items.Add(new DesignerActionHeaderItem("Nodes"));
            items.Add(new DesignerActionHeaderItem("Columns"));
            
            items.Add(new DesignerActionMethodItem(this, "EditColumns", "Edit Columns...", "Columns", "Edit Tree Control Columns", true));
            items.Add(new DesignerActionPropertyItem("ColumnsVisible", "Column header visible?", "Columns", "Indicates whether tree column header is visible"));
            items.Add(new DesignerActionPropertyItem("GridColumnLines", "Show grid column lines?", "Columns", "Indicates whether grid lines are visible"));
            items.Add(new DesignerActionPropertyItem("GridRowLines", "Show grid row lines?", "Nodes", "Indicates whether grid lines between nodes are visible"));
            items.Add(new DesignerActionPropertyItem("GridLinesColor", "Grid lines color:", "Columns", "Indicates custom color for grid lines"));

            items.Add(new DesignerActionPropertyItem("SelectionBoxStyle", "Selection style:", "Selection", "Indicates selection style"));
            items.Add(new DesignerActionPropertyItem("HotTracking", "Highlight mouse over node?", "Selection", "Indicates whether node that mouse is over is highlighted"));

            return items;
        }
		/// <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 actionItems = new DesignerActionItemCollection();

			actionItems.Add(
				new DesignerActionMethodItem(
					this,
					"AddSwitchPage",
					designProps.Resources.ActionList_Switcher_AddSwitchPage
				)
			);
			actionItems.Add(
				new DesignerActionMethodItem(
					this,
					"RemoveSwitchPage",
					designProps.Resources.ActionList_Switcher_RemoveSwitchPage
				)
			);

			return actionItems;
		}
		/*
		 * 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 actionItems = new DesignerActionItemCollection();

			actionItems.Add(
				new DesignerActionMethodItem(
					this,
					"AddTabPage",
					Resources.NuGenTabControlActionList_AddTabPage
				)
			);
			actionItems.Add(
				new DesignerActionMethodItem(
					this,
					"RemoveTabPage",
					Resources.NuGenTabControlActionList_RemoveTabPage
				)
			);

			return actionItems;
		}
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     for (int i = 0; i < this._verbs.Length; i++)
     {
         if ((this._verbs[i].Visible && this._verbs[i].Enabled) && this._verbs[i].Supported)
         {
             items.Add(new DesignerActionVerbItem(this._verbs[i]));
         }
     }
     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 actionItems = new DesignerActionItemCollection();

			actionItems.Add(new DesignerActionPropertyItem(
				"ColorScheme",
				Resources.ColorSchemeDisplayName,
				Resources.AppearanceCategory,
				Resources.ColorSchemeDescription)
				);

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

            var propertyItem = GetPropertyItem("AppendDataBoundItems", "Append DataBound Items");
            if(propertyItem != null)
                actionItems.Add(propertyItem);

            propertyItem = GetPropertyItem("CaseSensitive", "Case Sensitive");
            if(propertyItem != null)
                actionItems.Add(propertyItem);

            propertyItem = GetPropertyItem("DropDownStyle", "DropDown Style");
            if(propertyItem != null)
                actionItems.Add(propertyItem);

            propertyItem = GetPropertyItem("AutoCompleteMode", "AutoComplete Mode");
            if(propertyItem != null)
                actionItems.Add(propertyItem);

            return actionItems;
        }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionMethodItem(this, "EditFields", System.Design.SR.GetString("GridView_EditFieldsVerb"), "Action", System.Design.SR.GetString("GridView_EditFieldsDesc")));
     items.Add(new DesignerActionMethodItem(this, "AddNewField", System.Design.SR.GetString("GridView_AddNewFieldVerb"), "Action", System.Design.SR.GetString("GridView_AddNewFieldDesc")));
     if (this.AllowMoveLeft)
     {
         items.Add(new DesignerActionMethodItem(this, "MoveFieldLeft", System.Design.SR.GetString("GridView_MoveFieldLeftVerb"), "Action", System.Design.SR.GetString("GridView_MoveFieldLeftDesc")));
     }
     if (this.AllowMoveRight)
     {
         items.Add(new DesignerActionMethodItem(this, "MoveFieldRight", System.Design.SR.GetString("GridView_MoveFieldRightVerb"), "Action", System.Design.SR.GetString("GridView_MoveFieldRightDesc")));
     }
     if (this.AllowRemoveField)
     {
         items.Add(new DesignerActionMethodItem(this, "RemoveField", System.Design.SR.GetString("GridView_RemoveFieldVerb"), "Action", System.Design.SR.GetString("GridView_RemoveFieldDesc")));
     }
     if (this.AllowPaging)
     {
         items.Add(new DesignerActionPropertyItem("EnablePaging", System.Design.SR.GetString("GridView_EnablePaging"), "Behavior", System.Design.SR.GetString("GridView_EnablePagingDesc")));
     }
     if (this.AllowSorting)
     {
         items.Add(new DesignerActionPropertyItem("EnableSorting", System.Design.SR.GetString("GridView_EnableSorting"), "Behavior", System.Design.SR.GetString("GridView_EnableSortingDesc")));
     }
     if (this.AllowEditing)
     {
         items.Add(new DesignerActionPropertyItem("EnableEditing", System.Design.SR.GetString("GridView_EnableEditing"), "Behavior", System.Design.SR.GetString("GridView_EnableEditingDesc")));
     }
     if (this.AllowDeleting)
     {
         items.Add(new DesignerActionPropertyItem("EnableDeleting", System.Design.SR.GetString("GridView_EnableDeleting"), "Behavior", System.Design.SR.GetString("GridView_EnableDeletingDesc")));
     }
     if (this.AllowSelection)
     {
         items.Add(new DesignerActionPropertyItem("EnableSelection", System.Design.SR.GetString("GridView_EnableSelection"), "Behavior", System.Design.SR.GetString("GridView_EnableSelectionDesc")));
     }
     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 items = new DesignerActionItemCollection();

			items.Add(new DesignerActionPropertyItem(
				"Orientation",
				designProps.Resources.ActionList_Orientation,
				ctrlProps.Resources.Category_Appearance,
				ctrlProps.Resources.Description_Orientation)
			);

			return items;
		}
 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 (_contextMenu != null)
            {
                // Add the list of panel specific actions
                actions.Add(new DesignerActionHeaderItem("Visuals"));
                actions.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals", "Palette applied to drawing"));
            }

            return actions;
        }
예제 #29
0
        public virtual DesignerActionItemCollection GetSortedActionItems()
        {
            var items = new SortedList <string, DesignerActionItem>();

            // we want to ignore the public methods and properties for THIS class (only take the inherited ones)
            IList <MethodInfo>   originalMethods    = Array.AsReadOnly(typeof(DesignerActionList).GetMethods(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public));
            IList <PropertyInfo> originalProperties = Array.AsReadOnly(typeof(DesignerActionList).GetProperties(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public));

            // Do methods
            MethodInfo[] methods = GetType().GetMethods(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);
            foreach (MethodInfo info in methods)
            {
                if (originalMethods.Contains(info))
                {
                    continue;
                }

                // Make sure there are only methods that take no parameters
                if (info.GetParameters().Length == 0 && !info.IsSpecialName)
                {
                    GetMemberDisplayProperties(info, out string dispName, out string desc, out string cat);
                    items.Add(info.Name, new DesignerActionMethodItem(this, info.Name, dispName, cat, desc));
                }
            }

            // Do properties
            PropertyInfo[] properties = GetType().GetProperties(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);
            foreach (PropertyInfo info in properties)
            {
                if (originalProperties.Contains(info))
                {
                    continue;
                }

                GetMemberDisplayProperties(info, out string dispName, out string desc, out string cat);
                items.Add(dispName, new DesignerActionPropertyItem(info.Name, dispName, cat, desc));
            }

            var returnValue = new DesignerActionItemCollection();

            foreach (DesignerActionItem dai in items.Values)
            {
                returnValue.Add(dai);
            }

            return(returnValue);
        }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionMethodItem(this, "InvokeItemsDialog", System.Design.SR.GetString("ListViewActionListEditItemsDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ListViewActionListEditItemsDescription"), true));
     items.Add(new DesignerActionMethodItem(this, "InvokeColumnsDialog", System.Design.SR.GetString("ListViewActionListEditColumnsDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ListViewActionListEditColumnsDescription"), true));
     items.Add(new DesignerActionMethodItem(this, "InvokeGroupsDialog", System.Design.SR.GetString("ListViewActionListEditGroupsDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ListViewActionListEditGroupsDescription"), true));
     items.Add(new DesignerActionPropertyItem("View", System.Design.SR.GetString("ListViewActionListViewDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ListViewActionListViewDescription")));
     items.Add(new DesignerActionPropertyItem("SmallImageList", System.Design.SR.GetString("ListViewActionListSmallImagesDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ListViewActionListSmallImagesDescription")));
     items.Add(new DesignerActionPropertyItem("LargeImageList", System.Design.SR.GetString("ListViewActionListLargeImagesDisplayName"), System.Design.SR.GetString("PropertiesCategoryName"), System.Design.SR.GetString("ListViewActionListLargeImagesDescription")));
     return items;
 }
예제 #31
0
        public override System.ComponentModel.Design.DesignerActionItemCollection GetSortedActionItems()
        {
            System.ComponentModel.Design.DesignerActionItemCollection items = new System.ComponentModel.Design.DesignerActionItemCollection();

            //Define static section header entries.
            items.Add(new System.ComponentModel.Design.DesignerActionHeaderItem("Data Fields"));

            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("CognomeTextBox",
                                                                                  "Cognome control", null,
                                                                                  "Get or Set Cognome field."));


            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("NomeTextBox",
                                                                                  "Nome control", null,
                                                                                  "Get or Set Nome field."));


            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("SessoDropDownList",
                                                                                  "Sesso control", null,
                                                                                  "Get or Set Sesso field."));


            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("DataNascitaPicker",
                                                                                  "Data di Nascita control", null,
                                                                                  "Get or Set Data di Nascita field."));


            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("RegioniDropDownList",
                                                                                  "Regione di Nascita control", null,
                                                                                  "Get or Set Regione di Nascita field."));

            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("ProvinceDropDownList",
                                                                                  "Provincia di Nascita control", null,
                                                                                  "Get or Set Provincia di Nascita field."));


            items.Add(new System.ComponentModel.Design.DesignerActionPropertyItem("ComuniDropDownList",
                                                                                  "Comune di Nascita control", null,
                                                                                  "Get or Set Comune di Nascita field."));


            return(items);
        }
 public override DesignerActionItemCollection GetSortedActionItems()
 {
     DesignerActionItemCollection items = new DesignerActionItemCollection();
     items.Add(new DesignerActionPropertyItem("BoundMode", System.Design.SR.GetString("BoundModeDisplayName"), System.Design.SR.GetString("DataCategoryName"), System.Design.SR.GetString("BoundModeDescription")));
     ListControl component = base.Component as ListControl;
     if (this._boundMode || ((component != null) && (component.DataSource != null)))
     {
         this._boundMode = true;
         items.Add(new DesignerActionHeaderItem(System.Design.SR.GetString("BoundModeHeader"), System.Design.SR.GetString("DataCategoryName")));
         items.Add(new DesignerActionPropertyItem("DataSource", System.Design.SR.GetString("DataSourceDisplayName"), System.Design.SR.GetString("DataCategoryName"), System.Design.SR.GetString("DataSourceDescription")));
         items.Add(new DesignerActionPropertyItem("DisplayMember", System.Design.SR.GetString("DisplayMemberDisplayName"), System.Design.SR.GetString("DataCategoryName"), System.Design.SR.GetString("DisplayMemberDescription")));
         items.Add(new DesignerActionPropertyItem("ValueMember", System.Design.SR.GetString("ValueMemberDisplayName"), System.Design.SR.GetString("DataCategoryName"), System.Design.SR.GetString("ValueMemberDescription")));
         items.Add(new DesignerActionPropertyItem("BoundSelectedValue", System.Design.SR.GetString("BoundSelectedValueDisplayName"), System.Design.SR.GetString("DataCategoryName"), System.Design.SR.GetString("BoundSelectedValueDescription")));
         return items;
     }
     items.Add(new DesignerActionHeaderItem(System.Design.SR.GetString("UnBoundModeHeader"), System.Design.SR.GetString("DataCategoryName")));
     items.Add(new DesignerActionMethodItem(this, "InvokeItemsDialog", System.Design.SR.GetString("EditItemDisplayName"), System.Design.SR.GetString("DataCategoryName"), System.Design.SR.GetString("EditItemDescription"), true));
     return items;
 }