public MainWindowViewModel() { try { LoginImageInfo = new ObservableCollection <ImageLoginTextbox>(); LoginCommand = new DelegateCommand(LoginCommandHandler, null); FetchAllLoggedinUserPages = new DelegateCommand(FetchAllLoggedinUserPagesCommandHandler, null); FbMessengerListCommand = new DelegateCommand(LeftFbMessengerListCommandHandler, null); InstaInboxCommand = new DelegateCommand(LeftInstaInboxCommandHandler, null); FbPageInboxCommand = new DelegateCommand(LeftFbPageInboxCommandHandler, null); ShowAllLeftSideData = new DelegateCommand(ShowAllLeftSideDataSelectionChangedCommandHandler); ImageProgressBarLoaded = new DelegateCommand(ImageProgressBarLoadedCommandHandler, null); CloseTabCommand = new DelegateCommand(CloseTab); NewLoginButtonLoaded = new DelegateCommand(NewLoginButtonLoadedHandler); _databaseContext = new DatabaseContext(); _onlineFetcher = new OnlineFetcher(); _onlinePoster = new OnlinePoster(); _dbHelper = new DbHelper(); btnUserLogins_Click = new DelegateCommand(AddUserLogins); AddLoginUsersViewModel.UserAdded += UserAdded; DbHelper.pagess += AddPagesIntoList; _onlineFetcher.LoginSuccessEvent += _onlineFetcher_LoginSuccessEvent; Task.Factory.StartNew(() => FillLoginUserList()); Task.Factory.StartNew(() => FillPageList()); } catch (Exception) { } }
public SocialTabViewModel(TabType tabType, SocialUser loginUser) { LoginUser = loginUser; TabType = tabType.ToString(); SendMessageCommand = new DelegateCommand(SendMessageCommandHandler, null); SelectedUsers = new ObservableCollection <SocialUser>(); SendMessageInstaCommand = new DelegateCommand(SendMessageInstaCommandhandlar, null); SendimageFBCommand = new DelegateCommand(SendimageFBCommandHandler, null); SendFbCommentCommand = new DelegateCommand(SendFbCommentCommandHandler, null); _onlineFetcher = new OnlineFetcher(); _dbHelper = new DbHelper(); }
public override Task StopReceiving() { OnlineFetcher?.Stop(); return(Task.CompletedTask); }