public override void Load(INvtSession session, Account account) { CurrentSession = session; //show default log at startup subscription.Add(CurrentSession .GetSystemLog(SelectedType.type) .ObserveOnCurrentDispatcher() .Subscribe(syslog => { try { if (syslog == null) return; logDescr.FillData(syslog, SelectedType); } catch (Exception err) { dbg.Error(err); } finally { if (logDescr != null && logDescr.IsReceived) InitData(); Current = States.Common; } }, err => { dbg.Error(err); Current = States.Common; })); }
public ButtonBase(IEventAggregator eventAggregator, INvtSession session, Account currentAccount) { this.eventAggregator = eventAggregator; this.session = session; this.currentAccount = currentAccount; InitCommands(); this.Cursor = Cursors.Hand; }
void InitAccounts() { IsNotApply = true; Accounts.Clear(); anonymous = new Account(); anonymous.Name = "<Anonymous>"; Accounts.Add(anonymous); AccountManager.Load().ForEach(x => Accounts.Add(x)); try { var curaccount = AccountManager.CurrentAccount; if (curaccount == null) CurrentAccount = anonymous; else { Accounts.ForEach(x => { if (x.Name == curaccount.Name && x.Password == curaccount.Password) CurrentAccount = x; }); } } catch (Exception err) { dbg.Error(err); } }
public SystemLogButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount, SysLogDescriptor slog) : base(eventAggregator, session, currentAccount) { this.slog = slog; Init(); }
public MaintenanceButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount, global::onvif.services.Capabilities caps, string DevModel, string Manufact) : base(eventAggregator, session, currentAccount) { this.caps = caps; this.devName = DevModel; this.manufact = Manufact; Init(); }
public DeviceEventsButton(IEventAggregator eventAggregator, ObservableCollection<FilterExpression> filters, EventsStorage events, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { Init(); this.events = events; this.filters = filters; }
public ActionTriggersButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { Init(); }
public void SetCurrentAccount(Account account, bool remember) { this.CurrentAccount = account; Save(remember ? account : Account.Anonymous); }
public override void Load(INvtSession session, Account account) { this.session = session; CurrentAccount = account; Current = States.Loading; session.GetRelayOutputs() .ObserveOnCurrentDispatcher() .Subscribe(relayOutputs => { relayOutputs.ForEach(x => { relays.Add(x); }); Current = States.Common; }, err => { ErrorMessage = err.Message; ErrorBtnClick = new DelegateCommand(() => { Reload(); }); Current = States.Error; }); }
public VideoStreamingButton(IEventAggregator eventAggregator, INvtSession session, String channelToken, Profile profile, Account currentAccount, IVideoInfo videoInfo) : base(eventAggregator, session, currentAccount, channelToken, profile, videoInfo) { Init(); }
public NVASettingsButton(IEventAggregator eventAggregator, INvtSession session, AnalyticsEngine engine, AnalyticsEngineControl control, Account currentAccount, IVideoInfo videoInfo = null) : base(eventAggregator, session, currentAccount, engine, control, videoInfo) { Init(); }
public NVAButtonBase(IEventAggregator eventAggregator, INvtSession session, Account currentAccount, AnalyticsEngine engine, AnalyticsEngineControl control, IVideoInfo videoInfo = null) : base(eventAggregator, session, currentAccount) { this.engine = engine; this.control = control; this.videoInfo = videoInfo; }
public DeviceButtonBase(IEventAggregator eventAggregator, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { }
public ChannelButtonBase(IEventAggregator eventAggregator, INvtSession session, Account currentAccount, String channelToken, Profile profile, IVideoInfo videoInfo) : base(eventAggregator, session, currentAccount) { this.channelToken = channelToken; this.profile = profile; this.videoInfo = videoInfo; }
public void Init(INvtSession session, Account account, SysLogDescriptor slogdescr) { logDescr = slogdescr; base.Init(session, account); }
public NetworkButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { Init(); }
public XMLExplorerButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { Init(); }
public UITestButton(IEventAggregator eventAggregator, INvtSession session, String channelToken, Profile profile, Account currentAccount, IVideoInfo videoInfo) : base(eventAggregator, session, currentAccount, channelToken, profile, videoInfo) { this.profile = profile; Init(); }
public override void Load(INvtSession session, Account account) { Current = States.Common; }
public UserManagerButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount, string DevModel, string Manufact) : base(eventAggregator, session, currentAccount) { this.devName = DevModel; this.manufact = Manufact; Init(); }
public IdentificationButton(IEventAggregator eventAggregator, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { Init(); }
private void Save(Account account) { try { if (File.Exists(settingsPath)) File.Delete(settingsPath); using (var sr = File.CreateText(settingsPath)) { XmlSerializer serializer = new XmlSerializer(typeof(Account)); serializer.Serialize(sr, account); } } catch (Exception err) { dbg.Error(err); } }