/// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // Hide the StatusLabel
            StatusLabel.Visible = false;

            if (this.HasSelectedTable)
            {
                // determine action by the button text
                switch (tabButton.ButtonText)
                {
                case "...":

                    // EditFieldSets
                    EditFieldSets();

                    // required
                    break;

                case "Add":

                    // Add a new reader
                    AddNewReader();

                    // required
                    break;

                case "Edit":

                    // Edit Selected
                    EditSelectedReader();

                    // required
                    break;

                case "Delete":

                    // Delete the SelectedCustomReader
                    DeleteCustomReader();

                    // required
                    break;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "...":

                if (tabButton.ButtonNumber == 1)
                {
                    // call the BrowseStoredProcedureFolderButton_Click event
                    BrowseStoredProcedureFolderButton_Click(this, null);
                }
                else if (tabButton.ButtonNumber == 2)
                {
                    // call the BrowseStoredProcedureFolderButton_Click event
                    BrowseStoredProcedureSQLFolderButton_Click(this, null);
                }

                // required
                break;
            }
        }
Пример #3
0
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "...":

                // call the BrowseProjectFolderButton_Click event
                BrowseProjectFolderButton_Click(this, null);

                // required
                break;

            case "Enumerations":

                // Call the EditEnumerationsButton_Click event
                EditEnumerationsButton_Click(this, null);

                // required
                break;
            }
        }
Пример #4
0
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "Back":

                // call the BackButton
                BackButton_Click(this, null);

                // required
                break;

            case "Next":

                // call the NextButton_Click
                NextButton_Click(this, null);

                // required
                break;

            case "Save":

                // Call the SaveButton_Click event
                SaveButton_Click(this, null);

                // required
                break;

            case "Done":

                // Call the DoneButton_Click event
                DoneButton_Click(this, null);

                // required
                break;
            }
        }
Пример #5
0
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "...":

                // if the ButtonNumber is 1
                if (tabButton.ButtonNumber == 1)
                {
                    // call the BrowseServerButton_Click
                    BrowseServerButton_Click(this, null);
                }
                // if the ButtonNumber is 2
                else if (tabButton.ButtonNumber == 2)
                {
                    // call the BrowseDatabaseButton_Click
                    BrowseDatabaseButton_Click(this, null);
                }

                // required
                break;
            }
        }
Пример #6
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReferencesSetEditor));
     this.ReferencesSetNameTextBox = new System.Windows.Forms.TextBox();
     this.ReferencesSetNameLabel   = new System.Windows.Forms.Label();
     this.ReferencesListBox        = new System.Windows.Forms.ListBox();
     this.SaveCancelControl        = new SaveCancelControl();
     this.AddButton    = new TabButton();
     this.EditButton   = new TabButton();
     this.DeleteButton = new TabButton();
     this.SuspendLayout();
     //
     // ReferencesSetNameTextBox
     //
     this.ReferencesSetNameTextBox.Font         = new System.Drawing.Font("Verdana", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.ReferencesSetNameTextBox.Location     = new System.Drawing.Point(222, 13);
     this.ReferencesSetNameTextBox.Name         = "ReferencesSetNameTextBox";
     this.ReferencesSetNameTextBox.Size         = new System.Drawing.Size(370, 27);
     this.ReferencesSetNameTextBox.TabIndex     = 75;
     this.ReferencesSetNameTextBox.TextChanged += new System.EventHandler(this.ReferencesSetNameTextBox_TextChanged);
     //
     // ReferencesSetNameLabel
     //
     this.ReferencesSetNameLabel.Font      = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.ReferencesSetNameLabel.Location  = new System.Drawing.Point(21, 19);
     this.ReferencesSetNameLabel.Name      = "ReferencesSetNameLabel";
     this.ReferencesSetNameLabel.Size      = new System.Drawing.Size(203, 20);
     this.ReferencesSetNameLabel.TabIndex  = 74;
     this.ReferencesSetNameLabel.Text      = "References Set Name:";
     this.ReferencesSetNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // ReferencesListBox
     //
     this.ReferencesListBox.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.ReferencesListBox.FormattingEnabled = true;
     this.ReferencesListBox.ItemHeight        = 18;
     this.ReferencesListBox.Location          = new System.Drawing.Point(37, 62);
     this.ReferencesListBox.Name                  = "ReferencesListBox";
     this.ReferencesListBox.Size                  = new System.Drawing.Size(555, 166);
     this.ReferencesListBox.TabIndex              = 92;
     this.ReferencesListBox.SelectedIndexChanged += new System.EventHandler(this.ReferencesListBox_SelectedIndexChanged);
     //
     // SaveCancelControl
     //
     this.SaveCancelControl.BackColor = System.Drawing.Color.Transparent;
     this.SaveCancelControl.Dock      = System.Windows.Forms.DockStyle.Bottom;
     this.SaveCancelControl.Location  = new System.Drawing.Point(0, 308);
     this.SaveCancelControl.Name      = "SaveCancelControl";
     this.SaveCancelControl.Size      = new System.Drawing.Size(632, 40);
     this.SaveCancelControl.TabIndex  = 76;
     //
     // AddButton
     //
     this.AddButton.BackgroundImage       = ((System.Drawing.Image)(resources.GetObject("AddButton.BackgroundImage")));
     this.AddButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.AddButton.ButtonNumber          = 0;
     this.AddButton.ButtonText            = "Add";
     this.AddButton.Font             = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.AddButton.Location         = new System.Drawing.Point(186, 240);
     this.AddButton.Margin           = new System.Windows.Forms.Padding(4, 3, 4, 3);
     this.AddButton.Name             = "AddButton";
     this.AddButton.NotSelectedImage = null;
     this.AddButton.Selected         = false;
     this.AddButton.SelectedImage    = null;
     this.AddButton.ShowNotSelectedImageWhenDisabled = true;
     this.AddButton.Size     = new System.Drawing.Size(80, 28);
     this.AddButton.TabIndex = 96;
     //
     // EditButton
     //
     this.EditButton.BackgroundImage       = ((System.Drawing.Image)(resources.GetObject("EditButton.BackgroundImage")));
     this.EditButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.EditButton.ButtonNumber          = 0;
     this.EditButton.ButtonText            = "Edit";
     this.EditButton.Font             = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.EditButton.Location         = new System.Drawing.Point(274, 240);
     this.EditButton.Margin           = new System.Windows.Forms.Padding(4, 3, 4, 3);
     this.EditButton.Name             = "EditButton";
     this.EditButton.NotSelectedImage = global::DataTierClient.Properties.Resources.DeepGray;
     this.EditButton.Selected         = false;
     this.EditButton.SelectedImage    = global::DataTierClient.Properties.Resources.DeepBlue;
     this.EditButton.ShowNotSelectedImageWhenDisabled = true;
     this.EditButton.Size     = new System.Drawing.Size(80, 28);
     this.EditButton.TabIndex = 97;
     //
     // DeleteButton
     //
     this.DeleteButton.BackgroundImage       = ((System.Drawing.Image)(resources.GetObject("DeleteButton.BackgroundImage")));
     this.DeleteButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.DeleteButton.ButtonNumber          = 0;
     this.DeleteButton.ButtonText            = "Delete";
     this.DeleteButton.Font             = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.DeleteButton.Location         = new System.Drawing.Point(362, 240);
     this.DeleteButton.Margin           = new System.Windows.Forms.Padding(4, 3, 4, 3);
     this.DeleteButton.Name             = "DeleteButton";
     this.DeleteButton.NotSelectedImage = global::DataTierClient.Properties.Resources.DeepGray;
     this.DeleteButton.Selected         = false;
     this.DeleteButton.SelectedImage    = global::DataTierClient.Properties.Resources.DeepBlue;
     this.DeleteButton.ShowNotSelectedImageWhenDisabled = true;
     this.DeleteButton.Size     = new System.Drawing.Size(80, 28);
     this.DeleteButton.TabIndex = 98;
     //
     // ReferencesSetEditor
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.Color.Linen;
     this.BorderStyle         = System.Windows.Forms.BorderStyle.FixedSingle;
     this.Controls.Add(this.DeleteButton);
     this.Controls.Add(this.EditButton);
     this.Controls.Add(this.AddButton);
     this.Controls.Add(this.ReferencesListBox);
     this.Controls.Add(this.SaveCancelControl);
     this.Controls.Add(this.ReferencesSetNameTextBox);
     this.Controls.Add(this.ReferencesSetNameLabel);
     this.Name = "ReferencesSetEditor";
     this.Size = new System.Drawing.Size(632, 348);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
        /// <summary>
        /// This method sets the selected button by passing in
        /// the ActiveControlEnum from the wizard.
        /// </summary>
        /// <param name="tabButton"></param>
        internal void SetSelectedButton(ActiveControlEnum selectedControl)
        {
            // initial value
            TabButton tabButton = null;

            // Determine Which Button To Make Visible
            switch (selectedControl)
            {
            case ActiveControlEnum.ProjectsTab:

                // set tabButton
                tabButton = this.ProjectsTab;

                // required
                break;

            case ActiveControlEnum.DatabasesTab:

                // set tabButton
                tabButton = this.DatabasesTab;

                // required
                break;

            case ActiveControlEnum.DataObjectsTab:

                // set tabButton
                tabButton = this.DataObjectsTab;

                // required
                break;

            case ActiveControlEnum.DataManagerTab:

                // set tabButton
                tabButton = this.DataManagerTab;

                // required
                break;

            case ActiveControlEnum.DataOperationsTab:

                // set tabButton
                tabButton = this.DataOperationsTab;

                // required
                break;

            case ActiveControlEnum.ControllersTab:

                // set tabButton
                tabButton = this.ControllersTab;

                // required
                break;

            case ActiveControlEnum.ReadersTab:

                // set tabButton
                tabButton = this.ReadersTab;

                // required
                break;

            case ActiveControlEnum.WritersTab:

                // set tabButton
                tabButton = this.WritersTab;

                // required
                break;

            case ActiveControlEnum.StoredProceduresTab:

                // set tabButton
                tabButton = this.StoredProceduresTab;

                // required
                break;
            }

            // set the tabButton
            if (tabButton != null)
            {
                // Set the tabButton
                this.SetSelectedButton(tabButton);
            }

            // Refresh
            this.Refresh();
        }
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // Set Button Images
            SetSelectedButton(tabButton);

            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "Projects":

                // Call the event
                ProjectsTab_Click(this, new EventArgs());

                // required
                break;

            case "Databases":

                // Call the event
                DatabasesTab_Click(this, new EventArgs());

                // required
                break;

            case "Data Objects":

                // Call the event
                DataObjectsTab_Click(this, new EventArgs());

                // required
                break;

            case "Data Manager":

                // Call the event
                DataManagerTab_Click(this, new EventArgs());

                // required
                break;

            case "Data Operations":

                // Call the event
                DataOperationsTab_Click(this, new EventArgs());

                // required
                break;

            case "Controllers":

                // Call the event
                ControllersTab_Click(this, new EventArgs());

                // required
                break;

            case "Readers":

                // Call the event
                ReadersTab_Click(this, new EventArgs());

                // required
                break;

            case "Writers":

                // Call the event
                WritersTab_Click(this, new EventArgs());

                // required
                break;

            case "Stored Procedures":

                // Call the event
                StoredProceduresTab_Click(this, new EventArgs());

                // required
                break;
            }
        }
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "...":

                // All the Elipses use the same button text
                switch (tabButton.ButtonNumber)
                {
                case 1:

                    // Browse for the solution
                    SolutionBrowseButton_Click(this, null);

                    // required
                    break;

                case 2:

                    // Browse for the ALC
                    ALCBrowseButton_Click(this, null);

                    // required
                    break;

                case 3:

                    // Browse for the DAC
                    DACBrowseButton_Click(this, null);

                    // required
                    break;

                case 4:

                    // Browse for the ObjectLibrary
                    ObjectLibraryBrowseButton_Click(this, null);

                    // required
                    break;
                }


                // required
                break;

            case "Update Projects":

                // Call the UpdateProjectButton_Click event
                UpdateProjectButton_Click(this, null);

                // required
                break;

            case "Cancel":

                // Call the CancelSaveButton_Click event
                CancelUpdateButton_Click(this, null);

                // required
                break;
            }
        }
Пример #10
0
        /// <summary>
        /// A tab button was clicked.
        /// </summary>
        /// <param name="buttonText"></param>
        public void OnTabButtonClicked(TabButton tabButton)
        {
            // determine action by the button text
            switch (tabButton.ButtonText)
            {
            case "Add":

                // Set the ActionType
                this.ActionType = ActionTypeEnum.AddButtonClicked;

                // If the ParentCustomMethodsEditorForm object exists
                if (this.HasParentCustomMethodsEditorForm)
                {
                    // Close the parent form
                    this.ParentCustomMethodsEditorForm.Close();
                }

                // required
                break;

            case "Edit":

                // Select Edit
                Edit();

                // required
                break;

            case "Delete":

                // If the SelectedMethod object exists
                if ((this.HasSelectedMethod) && (this.HasSelectedTable))
                {
                    // Show the user a message
                    string message = "Are you sure you wish to delete this method? This action cannot be undone.";
                    string title   = "Confirm Delete";

                    // Get Dialog Result
                    DialogResult result = MessageBox.Show(message, title, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                    // if user choose 'Yes'
                    if (result == DialogResult.Yes)
                    {
                        // user confirmed the delete

                        // Create a new instance of a 'Gateway' object.
                        Gateway gateway = new Gateway();

                        // perform the delete
                        bool deleted = gateway.DeleteMethod(this.selectedMethod.MethodId);

                        // if the value for deleted is true
                        if (deleted)
                        {
                            // load the Methods for the SelectedTable
                            this.SelectedTable.Methods = gateway.LoadMethodsForTable(this.SelectedTable.TableId);

                            // Set the MethodsList
                            MethodsList = this.SelectedTable.Methods;

                            // Just to make sure the caller knows no action is required (should already be set to NoAction value)
                            ActionType = ActionTypeEnum.NoAction;

                            // Erase the SelectedMethod
                            this.SelectedMethod = null;

                            // Make sure the buttons are not enabled with a selected item
                            MethodsListBox_SelectedIndexChanged(this, new EventArgs());
                        }
                    }
                }

                // required
                break;
            }
        }