Esempio n. 1
0
        private void btnInit_Click(object sender, EventArgs e)
        {
            if (!Directory.Exists(dlgOpenDirectory.SelectedPath))
            {
                dlgOpenDirectory.SelectedPath = lastDirectory;
            }

            if (dlgOpenDirectory.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                NewFromData(dlgOpenDirectory.SelectedPath);
            }
        }
Esempio n. 2
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            if (ValidateRegex(RegexTextBox.Text))
            {
                FolderBrowser.Description = "Please choose the location of your INPUT .txt files that you want to split";

                if (FolderBrowser.ShowDialog() != DialogResult.Cancel)
                {
                    string TextFileFolder = FolderBrowser.SelectedPath.ToString();

                    FolderBrowser.Description = "Please choose the OUTPUT location for your files";

                    if (FolderBrowser.ShowDialog() != DialogResult.Cancel)
                    {
                        string OutputFileLocation = FolderBrowser.SelectedPath.ToString();

                        StartButton.Enabled                   = false;
                        SpeakerListTextBox.Enabled            = false;
                        ScanSubfolderCheckbox.Enabled         = false;
                        EncodingDropdown.Enabled              = false;
                        SpeakersMultipleLinesCheckbox.Enabled = false;
                        DetectSpeakersButton.Enabled          = false;
                        RegexTextBox.Enabled                  = false;
                        BgWorker.RunWorkerAsync(new string[] { TextFileFolder, OutputFileLocation });
                    }
                }
            }
        }
Esempio n. 3
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            FolderBrowser.Description = "Please choose the location of your .txt files to analyze";
            if (FolderBrowser.ShowDialog() != DialogResult.Cancel)
            {
                DictData.TextFileFolder = FolderBrowser.SelectedPath.ToString();

                if (DictData.TextFileFolder != "")
                {
                    saveFileDialog.FileName = "Senti-Gent_Output.csv";

                    saveFileDialog.InitialDirectory = DictData.TextFileFolder;
                    if (saveFileDialog.ShowDialog() != DialogResult.Cancel)
                    {
                        DictData.OutputFileLocation = saveFileDialog.FileName;

                        if (DictData.OutputFileLocation != "")
                        {
                            StartButton.Enabled           = false;
                            ScanSubfolderCheckbox.Enabled = false;
                            EncodingDropdown.Enabled      = false;

                            BgWorker.RunWorkerAsync(DictData);
                        }
                    }
                }
            }
        }
Esempio n. 4
0
 private void FolderBrowse_Click(object sender, EventArgs e)
 {
     if (FolderBrowser.ShowDialog() == DialogResult.OK)
     {
         UserDataTextBox.Text = FolderBrowser.SelectedPath;
     }
 }
 private void mnuExportHtml_Click(object sender, EventArgs e)
 {
     if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         ExportFileModeHtml(dlg.SelectedPath);
     }
 }
Esempio n. 6
0
 //Brows for files button
 private void BrowsButton_Click(object sender, EventArgs e)
 {
     FolderBrowser.ShowDialog();
     ProjectDirectory    = FolderBrowser.SelectedPath;
     DirectoryInput.Text = ProjectDirectory;
     HasPath             = true;
 }
 private void ButtonOutputPath_Click(object sender, EventArgs e)
 {
     if (FolderBrowser.ShowDialog(this) == DialogResult.OK)
     {
         EditOutputPath.Text = FolderBrowser.SelectedPath;
     }
 }
Esempio n. 8
0
        public string GetFolder()
        {
            myFolderBrowser.Description = this._Description;
            myFolderBrowser.ShowDialog();

            return(myFolderBrowser.DirectoryPath);
        }
Esempio n. 9
0
 private void // ERROR: Handles clauses are not supported in C#
 BtnBrowse_Click(System.Object sender, System.EventArgs e)
 {
     if (FolderBrowser.ShowDialog() == DialogResult.OK)
     {
         TxtPath.Text = FolderBrowser.SelectedPath;
     }
 }
Esempio n. 10
0
        private void button1_Click(object sender, EventArgs e)
        {
            FolderBrowser.Description = "Please choose the location of your .txt files";
            FolderBrowser.ShowDialog();
            string TextFileFolder = FolderBrowser.SelectedPath.ToString();

            if (TextFileFolder != "")
            {
                FolderBrowser.Description = "Please choose your output location";

                if (FolderBrowser.ShowDialog() != DialogResult.Cancel)
                {
                    string OutputFolder = FolderBrowser.SelectedPath.ToString();

                    if (TextFileFolder != OutputFolder)
                    {
                        button1.Enabled = false;
                        ScanSubfolderCheckbox.Enabled = false;
                        EncodingDropdown.Enabled      = false;
                        BgWorker.RunWorkerAsync(new string[] { TextFileFolder, OutputFolder });
                    }
                    else
                    {
                        MessageBox.Show("Your input folder cannot be the same as your output folder.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
Esempio n. 11
0
        /// <summary>
        /// Show the application dialog and return selection
        /// </summary>
        /// <param name="enableDirectory">Enable to create new direcoty.</param>
        /// <returns>selected application, null if cancel/fail</returns>
        private static string AppDialog(bool enableDirectory = true)
        {
            FolderBrowser fb = new FolderBrowser
            {
                Description         = Global.Properties["ItemAddApp"].Desc,
                IncludeFiles        = true,
                ShowNewFolderButton = enableDirectory
            };

            // Retrieve the Application Folder
            if (LimeLib.IsWindows8)
            {
                ShellShortcut link = new ShellShortcut(ConfigLocal.AppsFolderPath);
                IntPtr        pidl = link.PIDL;
                LimeMsg.Debug("AppDialog: AppsFolder PIDL: {0}", pidl.ToInt32());
                fb.RootPIDL         = pidl;
                fb.InitialDirectory = String.Format(":{0}", pidl.ToInt32());
            }
            else
            {
                fb.RootFolderID = FolderBrowser.FolderID.StartMenu;
                LimeMsg.Debug("AppDialog: AppsFolder FolderID: {0}", fb.RootFolderID);
            }

            // Show the dialog
            if (fb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                return(fb.SelectedPath);
            }

            return(null);
        }
Esempio n. 12
0
    // the Click event for the "Scan | From One Directory" menu item.

    private void mnuScanFromOne_Click(object sender, System.EventArgs e)
    {
        // Show the FolderBrowser dialog and set the initial directory to the
        // user's selection.

        string        strSelectedDirectory = FolderBrowser.ShowDialog();
        DirectoryNode dnSelectedDirectory;

        tvwDirectories.Nodes.Clear();
        lvwDirectories.Items.Clear();
        try {
            // Add the DirectoryNode that represents the selected directory to the
            // TreeView.

            dnSelectedDirectory      = new DirectoryNode();
            dnSelectedDirectory.Text = strSelectedDirectory;
            tvwDirectories.Nodes.Add(dnSelectedDirectory);
            // Calculate the size of the selected directory by adding up the size of
            // all its sub-directories.
            dnSelectedDirectory.Size += GetDirectorySize(strSelectedDirectory,
                                                         dnSelectedDirectory);
        } catch
        {
            // Do nothing. Simply skip any directories that can't be read. Control
            // passes to the first line after }.
        }
    }
Esempio n. 13
0
 private void Browse_Click(object sender, EventArgs e)
 {
     FolderBrowser.ShowDialog();
     D_Path      = FolderBrowser.SelectedPath;
     F_Path.Text = D_Path;
     FolderBrowser.Dispose();
 }
Esempio n. 14
0
 private void BrowseSourceButton_Click(object sender, EventArgs e)
 {
     FolderBrowser.Description = "Select source folder:";
     if (FolderBrowser.ShowDialog() == DialogResult.OK)
     {
         SourceTextBox.Text = FolderBrowser.SelectedPath;
     }
 }
Esempio n. 15
0
 private DialogResult RunDialog()
 {
     fb.Description   = this.Description;
     fb.StartLocation = FolderBrowserFolder.MyComputer;
     fb.Style         = FolderBrowserStyles.RestrictToSubfolders;
     //|FolderBrowserStyles.RestrictToDomain;
     return(fb.ShowDialog());
 }
Esempio n. 16
0
 private void BtnProcurarPasta_Click(object sender, EventArgs e)
 {
     FolderBrowser.ShowDialog();
     if (!string.IsNullOrEmpty(FolderBrowser.SelectedPath))
     {
         TxtPastaProjeto.Text = FolderBrowser.SelectedPath + '\\' + TxtNomeProjeto.Text;
     }
 }
Esempio n. 17
0
 private void BrowseDestinationButton_Click(object sender, EventArgs e)
 {
     FolderBrowser.Description = "Select destination folder:";
     if (FolderBrowser.ShowDialog() == DialogResult.OK)
     {
         DestinationTextBox.Text = FolderBrowser.SelectedPath;
     }
 }
 /// <summary>
 /// Change output path button clicked
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnOutputPath_Click(object sender, EventArgs e)
 {
     // show the open folder dialog. If we have a result, we set it to the output textbox
     if (FolderBrowser.ShowDialog(this) == DialogResult.OK)
     {
         txtOutputPath.Text = FolderBrowser.SelectedPath;
     }
 }
 private void ChooseDirectory_Click(object sender, EventArgs e)
 {
     if (FolderBrowser.ShowDialog() == DialogResult.OK)
     {
         DirectoryText.Text = FolderBrowser.SelectedPath;
         directory          = DirectoryText.Text;
     }
 }
Esempio n. 20
0
        private void btnChangeSaveTo_Click(object sender, EventArgs e)
        {
            browserDialog.SelectedPath = SaveDestination;

            if (browserDialog.ShowDialog() == DialogResult.OK)
            {
                SaveDestination = browserDialog.SelectedPath;
            }
        }
Esempio n. 21
0
        private void FolderButton_Click(object sender, EventArgs e)
        {
            if (FolderBrowser.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            Folder.Text = FolderBrowser.SelectedPath;
        }
        private void Menu_File_OpenFolder_Click(object sender, EventArgs e)
        {
            FolderBrowser.SelectedPath = Utility.Configuration.Config.Connection.SaveDataPath;

            if (FolderBrowser.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                LoadFiles(FolderBrowser.SelectedPath);
            }
        }
Esempio n. 23
0
        private string ShowFolderSelector(IProfile profile, bool allowNewFolders)
        {
            var browser = new FolderBrowser(profile, allowNewFolders)
            {
                StartPosition = FormStartPosition.CenterParent
            };

            return(browser.ShowDialog() == DialogResult.OK ? browser.SelectedPath : String.Empty);
        }
Esempio n. 24
0
        private void Folder_Button_Click(object sender, EventArgs e)
        {
            FolderBrowser.SelectedPath = Application.StartupPath;

            if (FolderBrowser.ShowDialog() == DialogResult.OK)
            {
                Copy_TB.Text = FolderBrowser.SelectedPath;
            }
        }
        private void Browse_Click(object sender, EventArgs e)
        {
            var result = FolderBrowser.ShowDialog();

            if (result == DialogResult.OK)
            {
                SelectedPath.Text = FolderBrowser.SelectedPath;
            }
        }
Esempio n. 26
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (FolderBrowser.ShowDialog() == DialogResult.OK)
     {
         Path.Text = FolderBrowser.SelectedPath;
         Settings.Default.MLocal_path = Path.Text;
         Settings.Default.Save();
     }
 }
Esempio n. 27
0
        private void _lookInBrowser_Browse(object sender, EventArgs e)
        {
            var browser = new FolderBrowser();

            if (browser.ShowDialog(this) == DialogResult.OK)
            {
                _lookIn.Text = browser.SelectedPath;
            }
        }
Esempio n. 28
0
    public static string ShowDialog()
    {
        FolderBrowser fb = new FolderBrowser();

        fb.Description = "Select a Directory to Scan";
        fb.Style       = System.Windows.Forms.Design.FolderNameEditor.FolderBrowserStyles.RestrictToFilesystem;
        fb.ShowDialog();
        return(fb.DirectoryPath);
    }
Esempio n. 29
0
        private void _browse_Click(object sender, EventArgs e)
        {
            var dialog = new FolderBrowser();

            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                _targetPath.Text = dialog.SelectedPath;
            }
        }
Esempio n. 30
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            if (CSVDelimiterTextbox.Text.Length < 1)
            {
                CSVDelimiterTextbox.Text = ",";
            }
            if (CSVQuoteTextbox.Text.Length < 1)
            {
                CSVQuoteTextbox.Text = "\"";
            }

            //make sure that our dictionary is loaded before anything else
            if (DictData.DictionaryLoaded != true)
            {
                MessageBox.Show("You must first load a dictionary file before you can analyze your texts.", "Dictionary not loaded!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


            FolderBrowser.Description = "Please choose the location of your .txt files to analyze";
            if (FolderBrowser.ShowDialog() != DialogResult.Cancel)
            {
                DictData.TextFileFolder = FolderBrowser.SelectedPath.ToString();

                if (DictData.TextFileFolder != "")
                {
                    saveFileDialog.FileName = "Vocabulate_Output.csv";

                    saveFileDialog.InitialDirectory = DictData.TextFileFolder;
                    if (saveFileDialog.ShowDialog() != DialogResult.Cancel)
                    {
                        DictData.OutputFileLocation = saveFileDialog.FileName;
                        DictData.RawWordCounts      = RawWCCheckbox.Checked;
                        DictData.StopListRawText    = StopListTextBox.Text;
                        DictData.CSVDelimiter       = CSVDelimiterTextbox.Text[0];
                        DictData.CSVQuote           = CSVQuoteTextbox.Text[0];
                        DictData.OutputCapturedText = OutputCapturedWordsCheckbox.Checked;

                        if (DictData.OutputFileLocation != "")
                        {
                            StopListTextBox.Enabled             = false;
                            StartButton.Enabled                 = false;
                            ScanSubfolderCheckbox.Enabled       = false;
                            EncodingDropdown.Enabled            = false;
                            LoadDictionaryButton.Enabled        = false;
                            RawWCCheckbox.Enabled               = false;
                            CSVDelimiterTextbox.Enabled         = false;
                            CSVQuoteTextbox.Enabled             = false;
                            OutputCapturedWordsCheckbox.Enabled = false;

                            BgWorker.RunWorkerAsync(DictData);
                        }
                    }
                }
            }
        }
Esempio n. 31
0
 public DialogResult ShowDialog()
 {
     FolderBrowser browser = new FolderBrowser();
     browser.Description = _description;
     browser.StartLocation = FolderNameEditor.FolderBrowserFolder.MyComputer;
     DialogResult result = browser.ShowDialog();
     if (result == DialogResult.OK)
         _directory = browser.DirectoryPath;
     else
         _directory = String.Empty;
     return result;
 }
Esempio n. 32
0
		// Alain VIZZINI reminded me to try out the .NET folder browser, because
		// the my documents bug seemed to have gone away ...
		public DialogResult DisplayDialog(string description)
		{
			using (FolderBrowser folderBrowser = new FolderBrowser()) {
				folderBrowser.Description = StringParser.Parse(description);
				DialogResult result = folderBrowser.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm);
				path = folderBrowser.DirectoryPath;
				LoggingService.Info("FolderDialog: user has choosen path " + path);
				if (path == null || path.Length == 0)
					return DialogResult.Cancel;
				return result;
			}
		}