private void Application_Startup(object sender, StartupEventArgs e) { s_Instance = this; Executor executor = null; m_Engine = MacroEngine.CreateApplicationInstance(executor); m_UI = MacroUI.CreateApplicationInstance(m_Engine); AssemblyDeclaration Interop_Assembly = new AssemblyDeclaration("Microsoft.Office.Interop.Excel", "./", true); m_UI.AddAssembly(Interop_Assembly); Excel.Application oExcelApp = GetExcel(); m_UI.SetExecutionValue("HOSTNAME", "Standalone App"); m_UI.SetExecutionValue("Excel", oExcelApp.Application); m_UI.SetExecutionValue("MISSING", Type.Missing); m_UI.AddAccent("ExcelAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/ExcelAccent.xaml")); m_UI.AddAccent("WordAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/WordAccent.xaml")); m_UI.AddAccent("PowerPointAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/PowerPointAccent.xaml")); m_UI.AddAccent("OneNoteAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/OneNoteAccent.xaml")); m_UI.AddAccent("AccessAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/AccessAccent.xaml")); m_UI.AddAccent("OutlookAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/OutlookAccent.xaml")); m_UI.AddAccent("PublisherAccent", new Uri("pack://application:,,,/Macro Editor;component/Themes/Accents/PublisherAccent.xaml")); m_UI.SetAccent("ExcelAccent"); Events.InvokeEvent("ApplicationLoaded"); MainWindow = m_UI.MainWindow; MainWindow.Show(); }
public WorldInput(WorldModel world) { // parent reference World = world; // service references _network = Service.Get <INetworkClient>(); _userInterface = Service.Get <UserInterfaceService>(); _input = Service.Get <IInputService>(); // local instances MousePick = new MousePicking(); _macros = new MacroEngine(); }
public WorldInput(WorldModel world) { // parent reference World = world; // service references m_Network = ServiceRegistry.GetService <INetworkClient>(); m_UserInterface = ServiceRegistry.GetService <UserInterfaceService>(); m_Input = ServiceRegistry.GetService <InputManager>(); // local instances MousePick = new MousePicking(); m_Macros = new MacroEngine(); }
static void Main(string[] args) { if (args.Length != 1) { Console.WriteLine("Invalid number of arguments..."); Console.ReadKey(); } else { MacroEngine.Initialize(args[0]); MacroEngine.ParsePages(); //Console.WriteLine(MacroEngine.Merge("..\\..\\MyMacro.mv", new Context())); Console.WriteLine("File Parsing Completed...Press any key to continue.."); Console.ReadKey(); } }
public HashSet <AssemblyDeclaration> GetAssemblies() { return(MacroEngine.GetAssemblies()); }
public HashSet <FileDeclaration> GetFileDeclarations() { return(MacroEngine.GetFileDeclarations()); }
public async Task <bool> TryExecuteFile(FileDeclaration d, bool async, string runtime = "") { return(await MacroEngine.TryExecuteFile(d, async, runtime)); }
public void RemoveExecutionValue(string name) { MacroEngine.RemoveExecutionValue(name); }
public void SetExecutionValue(string name, object value) { MacroEngine.SetExecutionValue(name, value); }
public async Task <bool> DeleteFolder(DirectoryInfo info) { return(await MacroEngine.DeleteFolder(info)); }
public HashSet <FileDeclaration> RenameFolder(DirectoryInfo info, string newDir) { return(MacroEngine.RenameFolder(info, newDir)); }
public void RemoveAssembly(AssemblyDeclaration declaration) { MacroEngine.RemoveAssembly(declaration); }
public HashSet <string> GetRuntimes(string language = "") { return(MacroEngine.GetRuntimes(language)); }
public string GetDefaultRuntime(FileDeclaration d) { return(MacroEngine.GetDefaultRuntime(d)); }
public string GetDefaultFileExtension() { return(MacroEngine.GetDefaultFileExtension()); }
public FileDeclaration GetDeclarationFromFullname(string fullname) { return(MacroEngine.GetDeclarationFromFullname(fullname)); }
public void RenameFile(FileDeclaration d, string newName) { MacroEngine.RenameFile(d, newName); }
public void RemoveFile(FileDeclaration d) { MacroEngine.RemoveFile(d); }
public void AddFile(FileDeclaration d) { MacroEngine.AddFile(d); }
public void AddAssembly(AssemblyDeclaration declaration) { MacroEngine.AddAssembly(declaration); }
public override string Evaluate(Context context) { string path = ParseUtilites.GetPathForIncludeParse(FilePath); return(MacroEngine.Merge(path, new Context())); }