Exemple #1
0
 private void OpenWindow(string windowTag)
 {
     if (AssemblyHelper.CreateInternalInstance($"Window.{windowTag}") is System.Windows.Window window)
     {
         window.ShowDialog();
     }
 }
Exemple #2
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            Messenger.Default.Send(true, MessageToken.FullSwitch);
            Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);
        }
Exemple #3
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo());
            Messenger.Default.Send(true, MessageToken.FullSwitch);
            Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.PracticalDemo}"), MessageToken.LoadShowContent);
        }
 private void OpenWindow(string windowTag)
 {
     if (AssemblyHelper.CreateInternalInstance($"Window.{windowTag}") is System.Windows.Window window)
     {
         window.Owner = Application.Current.MainWindow;
         window.ShowDialog();
     }
 }
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            Messenger.Default.Send <object>(null, MessageToken.ClearLeftSelected);
            Messenger.Default.Send(true, MessageToken.FullSwitch);
            Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);

            GlobalShortcut.Init(this);
        }
        protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);

            DataContext          = ViewModelLocator.Instance.Main;
            NonClientAreaContent = new NonClientAreaContent();
            ControlMain.Content  = new MainWindowContent();

            GlobalShortcut.Init(new List <KeyBinding>
            {
                new KeyBinding(ViewModelLocator.Instance.Main.GlobalShortcutInfoCmd, Key.I, ModifierKeys.Control | ModifierKeys.Alt),
                new KeyBinding(ViewModelLocator.Instance.Main.GlobalShortcutWarningCmd, Key.E, ModifierKeys.Control | ModifierKeys.Alt)
            });

            Dialog.SetToken(this, MessageToken.MainWindow);
            WindowAttach.SetIgnoreAltF4(this, true);

            Messenger.Default.Send(true, MessageToken.FullSwitch);
            Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.PracticalDemo}"), MessageToken.LoadShowContent);
        }
 private void MenuItemContributors_OnClick(object sender, RoutedEventArgs e)
 {
     Messenger.Default.Send <object>(null, MessageToken.ClearLeftSelected);
     Messenger.Default.Send(true, MessageToken.FullSwitch);
     Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.ContributorsView}"), MessageToken.LoadShowContent);
 }
 private void OpenView(string viewName)
 {
     Messenger.Default.Send <object>(null, MessageToken.ClearLeftSelected);
     Messenger.Default.Send(true, MessageToken.FullSwitch);
     Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{viewName}"), MessageToken.LoadShowContent);
 }