Example #1
0
 private void LfgMessage_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     FocusManager.UndoUnfocusable(WindowManager.LfgListWindow.Handle);
     ((TextBox)sender).Focus();
     Keyboard.Focus((TextBox)sender);
     WindowManager.LfgListWindow.Activate();
 }
Example #2
0
        private void LfgMessage_OnTbLoaded(object sender, RoutedEventArgs e)
        {
            FocusManager.UndoUnfocusable(WindowManager.LfgListWindow.Handle);
            WindowManager.LfgListWindow.Activate();

            ((TextBox)sender).Focus();
            Keyboard.Focus((TextBox)sender);
        }
Example #3
0
        private void LfgMessage_OnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key != Key.Enter)
            {
                return;
            }

            var lfg    = (Listing)((FrameworkElement)sender).DataContext;
            var msg    = lfg.Message;
            var isRaid = lfg.IsRaid;

            if (lfg.Temp)
            {
                WindowManager.ViewModels.LfgVM.Listings.Remove(lfg);
            }

            StubInterface.Instance.StubClient.RegisterListing(msg, isRaid);
            Keyboard.ClearFocus();
            FocusManager.MakeUnfocusable(WindowManager.LfgListWindow.Handle);

            Task.Delay(200).ContinueWith(_ => StubInterface.Instance.StubClient.RequestListings(App.Settings.LfgWindowSettings.MinLevel, App.Settings.LfgWindowSettings.MaxLevel));
        }
Example #4
0
 private void LfgMessage_OnTbLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     FocusManager.MakeUnfocusable(WindowManager.LfgListWindow.Handle);
 }
Example #5
0
 private void LfgMessage_OnGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     FocusManager.UndoUnfocusable(WindowManager.LfgListWindow.Handle);
     WindowManager.LfgListWindow.Activate();
 }