예제 #1
0
        /// <summary>
        /// Устанавливает путь куда будет загружаться файл по умолчание в textBox
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
        /// <returns>Функия void ничего не возвращает.</returns>

        private void checkBox_Checked(object sender, RoutedEventArgs e)
        {
            if (checkBox.IsChecked == true)
            {
                SetPath setPath = new SetPath();
                textBox1.Text = setPath.PathReader();
            }
        }
예제 #2
0
 /// <summary>
 /// Handles the Click event of the button1 control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     if (checkBox.IsChecked == true)
     {
         SetPath setPath = new SetPath();
         textBox1.Text = setPath.PathReader();
     }
     else
     {
         var pathName = new System.Windows.Forms.FolderBrowserDialog();
         System.Windows.Forms.DialogResult result = pathName.ShowDialog();
         textBox1.Text = pathName.SelectedPath.ToString() + @"\";
     }
 }