Пример #1
0
        public static string GetScriptString(ObjectReader reader)
        {
            if (scriptDumper == null)
            {
                var openFolderDialog = new OpenFolderDialog();
                openFolderDialog.Title = "Select Assembly Folder";
                if (openFolderDialog.ShowDialog() == DialogResult.OK)
                {
                    scriptDumper = new ScriptDumper(openFolderDialog.Folder);
                }
                else
                {
                    scriptDumper = new ScriptDumper();
                }
            }

            return(scriptDumper.DumpScript(reader));
        }
Пример #2
0
 // 加载DLL
 private void 加载DLLToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (manager.assetsFileList.Count > 0)
     {
         openFolderDialog.Title = "打开DLL所在文件夹";
         if (openFolderDialog.ShowDialog(this) == DialogResult.OK)
         {
             Logger.Info("载入DLL");
             scriptDumper.Dispose();
             scriptDumper = new ScriptDumper(openFolderDialog.Folder);
             Logger.Info("载入DLL完成");
         }
     }
     else
     {
         MessageBox.Show(this, "未加载Data文件");
     }
 }
Пример #3
0
        private void 加载文件夹ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            openFolderDialog.Title = "打开Data文件夹";
            if (openFolderDialog.ShowDialog(this) == DialogResult.OK)
            {
                menuStrip1.Enabled  = false;
                tabControl1.Enabled = false;
                ClearForm();
                ThreadPool.QueueUserWorkItem(delegate {
                    manager.LoadFolder(openFolderDialog.Folder);
                    if (Directory.Exists(openFolderDialog.Folder + "\\Manager"))
                    {
                        scriptDumper = new ScriptDumper(openFolderDialog.Folder + "\\Manager");
                    }
                    else
                    {
                        scriptDumper = new ScriptDumper();
                    }

                    Invoke(new Action(delegate { AfterLoad(); }));
                });
            }
        }