示例#1
0
 private static void OnTrayDoubleClick()
 {
     if (System.Windows.Application.Current.Windows.Count == 1 && System.Windows.Application.Current.Windows[0] is KeepAliveWindow)
     {
         DDnsSharpHelpers.ShowFromTray();
     }
     else
     {
         DDnsSharpHelpers.HideOnTray();
     }
 }
 private void DDNSMonitorWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!isClosingBySystem)
     {
         var result = MessageBox.Show("您确定要关闭DDnsSharp吗?", "提示", MessageBoxButton.YesNo);
         if (result == MessageBoxResult.No)
         {
             e.Cancel = true;
         }
         else
         {
             DDnsSharpHelpers.ExitApp();
         }
     }
 }
 private void btn_hide_Click(object sender, RoutedEventArgs e)
 {
     DDnsSharpHelpers.HideOnTray();
 }