Exemplo n.º 1
0
        /// <summary>
        /// This event launches the ConnectionStringForm
        /// </summary>
        private void BuildSourceConnectionStringButton_Click(object sender, EventArgs e)
        {
            // If the CompareInfo object exists
            if ((HasCompareInfo) && (this.HasSettings))
            {
                // if the CompareType is CompareTwoSQLDatabases or CreateXmlFile
                if ((CompareInfo.CompareType == CompareTypeEnum.CompareTwoSQLDatabases) || (CompareInfo.CompareType == CompareTypeEnum.CreateXmlFile))
                {
                    // Create an instance of the ConnectionStringBuilderForm
                    ConnectionStringBuilderForm connectionForm = new ConnectionStringBuilderForm();

                    // Show the form
                    connectionForm.ShowDialog();

                    // if the user did not cancel
                    if (!connectionForm.UserCancelled)
                    {
                        // Set the SourceConnectionStringControl
                        this.SourceConnectionStringControl.Text = connectionForm.ConnectionString;
                    }
                }
                else if (CompareInfo.CompareType == CompareTypeEnum.CompareXmlFileAndSQLDatabase)
                {
                    // Choose the file
                    DialogHelper.ChooseFile(this.SourceConnectionStringControl.GetTextBox(), XmlFilter, this.Settings.SourceXmlFilePath);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// event is fired when the 'BrowseButton' is clicked.
 /// </summary>
 private void BrowseButton_Click(object sender, EventArgs e)
 {
     // If we are browsing for a file
     if (this.BrowseType == BrowseTypeEnum.File)
     {
         // Browse for a file
         DialogHelper.ChooseFile(this.LabelTextBoxControl.GetTextBox(), this.Filter, this.SelectedPath);
     }
     // If browsing for a directory
     else if (this.BrowseType == BrowseTypeEnum.Folder)
     {
         // Browse for a directory
         DialogHelper.ChooseFolder(this.LabelTextBoxControl.GetTextBox(), this.SelectedPath);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// event is fired when the 'BrowseButton' is clicked.
 /// </summary>
 private void BrowseButton_Click(object sender, EventArgs e)
 {
     // If we are browsing for a file
     if (BrowseType == BrowseTypeEnum.File)
     {
         // Browse for a file
         DialogHelper.ChooseFile(this.TextBox, this.Filter, this.StartPath);
     }
     // If browsing for a directory
     else if (BrowseType == BrowseTypeEnum.Folder)
     {
         // Browse for a directory
         DialogHelper.ChooseFolder(this.TextBox, this.SelectedPath);
     }
     else if ((BrowseType == BrowseTypeEnum.CustomOpen) && (HasOpenCallback))
     {
         // Launch the OpenCallBack
         OpenCallback();
     }
 }