Exemplo n.º 1
0
        public Type ChooseClass()
        {
            var core   = new ChooseClass(GetAssemblies());
            var window = new ChooseClassDialog(core);

            if (window.ShowDialog().Value)
            {
                return(core.CurrentClass);
            }
            return(null);
        }
Exemplo n.º 2
0
        public ChooseClassDialog(ChooseClass core)
        {
            DataContext = core;
            SpecialInitializeComponent();

            uxFilter.Focus();
            uxList.MouseDoubleClick += uxList_MouseDoubleClick;
            uxOk.Click += delegate { Ok(); };

            AddHandler(Keyboard.GotKeyboardFocusEvent,
                       new KeyboardFocusChangedEventHandler(
                           (sender, e) => uxList.SetValue(IsSelectionActivePropertyKey, true)
                           ),
                       true);
        }