Exemplo n.º 1
0
        public async void ActivateWP(WorkPlaceViewModelBase givenWindow)
        {
            if (WorkPlaceList.Any(x => x.DisplayName.Equals(givenWindow.DisplayName)))
            {
                WorkPlaceViewModelBase configPanel = WorkPlaceList.First(x => x.DisplayName == givenWindow.DisplayName);
                CurrWorkPlace = configPanel;
                return;
            }
            await givenWindow.StartUp();

            WorkPlaceList.Add(givenWindow);
            CurrWorkPlace = givenWindow;
        }
Exemplo n.º 2
0
        internal void CloseWorkPlace(WorkPlaceViewModelBase workPlaceViewModelBase)
        {
            if (!WorkPlaceList.Contains(workPlaceViewModelBase))
            {
                return;
            }
            bool hasChanges = workPlaceViewModelBase.HasChanges();

            if (hasChanges)
            {
                WorkPlaceList.Remove(workPlaceViewModelBase);
            }
            else
            {
                WorkPlaceList.Remove(workPlaceViewModelBase);
            }
        }