Esempio n. 1
0
        public async Task <bool> MfAssistAf()
        {
            ReportAction();
            if (Profile.ManualFocusAF)
            {
                return(await Try(async() =>
                {
                    try
                    {
                        await http.Get <BaseRequestResult>("?mode=camcmd&value=oneshot_af");
                        return true;
                    }
                    catch (LumixException ex)
                    {
                        if (ex.Error == LumixError.ErrorParam)
                        {
                            Profile.ManualFocusAF = false;
                            ProfileUpdated?.Invoke();
                            return false;
                        }
                        throw;
                    }
                }));
            }

            return(false);
        }
Esempio n. 2
0
        void HandleEvents(AuthenticationResult result)
        {
            if (result.Code != AuthenticationResultCode.Success)
            {
                ProfileUpdateFailed?.Invoke(this, result.ErrorMessage);
                return;
            }

            ProfileUpdated?.Invoke(this, null);
        }