protected override void OnInitialized()
 {
     GlobalEventService.KeyUpEvent += GlobalEventService_KeyUpEvent;
     if (ShortcutKey.HasValue)
     {
         GlobalEventService.RegisterShortcutKey(ShortcutKey);
     }
 }
        //private async void GlobalEventService_KeyDownEvent(object sender, KeyboardInfo e)
        //{
        //	if (ShortcutKey.HasValue && ShortcutKey.IsMatch(e.Key, e.AltKey, e.CtrlKey, e.ShiftKey))
        //	{
        //		await InvokeAsync(async () => await Click.InvokeAsync(new MouseEventArgs()).ConfigureAwait(true)).ConfigureAwait(true);
        //	}
        //}

        public void Dispose()
        {
            if (ShortcutKey.HasValue)
            {
                GlobalEventService.UnregisterShortcutKey(ShortcutKey);
            }
            GlobalEventService.KeyUpEvent -= GlobalEventService_KeyUpEvent;
        }
Пример #3
0
 public void Dispose()
 {
     foreach (var item in Items)
     {
         if (item.ShortcutKey.HasValue)
         {
             GlobalEventService.UnregisterShortcutKey(item.ShortcutKey);
         }
     }
     GlobalEventService.KeyUpEvent -= GlobalEventService_KeyUpEvent;
 }
Пример #4
0
 protected override void OnInitialized()
 {
     GlobalEventService.KeyUpEvent += GlobalEventService_KeyUpEvent;
     foreach (var item in Items)
     {
         if (item.ShortcutKey.HasValue)
         {
             GlobalEventService.RegisterShortcutKey(item.ShortcutKey);
         }
     }
 }
Пример #5
0
 public TasksController()
 {
     if (Events == null) { Events = new GlobalEventService(); }
     if (Types == null) { Types = new TypeService(); }
     base.Initialize(new System.Web.Routing.RequestContext());
 }
Пример #6
0
 public void OnKeyUp(KeyboardInfo keyboardInfo)
 {
     GlobalEventService?.KeyUp(keyboardInfo);
 }
Пример #7
0
 /// <summary>
 /// Constructeur principal
 /// </summary>
 public DatabaseGlobalEvents()
 {
     InitializeComponent();
     _Service = new GlobalEventService();
     ListGlobalEvents.Title = Culture.Language.DatabaseRessources.DatabaseGlobalEvents;
 }