Пример #1
0
        private async void chkAutoRaiseBird_CheckedChanged(object sender, EventArgs e)
        {
            if (chkAutoRaiseBird.Checked)
            {
                try
                {
                    while (await CheckConditionAsync() && chkAutoRaiseBird.Checked)
                    {
                        int type   = 1;
                        var packet = await packetWriter.RaiseBirdAsync(type);

                        if (packet == null)
                        {
                            messageLogModel.Log("Lỗi nuôi chim.");
                        }
                        Parse66004(packet);
                        await Task.Delay(40);
                    }
                    chkAutoRaiseBird.Checked = false;
                    messageLogModel.Log("Hết bạc.");
                }
                catch (Exception ee)
                {
                    Console.WriteLine(ee.Message.ToString());
                    messageLogModel.Log(ee.Message.ToString());
                }
            }
        }