public override void Initialize() { MainDisplay.SetTitle("Kinetic K3"); string[] extensions = MainDisplay.SupportedExtensions(); Console.Write("Supported Extensions: "); foreach (string extension in extensions) { Console.Write(string.Format("{0}", extension)); } Console.Write("\r\n"); _overlayHolder = new OverlayHolder(ResourceManager, MainRenderer.Catalog, MainRenderer.Width, MainRenderer.Height); ResourceManager.ImportTexture(MainRenderer.Catalog, "KineticBanner", "Resources/KineticBanner.jpg"); }
private static void RelicBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { int WorkerIndex = (int)e.Argument; Bitmap PassedBitmap = Screenshot_Cuts[WorkerIndex]; string FoundText = Module_OCR.OCR_Image(PassedBitmap); e.Result = WorkerIndex + "," + FoundText; if (FoundText.Contains("Forma")) { return; } if (Module_Data.PrimeItemsData.ContainsKey(FoundText)) { Overlay OverlayItem = new Overlay(FoundText, LocationHolder["1920x1080"][Screenshot_Cuts.Count][WorkerIndex]); OverlayHolder.Add(OverlayItem); //_Form_OverlayRelic.Invoke((Action) (()=> { _Form_OverlayRelic.Controls.Add(OverlayItem); })); } else { Debug.Print(FoundText); FlowLayoutPanel TempFLP = new FlowLayoutPanel() { FlowDirection = FlowDirection.TopDown, Margin = new Padding(0, 0, 0, 0), Location = new Point(LocationHolder["1920x1080"][Screenshot_Cuts.Count][WorkerIndex], 32), AutoSize = true }; Label FailLabel = new Label() { Text = string.Format(@"OCR Fail!!! - {0}", FoundText.Replace("&", "&&")), Font = new Font("Microsoft Sans Serif", 10, FontStyle.Bold), MaximumSize = new Size(235, 0), AutoSize = true, BackColor = SystemColors.Control, BorderStyle = BorderStyle.FixedSingle }; PictureBox SomePic = new PictureBox() { BackgroundImage = PassedBitmap, BackgroundImageLayout = ImageLayout.Center, Size = new Size(235, 50), BorderStyle = BorderStyle.FixedSingle }; TempFLP.Controls.AddRange(new Control[] { FailLabel, SomePic }); Form_OverlayRelic._FormReference.BeginInvoke(new Action(() => { Form_OverlayRelic._FormReference.Controls.Add(TempFLP); })); } }