public Window AddWindow(ObjInfo item, bool adjust)
        {
            WinObjBase win = null;

            switch (item.Type)
            {
            case Text:
                win = new WinTextObj(item, dataManager, adjust);
                break;

            case PlainText:
                win = new WinPlainTextObj(item, adjust);
                break;

            case Bar:
                win = new WinBarObj(item, dataManager, adjust);
                break;

            case Pie:
                win = new WinCricleBarObj(item, dataManager, adjust);
                break;
            }
            if (item.Status != Enums.Status.Stoped)
            {
                win.Load();
                wins.Add(win, item);
                win.Show();
            }
            return(win);
        }
 public void RemoveWindow(ObjInfo item)
 {
     if (wins.ContainsValue(item))
     {
         WinObjBase win = wins.First(p => p.Value == item).Key;
         RemoveWindow(win);
     }
 }
        public void Adjust(ObjInfo item)
        {
            isBusy = true;
            WinObjBase win       = wins.First(p => p.Value == item).Key;
            var        adjusting = win.Adjuesting;

            RemoveWindow(win);
            AddWindow(item, !adjusting);
            isBusy = false;
        }
 public void RemoveWindow(WinObjBase win)
 {
     win.Close();
     wins.Remove(win);
 }