public void UpdateView(AccountDataTemplate account) { if (account is not null) { MODEL.OmemoState = account.Client.xmppClient.getOmemoHelper()?.STATE ?? OmemoHelperState.DISABLED; } }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- #endregion //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- public void UpdateView(AccountDataTemplate account) { if (!(account is null)) { IdentityKey key = account.Account.omemoIdentityKeyPair?.getPublicKey(); if (!(key is null)) { Fingerprint = CryptoUtils.generateOmemoFingerprint(key, true); QrCodeFingerprint = CryptoUtils.generateOmemoQrCodeFingerprint(key, account.Account); }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- #endregion //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- public void UpdateView(AccountDataTemplate account) { DEVICES.Clear(); if (account is null) { return; } IEnumerable <uint> devices = account.Client.getOmemoHelper()?.DEVICES?.IDS; if (!(devices is null)) { DEVICES.AddRange(devices.Select(x => new UintDataTemplate { Value = x })); } }
public void Troubleshoote(AccountDataTemplate account) { if (MODEL.Troubleshooting) { return; } MODEL.Troubleshooting = true; MODEL.Working = true; MODEL.StatusText = "Troubleshooting..."; _ = Task.Run(async() => { await Task.Delay(5000); MODEL.Troubleshooting = false; MODEL.Working = false; MODEL.StatusText = ""; }); }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- #endregion //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- public void UpdateView(AccountDataTemplate account) { if (account is null) { OmemoState = OmemoHelperState.DISABLED; DeviceId = 0; ErrorText = ""; } else { OmemoState = account.Client.getOmemoHelper()?.STATE ?? OmemoHelperState.DISABLED; DeviceId = account.Account.omemoDeviceId; if (!account.Account.checkOmemoKeys()) { ErrorText = "OMEMO keys are corrupted. Please remove and add your account again!"; } } }
private void Subscribe(AccountDataTemplate account) { account.Account.CONNECTION_INFO.PropertyChanged += CONNECTION_INFO_PropertyChanged; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- #endregion //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- public void UpdateView(AccountDataTemplate account) { }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- public AccountInfoDialog(AccountDataTemplate account) { ACCOUNT = account; InitializeComponent(); }