Ejemplo n.º 1
0
        public virtual void Execute(object parameter)
        {
            IntPtr cursor = IntPtr.Zero;

            try
            {
                cursor = System32.GetCursor();
                IntPtr    handle = System32.LoadCursor(new HandleRef(), 0x7f02);
                HandleRef inst   = new HandleRef(parameter, handle);
                System32.SetCursor(inst);
                if (_execute == null)
                {
                    throw new Exception("Execute action is null");
                }
                _execute(parameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                System32.SetCursor(new HandleRef(parameter, cursor));
            }
        }
Ejemplo n.º 2
0
        public void Execute(object parameter)
        {
            IntPtr cursor = IntPtr.Zero;

            try
            {
                cursor = System32.GetCursor();
                IntPtr    handle = System32.LoadCursor(new HandleRef(), 0x7f02);
                HandleRef inst   = new HandleRef(parameter, handle);
                System32.SetCursor(inst);
                _execute(parameter);
            }
            catch (Exception)
            {
                //Logger.Log("RelayCommand.Execute: Unhandled exception found executing command", TraceEventType.Error, ex);
                throw;
            }
            finally
            {
                System32.SetCursor(new HandleRef(parameter, cursor));
            }
        }