private void butSource_Click(object sender, EventArgs e)
 {
     if (m_fsdFileChooser.ShowDialog(this) == DialogResult.OK)
     {
         tbxSource.Text = m_fsdFileChooser.SelectedPath;
         tbxSource.Focus();
     }
 }
 private void butSelectImage_Click(object sender, EventArgs e)
 {
     if (m_fsdFileChooser.ShowDialog(this) == DialogResult.OK)
     {
         tbxImagePath.Text = m_fsdFileChooser.SelectedPath;
         tbxImagePath.Focus();
         LoadImage();
     }
 }
Exemple #3
0
        private void SelectFile()
        {
            this.Text = "Excel Data Viewer";

            FileSelectionDialog.Multiselect = false;
            FileSelectionDialog.Filter      = "Comma separated values|*.csv";
            if (FileSelectionDialog.ShowDialog(this) == DialogResult.OK)
            {
                LoadData(FileSelectionDialog.FileName);
            }
        }
        private void BrowseDatasheet_Click_1(object sender, RoutedEventArgs e)
        {
            FileSelectionDialog datasheetFilebroser = new FileSelectionDialog();

            datasheetFilebroser.Title           = "Please select the datasheet";
            datasheetFilebroser.CheckFileExists = true;
            datasheetFilebroser.ShowDialog();
            if (datasheetFilebroser.DialogResult == MessageBoxResult.OK)
            {
                if (ORM.SelectedItem is Part)
                {
                    Part      sel = (Part)ORM.SelectedItem;
                    Datasheet ds  = sel.Datasheet;
                    if (ds == null)
                    {
                        ds = new Datasheet();
                        context.Datasheets.Add(ds);
                        sel.Datasheet = ds;
                    }

                    sel.Datasheet.FileName = datasheetFilebroser.FileName;
                }
            }
        }
Exemple #5
0
 /// <summary>
 /// Вызов диалога выбора текстового файла.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FileSelectionButton_Click(object sender, EventArgs e)
 {
     FileSelectionDialog.ShowDialog();
 }