Example #1
0
 void RaiseEvent(ShellEvent e)
 {
     if (e != null)
     {
         e(this);
     }
 }
Example #2
0
        public static async Task SendCommand(string input)
        {
            ShellEventArgs args = new ShellEventArgs(input);

            if (ShellEvent != null)
            {
                await ShellEvent.Invoke(args);
            }

            if (!args.Handled)
            {
                await Command.ExeCommand(input);
            }
        }
Example #3
0
        async Task MainAsync()           //! Main loop
        {
            foreach (string str in args) //? Execute launch commands
            {
                await Command.ExeCommand(str);
            }

            while (true) //? Main async loop
            {
                string         input = Shell.Input();
                ShellEventArgs args  = new ShellEventArgs(input);

                if (ShellEvent != null)
                {
                    await ShellEvent.Invoke(args);
                }

                if (!args.Handled)
                {
                    await Command.ExeCommand(input);
                }
            }
        }
Example #4
0
 public ShellEventArgs(ShellEvent shellEvent, IntPtr windowHandle)
 {
     this.shellEvent   = shellEvent;
     this.windowHandle = windowHandle;
 }