Beispiel #1
0
        public static void ThreadedDataLoad()
        {
            try
            {
                StatusUpdate("Updating Databases...", 0);

                dataBase.Update();

                //RelicsWindow.LoadNodesOnThread();
                OCR.Init();

                if ((bool)Settings.settingsObj["Auto"])
                {
                    dataBase.EnableLogCapture();
                }
                if (dataBase.IsJWTvalid().Result)
                {
                    OCR.VerifyWarframe();
                    latestActive = DateTime.UtcNow.AddMinutes(1);
                    LoggedIn();

                    var startTimeSpan  = TimeSpan.Zero;
                    var periodTimeSpan = TimeSpan.FromMinutes(1);

                    timer = new System.Threading.Timer((e) =>
                    {
                        TimeoutCheck();
                    }, null, startTimeSpan, periodTimeSpan);
                }
                StatusUpdate("WFInfo Initialization Complete", 0);
                AddLog("WFInfo has launched successfully");
                FinishedLoading();
            }
            catch (Exception ex)
            {
                AddLog("LOADING FAILED");
                AddLog(ex.ToString());
                StatusUpdate("Launch Failure - Please Restart", 0);
                RunOnUIThread(() =>
                {
                    _ = new ErrorDialogue(DateTime.Now, 0);
                });
            }
        }
Beispiel #2
0
        async Task InitReader()
        {
            ToggleBusy(true);
            if (!OCR.Initialized)
            {
                await OCR.Init("eng");
            }

            if (Capture != null)
            {
                var cropped = CropCapture();
                await OCR.SetImage(cropped.AsJPEG().ToArray());

                Result         = OCR.Text;
                FilteredResult = FilterAlphaNumeric(OCR.Text);

                await SetOcrTextLabel();
            }
            ToggleBusy(false);
        }