Ejemplo n.º 1
0
        public SettingsViewModelActor(SettingsViewModel settingsViewModel)
        {
            _logger.Debug("Initialising {0} at {1}", GetType().FullName, Context.Self.Path.ToStringWithAddress());
            _settingsViewModel = settingsViewModel;

            Receive<ImmutableYakkaSettings>(msg => HandleSettingsUpdate(msg));
            Receive<SaveSettings>(msg => HandleSaveSettings(msg));
            Receive<LoadSettings>(msg => HandleLoadSettings(msg));
        }
Ejemplo n.º 2
0
        public ShellViewModel(HomeViewModel home, SettingsViewModel settings, ConversationsViewModel convos, IActorRefFactory system)
        {
            _screens.Add(Screens.Home, home);
            _screens.Add(Screens.Settings, settings);
            _screens.Add(Screens.Conversations, convos);

            system.ActorSelection(ClientActorPaths.ErrorDialogActor.Path)
                .Tell(new ErrorDialogActor.RegisterShell(this));

            _shellViewModelActor = system.ActorOf(Props.Create(() => new ShellViewModelActor(this)),
                ClientActorPaths.ShellViewModelActor.Name);
        }