コード例 #1
0
        public void Get(string idinputvalue)
        {
            VMCloseOverlayCommand.Execute("lost-connection-notification");
            VMCloseOverlayCommand.Execute("invalid-pass-notification");

            if (String.IsNullOrWhiteSpace(idinputvalue))
            {
                Service.Get();
                Data = Service.Data;
            }
            else
            {
                if (IsDeviceOnline())
                {
                    Service.Get(idinputvalue);
                    Data = Service.Data;
                }
                else
                {
                    IsDeviceOfflineEvent?.Invoke(this, EventArgs.Empty);
                }
            }


            IsBusy = false;

            Refresh();
        }
コード例 #2
0
        public bool VerifyResponse(bool IsOnline, bool UsesCache)
        {
            if (IsOnline == false)
            {
                if (UsesCache == true)
                {
                    IsContentOutdatedEvent?.Invoke(this, EventArgs.Empty);

                    IsBusy          = false;
                    IsContentLoaded = true;

                    OnPropertyChanged(nameof(IsBusy));
                    OnPropertyChanged(nameof(IsContentLoaded));

                    return(true);
                }
                else
                {
                    IsDeviceOfflineEvent?.Invoke(this, EventArgs.Empty);
                    return(false);
                }
            }
            else
            {
                IsBusy          = false;
                IsContentLoaded = true;

                OnPropertyChanged(nameof(IsBusy));
                OnPropertyChanged(nameof(IsContentLoaded));

                return(true);
            }
        }