Пример #1
0
        // NOTE: AppliedDeviceFiltersDialog also uses this test...
        internal static bool NewLabelIsLegal(
            ISite site,
            EditableTreeList filterList,
            String oldLabel,
            String newLabel,
            String errorDialogTitle
            )
        {
            Debug.Assert(site != null);

            if (newLabel.Length == 0)
            {
                GenericUI.ShowWarningMessage(
                    errorDialogTitle,
                    SR.GetString(SR.DeviceFilterEditorDialog_UnnamedFilter)
                    );
                return(false);
            }

            /* Removed for DCR 4240
             * if (!DesignerUtility.IsValidName(newLabel))
             * {
             *  GenericUI.ShowWarningMessage(
             *      errorDialogTitle,
             *      SR.GetString(SR.DeviceFilterEditorDialog_IllegalName, newLabel)
             *  );
             *  return false;
             * }
             */

            return(true);
        }
        protected virtual void InitForm()
        {
            TreeList               = new EditableTreeList(true, CaseSensitive, Y);
            TreeList.TabIndex      = 0;
            TreeList.LblTitle.Text = TreeViewTitle;
            TreeList.BtnAdd.Text   = AddButtonTitle;

            TreeList.TvList.AfterLabelEdit  += new NodeLabelEditEventHandler(OnAfterLabelEdit);
            TreeList.TvList.BeforeLabelEdit += new NodeLabelEditEventHandler(OnBeforeLabelEdit);
            TreeList.TvList.AfterSelect     += new TreeViewEventHandler(OnNodeSelected);
            TreeList.BtnAdd.Click           += new EventHandler(OnClickAddButton);
            TreeList.BtnRemove.Click        += new EventHandler(OnClickRemoveButton);
            TreeList.BtnUp.Click            += new EventHandler(OnClickUpButton);
            TreeList.BtnDown.Click          += new EventHandler(OnClickDownButton);

            this.Controls.AddRange(new Control[] { TreeList /*, grplblProperties*/ });
        }
Пример #3
0
        private void InitializeComponent()
        {
            this._pnlHeader        = new HeaderPanel();
            this._lblHeader        = new HeaderLabel();
            this._glAttributes     = new GroupLabel();
            this._glType           = new GroupLabel();
            this._txtType          = new System.Windows.Forms.TextBox();
            this._pnlMain          = new System.Windows.Forms.Panel();
            this._filterList       = new EditableTreeList();
            this._rbCompare        = new System.Windows.Forms.RadioButton();
            this._lblCompare       = new System.Windows.Forms.Label();
            this._dialogButtons    = new DefaultDialogButtons();
            this._lblType          = new System.Windows.Forms.Label();
            this._txtMethod        = new System.Windows.Forms.TextBox();
            this._txtArgument      = new System.Windows.Forms.TextBox();
            this._pnlRight         = new System.Windows.Forms.Panel();
            this._lblMethod        = new System.Windows.Forms.Label();
            this._rbDelegate       = new System.Windows.Forms.RadioButton();
            this._pnlCompare       = new System.Windows.Forms.Panel();
            this._cbCompare        = new System.Windows.Forms.ComboBox();
            this._lblArgument      = new System.Windows.Forms.Label();
            this._pnlDelegate      = new System.Windows.Forms.Panel();
            this._txtType.Location = new System.Drawing.Point(0, 20);
            this._txtType.Size     = new System.Drawing.Size(211, 20);

            this._lblHeader.Location = new System.Drawing.Point(0, 0);
            this._lblHeader.Size     = new System.Drawing.Size(434, 16);
            this._lblHeader.Anchor   = (System.Windows.Forms.AnchorStyles.Top
                                        | System.Windows.Forms.AnchorStyles.Left);
            this._pnlHeader.Controls.AddRange(new System.Windows.Forms.Control[] {
                this._lblHeader
            });
            this._pnlHeader.Location = new System.Drawing.Point(6, 5);
            this._pnlHeader.Size     = new System.Drawing.Size(434, 16);
            this._pnlHeader.Anchor   = (System.Windows.Forms.AnchorStyles.Top
                                        | System.Windows.Forms.AnchorStyles.Left);
            this._pnlMain.Controls.AddRange(new System.Windows.Forms.Control[] { this._dialogButtons,
                                                                                 this._pnlRight,
                                                                                 this._filterList });
            this._pnlMain.Location = new System.Drawing.Point(6, 27);
            this._pnlMain.Size     = new System.Drawing.Size(434, 253);
            this._pnlMain.Anchor   = (System.Windows.Forms.AnchorStyles.Bottom
                                      | System.Windows.Forms.AnchorStyles.Left);
            this._filterList.Size        = new System.Drawing.Size(198, 224);
            this._filterList.Location    = new System.Drawing.Point(0, 0);
            this._rbCompare.Location     = new System.Drawing.Point(8, 21);
            this._rbCompare.Size         = new System.Drawing.Size(211, 17);
            this._lblCompare.Location    = new System.Drawing.Point(0, 4);
            this._lblCompare.Size        = new System.Drawing.Size(211, 16);
            this._dialogButtons.Location = new System.Drawing.Point(197, 230);
            this._dialogButtons.Size     = new System.Drawing.Size(237, 23);
            this._lblType.Location       = new System.Drawing.Point(0, 4);
            this._lblType.Size           = new System.Drawing.Size(211, 16);
            this._txtMethod.Location     = new System.Drawing.Point(0, 64);
            this._txtMethod.Size         = new System.Drawing.Size(211, 20);
            this._txtArgument.Location   = new System.Drawing.Point(0, 64);
            this._txtArgument.Size       = new System.Drawing.Size(211, 20);
            this._pnlRight.Controls.AddRange(new System.Windows.Forms.Control[] { this._pnlCompare,
                                                                                  this._pnlDelegate,
                                                                                  this._glAttributes,
                                                                                  this._glType,
                                                                                  this._rbDelegate,
                                                                                  this._rbCompare });
            this._pnlRight.Location     = new System.Drawing.Point(215, 0);
            this._pnlRight.Size         = new System.Drawing.Size(219, 226);
            this._lblMethod.Location    = new System.Drawing.Point(0, 48);
            this._lblMethod.Size        = new System.Drawing.Size(211, 16);
            this._glAttributes.Location = new System.Drawing.Point(0, 73);
            this._glAttributes.Size     = new System.Drawing.Size(216, 16);
            this._rbDelegate.Location   = new System.Drawing.Point(8, 46);
            this._rbDelegate.Size       = new System.Drawing.Size(211, 17);
            this._glType.Size           = new System.Drawing.Size(216, 16);
            this._pnlCompare.Controls.AddRange(new System.Windows.Forms.Control[] { this._txtArgument,
                                                                                    this._lblArgument,
                                                                                    this._cbCompare,
                                                                                    this._lblCompare });
            this._pnlCompare.Location     = new System.Drawing.Point(8, 90);
            this._pnlCompare.Size         = new System.Drawing.Size(211, 136);
            this._cbCompare.DropDownWidth = 211;
            this._cbCompare.Location      = new System.Drawing.Point(0, 20);
            this._cbCompare.Size          = new System.Drawing.Size(211, 21);
            this._cbCompare.Sorted        = true;
            this._lblArgument.Location    = new System.Drawing.Point(0, 48);
            this._lblArgument.Size        = new System.Drawing.Size(211, 16);
            this._pnlDelegate.Controls.AddRange(new System.Windows.Forms.Control[] { this._txtType,
                                                                                     this._txtMethod,
                                                                                     this._lblMethod,
                                                                                     this._lblType });
            this._pnlDelegate.Location = new System.Drawing.Point(8, 90);
            this._pnlDelegate.Size     = new System.Drawing.Size(211, 136);
            this.FormBorderStyle       = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.ClientSize            = new System.Drawing.Size(448, 289);
            this.AcceptButton          = _dialogButtons.CmdOK;
            this.CancelButton          = _dialogButtons.CmdCancel;
            this.Controls.AddRange(new System.Windows.Forms.Control[] { this._pnlHeader, this._pnlMain });
        }
 private void InitializeComponent()
 {
     this._appliedFiltersList =
         new System.Web.UI.Design.MobileControls.Util.EditableTreeList(
             false, true, 16
             );
     this._btnEditFilters      = new System.Windows.Forms.Button();
     this._cmdHelp             = new System.Windows.Forms.Button();
     this._cmdOK               = new System.Windows.Forms.Button();
     this._pnlMain             = new System.Windows.Forms.Panel();
     this._tbArgument          = new System.Windows.Forms.TextBox();
     this._lblArgument         = new System.Windows.Forms.Label();
     this._cmdCancel           = new System.Windows.Forms.Button();
     this._lblAvailableFilters = new System.Windows.Forms.Label();
     this._cbAvailableFilters  = new System.Windows.Forms.ComboBox();
     this._btnApplyFilter      = new System.Windows.Forms.Button();
     this._pnlMain.SuspendLayout();
     this.SuspendLayout();
     //
     // _appliedFiltersList
     //
     this._appliedFiltersList.Location = new System.Drawing.Point(0, 74);
     this._appliedFiltersList.Name     = "_appliedFiltersList";
     this._appliedFiltersList.Size     = new System.Drawing.Size(275, 208);
     //
     // _btnEditFilters
     //
     this._btnEditFilters.Location = new System.Drawing.Point(201, 15);
     this._btnEditFilters.Size     = new System.Drawing.Size(75, 23);
     this._btnEditFilters.Name     = "_btnEditFilters";
     //
     // _cmdHelp
     //
     this._cmdHelp.Location = new System.Drawing.Point(201, 334);
     this._cmdHelp.Name     = "_cmdHelp";
     //
     // _cmdOK
     //
     this._cmdOK.Location = new System.Drawing.Point(39, 334);
     this._cmdOK.Name     = "_cmdOK";
     //
     // _pnlMain
     //
     this._pnlMain.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
     this._pnlMain.Controls.AddRange(new System.Windows.Forms.Control[] {
         this._tbArgument,
         this._lblArgument,
         this._appliedFiltersList,
         this._cmdHelp,
         this._cmdCancel,
         this._cmdOK,
         this._lblAvailableFilters,
         this._btnEditFilters,
         this._cbAvailableFilters,
         this._btnApplyFilter
     });
     this._pnlMain.Location = new System.Drawing.Point(6, 8);
     this._pnlMain.Name     = "_pnlMain";
     this._pnlMain.Size     = new System.Drawing.Size(276, 357);
     //
     // _tbArgument
     //
     this._tbArgument.Location = new System.Drawing.Point(0, 306);
     this._tbArgument.Name     = "_tbArgument";
     this._tbArgument.Size     = new System.Drawing.Size(275, 20);
     this._tbArgument.Text     = "";
     //
     // _lblArgument
     //
     this._lblArgument.Location = new System.Drawing.Point(0, 290);
     this._lblArgument.Name     = "_lblArgument";
     this._lblArgument.Size     = new System.Drawing.Size(275, 16);
     //
     // _cmdCancel
     //
     this._cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this._cmdCancel.Location     = new System.Drawing.Point(120, 334);
     this._cmdCancel.Name         = "_cmdCancel";
     //
     // _lblAvailableFilters
     //
     this._lblAvailableFilters.Name = "_lblAvailableFilters";
     this._lblAvailableFilters.Size = new System.Drawing.Size(198, 16);
     //
     // _cbAvailableFilters
     //
     this._cbAvailableFilters.DropDownWidth = 195;
     this._cbAvailableFilters.Location      = new System.Drawing.Point(0, 16);
     this._cbAvailableFilters.Name          = "_cbAvailableFilters";
     this._cbAvailableFilters.Size          = new System.Drawing.Size(195, 21);
     this._cbAvailableFilters.Sorted        = true;
     //
     // _btnApplyFilter
     //
     this._btnApplyFilter.Location = new System.Drawing.Point(0, 44);
     this._btnApplyFilter.Name     = "_btnApplyFilter";
     this._btnApplyFilter.Size     = new System.Drawing.Size(195, 23);
     //
     // AppliedDeviceFiltersDialog
     //
     this.AcceptButton      = this._cmdOK;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.CancelButton      = this._cmdCancel;
     this.ClientSize        = new System.Drawing.Size(285, 373);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this._pnlMain
     });
     this.Name           = "AppliedDeviceFiltersDialog";
     this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.OnHelpRequested);
     this._pnlMain.ResumeLayout(false);
     this.ResumeLayout(false);
 }