private void OnDeleteProcess(object sender, RoutedEventArgs e) { Tool.XControl.XButton Btn = sender as Tool.XControl.XButton; string id = Btn.Tag.ToString(); MessageBoxResult Result = NotifyMessageEx.ShowNotify(Tool.MainWindow.This, "确定要删除此进程?", "提示", MessageBoxButton.YesNo); if (Result == MessageBoxResult.No) { return; } if (!ProcessInfoCollect.GetInstance().RemoveProcess(Convert.ToInt32(id))) { NotifyMessageEx.ShowNotify(Tool.MainWindow.This, "删除失败!", "错误"); return; } if (UpdateProcessInfo() < 0) { return; } Refresh(); }
private void OnUpProcess(object sender, RoutedEventArgs e) { Tool.XControl.XButton Btn = sender as Tool.XControl.XButton; string id = Btn.Tag.ToString(); if (!ProcessInfoCollect.GetInstance().SortUPProcess(Convert.ToInt32(id))) { NotifyMessageEx.ShowNotify(Tool.MainWindow.This, "调准顺序失败!", "错误"); return; } if (UpdateProcessInfo() < 0) { return; } Refresh(); }