コード例 #1
0
ファイル: LevelEditor.cs プロジェクト: oguzhalil/unityscripts
    public void LoadAlpha()
    {
        string folder = browser.SelectFolder("Hello", initialPath, handle);

        Debug.Log(folder);
        initialPath = folder;
    }
コード例 #2
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            var    fbd     = new BrowseForFolder();
            var    hwnd    = new WindowInteropHelper(this).Handle;
            string docPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            string path    = fbd.SelectFolder("Select a folder containing one or more game files.", docPath, hwnd);

            if (!string.IsNullOrWhiteSpace(path))
            {
                AddDirectory(path);
            }
        }
コード例 #3
0
        private void btnAnalysisFolder_Click(object sender, EventArgs e)
        {
            BrowseForFolder bff = new BrowseForFolder();

            bff.Filters.Add("zip");
            bff.Filters.Add("trc");
            bff.Filters.Add("blg");
            bff.Filters.Add("mdf");
            bff.Filters.Add("ini");
            bff.Filters.Add("etl");
            bff.Filters.Add("evtx");
            bff.Filters.Add("mdmp");
            string strPath = Environment.CurrentDirectory as string;

            strPath = bff.SelectFolder("Choose an SSASDiag folder or zip file for analysis of all its components.\r\nOR\r\n"
                                       + "AS profiler trace file or db, PerfMon log, crash dump, network trace, or config file.", txtFolderZipForAnalysis.Text == "" ? strPath : txtFolderZipForAnalysis.Text, Handle);
            if (strPath != null && strPath != "")
            {
                txtFolderZipForAnalysis.Text = m_analysisPath = strPath;
                LogFeatureUse("Analysis File Opened", strPath.Substring(strPath.LastIndexOf("\\") + 1));
                PopulateAnalysisTabs();
            }
            AnalysisMessagePumpTimer.Interval = 1000;
        }
コード例 #4
0
 public static string OpenFolderDialog(string initPath, string dialogTitle = "选择文件夹")
 {
     return(BrowseForFolder.SelectFolder(dialogTitle, initPath, IntPtr.Zero));
 }