Пример #1
0
        async Task RunAsync()
        {
            while (_enabled)
            {
                LargeBadgeView lbv = OpenRandomBadge();
                if (lbv != null)
                {
                    await Utils.DelayAsync(1000);

                    if (_rnd.Next(10) < 5)
                    {
                        await WorkWithAttachmentAsync(lbv, _rnd);
                    }
                    else
                    {
                        await OpenRandomSourceAsync(lbv);
                    }

                    await Utils.DelayAsync(300 + _rnd.Next(500));

                    lbv.Close();
                }

                await Utils.DelayAsync(_rnd.Next(1000));
            }
        }
Пример #2
0
        async Task RunAsync()
        {
            while (_enabled)
            {
                LargeBadgeView lbv = OpenRandomBadge();
                await Utils.DelayAsync(1000);

                if (lbv != null)
                {
                    var numCommentActivities = _rnd.Next(5) + 1;
                    for (int i = 1; i <= numCommentActivities; ++i)
                    {
                        if (!_enabled)
                        {
                            return;
                        }
                        lbv.BotGenerateCommentChange();
                        await Utils.DelayAsync(200 + _rnd.Next(500));
                    }

                    await Utils.DelayAsync(200);

                    lbv.Close();
                }

                await Utils.DelayAsync(_rnd.Next(1000));
            }
        }
Пример #3
0
        static async Task WorkWithAttachmentAsync(LargeBadgeView lbv, Random rnd)
        {
            Tuple <WebkitBrowserWindow, ImageWindow, ReaderWindow2> result =
                await lbv.BotLaunchRandomAttachmentAsync(rnd);

            WebkitBrowserWindow browserWindow = result.Item1;

            if (browserWindow != null)
            {
                await Utils.DelayAsync(500);

                browserWindow.Deinit();
                return;
            }

            ImageWindow imgWindow = result.Item2;

            if (imgWindow != null)
            {
                await Utils.DelayAsync(300);

                ExplanationModeMediator.Inst.LasersEnabled = true;

                await imgWindow.BotManipulationsAsync();

                await Utils.DelayAsync(400);

                ExplanationModeMediator.Inst.LasersEnabled = false;
                await Utils.DelayAsync(1000);

                imgWindow.Deinit();
                return;
            }

            ReaderWindow2 pdf = result.Item3;

            if (pdf != null)
            {
                await Utils.DelayAsync(1000);

                await pdf.BotScrollAsync(rnd);

                await Utils.DelayAsync(600);

                await pdf.BotLaserActivityAsync();

                await Utils.DelayAsync(400);

                pdf.Deinit();
                return;
            }
        }
        async Task OpenRandomSourceAsync(LargeBadgeView lbv)
        {
            var browser = await lbv.BotLaunchRandomSource(_rnd);

            if (browser == null)
            {
                return;
            }

            await Utils.DelayAsync(_rnd.Next(1000));

            await browser.BotScrollRandomAsync(_rnd);

            await Utils.DelayAsync(1000 + _rnd.Next(1800));

            browser.Close();
        }
        async Task RunAsync()
        {
            while (_enabled)
            {
                LargeBadgeView lbv = OpenRandomBadge();
                if (lbv != null)
                {
                    await OpenRandomSourceAsync(lbv);

                    await Utils.DelayAsync(100 + _rnd.Next(200));

                    lbv.Close();
                }

                await Utils.DelayAsync(200 + _rnd.Next(200));
            }
        }
        async Task RunAsync()
        {
            while (_enabled)
            {
                LargeBadgeView lbv = OpenRandomBadge();
                if (lbv != null)
                {
                    await Utils.DelayAsync(200);

                    await OpenAttachmentAsync((ArgPoint)lbv.DataContext, _rnd);

                    await Utils.DelayAsync(300 + _rnd.Next(500));


                    lbv.Close();
                }

                await Utils.DelayAsync(_rnd.Next(1000));
            }
        }