コード例 #1
0
 public void updateScriptInfo(ScriptInformation information)
 {
     sInfo = information;
     lblScript.Dispatcher.BeginInvoke((Action)(() => lblScript.Content = scriptString + sInfo.attribute.name));
     lblAuthor.Dispatcher.BeginInvoke((Action)(() => lblAuthor.Content = authorString + sInfo.attribute.author));
     lblDesc.Dispatcher.BeginInvoke((Action)(() => lblDesc.Content = descString + sInfo.attribute.description));
 }
コード例 #2
0
        /*private String assemblyName;
        private Type mainScript;
        private Type apiType;
        private ScriptAttributes attribute;
        private Assembly assembly;*/
        public ScriptController(MacroMain mainController)
        {
            main = mainController;

            sInfo = new ScriptInformation();
            sInfo.run = false;

            stopHotkey = new Hotkey_WPF(System.Windows.Forms.Keys.Q, false, true, false, false);
            stopHotkey.Pressed += (object sender, System.ComponentModel.HandledEventArgs e) => setScript(null);
            //stopHotkey.Register(main.window);
        }
コード例 #3
0
        public void setScript(String pathToAssembly)
        {
            Console.WriteLine("Stopping current script...");
            sInfo.run = false;

            if (pathToAssembly != null) {
                Console.WriteLine("Setting up new script...");
                sInfo = new ScriptInformation();
                sInfo.assemblyPath = pathToAssembly;
                sInfo.assembly = Assembly.LoadFrom(sInfo.assemblyPath);

                Thread threadSearch = new Thread(new ThreadStart(Search));
                threadSearch.Start();
            } else {
                main.window.Dispatcher.BeginInvoke((Action)(() => Hooking.Manager.stopLLInput()));
            }
        }