private void ShowFunctionButton() { if (!ModuleControl.isDevelopMode) { if (GUILayout.Button("Apply", GUILayout.Width(200))) { ModuleControl.ApplySymbol(isImportDict); inited = false; } if (GUILayout.Button("Refresh Backup", GUILayout.Width(200))) { ModuleControl.RefreshBackUp(); inited = false; } if (GUILayout.Button("Remove ResetCore", GUILayout.Width(200))) { ModuleControl.RemoveResetCore(); inited = false; } } }
private static void Init() { if (inited) { return; } isImportDict = new Dictionary <MODULE_SYMBOL, bool>(); Array versionSymbols = Enum.GetValues(typeof(MODULE_SYMBOL)); foreach (MODULE_SYMBOL symbol in versionSymbols) { if (!ModuleControl.isDevelopMode) { isImportDict.Add(symbol, ModuleControl.ContainSymbol(symbol)); } else { isImportDict.Add(symbol, true); } } inited = true; }
//刷新备份文件夹 public static void RefreshBackUp() { ModuleControl.CheckAllSymbol(); Array symbolArr = Enum.GetValues(typeof(MODULE_SYMBOL)); foreach (MODULE_SYMBOL symbol in symbolArr) { string modulePath = ModuleConst.GetSymbolPath(symbol); string moduleTempPath = ModuleConst.GetSymbolTempPath(symbol); if (!Directory.Exists(modulePath)) { return; } if (Directory.Exists(moduleTempPath)) { Directory.Delete(moduleTempPath, true); Directory.CreateDirectory(moduleTempPath); } DirectoryEx.DirectoryCopy(modulePath, moduleTempPath, true); } ModuleControl.CheckAllSymbol(); }