Exemple #1
0
        public void doOpenDialog(string filter, string callback)
        {
            ObjectCreator oc = new ObjectCreator("OpenFolderDialog");

            oc["Title"]         = "Select Export Folder";
            oc["Filters"]       = filter;
            oc["DefaultFile"]   = new ObjectCreator.StringNoQuote("$currentFile");
            oc["ChangePath"]    = false;
            oc["MustExist"]     = true;
            oc["MultipleFiles"] = false;

            OpenFolderDialog dlg = oc.Create();

            if (Util.filePath(sGlobal["$currentFile"]) != "")
            {
                dlg["DefaultPath"] = Util.filePath(sGlobal["$currentFile"]);
            }
            else
            {
                dlg["DefaultPath"] = Util.getMainDotCsDir();
            }

            if (dlg.Execute())
            {
                Util.eval(callback + "(\"" + dlg["FileName"] + "\");");
            }

            dlg.delete();
        }