示例#1
0
        private void Button_Del_Click(object sender, RoutedEventArgs e)
        {
            var tag = (sender as Button).DataContext as TbHideWinEntry;

            TbHideWin.Del(tag);
            refreshGrid();
        }
示例#2
0
 public MainWindow()
 {
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     InitializeComponent();
     mListHotkey  = TbHotkey.GetAll();
     mListHideWin = TbHideWin.GetAll();
 }
示例#3
0
 internal void Show(IWindowEntry win, Action onHideWinUpdate)
 {
     Show();
     if (MessageBox.Show(String.Format("确定隐藏 \n程序名:{0}\n标题:{1} \n    窗口吗?", win.ProcessName, win.Title), "隐藏窗口", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
     {
         TbHideWin.Add(win);
         onHideWinUpdate();
         Close();
     }
 }
示例#4
0
 private void refreshGrid()
 {
     mList = TbHideWin.GetAll();
     dataGrid1.ItemsSource = mList;
 }
示例#5
0
 private void OnHideWinUpdate()
 {
     mListHideWin = TbHideWin.GetAll();
 }