public void OpenEditWindow(ObjInfo item)
        {
            WinAddObjBase win = null;

            switch (item.Type)
            {
            case ObjType.Text:
                win = new WinAddTextObj(item, "请输入含通配符的内容");
                break;

            case ObjType.PlainText:
                win = new WinAddTextObj(item, "请输入内容");
                break;

            case ObjType.Bar:
                win = new WinAddBarObj(item);
                break;

            case ObjType.Pie:
                win = new WinAddBarObj(item);
                break;
            }
            win.Owner = App.Instance.SingleObject;

            win.ShowDialog();

            if (win?.DialogResult == true)
            {
                App.Instance.Manager.RefreshWindow(item);
                CollectionViewSource.GetDefaultView(Config.Instance.Objs).Refresh();//刷新列表
            }
        }
        public void OpenEditWindow(ObjType type)
        {
            WinAddObjBase win  = null;
            ObjInfo       item = new ObjInfo();

            switch (type)
            {
            case ObjType.Text:
                win = new WinAddTextObj(item, "请输入含通配符的内容");
                break;

            case ObjType.PlainText:
                win = new WinAddTextObj(item, "请输入内容");
                break;

            case ObjType.Bar:
                win = new WinAddBarObj(item);
                break;

            case ObjType.Pie:
                win = new WinAddBarObj(item);
                break;
            }
            win.Owner = App.Instance.SingleObject;
            win.ShowDialog();

            if (win?.DialogResult == true)
            {
                AddItemToList(type, item);
                App.Instance.Manager.AddWindow(item, false);
            }
        }