Skip to content

Commit

Permalink
Add Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinerising committed Oct 8, 2022
1 parent bb5d4b6 commit 9c64e1d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion ComTransfer/View/TaskWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
namespace ComTransfer
{
/// <summary>
/// ConfigWindow.xaml 的交互逻辑
/// 计划任务修改窗口
/// </summary>
public partial class TaskWindow : Window
{
/// <summary>
/// 计划任务对象列表
/// </summary>
public ObservableCollection<TaskNode> TaskList { get; set; }
/// <summary>
/// 构建函数
/// </summary>
/// <param name="window">父窗口对象</param>
public TaskWindow(Window window)
{
Owner = window;
Expand All @@ -23,6 +30,11 @@ public TaskWindow(Window window)
InitializeComponent();
}

/// <summary>
/// 窗口关闭事件
/// </summary>
/// <param name="sender">事件对象</param>
/// <param name="e">事件参数</param>
private void Window_Closing(object sender, CancelEventArgs e)
{
FocusManager.SetFocusedElement(this, this);
Expand All @@ -31,11 +43,21 @@ private void Window_Closing(object sender, CancelEventArgs e)
TaskManager.SaveFailFileData(TaskManager.Instance.FailFileList);
}

/// <summary>
/// 添加按钮点击事件
/// </summary>
/// <param name="sender">事件对象</param>
/// <param name="e">事件参数</param>
private void Button_Add_Click(object sender, RoutedEventArgs e)
{
TaskList.Add(new TaskNode());
}

/// <summary>
/// 删除按钮点击事件
/// </summary>
/// <param name="sender">事件对象</param>
/// <param name="e">事件参数</param>
private void Button_Delete_Click(object sender, RoutedEventArgs e)
{
TaskList.Remove(ListBox_Task.SelectedItem as TaskNode);
Expand Down

0 comments on commit 9c64e1d

Please sign in to comment.