Beispiel #1
0
        /// <summary>
        /// 菜单事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menu = sender as MenuItem;

            if (menu != null)
            {
                string param = menu.CommandParameter.ToString();
                switch (param)
                {
                case "exit":
                {
                    BackgroundWindow.ExitApp();
                    break;
                }

                case "config":
                {
                    break;
                }

                case "help":
                {
                    System.Diagnostics.Process.Start("http://www.baidu.com");
                    break;
                }

                case "feedback":
                {
                    System.Diagnostics.Process.Start("http://www.baidu.com");
                    break;
                }

                case "update":
                {
                    System.Diagnostics.Process.Start("http://www.baidu.com");
                    break;
                }
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// 退出
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     BackgroundWindow.ExitApp();
 }