public EventsCreateViewModel(IGoogleCalendar googleCalendar, IRecurrenceSettings recurrenceSettings, IRepository commonRepository, IMessanger commonMessanger) { try { log.Debug("Loading EventsCreate view model..."); calendar = googleCalendar; repository = commonRepository; messanger = commonMessanger; recurrence = recurrenceSettings; CreateEventCommand = new RelayCommand(CreateEvent); UpdateEventCommand = new RelayCommand(UpdateEvent); QuickActionCommand = new RelayCommand(QuickAction); CancelUpdateEventCommand = new RelayCommand(CancelUpdateEvent); // For Update Events eventUpdater = repository.GetEventUpdater(); if (eventUpdater.Type != GoogleCalendar.ActionType.none) { IsUpdate = true; SetUpdateEventSettings(eventUpdater); } log.Debug("EventsCreate view model was succssfully loaded"); } catch(Exception ex) { log.Error("Failed to load EventsCreate view model:", ex); } }
public Receiver(WebSocket webSocket, IMessanger messanger, string receiverId, string docId) { _webSocket = webSocket; _messanger = messanger; ReceiverId = receiverId; DocId = docId; }
public ContentViewModel(IMessanger messanger) { //logger.Info("asd"); messanger.Subscribe <string>(OnMessageArrived).ExecuteOn(MessageProcessingThread.Dispatcher); Button = new DummyCommand(this, messanger); }
public override void Start(IMessanger messanger) { this.ts = TeamSpeak.GetTeamspeak(ConfigurationManager.AppSettings["tsServer"], Int32.Parse(ConfigurationManager.AppSettings["tsQueryPort"])); this.ts.ErrorOccured += this.ts_ErrorOccured; base.Start(messanger); }
public AddQuickEventViewModel(IGoogleCalendar googleCalendar, IRepository commonRepository, IMessanger commonMessanger) { try { log.Debug("Loading AddQuickEvent view model..."); calendar = googleCalendar; repository = commonRepository; messanger = commonMessanger; quickEventsTemplates = repository.GetQuickEventsTemplates(); LoadData(); SelectTemplateCommand = new RelayCommand(SelectTemplate); MoveUpTemplateCommand = new RelayCommand(MoveUpTemplate); MoveDownTemplateCommand = new RelayCommand(MoveDownTemplate); RemoveTemplateCommand = new RelayCommand(RemoveTemplate); AddQuickEventCommand = new RelayCommand(AddQuickEvent); SaveAsTemplateCommand = new RelayCommand(SaveAsTemplate); log.Debug("AddQuickEvent view model was succssfully loaded"); } catch (Exception ex) { log.Error("Failed to load AddQuickEvent view model:", ex); } }
public void Start(IMessanger messanger) { this.listening = true; this.messanger = messanger; try { this.connection = new MySqlConnection(Forums.ConnectionString); this.connection.Open(); } catch (MySqlException ex) { this.messanger.SendToChannel("ForumPosts module b0rked: " + ex.Message); this.Stop(); return; } Thread listenerThread = new Thread(this.Listener) { Name = "Forum post listener", IsBackground = true }; listenerThread.Start(); }
/// <summary> /// Ctor. /// </summary> /// <param name="resourceManager">the resource manager class used to merging resources.</param> protected ModuleBase(IResourceManager resourceManager, IMessanger messanger, IContainer container) { Container = container; ResourceManager = resourceManager; this.messanger = messanger; PublishSystemMessage(string.Format("Module {0} has been created", typeof(T))); }
public ChatViewModel() { messanger = DependencyService.Get <IMessanger>(); Messages = new ObservableRangeCollection <Message>(); SendCommand = new Command(() => { var message = new Message { Text = OutGoingText, OutOrIn = true }; Messages.Add(message); messanger?.SendMessage(message.Text); OutGoingText = string.Empty; }); //if (messanger == null) //{ // return; //} //messanger.MessageAdded = (message) => //{ // Messages.Add(message); //}; }
public MarkersService(IMarkersDAL dal, IDocumentDAL DocumentDAL, IMessanger messanger, IDocumentSharingService documentSharingService) { _DocumentDAL = DocumentDAL; _documentSharingService = documentSharingService; _dal = dal; _messanger = messanger; }
public OtherContentViewModel(IMessanger messanger) { messanger.Subscribe <string>(OnMessageArrived).ExecuteOn(MessageProcessingThread.Dispatcher); Button = new DummyCommandTwo(this, messanger); base.Title = "asd"; }
public CommentService(IMarkersDAL markersDAL, ICommentDAL dal, IDocumentSharingService documentSharingService, IMessanger messanger) { _DAL = dal; _documentSharingService = documentSharingService; _messanger = messanger; _markersDAL = markersDAL; }
public MainPresenter(IMainForm view) { this.log = new Log(); this.score = new Score(); log.ReadFile(); score.StartWindow(); this.player = new Player(score.NamePlayer); this.bot = new Bot(); this.save = new Saver(); this.load = new Loader(); this.view = view; this.controller = new GameController(player, bot); this.messange = new Messanger(player, bot, view); if (score.LoadStatus == true) { controller.LoadPlayer(load.LoadPlayer(score.NamePlayer)); RefreshProgress(); } StringBuilder str = new StringBuilder(); str.Append("У вас осталось "); str.Append(player.Bonus); str.Append(" свободных статов"); view.LabelStat = str.ToString(); controller.SetBotStat(); messange.Message(); View(); view.Fight += view_Fight; view.NextBatle += view_NextBatle; view.PlayerStrengthAdd += view_PlayerStrengthAdd; view.PlayerArmorAdd += view_PlayerArmorAdd; view.Save += view_Save; }
public EventsCreateViewModel(IGoogleCalendar googleCalendar, IRecurrenceSettings recurrenceSettings, IRepository commonRepository, IMessanger commonMessanger) { try { log.Debug("Loading EventsCreate view model..."); calendar = googleCalendar; repository = commonRepository; messanger = commonMessanger; recurrence = recurrenceSettings; CreateEventCommand = new RelayCommand(CreateEvent); UpdateEventCommand = new RelayCommand(UpdateEvent); QuickActionCommand = new RelayCommand(QuickAction); CancelUpdateEventCommand = new RelayCommand(CancelUpdateEvent); // For Update Events eventUpdater = repository.GetEventUpdater(); if (eventUpdater.Type != GoogleCalendar.ActionType.none) { IsUpdate = true; SetUpdateEventSettings(eventUpdater); } log.Debug("EventsCreate view model was succssfully loaded"); } catch (Exception ex) { log.Error("Failed to load EventsCreate view model:", ex); } }
public SplashViewModel(IMessanger messanger) { Messages = new ObservableCollection <string>(); messangerSubscription = messanger.Subscribe <SystemNotyficationMessage>(OnMessageArrive) .ExecuteOn(MessageProcessingThread.Dispatcher); }
public WebhookController(IMessanger messanger, CommandFactory commandFactory, UserRepository userRepo) { _messanger = messanger; _commandFactory = commandFactory; _userRepo = userRepo; }
public DummyModule(IResourceManager resourceManager, INavigationManager navigationManager, IRegionManager regionManager, IMessanger messanger, IContainer container) : base(resourceManager, messanger, container) { this.navigationManager = navigationManager; this.regionManager = regionManager; messanger.Publish("publish from module;"); }
public SettingsViewModel(IRepository commonRepository, IMessanger commonMessanger) { repository = commonRepository; dateTimePreferences = repository.GetDateTimePreferences(); messanger = commonMessanger; LoadDateTimePreferences(); SaveDateTimePreferencesCommand = new RelayCommand(SaveDateTimePreferences); }
public async Task SendMessage(string userId, IMessanger client) { if (_title != null) { await _title.SendMessage(userId, client); } await Task.WhenAll(_texts.Select(t => t.SendMessage(userId, client))); }
public async Task SendMessage(string userId, IMessanger client) { await client.SendMessage(userId, new TextData { Text = _text }); }
public TabCategoryViewModel(IMessanger messageService) { if (messageService == null) { throw ArgumentNullException("messageService"); } this.messageService = messageService; this.messageService.Register <GoToPageMessage>(this, OnSelectedViewChanged); }
public ShopMapFragment(IMessanger messanger, IGeolocationService geolocationService, ISettingsRepository settingsRepository) { _token = messanger.Subscribe <ShopCreatedMessage>(HandleShopCreated); _geolocationService = geolocationService; _settingsRepository = settingsRepository; }
public Service(IDBRepository repository, IMapper mapper, IMessanger messanger, ILogger <IService> logger) { Verify(repository, mapper, messanger, logger); _repository = repository; _mapper = mapper; _messanger = messanger; _logger = logger; }
public ContentViewModel(IMessanger messanger) { //logger.Info("asd"); messanger.Subscribe <string>(OnMessageArrived).ExecuteOn(MessageProcessingThread.Dispatcher); Button = new DummyCommand(this, messanger); base.Title = "asd"; Items = new ObservableCollection <string>(new[] { "-- All --", "Anna", "annie", "cookie", "lolo test" }); Reset = new ResetKey(); }
public SchedulerController(IMessanger messanger, SnowfallChecker snowfallChecker, UserRepository userRepo, SubscriptionRepository subscriptionRepo) { _messanger = messanger; _snowfallChecker = snowfallChecker; _userRepo = userRepo; _subscriptionRepo = subscriptionRepo; }
public void Start(IMessanger messanger) { this.messanger = messanger; this.ts = TeamSpeak.GetTeamspeak(ConfigurationManager.AppSettings["tsServer"], Int32.Parse(ConfigurationManager.AppSettings["tsQueryPort"])); this.ts.ErrorOccured += this.ts_ErrorOccured; this.ts.PlayerJoined += this.ts_PlayerJoined; this.ts.PlayerLeft += this.ts_PlayerLeft; this.ts.StartListener(15000); }
public override void PostConfiguration(IContainer container, IMessanger messanger) { // lets setup main window name and icon if (container.IsTypeRegistered <IShellViewModel>()) { var shellViewModel = container.Resolve <IShellViewModel>(); shellViewModel.Icon = new Uri("pack://application:,,,/Wise.Framework.Presentation.Resources;component/Resources/1389141962_229117.ico", UriKind.Absolute); shellViewModel.Title = "Wise Test WPF Application"; } }
/// <summary> /// Starts the plugin /// </summary> /// <param name="m">The messanger the plugin should use to communicate</param> public void Start(IMessanger m) { this.messanger = m; this.listening = true; (this.listenerThread = new Thread(this.Listener) { IsBackground = true }).Start(); }
public SortingAndFilteringViewModel(IRepository commonRepository, IMessanger commonMessanger) { repository = commonRepository; messanger = commonMessanger; sortFilterPreferences = repository.GetSortFilterPreferences(); LoadSortFilterPreferences(); SavePreferencesAsDefaultCommand = new RelayCommand(SaveAsDefault); SortAndFilterCommand = new RelayCommand(SortAndFilter); CancelSortAndFilterCommand = new RelayCommand(CancelSortAndFilter); }
public ShopRepository(IMessanger messenger, UsersContext usersContext, ISettingsRepository settingsRepository, IGeofenceService geofenceService) { _messanger = messenger; _usersContext = usersContext; _settingsRepository = settingsRepository; _user = _settingsRepository.User; _geofenceService = geofenceService; }
public NavigationManager(IContainer container, IMessanger messanger, IRegionManager regionManager, IShellWindow shell, ILog loger, IMenuService menuService, IRegionNavigationJournal regionNavigationJournal) { this.menuService = menuService; this.loger = loger; this.container = container; this.shell = shell; this.messanger = messanger; this.regionManager = regionManager; this.regionNavigationJournal = regionNavigationJournal; subscription = messanger.Subscribe <NavigationRequest>(OnMessageArrived); }
public DeleteEventOptionsViewModel(IGoogleCalendar googleCalendar, IRepository commonRepository, IMessanger commonMessanger) { calendar = googleCalendar; repository = commonRepository; selectedEvent = repository.GetCurrentEvent(); messanger = commonMessanger; DeleteOnlyInstanceCommand = new RelayCommand(DeleteOnlyInstance); DeleteFollowingEventsCommand = new RelayCommand(DeleteFollowingEvents); DeleteAllEventsCommand = new RelayCommand(DeleteAllEvents); CancelDeleteCommand = new RelayCommand(CloseWindow); }
public OthersCalendarViewModel(IGoogleCalendar googleCalendar, ICalendarEventService eventService, ITimeIntervals timeInterval, IRepository commonRepository, IMessanger commonMessanger) { try { log.Debug("Loading EventsList view model..."); calendar = googleCalendar; service = eventService; period = timeInterval; repository = commonRepository; sortFilterPreferences = repository.GetSortFilterPreferences(); messanger = commonMessanger; OthersEvents = service.GetOthersEvents(calendar, period.Today(), _OtherCalendarsList); OthersEvents = service.FormatEventsDatesStringRepresentation(OthersEvents, repository.GetDateTimePreferences()); GetOtherCalendarsCommand = new RelayCommand(GetOtherCalendars); GetTodayEventsCommand = new RelayCommand(GetTodayEvents); GetTomorrowEventsCommand = new RelayCommand(GetTomorrowEvents); GetThisWeekEventsCommand = new RelayCommand(GetThisWeekEvents); GetNextWeekEventsCommand = new RelayCommand(GetNextWeekEvents); GetThisMonthEventsCommand = new RelayCommand(GetThisMonthEvents); GetNextMonthEventsCommand = new RelayCommand(GetNextMonthEvents); GetPeriodEventsCommand = new RelayCommand(GetPeriodEvents); RefreshCommand = new RelayCommand(RefreshEventsList); DeleteEventCommand = new RelayCommand(DeleteEvent); UpdateEventCommand = new RelayCommand(FullUpdateEvent); ConfirmEventCommand = new RelayCommand(ConfirmEvent); MakeTentativeEventCommand = new RelayCommand(MakeTentativeEvent); ShowChooseDateEventsControlsCommand = new RelayCommand(ShowChooseDateEventsControls); HideChooseDateEventsControlsCommand = new RelayCommand(HideChooseDateEventsControls); GetChooseDateEventsCommand = new RelayCommand(GetChooseDateEvents); SetSortingAndFilteringPreferencesCommand = new RelayCommand(SetSortingAndFilteringPreferences); LogOutCommand = new RelayCommand(LogOut); log.Debug("EventsList view model was succssfully loaded"); } catch(Exception ex) { log.Error("Failed to load EventsList view model:", ex); } }