Esempio n. 1
0
        /// <summary>
        /// event is fired when the 'AddIgnoreFolderButton' is clicked.
        /// </summary>
        private void AddIgnoreFolderButton_Click(object sender, EventArgs e)
        {
            // set the selectedPath
            string selectedPath = this.SourceFolderTextBox.Text;

            // Choose a folder to ignore
            DialogHelper.ChooseFolder(this.IgnorFolderTextBox, selectedPath);
        }
Esempio n. 2
0
        /// <summary>
        /// This event builds the target connection.
        /// </summary>
        private void BuildTargetConnectionStringButton_Click(object sender, EventArgs e)
        {
            // If the CompareInfo object exists and the Settings exist
            if ((HasCompareInfo) && (HasSettings))
            {
                // if the CompareType is CompareTwoSQLDatabases or CreateXmlFile
                if ((CompareInfo.CompareType == CompareTypeEnum.CompareTwoSQLDatabases) || (CompareInfo.CompareType == CompareTypeEnum.CompareXmlFileAndSQLDatabase))
                {
                    // 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 TargetConnectionStringControl
                        this.TargetConnectionStringControl.Text = connectionForm.ConnectionString;
                    }
                }
                else if (CompareInfo.CompareType == CompareTypeEnum.CompareXmlFileAndSQLDatabase)
                {
                    // local
                    string folderName = "";

                    // if the OutputXmlFilePath exists
                    if ((TextHelper.Exists(Settings.OutputXmlFilePath)) && (File.Exists(Settings.OutputXmlFilePath)))
                    {
                        // Crete the directory
                        FileInfo file = new FileInfo(Settings.OutputXmlFilePath);

                        // if the file exists
                        if (file.Exists)
                        {
                            // get the folderName
                            folderName = file.Directory.FullName;
                        }
                    }

                    // Choose the folder
                    DialogHelper.ChooseFolder(this.TargetConnectionStringControl.GetTextBox(), folderName);

                    // if a folder was selected
                    if (TargetConnectionStringControl.HasText)
                    {
                        // Add [Enter The File Name] to the choosen folder
                        this.TargetConnectionStringControl.Text += "[Enter The File Name].xml";
                    }
                }
            }
        }
Esempio 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 (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);
     }
 }
Esempio n. 4
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();
     }
 }
 /// <summary>
 /// This event is used to browse for the Data Operations
 /// folder.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BrowseDataOperationsFolderButton_Click(object sender, EventArgs e)
 {
     // Browse for the folder
     DialogHelper.ChooseFolder(this.DataOperationsFolderTextBox, this.ProjectFolder);
 }
Esempio n. 6
0
 /// <summary>
 /// This event browses for the StoredProcedureSQLFolder.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BrowseStoredProcedureSQLFolderButton_Click(object sender, EventArgs e)
 {
     // Browse for the folder
     DialogHelper.ChooseFolder(this.StoredProcedureSQLFolderTextBox, this.ProjectFolder);
 }
Esempio n. 7
0
 /// <summary>
 /// event is fired when the 'BrowseSourceFolderButton' is clicked.
 /// </summary>
 private void BrowseSourceFolderButton_Click(object sender, EventArgs e)
 {
     // Choose the folder
     DialogHelper.ChooseFolder(this.SourceFolderTextBox.GetTextBox());
 }