コード例 #1
0
        internal AllTeamsViewModel(MenuBasedShellViewModel menuBasedShellViewModel)
        {
            _menuBasedShellViewModel = menuBasedShellViewModel;

            CreateTeamItems();
            InitializeCommands();
            SubscribeToDataModelEvents();
        }
コード例 #2
0
        internal ProjectsViewModel(MenuBasedShellViewModel menuBasedShellViewModel)
        {
            _menuBasedShellViewModel = menuBasedShellViewModel;
            _menuBasedShellViewModel.PropertyChanged += MenuBasedShellViewModelPropertyChangedEventHandler;

            InitializeProjects();
            InitializeCommands();
            SubscribeToDataModelEvents();
        }
コード例 #3
0
        internal ProductBacklogViewModel(MenuBasedShellViewModel menuBasedShellViewModel)
        {
            _menuBasedShellViewModel = menuBasedShellViewModel;
            _menuBasedShellViewModel.PropertyChanged += MenuBasedShellViewModelPropertyChangedEventHandler;

            Statuses = new ObservableCollection <string>(_storyStatusesDataModel.GetAllStatuses());

            InitializeCommands();
            InitializeBacklog();
        }
コード例 #4
0
        internal AllUserTasksViewModel(MenuBasedShellViewModel menuBasedShellViewModel)
        {
            _menuBasedShellViewModel = menuBasedShellViewModel;
            InitializeFields();
            InitializeCommands();

            SetDialog += delegate(object sender, ViewModelBase dialogViewModel)
            {
                CurrentDialogViewModel = dialogViewModel;
                ShowDialog             = true;
            };

            HideDialog += delegate
            {
                ShowDialog = false;
            };

            SubscribeToDataModelEvents();
        }
コード例 #5
0
        internal SprintViewModel(MenuBasedShellViewModel menuBasedShellViewModel)
        {
            _menuBasedShellViewModel = menuBasedShellViewModel;
            _menuBasedShellViewModel.PropertyChanged += MenuBasedShellViewModelPropertyChangedEventHandler;
            InitializeCommands();
            InitializeFields();

            SetDialog += delegate(object sender, ViewModelBase dialogViewModel)
            {
                CurrentDialogViewModel = dialogViewModel;
                ShowDialog             = true;
            };

            HideDialog += delegate
            {
                ShowDialog = false;
            };

            SubscribeToDataModelEvents();
        }
コード例 #6
0
        internal LogoutViewModel(MenuBasedShellViewModel menuBasedShellViewModel)
        {
            _menuBasedShellViewModel = menuBasedShellViewModel;

            SetDialog += delegate(object sender, ViewModelBase dialogViewModel)
            {
                CurrentDialogViewModel = dialogViewModel;
                ShowDialog             = true;
            };

            HideDialog += delegate
            {
                ShowDialog = false;
            };

            ConfirmationDialogViewModel                  = new ConfirmationDialogViewModel();
            ConfirmationDialogViewModel.Text             = "Do you really want to log out?";
            ConfirmationDialogViewModel.ConfirmSelected += delegate
            {
                try
                {
                    _menuBasedShellViewModel.Logout();
                }
                catch
                {
                    if (ViewContext != null)
                    {
                        ComponentsContainer.Get <IDialogCoordinator>().ShowMessageAsync(
                            ViewContext,
                            "Log out error",
                            "Please, run applications with administrator rights and try to log out again.");
                    }
                }
            };
            ConfirmationDialogViewModel.CancelSelected += delegate
            {
                _menuBasedShellViewModel.SetCurrentViewModel(typeof(AllUserTasksViewModel));
            };

            SetDialog?.Invoke(this, ConfirmationDialogViewModel);
        }