/// <summary> /// グループリネームボタン押下時イベント /// </summary> /// <param name="sender">イベント送信オブジェクト</param> /// <param name="e">イベント引数</param> private async void BtnReNameGroup_Click(object sender, EventArgs e) { if (this.LsvGroup.SelectedItems.Count > 0) { var selected = this.LsvGroup.SelectedItems[0].Tag as KeyInfo; if (selected != null) { var item = ResourceManager.Instance.GetGroupInfo(selected); if (!selected.Equals(TaskGroupInfo.GetRootGroup().Key) && !selected.Equals(TaskGroupInfo.GetDefaultGroup().Key)) { var win = new TaskGroupEditForm(); win.Initialize(item, false, ResourceManager.Instance.GetGroupInfo(item.ParentGroup)); var ret = await win.ShowWindow(this); this.RefleshTaskGroupIchiran(); } } } }
/// <summary> /// グループ追加ボタン押下時イベント /// </summary> /// <param name="sender">イベント送信オブジェクト</param> /// <param name="e">イベント引数</param> private async void BtnAddGroup_Click(object sender, EventArgs e) { var parent = TaskGroupInfo.GetRootGroup(); if (this.LsvGroup.SelectedItems.Count > 0) { var selected = this.LsvGroup.SelectedItems[0].Tag as KeyInfo; if (selected != null) { var item = ResourceManager.Instance.GetGroupInfo(selected); parent = item; } } var win = new TaskGroupEditForm(); win.Initialize(null, true, parent); var ret = await win.ShowWindow(this); this.RefleshTaskGroupIchiran(); }