Ejemplo n.º 1
0
        }// CRemotingProp3

        //-------------------------------------------------
        // InsertPropSheetPageControls
        //
        // This function will create all the winforms controls
        // and parent them to the passed-in Window Handle.
        //
        // Note: For some winforms controls, such as radio buttons
        // and datagrids, we need to create a container, parent the
        // container to our window handle, and then parent our
        // winform controls to the container.
        //-------------------------------------------------
        internal override int InsertPropSheetPageControls()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CRemotingProp3));
            this.m_cbChannel        = new System.Windows.Forms.ComboBox();
            this.m_lblGenHelp       = new System.Windows.Forms.Label();
            this.m_lblHelp          = new System.Windows.Forms.Label();
            this.m_lblChooseChannel = new System.Windows.Forms.Label();
            this.m_dg = new MyDataGrid();
            this.m_cbChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.m_cbChannel.DropDownWidth = 152;
            this.m_cbChannel.Location      = ((System.Drawing.Point)(resources.GetObject("m_cbChannel.Location")));
            this.m_cbChannel.Size          = ((System.Drawing.Size)(resources.GetObject("m_cbChannel.Size")));
            this.m_cbChannel.TabIndex      = ((int)(resources.GetObject("m_cbChannel.TabIndex")));
            m_cbChannel.Name                 = "Channels";
            this.m_lblGenHelp.Location       = ((System.Drawing.Point)(resources.GetObject("m_lblGenHelp.Location")));
            this.m_lblGenHelp.Size           = ((System.Drawing.Size)(resources.GetObject("m_lblGenHelp.Size")));
            this.m_lblGenHelp.TabIndex       = ((int)(resources.GetObject("m_lblGenHelp.TabIndex")));
            this.m_lblGenHelp.Text           = resources.GetString("m_lblGenHelp.Text");
            m_lblGenHelp.Name                = "GeneralHelp";
            this.m_lblHelp.Location          = ((System.Drawing.Point)(resources.GetObject("m_lblHelp.Location")));
            this.m_lblHelp.Size              = ((System.Drawing.Size)(resources.GetObject("m_lblHelp.Size")));
            this.m_lblHelp.TabIndex          = ((int)(resources.GetObject("m_lblHelp.TabIndex")));
            this.m_lblHelp.Text              = resources.GetString("m_lblHelp.Text");
            m_lblHelp.Name                   = "Help";
            this.m_lblChooseChannel.Location = ((System.Drawing.Point)(resources.GetObject("m_lblChooseChannel.Location")));
            this.m_lblChooseChannel.Size     = ((System.Drawing.Size)(resources.GetObject("m_lblChooseChannel.Size")));
            this.m_lblChooseChannel.TabIndex = ((int)(resources.GetObject("m_lblChooseChannel.TabIndex")));
            this.m_lblChooseChannel.Text     = resources.GetString("m_lblChooseChannel.Text");
            m_lblChooseChannel.Name          = "ChooseChannel";
            this.m_dg.DataMember             = "";
            this.m_dg.Location               = ((System.Drawing.Point)(resources.GetObject("m_dg.Location")));
            this.m_dg.Size                   = ((System.Drawing.Size)(resources.GetObject("m_dg.Size")));
            this.m_dg.TabIndex               = ((int)(resources.GetObject("m_dg.TabIndex")));
            m_dg.Name            = "Grid";
            m_dg.BackgroundColor = Color.White;

            PageControls.AddRange(new System.Windows.Forms.Control[] { this.m_dg,
                                                                       this.m_lblHelp,
                                                                       m_lblGenHelp,
                                                                       this.m_lblChooseChannel,
                                                                       this.m_cbChannel });

            //---------- Begin Data Table ----------------
            m_dt = new DataTable("Attributes");
            m_ds = new DataSet();
            m_ds.Tables.Add(m_dt);

            m_dt.DefaultView.AllowNew = false;

            // Create the "Attribute" Column
            DataColumn dcAttribute = new DataColumn();

            dcAttribute.ColumnName = "Attribute";
            dcAttribute.DataType   = typeof(String);
            m_dt.Columns.Add(dcAttribute);

            // Create the "Value" Column
            DataColumn dcValue = new DataColumn();

            dcValue.ColumnName = "Value";
            dcValue.DataType   = typeof(String);
            m_dt.Columns.Add(dcValue);

            // Now set up any column-specific behavioral stuff....
            // like setting column widths, etc.

            DataGridTableStyle    dgtsAct        = new DataGridTableStyle();
            DataGridTextBoxColumn dgtbcAttribute = new DataGridTextBoxColumn();
            DataGridTextBoxColumn dgtbcValue     = new DataGridTextBoxColumn();

            m_dg.TableStyles.Add(dgtsAct);
            dgtsAct.MappingName       = "Attributes";
            dgtsAct.RowHeadersVisible = false;
            dgtsAct.AllowSorting      = false;
            dgtsAct.ReadOnly          = false;

            // Set up the column info for the Object Type column
            dgtbcAttribute.MappingName = "Attribute";
            dgtbcAttribute.HeaderText  = CResourceStore.GetString("CRemotingProp3:AttributeColumn");
            dgtbcAttribute.ReadOnly    = true;
            dgtbcAttribute.Width       = ScaleWidth(CResourceStore.GetInt("CRemotingProp3:AttributeColumnWidth"));
            dgtbcAttribute.NullText    = "";

            dgtsAct.GridColumnStyles.Add(dgtbcAttribute);

            // Set up the column info for the value column
            dgtbcValue.MappingName          = "Value";
            dgtbcValue.HeaderText           = CResourceStore.GetString("CRemotingProp3:ValueColumn");
            dgtbcValue.ReadOnly             = false;
            dgtbcValue.Width                = ScaleWidth(CResourceStore.GetInt("CRemotingProp3:ValueColumnWidth"));
            dgtbcValue.NullText             = "";
            dgtbcValue.TextBox.TextChanged += new EventHandler(onChange);


            dgtsAct.GridColumnStyles.Add(dgtbcValue);

            m_dg.DataSource = m_dt;
            //---------- End Data Table ----------------

            // Fill in the data
            PutValuesinPage();

            // Do some UI tweaks
            m_dg.ReadOnly          = false;
            m_dg.CaptionVisible    = false;
            m_dg.ParentRowsVisible = false;

            // Now finally hook up event handlers
            m_cbChannel.SelectedIndexChanged     += new EventHandler(onChannelChange);
            m_dg.TheVertScrollBar.VisibleChanged += new EventHandler(onVisibleChange);

            return(1);
        }// InsertPropSheetPageControls
Ejemplo n.º 2
0
        }// CAssemVerCodebases

        internal override int InsertPropSheetPageControls()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CAssemVerCodebases));
            this.m_lblExample4             = new System.Windows.Forms.Label();
            this.m_btnDeleteEntry          = new System.Windows.Forms.Button();
            this.m_dg                      = new MyDataGrid();
            this.m_lblExamples             = new System.Windows.Forms.Label();
            this.m_lblBindingHelp          = new System.Windows.Forms.Label();
            this.m_lblExample1             = new System.Windows.Forms.Label();
            this.m_lblExample3             = new System.Windows.Forms.Label();
            this.m_lblExample2             = new System.Windows.Forms.Label();
            this.m_lblExample4.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblExample4.Location")));
            this.m_lblExample4.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblExample4.Size")));
            this.m_lblExample4.TabIndex    = ((int)(resources.GetObject("m_lblExample4.TabIndex")));
            this.m_lblExample4.Text        = resources.GetString("m_lblExample4.Text");
            m_lblExample4.Name             = "Example4";
            this.m_btnDeleteEntry.Location = ((System.Drawing.Point)(resources.GetObject("m_btnDeleteEntry.Location")));
            this.m_btnDeleteEntry.Size     = ((System.Drawing.Size)(resources.GetObject("m_btnDeleteEntry.Size")));
            this.m_btnDeleteEntry.TabIndex = ((int)(resources.GetObject("m_btnDeleteEntry.TabIndex")));
            this.m_btnDeleteEntry.Text     = resources.GetString("m_btnDeleteEntry.Text");
            m_btnDeleteEntry.Name          = "Delete";
            this.m_dg.Location             = ((System.Drawing.Point)(resources.GetObject("m_dg.Location")));
            this.m_dg.Size                 = ((System.Drawing.Size)(resources.GetObject("m_dg.Size")));
            this.m_dg.TabIndex             = ((int)(resources.GetObject("m_dg.TabIndex")));
            m_dg.Name                      = "Grid";
            this.m_lblExamples.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblExamples.Location")));
            this.m_lblExamples.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblExamples.Size")));
            this.m_lblExamples.TabIndex    = ((int)(resources.GetObject("m_lblExamples.TabIndex")));
            this.m_lblExamples.Text        = resources.GetString("m_lblExamples.Text");
            m_lblExamples.Name             = "Examples";
            this.m_lblBindingHelp.Location = ((System.Drawing.Point)(resources.GetObject("m_lblBindingHelp.Location")));
            this.m_lblBindingHelp.Size     = ((System.Drawing.Size)(resources.GetObject("m_lblBindingHelp.Size")));
            this.m_lblBindingHelp.TabIndex = ((int)(resources.GetObject("m_lblBindingHelp.TabIndex")));
            this.m_lblBindingHelp.Text     = resources.GetString("m_lblBindingHelp.Text");
            m_lblBindingHelp.Name          = "BindingHelp";
            this.m_lblExample1.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblExample1.Location")));
            this.m_lblExample1.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblExample1.Size")));
            this.m_lblExample1.TabIndex    = ((int)(resources.GetObject("m_lblExample1.TabIndex")));
            this.m_lblExample1.Text        = resources.GetString("m_lblExample1.Text");
            m_lblExample1.Name             = "Example1";
            this.m_lblExample3.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblExample3.Location")));
            this.m_lblExample3.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblExample3.Size")));
            this.m_lblExample3.TabIndex    = ((int)(resources.GetObject("m_lblExample3.TabIndex")));
            this.m_lblExample3.Text        = resources.GetString("m_lblExample3.Text");
            m_lblExample3.Name             = "Example3";
            this.m_lblExample2.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblExample2.Location")));
            this.m_lblExample2.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblExample2.Size")));
            this.m_lblExample2.TabIndex    = ((int)(resources.GetObject("m_lblExample2.TabIndex")));
            this.m_lblExample2.Text        = resources.GetString("m_lblExample2.Text");
            m_lblExample2.Name             = "Example2";
            PageControls.AddRange(new System.Windows.Forms.Control[] { this.m_lblExample4,
                                                                       this.m_lblExample3,
                                                                       this.m_lblExample2,
                                                                       this.m_lblExample1,
                                                                       this.m_dg,
                                                                       this.m_btnDeleteEntry,
                                                                       this.m_lblExamples,
                                                                       this.m_lblBindingHelp });

            // ----------------- Let's build our data table --------------

            // We'll create these variables just so we can use their type...
            // we don't need to worry about their actual values.

            m_dt = new DataTable("Stuff");

            // Create the columns for this table
            DataColumn dcReqVersion = new DataColumn();

            dcReqVersion.ColumnName = "Requested Version";
            dcReqVersion.DataType   = typeof(String);
            m_dt.Columns.Add(dcReqVersion);

            DataColumn dcURL = new DataColumn();

            dcURL.ColumnName = "URI";
            dcURL.DataType   = typeof(String);
            m_dt.Columns.Add(dcURL);

            // Now set up any column-specific behavioral stuff....
            // like not letting the checkboxes allow null, setting
            // column widths, etc.

            DataGridTableStyle    dgts        = new DataGridTableStyle();
            DataGridTextBoxColumn dgtbcReqVer = new DataGridTextBoxColumn();
            DataGridTextBoxColumn dgtbcURL    = new DataGridTextBoxColumn();

            m_dg.TableStyles.Add(dgts);
            dgts.MappingName       = "Stuff";
            dgts.RowHeadersVisible = false;
            dgts.AllowSorting      = false;
            dgts.ReadOnly          = false;
            // Set up the column info for the Requested Version column
            dgtbcReqVer.MappingName = "Requested Version";
            dgtbcReqVer.HeaderText  = CResourceStore.GetString("CAssemVerCodebases:RVColumn");
            dgtbcReqVer.Width       = ScaleWidth(CResourceStore.GetInt("CAssemVerCodebases:RVColumnWidth"));
            dgtbcReqVer.ReadOnly    = false;
            dgtbcReqVer.NullText    = "";
            // Allows us to filter what is typed into the box
            dgtbcReqVer.TextBox.KeyPress    += new KeyPressEventHandler(onVersionKeyPress);
            dgtbcReqVer.TextBox.TextChanged += new EventHandler(onChange);
            dgts.GridColumnStyles.Add(dgtbcReqVer);

            // Set up the column info for the New Version column
            dgtbcURL.MappingName          = "URI";
            dgtbcURL.HeaderText           = CResourceStore.GetString("CAssemVerCodebases:URIColumn");
            dgtbcURL.Width                = ScaleWidth(CResourceStore.GetInt("CAssemVerCodebases:URIColumnWidth"));
            dgtbcURL.NullText             = "";
            dgtbcURL.TextBox.TextChanged += new EventHandler(onChange);
            dgts.GridColumnStyles.Add(dgtbcURL);
            m_ds = new DataSet();
            m_ds.Tables.Add(m_dt);

            m_dg.DataSource      = m_dt;
            m_dg.BackgroundColor = Color.White;
            //--------------- End Building Data Table ----------------------------



            // Some UI Tweaks
            m_dg.ReadOnly       = false;
            m_dg.CaptionVisible = false;
            PageControls.Add(m_dg);

            // Fill in the data
            PutValuesinPage();

            // Set up any callbacks
            m_btnDeleteEntry.Click += new EventHandler(onDeleteEntireRow);
            m_dg.TheVertScrollBar.VisibleChanged += new EventHandler(onVisibleChange);
            // Allows us to enable/disable the delete button
            m_dg.CurrentCellChanged += new EventHandler(onCellChange);

            onCellChange(null, null);
            // See if we need to adjust the width of the headers
            onVisibleChange(null, null);
            return(1);
        }// InsertPropSheetPageControls
Ejemplo n.º 3
0
        }// CTablePermControls

        internal override int InsertPropSheetPageControls(Control.ControlCollection cc)
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CTablePermControls));
            this.m_radUnrestricted = new System.Windows.Forms.RadioButton();
            this.m_btnDeleteRow    = new System.Windows.Forms.Button();
            this.m_dg = new MyDataGrid();
            this.m_radGrantFollowingPermission = new System.Windows.Forms.RadioButton();
            this.m_radUnrestricted.Location    = ((System.Drawing.Point)(resources.GetObject("m_radUnrestricted.Location")));
            this.m_radUnrestricted.Size        = ((System.Drawing.Size)(resources.GetObject("m_radUnrestricted.Size")));
            this.m_radUnrestricted.TabIndex    = ((int)(resources.GetObject("m_radUnrestricted.TabIndex")));
            this.m_radUnrestricted.Text        = resources.GetString("m_radUnrestricted.Text");
            m_radUnrestricted.Name             = "Unrestricted";
            this.m_btnDeleteRow.Location       = ((System.Drawing.Point)(resources.GetObject("m_btnDeleteRow.Location")));
            this.m_btnDeleteRow.Size           = ((System.Drawing.Size)(resources.GetObject("m_btnDeleteRow.Size")));
            this.m_btnDeleteRow.TabIndex       = ((int)(resources.GetObject("m_btnDeleteRow.TabIndex")));
            this.m_btnDeleteRow.Text           = resources.GetString("m_btnDeleteRow.Text");
            m_btnDeleteRow.Name = "DeleteRow";
            this.m_dg.Location  = ((System.Drawing.Point)(resources.GetObject("m_dg.Location")));
            this.m_dg.Size      = ((System.Drawing.Size)(resources.GetObject("m_dg.Size")));
            this.m_dg.TabIndex  = ((int)(resources.GetObject("m_dg.TabIndex")));
            m_dg.Name           = "Grid";
            this.m_ucOptions.Controls.AddRange(new System.Windows.Forms.Control[] {
                this.m_dg,
                this.m_btnDeleteRow
            });
            this.m_ucOptions.Location = ((System.Drawing.Point)(resources.GetObject("m_ucOptions.Location")));
            this.m_ucOptions.Size     = ((System.Drawing.Size)(resources.GetObject("m_ucOptions.Size")));
            this.m_ucOptions.TabIndex = ((int)(resources.GetObject("m_ucOptions.TabIndex")));
            m_ucOptions.Name          = "Options";
            this.m_radGrantFollowingPermission.Location = ((System.Drawing.Point)(resources.GetObject("m_radGrantFollowingPermission.Location")));
            this.m_radGrantFollowingPermission.Size     = ((System.Drawing.Size)(resources.GetObject("m_radGrantFollowingPermission.Size")));
            this.m_radGrantFollowingPermission.TabIndex = ((int)(resources.GetObject("m_radGrantFollowingPermission.TabIndex")));
            this.m_radGrantFollowingPermission.Text     = resources.GetString("m_radGrantFollowingPermission.Text");
            m_radGrantFollowingPermission.Name          = "Restricted";
            cc.AddRange(new System.Windows.Forms.Control[] {
                this.m_radGrantFollowingPermission,
                this.m_ucOptions,
                this.m_radUnrestricted
            });

            m_dt = CreateDataTable(m_dg);
            m_ds = new DataSet();
            m_ds.Tables.Add(m_dt);

            m_dg.DataSource      = m_dt;
            m_dg.BackgroundColor = Color.White;


            // Set up the GUI-type stuff for the data grid
            m_dg.CaptionVisible = false;

            // Fill in the data
            PutValuesinPage();

            // Set up any callbacks
            m_radGrantFollowingPermission.CheckedChanged += new EventHandler(onChangeUnRestrict);
            m_dg.TheVertScrollBar.VisibleChanged         += new EventHandler(onVisibleChange);
            m_dg.CurrentCellChanged          += new EventHandler(onChange);
            m_btnDeleteRow.Click             += new EventHandler(onDeleteEntireRow);
            m_radUnrestricted.CheckedChanged += new EventHandler(onChangeUnRestrict);
            m_dg.CurrentCellChanged          += new EventHandler(onCellChange);

            // Get the datagrid to be the color we want
            onChangeUnRestrict(null, null);
            // Get the delete entry button set to the correct state
            onCellChange(null, null);
            return(1);
        }// InsertPropSheetPageControls
Ejemplo n.º 4
0
        }// CRemotingProp1

        //-------------------------------------------------
        // InsertPropSheetPageControls
        //
        // This function will create all the winforms controls
        // and parent them to the passed-in Window Handle.
        //
        // Note: For some winforms controls, such as radio buttons
        // and datagrids, we need to create a container, parent the
        // container to our window handle, and then parent our
        // winform controls to the container.
        //-------------------------------------------------
        internal override int InsertPropSheetPageControls()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CRemotingProp1));
            this.m_lblAppLivesHere = new System.Windows.Forms.Label();
            m_lblHelp = new System.Windows.Forms.Label();
            this.m_lblWellKnownObjectsHelp = new System.Windows.Forms.Label();
            this.m_dg                               = new MyDataGrid();
            this.m_lblChooseApp                     = new System.Windows.Forms.Label();
            this.m_cbRemoteApps                     = new System.Windows.Forms.ComboBox();
            this.m_txtAppLocation                   = new System.Windows.Forms.TextBox();
            this.m_lblHelp.Location                 = ((System.Drawing.Point)(resources.GetObject("m_lblHelp.Location")));
            this.m_lblHelp.Size                     = ((System.Drawing.Size)(resources.GetObject("m_lblHelp.Size")));
            this.m_lblHelp.TabIndex                 = ((int)(resources.GetObject("m_lblHelp.TabIndex")));
            this.m_lblHelp.Text                     = resources.GetString("m_lblHelp.Text");
            m_lblHelp.Name                          = "Help";
            this.m_lblAppLivesHere.Location         = ((System.Drawing.Point)(resources.GetObject("m_lblAppLivesHere.Location")));
            this.m_lblAppLivesHere.Size             = ((System.Drawing.Size)(resources.GetObject("m_lblAppLivesHere.Size")));
            this.m_lblAppLivesHere.TabIndex         = ((int)(resources.GetObject("m_lblAppLivesHere.TabIndex")));
            this.m_lblAppLivesHere.Text             = resources.GetString("m_lblAppLivesHere.Text");
            m_lblAppLivesHere.Name                  = "AppLivesHereLabel";
            this.m_lblWellKnownObjectsHelp.Location = ((System.Drawing.Point)(resources.GetObject("m_lblWellKnownObjectsHelp.Location")));
            this.m_lblWellKnownObjectsHelp.Size     = ((System.Drawing.Size)(resources.GetObject("m_lblWellKnownObjectsHelp.Size")));
            this.m_lblWellKnownObjectsHelp.TabIndex = ((int)(resources.GetObject("m_lblWellKnownObjectsHelp.TabIndex")));
            this.m_lblWellKnownObjectsHelp.Text     = resources.GetString("m_lblWellKnownObjectsHelp.Text");
            m_lblWellKnownObjectsHelp.Name          = "WellKnownObjectsHelp";
            this.m_dg.Location                      = ((System.Drawing.Point)(resources.GetObject("m_dg.Location")));
            this.m_dg.Size                          = ((System.Drawing.Size)(resources.GetObject("m_dg.Size")));
            this.m_dg.TabIndex                      = ((int)(resources.GetObject("m_dg.TabIndex")));
            m_dg.Name                               = "Grid";
            this.m_lblChooseApp.Location            = ((System.Drawing.Point)(resources.GetObject("m_lblChooseApp.Location")));
            this.m_lblChooseApp.Size                = ((System.Drawing.Size)(resources.GetObject("m_lblChooseApp.Size")));
            this.m_lblChooseApp.TabIndex            = ((int)(resources.GetObject("m_lblChooseApp.TabIndex")));
            this.m_lblChooseApp.Text                = resources.GetString("m_lblChooseApp.Text");
            m_lblChooseApp.Name                     = "ChooseApp";
            this.m_cbRemoteApps.DropDownWidth       = 328;
            this.m_cbRemoteApps.Location            = ((System.Drawing.Point)(resources.GetObject("m_cbRemoteApps.Location")));
            this.m_cbRemoteApps.Size                = ((System.Drawing.Size)(resources.GetObject("m_cbRemoteApps.Size")));
            this.m_cbRemoteApps.TabIndex            = ((int)(resources.GetObject("m_cbRemoteApps.TabIndex")));
            m_cbRemoteApps.Name                     = "RemoteApps";
            this.m_txtAppLocation.Location          = ((System.Drawing.Point)(resources.GetObject("m_txtAppLocation.Location")));
            this.m_txtAppLocation.Size              = ((System.Drawing.Size)(resources.GetObject("m_txtAppLocation.Size")));
            this.m_txtAppLocation.TabIndex          = ((int)(resources.GetObject("m_txtAppLocation.TabIndex")));
            m_txtAppLocation.Name                   = "AppLocation";
            PageControls.AddRange(new System.Windows.Forms.Control[] {
                this.m_lblWellKnownObjectsHelp,
                m_lblHelp,
                this.m_lblChooseApp,
                this.m_cbRemoteApps,
                this.m_lblAppLivesHere,
                this.m_txtAppLocation,
                this.m_dg
            });

            //---------- Build the  Data Table ----------------

            m_dt = new DataTable("Remoting");
            m_ds = new DataSet();
            m_ds.Tables.Add(m_dt);

            m_dt.DefaultView.AllowNew = false;

            // Create the "Object Name" Column
            DataColumn dcObjectName = new DataColumn();

            dcObjectName.ColumnName = "Object Name";
            dcObjectName.DataType   = typeof(String);
            m_dt.Columns.Add(dcObjectName);

            // Create the "URL" Column
            DataColumn dcKnownURL = new DataColumn();

            dcKnownURL.ColumnName = "URL";
            dcKnownURL.DataType   = typeof(String);
            m_dt.Columns.Add(dcKnownURL);

            m_dg.ReadOnly          = false;
            m_dg.CaptionVisible    = false;
            m_dg.ParentRowsVisible = false;
            m_dg.BackgroundColor   = Color.White;

            // Now set up any column-specific behavioral stuff....
            // like setting column widths, etc.

            DataGridTableStyle    dgts            = new DataGridTableStyle();
            DataGridTextBoxColumn dgtbcObjectName = new DataGridTextBoxColumn();
            DataGridTextBoxColumn dgtbcURL        = new DataGridTextBoxColumn();

            m_dg.TableStyles.Add(dgts);
            dgts.MappingName       = "Remoting";
            dgts.RowHeadersVisible = false;


            // Set up the column info for the Object Type column
            dgtbcObjectName.MappingName = "Object Name";
            dgtbcObjectName.HeaderText  = CResourceStore.GetString("CRemotingProp1:ObjectNameColumn");
            dgtbcObjectName.ReadOnly    = true;
            dgtbcObjectName.Width       = ScaleWidth(CResourceStore.GetInt("CRemotingProp1:ObjectNameColumnWidth"));
            dgts.GridColumnStyles.Add(dgtbcObjectName);

            // Set up the column info for the URL column
            dgtbcURL.MappingName          = "URL";
            dgtbcURL.HeaderText           = CResourceStore.GetString("CRemotingProp1:URLColumn");
            dgtbcURL.ReadOnly             = false;
            dgtbcURL.Width                = ScaleWidth(CResourceStore.GetInt("CRemotingProp1:URLColumnWidth"));
            dgtbcURL.TextBox.TextChanged += new EventHandler(onTextChange);

            dgts.GridColumnStyles.Add(dgtbcURL);

            m_dg.DataSource = m_dt;

            //---------- End Data Table stuff ----------------


            m_cbRemoteApps.SelectedIndexChanged += new EventHandler(onRemotingAppChange);

            // Fill in the data
            PutValuesinPage();

            // Now finally hook up this event handler

            m_txtAppLocation.TextChanged += new EventHandler(onTextChange);
            return(1);
        }// InsertPropSheetPageControls
Ejemplo n.º 5
0
        }// CRemotingProp2

        //-------------------------------------------------
        // InsertPropSheetPageControls
        //
        // This function will create all the winforms controls
        // and parent them to the passed-in Window Handle.
        //
        // Note: For some winforms controls, such as radio buttons
        // and datagrids, we need to create a container, parent the
        // container to our window handle, and then parent our
        // winform controls to the container.
        //-------------------------------------------------
        internal override int InsertPropSheetPageControls()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CRemotingProp2));
            this.m_lblObjectURIs           = new System.Windows.Forms.Label();
            this.m_dgObjectURIs            = new MyDataGrid();
            this.m_lblObjectURIs.Location  = ((System.Drawing.Point)(resources.GetObject("m_lblObjectURIs.Location")));
            this.m_lblObjectURIs.Size      = ((System.Drawing.Size)(resources.GetObject("m_lblObjectURIs.Size")));
            this.m_lblObjectURIs.TabIndex  = ((int)(resources.GetObject("m_lblObjectURIs.TabIndex")));
            this.m_lblObjectURIs.Text      = resources.GetString("m_lblObjectURIs.Text");
            m_lblObjectURIs.Name           = "ObjectURILabel";
            this.m_dgObjectURIs.Location   = ((System.Drawing.Point)(resources.GetObject("m_dgObjectURIs.Location")));
            this.m_dgObjectURIs.Size       = ((System.Drawing.Size)(resources.GetObject("m_dgObjectURIs.Size")));
            this.m_dgObjectURIs.TabIndex   = ((int)(resources.GetObject("m_dgObjectURIs.TabIndex")));
            m_dgObjectURIs.Name            = "Grid";
            m_dgObjectURIs.BackgroundColor = Color.White;

            PageControls.AddRange(new System.Windows.Forms.Control[] { this.m_dgObjectURIs,
                                                                       this.m_lblObjectURIs });

            //---------- Begin Object URI table ----------------
            // Build the first data table


            m_dtObjectURIs = new DataTable("ObjectURIs");
            m_ds           = new DataSet();
            m_ds.Tables.Add(m_dtObjectURIs);
            m_dtObjectURIs.DefaultView.AllowNew = false;

            // Create the "Object Name" Column
            DataColumn dcKnownOName = new DataColumn();

            dcKnownOName.ColumnName = "Object Name";
            dcKnownOName.DataType   = typeof(String);
            m_dtObjectURIs.Columns.Add(dcKnownOName);

            // Create the "URI" Column
            DataColumn dcKnownURI = new DataColumn();

            dcKnownURI.ColumnName = "URI";
            dcKnownURI.DataType   = typeof(String);
            m_dtObjectURIs.Columns.Add(dcKnownURI);

            // Set up the GUI-type stuff for the data grid
            m_dgObjectURIs.ReadOnly          = false;
            m_dgObjectURIs.CaptionVisible    = false;
            m_dgObjectURIs.ParentRowsVisible = false;

            // Now set up any column-specific behavioral stuff....
            // like setting column widths, etc.

            DataGridTableStyle    dgtsKnown       = new DataGridTableStyle();
            DataGridTextBoxColumn dgtbcKnownOName = new DataGridTextBoxColumn();
            DataGridTextBoxColumn dgtbcKnownURI   = new DataGridTextBoxColumn();

            m_dgObjectURIs.TableStyles.Add(dgtsKnown);
            dgtsKnown.MappingName       = "ObjectURIs";
            dgtsKnown.RowHeadersVisible = false;
            dgtsKnown.AllowSorting      = false;
            dgtsKnown.ReadOnly          = false;

            // Set up the column info for the Object Type column
            dgtbcKnownOName.MappingName = "Object Name";
            dgtbcKnownOName.HeaderText  = CResourceStore.GetString("CRemotingProp2:ObjectNameColumn");
            dgtbcKnownOName.ReadOnly    = true;
            dgtbcKnownOName.Width       = ScaleWidth(CResourceStore.GetInt("CRemotingProp2:ObjectNameColumnWidth"));
            dgtsKnown.GridColumnStyles.Add(dgtbcKnownOName);

            // Set up the column info for the URI column
            dgtbcKnownURI.MappingName          = "URI";
            dgtbcKnownURI.HeaderText           = CResourceStore.GetString("CRemotingProp2:URIColumn");
            dgtbcKnownURI.ReadOnly             = false;
            dgtbcKnownURI.Width                = ScaleWidth(CResourceStore.GetInt("CRemotingProp2:URIColumnWidth"));
            dgtbcKnownURI.TextBox.TextChanged += new EventHandler(onChange);

            dgtsKnown.GridColumnStyles.Add(dgtbcKnownURI);

            m_dgObjectURIs.DataSource = m_dtObjectURIs;

            //---------- End Data Table2 ----------------


            // Fill in the data
            PutValuesinPage();

            // See if we should shrink one of the columns
            if (m_dgObjectURIs.TheVertScrollBar.Visible)
            {
                // The vertical scrollbar is visible. It takes up 13 pixels
                m_dgObjectURIs.TableStyles[0].GridColumnStyles[1].Width -= m_dgObjectURIs.TheVertScrollBar.Width;
            }

            return(1);
        }// InsertPropSheetPageControls
Ejemplo n.º 6
0
        }// CMessageQueuePermControls

        //-------------------------------------------------
        // InsertPropSheetPageControls
        //
        // Inserts controls into the given control collection
        //-------------------------------------------------
        internal override int InsertPropSheetPageControls(Control.ControlCollection cc)
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CMessageQueuePermControls));
            this.m_radUnrestricted             = new System.Windows.Forms.RadioButton();
            this.m_ucOptions                   = new System.Windows.Forms.UserControl();
            this.m_dgOther                     = new MyDataGrid();
            this.m_btnDeletePath               = new System.Windows.Forms.Button();
            this.m_lblPathDes                  = new System.Windows.Forms.Label();
            this.m_radGrantFollowingPermission = new System.Windows.Forms.RadioButton();
            this.m_dgPath                   = new MyDataGrid();
            this.m_btnDeleteOther           = new System.Windows.Forms.Button();
            this.m_lblOtherDes              = new System.Windows.Forms.Label();
            this.m_radUnrestricted.Location = ((System.Drawing.Point)(resources.GetObject("m_radUnrestricted.Location")));
            this.m_radUnrestricted.Name     = "Unrestricted";
            this.m_radUnrestricted.Size     = ((System.Drawing.Size)(resources.GetObject("m_radUnrestricted.Size")));
            this.m_radUnrestricted.TabIndex = ((int)(resources.GetObject("m_radUnrestricted.TabIndex")));
            this.m_radUnrestricted.Text     = resources.GetString("m_radUnrestricted.Text");
            this.m_ucOptions.Controls.AddRange(new System.Windows.Forms.Control[] {
                this.m_lblPathDes,
                this.m_dgPath,
                this.m_btnDeletePath,
                this.m_lblOtherDes,
                this.m_dgOther,
                this.m_btnDeleteOther
            });
            this.m_ucOptions.Location     = ((System.Drawing.Point)(resources.GetObject("m_ucOptions.Location")));
            this.m_ucOptions.Name         = "Options";
            this.m_ucOptions.Size         = ((System.Drawing.Size)(resources.GetObject("m_ucOptions.Size")));
            this.m_ucOptions.TabIndex     = ((int)(resources.GetObject("m_ucOptions.TabIndex")));
            this.m_dgOther.DataMember     = "";
            this.m_dgOther.Location       = ((System.Drawing.Point)(resources.GetObject("m_dgOther.Location")));
            this.m_dgOther.Name           = "OtherTable";
            this.m_dgOther.Size           = ((System.Drawing.Size)(resources.GetObject("m_dgOther.Size")));
            this.m_dgOther.TabIndex       = ((int)(resources.GetObject("m_dgOther.TabIndex")));
            this.m_btnDeletePath.Location = ((System.Drawing.Point)(resources.GetObject("m_btnDeletePath.Location")));
            this.m_btnDeletePath.Name     = "DeletePath";
            this.m_btnDeletePath.Size     = ((System.Drawing.Size)(resources.GetObject("m_btnDeletePath.Size")));
            this.m_btnDeletePath.TabIndex = ((int)(resources.GetObject("m_btnDeletePath.TabIndex")));
            this.m_btnDeletePath.Text     = resources.GetString("m_btnDeletePath.Text");
            this.m_lblPathDes.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblPathDes.Location")));
            this.m_lblPathDes.Name        = "PathDescription";
            this.m_lblPathDes.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblPathDes.Size")));
            this.m_lblPathDes.TabIndex    = ((int)(resources.GetObject("m_lblPathDes.TabIndex")));
            this.m_lblPathDes.Text        = resources.GetString("m_lblPathDes.Text");
            this.m_radGrantFollowingPermission.Location = ((System.Drawing.Point)(resources.GetObject("m_radGrantPermissions.Location")));
            this.m_radGrantFollowingPermission.Name     = "Restricted";
            this.m_radGrantFollowingPermission.Size     = ((System.Drawing.Size)(resources.GetObject("m_radGrantPermissions.Size")));
            this.m_radGrantFollowingPermission.TabIndex = ((int)(resources.GetObject("m_radGrantPermissions.TabIndex")));
            this.m_radGrantFollowingPermission.Text     = resources.GetString("m_radGrantPermissions.Text");
            this.m_dgPath.DataMember       = "";
            this.m_dgPath.Location         = ((System.Drawing.Point)(resources.GetObject("m_dgPath.Location")));
            this.m_dgPath.Name             = "PathTable";
            this.m_dgPath.Size             = ((System.Drawing.Size)(resources.GetObject("m_dgPath.Size")));
            this.m_dgPath.TabIndex         = ((int)(resources.GetObject("m_dgPath.TabIndex")));
            this.m_btnDeleteOther.Location = ((System.Drawing.Point)(resources.GetObject("m_btnDeleteOther.Location")));
            this.m_btnDeleteOther.Name     = "DeleteOther";
            this.m_btnDeleteOther.Size     = ((System.Drawing.Size)(resources.GetObject("m_btnDeleteOther.Size")));
            this.m_btnDeleteOther.TabIndex = ((int)(resources.GetObject("m_btnDeleteOther.TabIndex")));
            this.m_btnDeleteOther.Text     = resources.GetString("m_btnDeleteOther.Text");
            this.m_lblOtherDes.Location    = ((System.Drawing.Point)(resources.GetObject("m_lblOtherDes.Location")));
            this.m_lblOtherDes.Name        = "OtherDescription";
            this.m_lblOtherDes.Size        = ((System.Drawing.Size)(resources.GetObject("m_lblOtherDes.Size")));
            this.m_lblOtherDes.TabIndex    = ((int)(resources.GetObject("m_lblOtherDes.TabIndex")));
            this.m_lblOtherDes.Text        = resources.GetString("m_lblOtherDes.Text");
            cc.AddRange(new System.Windows.Forms.Control[] {
                this.m_ucOptions,
                this.m_radUnrestricted,
                this.m_radGrantFollowingPermission
            });

            m_dtPath  = CreatePathDataTable(m_dgPath);
            m_dtOther = CreateOtherDataTable(m_dgOther);

            m_ds = new DataSet();
            m_ds.Tables.Add(m_dtPath);
            m_ds.Tables.Add(m_dtOther);

            m_dgPath.DataSource  = m_dtPath;
            m_dgOther.DataSource = m_dtOther;


            // Set up the GUI-type stuff for the data grid
            m_dgPath.CaptionVisible  = false;
            m_dgPath.BackgroundColor = Color.White;

            m_dgOther.CaptionVisible  = false;
            m_dgOther.BackgroundColor = Color.White;

            // Fill in the data
            PutValuesinPage();

            // Set up any callbacks
            m_radGrantFollowingPermission.CheckedChanged += new EventHandler(onChangeUnRestrict);
            m_dgPath.CurrentCellChanged      += new EventHandler(onChange);
            m_dgOther.CurrentCellChanged     += new EventHandler(onChange);
            m_btnDeletePath.Click            += new EventHandler(onDeleteEntireRow);
            m_btnDeleteOther.Click           += new EventHandler(onDeleteEntireRow);
            m_radUnrestricted.CheckedChanged += new EventHandler(onChangeUnRestrict);
            m_dgPath.CurrentCellChanged      += new EventHandler(onCellChange);
            m_dgOther.CurrentCellChanged     += new EventHandler(onCellChange);

            // Get the delete buttons set up right
            onCellChange(m_dgPath, null);
            onCellChange(m_dgOther, null);


            return(1);
        }// InsertPropSheetPageControls