Ejemplo n.º 1
0
        private TreeNode Delete(TreeViewItem it)
        {
            TreeNode deletedNode = null;
            var      node        = ReadNode(it);
            var      text        = _ctl.ReadNodeTitle(node);

            if (text.xIsNullOrEmptyOrSpace())
            {
                text = _ctl.ReadNodeTitle(node);
            }
            var message = string.Format("确定要删除 {0}:{1}?", _ctl.ControllerName(), text);

            if (WndNotTipAgain.MyShowDialog(message, "删除" + ParentWindow.GetType().Name, null, null, true))
            {
                _ctl.DbAccessor.DeleteLeaf(node);
                FocusNearest(it);
                deletedNode = node;
            }
            return(deletedNode);
        }
Ejemplo n.º 2
0
 public static bool ShowDialog(string msg, string title, string showKey, Window owner = null)
 {
     return(WndNotTipAgain.MyShowDialog(msg, title, showKey, owner, true));
 }
Ejemplo n.º 3
0
 public static void ShowNotTipAgain(string msg, string title, string showKey, Action <bool, bool> cb = null, Window owner = null, string okButtonText = null)
 {
     WndNotTipAgain.MyShow(msg, title, showKey, true, cb, owner, true, okButtonText);
 }
Ejemplo n.º 4
0
 public static void ShowNotTipAgain(string msg, string title, string showKey, Window owner = null)
 {
     WndNotTipAgain.MyShow(msg, title, showKey, false, null, owner, true);
 }
Ejemplo n.º 5
0
 private void btnRestore_Click(object sender, RoutedEventArgs e)
 {
     WndNotTipAgain.DeleteWndNotTipAgainNeedShow();
     MsgBox.ShowDialog("已恢复", null, this, null);
 }