//修改标签 public void EditTag_Click(TagBean bean) { TagWindow window = new TagWindow("修改标签", bean); bool? result = window.ShowDialog(); if (result == true) { TagMapper.UpdataOne(bean); RefreshAll(); } }
//新建标签 public void NewTag_Click(ListBox sender) { int plies = GetPliesByName(sender.Name); if (nodeParentId[plies] == -1) { MessageBox.Show("未选择父级标签", "提示", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } uint patentId = Convert.ToUInt32(nodeParentId[plies]); TagWindow window = new TagWindow("新建标签"); bool? result = window.ShowDialog(); if (result == true) { TagBean bean = window.DataContext as TagBean; bean.ParentId = patentId; TagMapper.AddOne(bean); RefreshAll(); } }
private void MenuTag_OnClick(object sender, RoutedEventArgs e) { var win = new TagWindow(); win.Show(); }
public void TypingCancel() { typingWindow.Close(); typingWindow = null; }
public void PopupTagRename() { if (typingWindow != null) typingWindow.Close(); GameObject gObj = new GameObject("sensorTag", typeof(TagWindow)); DontDestroyOnLoad(gObj); typingWindow = (TagWindow)gObj.GetComponent(typeof(TagWindow)); typingWindow.Invoke(this, sensorTag); }