예제 #1
0
        public static void Main(string[] args)
        {
            Log.SetLevel(Log.Level.FINEST);
            Thread.Sleep(5000);
            Dictionary <string, string> config = BotAppLogic.ReadConfig();
            Win32Control ctrl     = new Win32Control();
            TableOpener  opener   = new TableOpener(ctrl, new HumanMouse(ctrl), new Keyboard(ctrl), new TableIdentifier(new TableLayout9()));
            Settings     settings = new Settings();

            settings.AutoLocateTablesNum = 1;
            opener.OpenNewTables(settings, ImageRendererForm.newImageRendererForm());
            Thread.Sleep(3000);
            opener.SitIn();
        }
예제 #2
0
        public static ImageRendererForm newImageRendererForm()
        {
            // lock
            EventWaitHandle wait = new AutoResetEvent(false);

            // ui
            ImageRendererForm form     = null;
            Thread            threadUi = new Thread(delegate()
            {
                form = new ImageRendererForm();
                wait.Set();
                Application.Run(form);
            });

            threadUi.Start();
            wait.WaitOne();

            return(form);
        }