예제 #1
0
        public AkashiTimerViewModel()
        {
            this.source = new AkashiTimer();

            this.source.TimerTick += this.Tick;
            this.CompositeDisposable.Add(() => this.source.TimerTick -= this.Tick);

            NotifyService.Current.UpdateAkashiTimer(this.source);

            KanColleClient.Current.Proxy.api_req_hensei_change.TryParse()
            .Where(x => x.IsSuccess)
            .Subscribe(x => this.Update(
                           int.Parse(x.Request["api_id"]),
                           int.Parse(x.Request["api_ship_idx"]),
                           int.Parse(x.Request["api_ship_id"])
                           ));

            KanColleClient.Current.Proxy.api_port.TryParse().Subscribe(x => this.Reset());
            KanColleClient.Current.Proxy.api_req_hensei_preset_select.TryParse()
            .Where(x => x.IsSuccess)
            .Subscribe(x => this.Update(
                           int.Parse(x.Request["api_deck_id"])
                           ));

            KanColleSettings.UseRepairTimer.ValueChanged += (s, e) => this.UpdateVisibility();
            this.UpdateVisibility();
        }
예제 #2
0
 public void Initialize()
 {
     _timeProvider  = new TimeProvider();
     _shipInventory = new ShipInventory();
     _shipInfo      = new ShipInfo(null, _shipInventory, new ItemInventory());
     _akashiTimer   = new AkashiTimer(_shipInfo, new DockInfo(null, null), null, _timeProvider.GetTime);
     SetupFleet();
 }
        public AkashiTimerViewModel()
        {
            this.source = new AkashiTimer();
            this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName)));

            KanColleClient.Current.Proxy.api_req_hensei_change.TryParse().Subscribe(x => this.Update(x.Request));
            KanColleClient.Current.Proxy.api_port.TryParse().Subscribe(x => this.Reset());
        }
예제 #4
0
 public Sniffer(bool started = false)
 {
     Started         = started;
     _itemInfo       = new ItemInfo(_itemMaster, _itemInventory);
     _shipInfo       = new ShipInfo(_shipMaster, _shipInventory, _itemInventory);
     _conditionTimer = new ConditionTimer(_shipInfo);
     _dockInfo       = new DockInfo(_shipInventory, _materialInfo);
     _akashiTimer    = new AkashiTimer(_shipInfo, _dockInfo, _presetDeck);
     _airBase        = new AirBase(_itemInfo);
     _battleInfo     = new BattleInfo(_shipInfo, _itemInfo, _airBase);
     _logger         = new Logger(_shipInfo, _itemInfo, _battleInfo);
     _questInfo      = new QuestInfo(_questCountList);
     _questCounter   = new QuestCounter(_questInfo, _itemInventory, _shipInventory, _battleInfo);
     _miscTextInfo   = new MiscTextInfo(_shipInfo, _itemInfo);
     _haveState      = new List <IHaveState> {
         _achievement, _materialInfo, _conditionTimer, _exMapInfo, _questInfo
     };
     AdditionalData = new AdditionalData();
 }