public MainWindow()
        {
            InitializeComponent();

            #region kill Explorer

            //Start a command line stream to kill explorer.exe via hidden command line.
            System.Diagnostics.Process          process   = new System.Diagnostics.Process();
            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo {
                WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden,
                FileName    = "cmd.exe",
                Arguments   = "/C taskkill /F /IM explorer.exe"
            };
            process.StartInfo = startInfo;
            //While you could do Process.kill("explorer.exe");, windows NT systems will auto restart the explorer.
            //Using shell fixs the shell restart.
            process.Start();

            #endregion

            //Setup main view
            ControlNavigator.SetContentController(ControlNavigator.FrontPage());
            ContentController = ControlNavigator.FrontPage();
        }
Exemple #2
0
 private void Back_OnClick(object sender, RoutedEventArgs e)
 {
     ControlNavigator.SetContentController(ControlNavigator.FrontPage());
 }
 private void SystemManagement_OnClick(object sender, RoutedEventArgs e)
 {
     ControlNavigator.SetContentController(ControlNavigator.SystemManager());
 }