Пример #1
0
        public BoardViewModel(LoadingViewModel loading, NavigationServiceInternal navigationService,
                              Repo repository, LoginResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
            : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
        {
            Messenger.Default.Register <IViewModelsState>(this, param =>
            {
                if (LastDisabled != null && LastDisabled != param)
                {
                    LastDisabled.ChangeLastState();
                }
                LastDisabled = param;
                LastDisabled = param;
            });

            Messenger.Default.Register <ObservableCollection <ColumnViewModel> >
                (this, param => BoardLists = param);

            Messenger.Default.Register <MyProject>
                (this, param => CurrentProject = param);

            Messenger.Default.Register <string>(this, param =>
                                                ImageSource = "/Images/expand.png");

            Messenger.Default.Register <bool>(this, param => BackgroundColorStart = param);

            AddAnotherListButton = true;
            ImageSource          = "/Images/expand.png";

            BackgroundColor      = false;
            BackgroundColorStart = false;
        }
 public NotificationsViewModel(LoadingViewModel loading, NavigationService navigationService,
                               Repo repository, LoginResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
     : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
 {
     Messenger.Default.Register <ObservableCollection <Notification> >(this,
                                                                       param => Notifications = param);
 }
Пример #3
0
 public EmailEnterViewModel(LoadingViewModel loading, NavigationService navigationService,
                            Repo repository, LoginResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
     : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
 {
 }
Пример #4
0
        public ProjectsListViewModel(LoadingViewModel loadingViewModel,
                                     NavigationServiceInternal InternalNavigationService, Repo repository,
                                     LoginResponseHandler responseHandler, BoardViewModel boardViewModel, MessageBoxViewModel messageBoxViewModel)
            : base(loadingViewModel, InternalNavigationService, repository, responseHandler, messageBoxViewModel)
        {
            #region MockData
            var projectsFromDataBase = new ObservableCollection <Project>()
            {
                new Project {
                    Name = "Some project", BoardLists = new List <BoardList>()
                    {
                        new BoardList()
                        {
                            Name = "ToDo", Cards = new List <Card>()
                            {
                                new Card()
                                {
                                    Name = "Create database"
                                },
                                new Card()
                                {
                                    Name = "adasdasd"
                                },
                                new Card()
                                {
                                    Name = "asdasdasdasdasdasd database"
                                },
                                new Card()
                                {
                                    Name = "Creaasdasdasd asd asd asd asdasdasd asdasdas te database"
                                },
                            }
                        },
                        new BoardList()
                        {
                            Name = "Doing", Cards = new List <Card>()
                            {
                                new Card()
                                {
                                    Name = "adasdasd"
                                },
                                new Card()
                                {
                                    Name = "asdasd asdasad sdasadasdas dasd aadasdas"
                                },
                                new Card()
                                {
                                    Name = "Creaasdasdasd asd asd asd asda"
                                },
                            }
                        },
                        new BoardList()
                        {
                            Name = "Done", Cards = new List <Card>()
                        }
                    },
                    Notifications = new List <Notification>()
                    {
                        new Notification()
                        {
                            Name = "sgfsd"
                        },
                        new Notification()
                        {
                            Name = "sdssdfs dfsdfsdf"
                        },
                    }
                },
                new Project {
                    Name = "Another", BoardLists = new List <BoardList>()
                    {
                        new BoardList()
                        {
                            Name = "ToDo", Cards = new List <Card>()
                            {
                                new Card()
                                {
                                    Name = "Creadsadasdasnda sdasd  asd asd asd a sdasd asdasdasd ate database"
                                },
                                new Card()
                                {
                                    Name = "adasasd asd asd asdasddasd"
                                },
                                new Card()
                                {
                                    Name = "asdasdasdasdasdasd database"
                                },
                            }
                        },
                        new BoardList()
                        {
                            Name = "Doing", Cards = new List <Card>()
                        },
                        new BoardList()
                        {
                            Name = "Done", Cards = new List <Card>()
                        }
                    }, Notifications = new List <Notification>()
                    {
                        new Notification()
                        {
                            Name = "sgfs  ssdd"
                        },
                        new Notification()
                        {
                            Name = "sdsssd fsdf sdaaaaa aaa"
                        },
                        new Notification()
                        {
                            Name = "sds sdfs dfsdf sdf"
                        }
                    }
                },
                new Project {
                    Name = "Project", BoardLists = new List <BoardList>()
                    {
                        new BoardList()
                        {
                            Name = "ToDo", Cards = new List <Card>()
                            {
                                new Card()
                                {
                                    Name = "Creasasda sdnas d as d asd asate database"
                                },
                                new Card()
                                {
                                    Name = "adaasd as das d assdasd"
                                },
                                new Card()
                                {
                                    Name = "asdasasdasd asd asd as d asd as d asd asd as d asd asd asd as d s s s s s ssssdasdasdasdasd database"
                                },
                                new Card()
                                {
                                    Name = "Creaasdasdasd asd asd asd asdasdasd asdasdas te database"
                                },
                                new Card()
                                {
                                    Name = "Create database"
                                },
                                new Card()
                                {
                                    Name = "adasdasd"
                                },
                                new Card()
                                {
                                    Name = "asdasdasdasdasdasd database"
                                },
                                new Card()
                                {
                                    Name = "Creaasdasdasd asd asd asd asdasdasd asdasdas te database"
                                },
                            }
                        },
                        new BoardList()
                        {
                            Name = "Doing", Cards = new List <Card>()
                        },
                        new BoardList()
                        {
                            Name = "Done", Cards = new List <Card>()
                        }
                    }, Notifications = new List <Notification>()
                },
                new Project()
                {
                    Name = "sdfsdf", BoardLists = new List <BoardList>(), Notifications = new List <Notification>()
                },
                new Project()
                {
                    Name = "sdfsdf", BoardLists = new List <BoardList>(), Notifications = new List <Notification>()
                },
                new Project()
                {
                    Name = "sdfsdf", BoardLists = new List <BoardList>(), Notifications = new List <Notification>()
                },
                new Project()
                {
                    Name = "sdfsdf", BoardLists = new List <BoardList>(), Notifications = new List <Notification>()
                }
            };
            #endregion

            CurrentViewModel = boardViewModel;
            Projects         = new ObservableCollection <MyProject>();

            foreach (var item in projectsFromDataBase)
            {
                Projects.Add(Converter(item));
            }

            for (int i = 0; i < 1000; i++)
            {
                Projects
                .FirstOrDefault()
                .Notifications.Add(new Notification()
                {
                    Name = "sgfsd"
                });
            }

            SetProject(Projects.FirstOrDefault());
        }
 public RegistrationConfirmCodeViewModel(LoadingViewModel loading,
                                         NavigationService navigationService, Repo repository,
                                         LoginResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
     : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
     => Messenger.Default.Register <CodeInputForm>(this, param => Form = param);
 public ForgotPasswordViewModel(LoadingViewModel loading, NavigationService navigationService,
                                Repo repository, LoginResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
     : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
 {
     Messenger.Default.Register <ChangePasswordForm>(this, param => Form = param);
 }
Пример #7
0
 public ProjectConfigurationViewModel(LoadingViewModel loading, NavigationService navigationService,
                                      Repo repository, LoginResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
     : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
 {
     Sprints = new ObservableCollection <Sprint>()
     {
         new Sprint()
         {
             Name = "Some sprint"
         },
         new Sprint()
         {
             Name = "Other sprint"
         }
     };
     SomeUsers = new List <User>()
     {
         new User()
         {
             Name = "Zahid Abbasli"
         },
         new User()
         {
             Name = "Samir Mammadli"
         },
         new User()
         {
             Name = "Igor Zabolotin"
         },
         new User()
         {
             Name = "Ramil Aliyev"
         },
         new User()
         {
             Name = "Zakir Mammadli"
         },
         new User()
         {
             Name = "Samir Musayev"
         },
         new User()
         {
             Name = "Zaur Huseynov"
         }
     };
     Backlogs = new ObservableCollection <BackLog>();
     Users    = new ObservableCollection <User>();
     AddAnotherCardIsVisible = true;
     UserListIsVisible       = true;
 }
Пример #8
0
 public SignUpViewModel(LoadingViewModel loading, NavigationService navigationService,
                        Repo repository, SignUpResponseHandler responseHandler, MessageBoxViewModel messageBoxViewModel)
     : base(loading, navigationService, repository, responseHandler, messageBoxViewModel)
 {
 }