示例#1
0
        public void Initialize(IMubox mubox, string extensionDllPath)
        {
            if (_extension != null)
            {
                return;
            }
            var inner = default(Exception);

            try
            {
                var name = Path.GetFileNameWithoutExtension(extensionDllPath);
                LoadExtensionDLL(extensionDllPath);
                if (CreateExtensionInstance())
                {
                    InitializeDispatchRuntime(mubox, name);
                    return;
                }
                //mubox.AddServiceProvider(this); // TODO: need to attempt to remove this when loader is unloading
            }
            catch (Exception ex)
            {
                ex.Log();
                inner = ex;
            }
            throw new Exception("No extension found or other error occured, check Inner Exception property.", inner);
        }
示例#2
0
 public void Initialize(IMubox mubox, string extensionDllPath)
 {
     if (_extension != null)
     {
         return;
     }
     var inner = default(Exception);
     try
     {
         var name = Path.GetFileNameWithoutExtension(extensionDllPath);
         LoadExtensionDLL(extensionDllPath);
         if (CreateExtensionInstance())
         {
             InitializeDispatchRuntime(mubox, name);
             return;
         }
         //mubox.AddServiceProvider(this); // TODO: need to attempt to remove this when loader is unloading
     }
     catch (Exception ex)
     {
         ex.Log();
         inner = ex;
     }
     throw new Exception("No extension found or other error occured, check Inner Exception property.", inner);
 }
示例#3
0
 private void InitializeDispatchRuntime(IMubox mubox, string name)
 {
     _dispatchQueue  = new ConcurrentQueue <dynamic>();
     _exitYet        = new ManualResetEvent(false);
     _shutdownYet    = new ManualResetEvent(false);
     _dispatchThread = new Thread(DispatchThreadMain);
     _dispatchThread.IsBackground = true;
     _dispatchThread.Name         = name;
     _dispatchThread.Start(mubox);
 }
示例#4
0
        public void OnLoad(IMubox mubox)
        {
            "AntiAfk::OnLoad".Log();
            _mubox = mubox;
            (_mubox as MarshalByRefObject).GetLifetimeService();

            _onActiveClientChanged      = new ProxyEventHandler <ClientEventArgs>(_mubox_ActiveClientChanged);
            _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy;

            _onKeyboardInputReceived       = new ProxyEventHandler <Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived);
            _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy;

            _onMouseInputReceived       = new ProxyEventHandler <Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived);
            _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy;

            _exitYet = false;

            Show();
        }
示例#5
0
        public void OnLoad(IMubox mubox)
        {
            "AntiAfk::OnLoad".Log();
            _mubox = mubox;
            (_mubox as MarshalByRefObject).GetLifetimeService();

            _onActiveClientChanged = new ProxyEventHandler<ClientEventArgs>(_mubox_ActiveClientChanged);
            _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy;

            _onKeyboardInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived);
            _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy;

            _onMouseInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived);
            _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy;

            _exitYet = false;

            Show();
        }
示例#6
0
        public void OnLoad(IMubox mubox)
        {
            "Console::OnLoad".Log();
            _mubox = mubox;

            _onActiveClientChanged      = new ProxyEventHandler <ClientEventArgs>(_mubox_ActiveClientChanged);
            _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy;

            _onKeyboardInputReceived       = new ProxyEventHandler <Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived);
            _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy;

            _onMouseInputReceived       = new ProxyEventHandler <Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived);
            _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy;

            _exitYet = false;

            //_mubox.AddServiceProvider(this);

            Show();
        }
示例#7
0
        public void OnLoad(IMubox mubox)
        {
            "Console::OnLoad".Log();
            _mubox = mubox;

            _onActiveClientChanged = new ProxyEventHandler<ClientEventArgs>(_mubox_ActiveClientChanged);
            _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy;

            _onKeyboardInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived);
            _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy;

            _onMouseInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived);
            _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy;

            _exitYet = false;

            //_mubox.AddServiceProvider(this);

            Show();
        }
示例#8
0
 private void InitializeDispatchRuntime(IMubox mubox, string name)
 {
     _dispatchQueue = new ConcurrentQueue<dynamic>();
     _exitYet = new ManualResetEvent(false);
     _shutdownYet = new ManualResetEvent(false);
     _dispatchThread = new Thread(DispatchThreadMain);
     _dispatchThread.IsBackground = true;
     _dispatchThread.Name = name;
     _dispatchThread.Start(mubox);
 }