public DragDropHandler(IColumnDefinitionList columnList, IMessenger messenger) { ColumnList = columnList; messenger.Register <DragMessage>(this, OnDragMessage); messenger.Register <ColumnLockMessage>(this, OnColumnLock); }
public AccountsDialogViewModel(IColumnDefinitionList columnList, ITwitterContextList contextList, ITwitterAuthorizer authorizer) { ContextList = contextList; ColumnList = columnList; Authorizer = authorizer; AddedAccounts = new ObservableCollection <AccountEntry>(ContextList.Contexts.Select(c => new AccountEntry(c))); foreach (var acc in AddedAccounts) { acc.ConfirmationChanged += Acc_ConfirmationChanged; } }
public AddColumnDialogViewModel(ITwitterContextList contextList, IColumnDefinitionList columnList, ITimerFactory timerFactory) { ColumnList = columnList; Pages.Add(0, new SourceAccountSelectorPage(this, contextList)); Pages.Add(1, new ColumnTypeSelctorPage(this)); Pages.Add(2, new UserSelectorPage(this, timerFactory)); Pages.Add(3, new FinishPage(this)); SetProperty(SourceAccountsKey, new ulong[0]); SetProperty(TargetAccountsKey, new ulong[0]); SetProperty(SourceAccountNamesKey, new string[0]); SetProperty(TargetAccountNamesKey, new string[0]); SetProperty(ContextsKey, new IContextEntry[0]); CurrentPage = Pages[0]; }
public MainViewModel(ITwitterContextList contextList, INotifier notifier, IColumnDefinitionList columnList, IColumnFactory columnFactory, IMessenger messenger = null) : base(messenger) { ContextList = contextList; ContextList.ContextsChanged += ContextList_ContextsChanged; Columns = new ObservableCollection <IColumnViewModel>(); Notifier = notifier; Factory = columnFactory; ColumnList = columnList; ColumnList.ColumnsChanged += ColumnList_ColumnsChanged; ConstructColumns(); DragDropHandler = new DragDropHandler(columnList, MessengerInstance); var rateLimitTimer = new DispatcherTimer { Interval = TimeSpan.FromMinutes(15) }; rateLimitTimer.Tick += RateLimitTimer_Tick; rateLimitTimer.Start(); var statusUpdateTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(10) }; statusUpdateTimer.Tick += StatusUpdateTimer_Tick; statusUpdateTimer.Start(); var updateCheckTimer = new DispatcherTimer { Interval = TimeSpan.FromHours(1) }; updateCheckTimer.Tick += UpdateCheckTimer_Tick; updateCheckTimer.Start(); }