public Bot(API_Instance aPI, ChromiumWebBrowser webBrowser, DatabaseInterface dbInterface, PictureBox debug_PictureBox = null)
 {
     API               = aPI;
     WebBrowser        = webBrowser;
     Debug_PictureBox  = debug_PictureBox;
     DatabaseInterface = dbInterface;
     GameLogs          = new List <BotGameLog>();
 }
Exemple #2
0
        public GameWindow(API_Instance api)
        {
            InitializeComponent();
            Console.WriteLine("[GameWindow] WinForm initializing...");
            if (api == null)
            {
                Close();
                return;
            }
            API = api;
            var settings = new CefSettings()
            {
                UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36",
                CachePath = "Cache"
            };

            Console.Write("[GameWindow] Initialize chromium... ");
            Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
            webBrowser.IsBrowserInitializedChanged += WebBrowser_IsBrowserInitializedChanged;
        }
Exemple #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Console.WriteLine("Rollercoin Automation, Client.WinForms, sample 2");
            if (Directory.Exists("Cache"))
            {
                Console.WriteLine("Clearing chromium cache from the last session...");
                //Directory.Delete("Cache", true);
            }
            if (Directory.Exists("GPUCache"))
            {
                Console.WriteLine("Clearing chromium GPU cache from the last session...");
                Directory.Delete("GPUCache", true);
            }
            API_Instance API = new API_Instance();

            Console.WriteLine($"API.Login => {API.Login(new CredentialModel("*****@*****.**", null, "Asusamd74"))}");
            Console.WriteLine("Initializing the GameWindow...");
            GameWindow game = new GameWindow(API);

            game.Show();

            Application.Run(game);
        }