コード例 #1
0
 public LoginPageViewModel()
 {
     Login = new RelayCommand((param) => LoginBody(param as string[]));
     accountService = new AccountClient();
     accountService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(OnEndLogin);
     accountService.RegisterCompleted += new EventHandler<RegisterCompletedEventArgs>(OnEndRegister);
     _error = 0;
     _logued = false;
 }
コード例 #2
0
        public UserManagementViewModel()
        {
            _accountService.RegisterCompleted += new EventHandler<RegisterCompletedEventArgs>(_accountService_RegisterCompleted);
            _accountService.DeleteCompleted += new EventHandler<DeleteCompletedEventArgs>(_accountService_DeleteCompleted);
            _accountService.UpdateCompleted += new EventHandler<UpdateCompletedEventArgs>(_accountService_UpdateCompleted);
            _accountService.UserListCompleted += new EventHandler<UserListCompletedEventArgs>(_accountService_UserListCompleted);

            CreateUser = new RelayCommand((param) => CreateUserBody());
            DeleteUser = new RelayCommand((param) => DeleteUserBody(param as User));
            UpdateUser = new RelayCommand((param) => UpdateUserBody(param as User));
            RefresUsers = new RelayCommand((param) => RefresUsersBody());
            NewUser = new User();
            Users = new ObservableCollection<User>();
        }
コード例 #3
0
        public FolderDefinition(string name)
        {
            Name = name;
            UploadFiles = new RelayCommand((param) => UploadFilesBody());
            UpdateFileList = new RelayCommand((param) => UpdateFileListBody());
            DownloadFile = new RelayCommand((param) => DownloadFileBody(param as string));
            RefreshUserList = new RelayCommand((param) => RefreshUserListBody());
            AddSharing = new RelayCommand((param) => AddSharingBody(param as ServiceReference.User));
            GetReceiver = new RelayCommand((param) => GetReceiverBody());
            DeleteSharing = new RelayCommand((param) => DeleteSharingBody(param as SharingDefinition));

            folderManagerService.FileListCompleted += new EventHandler<FileListCompletedEventArgs>(folderManagerService_FileListCompleted);
            folderManagerService.GetFileFromCompleted +=new EventHandler<GetFileFromCompletedEventArgs>(folderManagerService_GetFileFromCompleted);
            folderManagerService.AddSharingCompleted += new EventHandler<AddSharingCompletedEventArgs>(folderManagerService_AddSharingCompleted);
            accountService.UserListCompleted += new EventHandler<ServiceReference.UserListCompletedEventArgs>(accountService_UserListCompleted);
            folderManagerService.GetReceiverCompleted += new EventHandler<GetReceiverCompletedEventArgs>(folderManagerService_GetReceiverCompleted);
            folderManagerService.DeleteSharingCompleted += new EventHandler<DeleteSharingCompletedEventArgs>(folderManagerService_DeleteSharingCompleted);
            Files = new ObservableCollection<FileDefinition>();
            Locator.Folders.Add(this);
        }
コード例 #4
0
 public FolderViewModel()
 {
     Folders = new ObservableCollection<KeyValuePair<string, ObservableCollection<FolderDefinition>>>();
     UpdateDirList = new RelayCommand((param) => UpdateDirListBody());
     CreateDirectory = new RelayCommand((param) => CreateDirectoryBody(param as string));
     DeleteDirectory = new RelayCommand((param) => DeleteDirectoryBody(param as FolderDefinition));
     _folderManagerService.DirListCompleted += new EventHandler<DirListCompletedEventArgs>(_folderManagerService_DirListCompleted);
     _folderManagerService.CreateCompleted += new EventHandler<CreateCompletedEventArgs>(_folderManagerService_CreateCompleted);
     _folderManagerService.DeleteCompleted += new EventHandler<DeleteCompletedEventArgs>(_folderManagerService_DeleteCompleted);
     _folderManagerService.GetSharingCompleted += new EventHandler<GetSharingCompletedEventArgs>(_folderManagerService_GetSharingCompleted);
 }
コード例 #5
0
 public EditProfileViewModel()
 {
     UpdateUser = new RelayCommand((param) => UpdateUserBody());
     _accountService.UpdateCompleted += new EventHandler<UpdateCompletedEventArgs>(_accountService_UpdateCompleted);
     VMLocator.LoginPageViewModel.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(LoginPageViewModel_PropertyChanged);
 }
コード例 #6
0
 public DashboardModel()
 {
     OpenProfileWindow = new RelayCommand((param) => this.OpenProfileWindowBody());
     Locator = new ViewModelLocator();
     Locator.LoginPageViewModel.PropertyChanged += new PropertyChangedEventHandler(LoginPageViewModel_PropertyChanged);
 }