/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddClicked(object sender, EventArgs e) { using (AddTagForm form = new AddTagForm()) { if (form.ShowDialog(this) == DialogResult.OK) { Program.NetClient.CreateTag(form.TagName, form.TagColor, form.TagUnique, form.TagDecayTagId); Program.NetClient.RequestTagList(); } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditClicked(object sender, EventArgs e) { TagTreeNode Node = MainTreeView.SelectedNode == null ? null : MainTreeView.SelectedNode.Tag as TagTreeNode; if (Node == null) { return; } using (AddTagForm form = new AddTagForm()) { form.TagName = Node.BuildTag.Name; form.TagColor = Node.BuildTag.Color; form.TagUnique = Node.BuildTag.Unique; form.TagDecayTagId = Node.BuildTag.DecayTagId; if (form.ShowDialog(this) == DialogResult.OK) { Node.Name = form.TagName; Program.NetClient.RenameTag(Node.BuildTag.Id, form.TagName, form.TagColor, form.TagUnique, form.TagDecayTagId); Program.NetClient.RequestTagList(); } } }