public OptionDialog(InteractionFacade _interactionFacade) { InitializeComponent(); _widget.Add(new FontSelectionWidget()); _widget.Add(new OtherSettingWidget(_interactionFacade)); ShowWidget(0); }
public AutoInstManager(InteractionFacade _ifacade) { ifacade = _ifacade; thread = null; isalive = false; isactive = false; }
/// <summary> /// 构造函数 /// </summary> /// <param name="_parent">交互</param> public TextFindWindow(InteractionFacade _parent) { InitializeComponent(); DataContext = this; parent = _parent; parent.CurrentTabChanged += OnCurrentTabChanged; Mode = MODE_CURRENT; }
/// <summary> /// 初始化构造函数 /// </summary> /// <param name="_parent">交互父类</param> public FindWindow(InteractionFacade _parent) { InitializeComponent(); DataContext = this; parent = _parent; parent.CurrentTabChanged += OnCurrentTabChanged; Mode = MODE_CURRENT; TB_Input.Background = Brushes.Red; }
static void Main(string[] args) { //var image = new Bitmap(@"C:\Users\kiwo_000\Downloads\Pkr\870727716_2ea9.bmp"); //var result2 = ScreenRecognition.recognizeScreen(image); //var screenSize = new Size(650, 490); //var targetSize = new Size(433, 328); var screenSize = new Size(816, 577); var targetSize = new Size(816, 577); Console.Write("Press any key to get the list of open tables..."); Console.ReadKey(); var party = new WindowExtractor("Party", title => { var startIndex = title.IndexOf("Heads Up Hyper Turbo (") + 22; var endIndex = title.IndexOf(") Table"); return(startIndex > 0 && endIndex > startIndex ? title.Substring(startIndex, endIndex - startIndex) : null); }); while (true) { var windows = InteractionFacade.GetWindowList(screenSize, targetSize, party).ToArray(); foreach (WindowInfo window in windows) { var tableNumber = window.TableName; Console.WriteLine($"\n{tableNumber} ({window.Size.Width}x{window.Size.Height})"); try { var result = PartyRecognition.recognizeScreenParty(window.Bitmap, window.Title); foreach (var s in ScreenRecognition.print(result)) { Console.WriteLine(s); } var result2 = PartyRecognition.recognizeBetSizeParty(window.Bitmap); Console.WriteLine($"Hero entered bet size: {result2}"); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.StackTrace); Dumper.SaveBitmap(window.Bitmap, tableNumber, false); } } Console.Write("\n\n"); Console.Write("Press S to save images or any key to get the list of open tables..."); var key = Console.ReadKey(); if (key.KeyChar == 'S' || key.KeyChar == 's') { foreach (WindowInfo window in windows) { Dumper.SaveBitmap(window.Bitmap, window.TableName + Guid.NewGuid().ToString().Substring(0, 6), false); } } } }
public OtherSettingWidget(InteractionFacade _interactionFacade) { InitializeComponent(); this._interactionFacade = _interactionFacade; timespantextbox.GetTextBox().Text = GlobalSetting.SaveTimeSpan.ToString(); TB_Inst.GetTextBox().Text = GlobalSetting.InstTimeSpan.ToString(); checkbox.IsChecked = GlobalSetting.IsSavedByTime; CB_Inst.IsChecked = GlobalSetting.IsInstByTime; CB_Coil.IsChecked = GlobalSetting.IsCheckCoil; OptionDialog.EnsureButtonClick += OptionDialog_EnsureButtonClick; }
public void Select(LadderNetworkViewModel lnvmodel) { if (this == Empty) { return; } LadderDiagramViewModel ldvmodel = lnvmodel.LDVModel; ProjectModel pmodel = ldvmodel.ProjectModel; InteractionFacade ifacade = pmodel.IFacade; ldvmodel.AcquireArea(this); ifacade.MainTabControl.ShowItem(ldvmodel); }
public BackTraceWindow(InteractionFacade _ifacade) { InitializeComponent(); DataContext = this; ifacade = _ifacade; }
public ErrorReportWindow(InteractionFacade _parent) { InitializeComponent(); DataContext = this; parent = _parent; }
public AutoSavedManager(InteractionFacade IFacade) { _iFacade = IFacade; AutoSaveThread = new Thread(Run); }
public SimuBrpoWindow(InteractionFacade _ifacade) { InitializeComponent(); DataContext = this; ifacade = _ifacade; }