void SelectProjectLocationButtonClicked(object sender, EventArgs e)
		{
			FolderDialog fdiag = new  FolderDialog();
			if (fdiag.DisplayDialog(StringParser.Parse("${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SelectDefaultProjectLocationDialog.Title}")) == DialogResult.OK) {
				ControlDictionary["projectLocationTextBox"].Text = fdiag.Path;
			}
		}
Пример #2
0
 private void MenuFileOpenFolder_Click(object sender, EventArgs e)
 {
     FolderDialog.Description = "Select a folder containing songs.";
     if (FolderDialog.ShowDialog(this) == DialogResult.Cancel)
     {
         return;
     }
     Open(FolderDialog.SelectedPath);
 }
Пример #3
0
        private void btnRBrowse_Click(object sender, EventArgs e)
        {
            DialogResult result = FolderDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                txtRuleTier.Text = FolderDialog.SelectedPath;
            }
        }
Пример #4
0
        //导出模板
        private void barBtnExportFloder_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                var    dtExport = (DataTable)this.gcDataInfo.DataSource;
                string msg      = string.Empty;
                if (dtExport == null || dtExport.Rows.Count < 1)
                {
                    MessageBox.Show("当前没有数据可以操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                FolderDialog openFolder = new FolderDialog();
                if (openFolder.DisplayDialog() == DialogResult.OK)
                {
                    if (string.IsNullOrEmpty(Settings.Default.ClearYear) || string.IsNullOrEmpty(Settings.Default.Vehicle_MFCS))
                    {
                        MessageBox.Show("请先设置车辆生存企业名称和清算年份!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    DialogResult dr = MessageBox.Show(String.Format("确定要导出【{0}】,清算年份为【{1}】的数据吗?", Settings.Default.Vehicle_MFCS, Settings.Default.ClearYear), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        try
                        {
                            LoadingHandler.Show(this, args =>
                            {
                                var exutils = new ExportNewInfoUtils();
                                msg         = exutils.ExportNewTemplate(openFolder.Path, "");
                            });
                            if (String.IsNullOrEmpty(msg))
                            {
                                MessageBox.Show("导出完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                            else
                            {
                                using (var mf = new MessageForm(msg)
                                {
                                    Text = "校验结果"
                                })
                                {
                                    mf.ShowDialog();
                                }
                            }
                        }
                        catch (System.Exception ex)
                        {
                            MessageBox.Show("操作出现错误:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
            }
        }
Пример #5
0
 private void FolderBrowserButton_Click(object sender, EventArgs e)
 {
     if (FolderDialog.ShowDialog() == DialogResult.OK)
     {
         var folderName = FolderDialog.SelectedPath;
         var item       = new ListViewItem(folderName, "Folder");
         //item.Checked = true;
         FolderListView.Items.Add(item);
     }
 }
Пример #6
0
        private void _button导入文华数据_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            FolderDialog sfd = new FolderDialog();

            if (sfd.DisplayDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Thread th = new Thread(new ThreadStart(() => ImportStocksFromWh6MonthStatement(sfd.Path)));
                th.Start();
            }
        }
Пример #7
0
        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult result = FolderDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                BackupPath = FolderDialog.SelectedPath;
                DisplayRefresh(false, true);
            }
        }
Пример #8
0
        void BrowseDirectories(object sender, EventArgs e)
        {
            FolderDialog fd = new FolderDialog();

            if (fd.DisplayDialog("${res:Dialog.NewProject.SelectDirectoryForProject}") == DialogResult.OK)
            {
                ((TextBox)ControlDictionary["locationTextBox"]).Text = fd.Path;
            }
            // End
        }
Пример #9
0
        private void MenuFileOpenSD_Click(object sender, EventArgs e)
        {
            FolderDialog.Description = "Select the SD card drive.";
            if (FolderDialog.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }

            OpenSdCard(FolderDialog.SelectedPath);
        }
Пример #10
0
        void LookInBrowseButtonClicked(object sender, EventArgs e)
        {
            FolderDialog dlg = new FolderDialog();

            if (dlg.DisplayDialog("${res:Dialog.NewProject.SearchReplace.LookIn.SelectDirectory}") == DialogResult.OK)
            {
                Get <ComboBox>("lookIn").SelectedIndex = customDirectoryIndex;
                Get <ComboBox>("lookIn").Text          = dlg.Path;
            }
        }
Пример #11
0
        private void MenuSongsExportFoF_Click(object sender, EventArgs e)
        {
            FolderDialog.Description = "Select your Frets on Fire songs folder.";
            if (FolderDialog.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }

            Exports.ExportFoF(FolderDialog.SelectedPath, GetSelectedSongData());
        }
Пример #12
0
        private void on_addSharedFolderButton_clicked(object o, EventArgs args)
        {
            FolderDialog selectFolderDialog = new FolderDialog("Select Folder");

            selectFolderDialog.TransientFor = dialog;
            if (selectFolderDialog.Run() == (int)ResponseType.Ok)
            {
                sharedFoldersListStore.AppendValues(new object[] { selectFolderDialog.CurrentFolder });
            }
            selectFolderDialog.Destroy();
        }
Пример #13
0
 private void browseButton_Click(object sender, EventArgs e)
 {
     try
     {
         folderTextBox.Text = FolderDialog.SelectFolder(folderTextBox.Text);
         PreviewRenameFilesIfEnabled();
     }
     catch (Exception ex)
     {
         HandleException(ex);
     }
 }
Пример #14
0
 private void BrowseFileButton_Click(object sender, EventArgs e)
 {
     if (SDCardFolderText.Text.Length == 0)
     {
         FolderDialog.SelectedPath = Application.StartupPath;
     }
     if (FolderDialog.ShowDialog() == DialogResult.OK)
     {
         SDCardFolderText.Text = FolderDialog.SelectedPath;
         SDCardEnabled.Checked = true;
     }
 }
        private static IDialogResult ShowFolderDialog(Action <FolderDialog> options)
        {
            var dialog = new FolderDialog {
                Title = "Select Folder"
            };

            options?.Invoke(dialog);

            return(dialog.ShowDialog() != true
                ? new DialogResult(MessageBoxResult.Cancel, null)
                : new DialogResult(MessageBoxResult.OK, dialog.SelectedPath));
        }
Пример #16
0
 private void SaveToFolderShowButton_Click(object sender, EventArgs e)
 {
     if (Directory.Exists(FolderPathTextBox.Text))
     {
         FolderDialog.SelectedPath = FolderPathTextBox.Text;
     }
     FolderDialog.ShowNewFolderButton = true;
     if (FolderDialog.ShowDialog() == DialogResult.OK)
     {
         SaveToFolderTextBox.Text = FolderDialog.SelectedPath;
     }
 }
Пример #17
0
        /// <summary>
        /// Add a fetching directroy from disk
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddFetchingDirectory(object sender, EventArgs e)
        {
            FolderDialog folderDialog = new FolderDialog();

            folderDialog.ShowDialog();
            DBLinker.Execute($@"
                insert into main values(
                    '{ folderDialog.Path }', 'exe'
                );
            ");
            ReloadListViewFetching();
        }
Пример #18
0
        /// <summary>
        /// 导入VIN
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnImportVin_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            NissanUtils  utils      = new NissanUtils();
            FolderDialog openFolder = new FolderDialog();

            try
            {
                if (openFolder.DisplayDialog() == DialogResult.OK)
                {
                    // 获取用户选择的文件夹路径
                    string folderPath = openFolder.Path;

                    // 获取folderPath下以格式为utils.CocFileName的所有文件
                    List <string> fileNameList = utils.GetFileName(folderPath, utils.VinFileName);
                    if (fileNameList.Count > 0)
                    {
                        string fileNameMsg = string.Empty;
                        string returnMsg   = string.Empty;

                        // 获取全部主表数据,用作合并VIN数据
                        bool IsMainDataExist = utils.GetMainData();
                        if (!IsMainDataExist)
                        {
                            MessageBox.Show("系统中不存在主表数据,请首先导入主表数据", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }

                        // 遍历读所有文件fileNameList
                        foreach (string fileName in fileNameList)
                        {
                            // fileNameMsg += Path.GetFileName(fileName) + "\r\n";

                            // 导入filename文件信息
                            returnMsg += utils.ImportVinData(fileName, folderPath);
                        }

                        MessageForm mf = new MessageForm(returnMsg);
                        Utils.SetFormMid(mf);
                        mf.Text = "导入结果";
                        mf.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show(String.Format("目录{0}下没有文件{1}", folderPath, utils.VinFileName));
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("导入失败:" + ex.Message);
            }
        }
Пример #19
0
        private void ChooseFolder(TextBox input)
        {
            var dialog = new FolderDialog();

            dialog.FileName = input.Text;
            dialog.Owner    = this;
            var result = dialog.ShowDialog();

            if (result != null && result.Value)
            {
                input.Text = dialog.FileName;
            }
        }
Пример #20
0
        private void DirSelectButton_Click(object sender, EventArgs e)
        {
            Type   jsonObjType = DirectoryButtonTypeMap[((Control)sender).Name];
            String textBoxName = DirectoryButtonTextBoxMap[((Control)sender).Name];

            FolderDialog.ShowDialog();
            if (FolderDialog.SelectedPath != "")
            {
                JsonFiles.JsonFilePaths[jsonObjType.Name] = FolderDialog.SelectedPath;
                TabOptions.Controls[textBoxName].Text     = FolderDialog.SelectedPath;
                JsonFiles.SaveFilePaths();
            }
        }
Пример #21
0
        private void OnOutputBrowse(object sender, EventArgs e)
        {
            FolderDialog.SelectedPath = OutputFolder.Text;

            var result = FolderDialog.ShowDialog();

            if (result != DialogResult.OK)
            {
                return;
            }

            OutputFolder.Text = FolderDialog.SelectedPath;
        }
Пример #22
0
        private void btnSelectRootPath_Click(object sender, EventArgs e)
        {
            FolderDialog folder = new FolderDialog();

            if (folder.DisplayDialog() == DialogResult.OK)
            {
                tbRootPath.Text = folder.Path;
            }
            else
            {
                MessageBox.Show("你没有选择目录");
            }
        }
Пример #23
0
        private void BtDataDir_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new FolderDialog();
            var result = dialog.ShowDialog();

            if (result != null && !result.Value)
            {
                return;
            }

            TbDataDir.Text = dialog.FileName;
            _Cfg.RootDir   = dialog.FileName.Replace("\\", "/");
        }
Пример #24
0
        private void OnOutputFolderBrowseClick(object sender, EventArgs e)
        {
            var lResult = FolderDialog.ShowDialog();

            if (lResult == DialogResult.OK)
            {
                txt_OutputDirectory.Text = FolderDialog.SelectedPath;

                Settings.Default.OutputFolder = FolderDialog.SelectedPath;

                Settings.Default.Save();
            }
        }
Пример #25
0
        //选择文件夹
        private void sbtnSelectDir_Click(object sender, EventArgs e)
        {
            string       dirpath    = string.Empty;
            FolderDialog openFolder = new FolderDialog();

            if (openFolder.DisplayDialog() == DialogResult.OK)
            {
                FileTable.Clear();
                dirpath          = openFolder.Path.ToString();
                txtfilename.Text = dirpath;
                FileTable        = GetFiles(dirpath, ".xls");
                ShowFiles();
            }
        }
Пример #26
0
        private void OpenFolderMenu_Click(object sender, EventArgs e)
        {
            if (FolderDialog.ShowDialog() == DialogResult.OK)
            {
                Sidebar.Nodes.Clear();
                TextContainer.Clear();

                string[] paths = Directory.EnumerateFiles(FolderDialog.SelectedPath, "*.bin", SearchOption.AllDirectories).ToArray();

                foreach (string path in paths)
                {
                    CheckBinaryFileFormat(path);
                }
            }
        }
Пример #27
0
 private void Unpacked_Click(object sender, EventArgs e)
 {
     FolderDialog.Reset();
     FolderDialog.Description = "Select Folder to Unpack XNB Files Into";
     FolderDialog.ShowDialog();
     UnPackedtxbx.Text = FolderDialog.SelectedPath;
     if (CompressToTxtbx.Text != "" && UnPackedtxbx.Text != "")
     {
         PackBtn.Enabled = true;
     }
     else
     {
         PackBtn.Enabled = false;
     }
 }
Пример #28
0
 private void Extract_Click(object sender, EventArgs e)
 {
     FolderDialog.Reset();
     FolderDialog.Description = "Select Folder to Unpack XNB Files Into";
     FolderDialog.ShowDialog();
     ExtractFolderTxb.Text = FolderDialog.SelectedPath;
     if (FolderXNBTbx.Text != "" && ExtractFolderTxb.Text != "")
     {
         UnpackBtn.Enabled = true;
     }
     else
     {
         UnpackBtn.Enabled = false;
     }
 }
Пример #29
0
        private void BtnScarnProductDir_Click(object sender, EventArgs e)
        {
            FolderDialog openFolder = new FolderDialog();

            if (openFolder.DisplayDialog() == DialogResult.OK)
            {
                textBox_ProductDir.Text = openFolder.Path.ToString();
                ParamSetMgr.GetInstance().CurrentWorkDir = textBox_ProductDir.Text;
                ConfigToolMgr.GetInstance().SaveProductDir();
            }
            else
            {
                textBox_ProductDir.Text = "你没有选择目录";
            }
        }
Пример #30
0
 private void BTN_Engine_Click(object sender, EventArgs e)
 {
     if (DialogResult.OK == FolderDialog.ShowDialog())
     {
         TB_Engine.Text = FolderDialog.SelectedPath;
         if (TB_Cache.Text.Length == 0)
         {
             string TmpPath = Path.Combine(TB_Engine.Text, @".git\ue4-gitdeps");
             if (Directory.Exists(TmpPath))
             {
                 TB_Cache.Text = TmpPath;
             }
         }
     }
 }
Пример #31
0
        public void ImportByCat()
        {
            var dialog = new FolderDialog();

            dialog.Owner       = _Main;
            dialog.Multiselect = true;
            if (dialog.ShowDialog() != true)
            {
                return;
            }

            var file = dialog.FileName;

            ImportCat(_CurrCat, file);
        }
Пример #32
0
 private void btnBrowseFolder_Click(object sender, RoutedEventArgs e)
 {
     FolderDialog dlg = new FolderDialog();
     dlg.ShowDialog();
 }
 private void on_browseOutputFile_clicked(object o, EventArgs e)
 {
     FolderDialog folderDialog = new FolderDialog("Select folder to write code to");
     if (folderDialog.Run() == (int)Gtk.ResponseType.Ok) {
         outputDirectoryEntry.Text = folderDialog.CurrentFolder;
     }
     folderDialog.Destroy();
 }
Пример #34
0
 private void on_addSharedFolderButton_clicked(object o, EventArgs args)
 {
     FolderDialog selectFolderDialog = new FolderDialog ("Select Folder");
     selectFolderDialog.TransientFor = dialog;
     if (selectFolderDialog.Run() == (int)ResponseType.Ok) {
         sharedFoldersListStore.AppendValues(new object[] { selectFolderDialog.CurrentFolder });
     }
     selectFolderDialog.Destroy();
 }