private void RefreshFiles() { List_Macros.Items.Clear(); if (Directory.Exists(MacroFiles.MacrosDir)) { string[] files = Directory.GetFiles(MacroFiles.MacrosDir, "*" + MacroFiles.MacrosExt); for (int i = 0; i < files.Length; i++) { List_Macros.Items.Add(Path.GetFileNameWithoutExtension(files[i])); } } Macros = MacroFiles.Load(); }
static void Main(string[] args) { if (args.Length > 0) { Macro macro = MacroFiles.LoadMacroFile(System.IO.File.ReadAllLines(args[0])); if (macro != null) { macro.Run(); } } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new FormMain()); } }