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();
        }
Example #2
0
 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();
 }
Example #3
0
        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();
        }
Example #4
0
 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();
     }
 }
Example #5
0
 public HashSet <AssemblyDeclaration> GetAssemblies()
 {
     return(MacroEngine.GetAssemblies());
 }
Example #6
0
 public HashSet <FileDeclaration> GetFileDeclarations()
 {
     return(MacroEngine.GetFileDeclarations());
 }
Example #7
0
 public async Task <bool> TryExecuteFile(FileDeclaration d, bool async, string runtime = "")
 {
     return(await MacroEngine.TryExecuteFile(d, async, runtime));
 }
Example #8
0
 public void RemoveExecutionValue(string name)
 {
     MacroEngine.RemoveExecutionValue(name);
 }
Example #9
0
 public void SetExecutionValue(string name, object value)
 {
     MacroEngine.SetExecutionValue(name, value);
 }
Example #10
0
 public async Task <bool> DeleteFolder(DirectoryInfo info)
 {
     return(await MacroEngine.DeleteFolder(info));
 }
Example #11
0
 public HashSet <FileDeclaration> RenameFolder(DirectoryInfo info, string newDir)
 {
     return(MacroEngine.RenameFolder(info, newDir));
 }
Example #12
0
 public void RemoveAssembly(AssemblyDeclaration declaration)
 {
     MacroEngine.RemoveAssembly(declaration);
 }
Example #13
0
 public HashSet <string> GetRuntimes(string language = "")
 {
     return(MacroEngine.GetRuntimes(language));
 }
Example #14
0
 public string GetDefaultRuntime(FileDeclaration d)
 {
     return(MacroEngine.GetDefaultRuntime(d));
 }
Example #15
0
 public string GetDefaultFileExtension()
 {
     return(MacroEngine.GetDefaultFileExtension());
 }
Example #16
0
 public FileDeclaration GetDeclarationFromFullname(string fullname)
 {
     return(MacroEngine.GetDeclarationFromFullname(fullname));
 }
Example #17
0
 public void RenameFile(FileDeclaration d, string newName)
 {
     MacroEngine.RenameFile(d, newName);
 }
Example #18
0
 public void RemoveFile(FileDeclaration d)
 {
     MacroEngine.RemoveFile(d);
 }
Example #19
0
 public void AddFile(FileDeclaration d)
 {
     MacroEngine.AddFile(d);
 }
Example #20
0
 public void AddAssembly(AssemblyDeclaration declaration)
 {
     MacroEngine.AddAssembly(declaration);
 }
Example #21
0
        public override string Evaluate(Context context)
        {
            string path = ParseUtilites.GetPathForIncludeParse(FilePath);

            return(MacroEngine.Merge(path, new Context()));
        }