Пример #1
0
        private async Task <MenuSet> GetMenuSet()
        {
            var allmenuString = await http.GetString("?mode=getinfo&type=allmenu");

            var result = Http.ReadResponse <MenuSetRequestResult>(allmenuString);

            if (result.MenuSet == null)
            {
                return(null);
            }

            try
            {
                if (Parser == null)
                {
                    Parser = CameraParser.TryParseMenuSet(result.MenuSet, language, out var menuset);
                    return(menuset);
                }

                return(Parser.ParseMenuSet(result.MenuSet, language));
            }
            catch (AggregateException)
            {
                LogError("Cannot parse MenuSet", (object)allmenuString);
                return(null);
            }
        }
Пример #2
0
 public OffFrameProcessor(string deviceName, CameraParser parser)
 {
     this.parser     = parser;
     this.deviceName = deviceName;
 }
Пример #3
0
 public OffFrameProcessor(string deviceName, CameraParser parser, LumixState lumixState)
 {
     this.parser     = parser;
     this.lumixState = lumixState;
     this.deviceName = deviceName;
 }