示例#1
0
        private async void updatePriceButton_Click(object sender, EventArgs e)
        {
            MKMBotSettings s;

            if (settingsWindow.GenerateBotSettings(out s))
            {
                bot.setSettings(s);
                updatePriceButton.Enabled = false;
                updatePriceButton.Text    = "Updating...";
                await Task.Run(() => updatePriceRun());

                updatePriceButton.Text    = "Update Prices";
                updatePriceButton.Enabled = true;
            }
            else
            {
                logBox.AppendText("Update abandoned, incorrect setting parameters." + Environment.NewLine);
            }
        }
示例#2
0
        private async void buttonAppraise_Click(object sender, EventArgs e)
        {
            bool MKMToolPrice = checkBoxToolPrices.Checked;
            bool PriceGuide   = checkBoxPriceGuide.Checked;

            if (MKMToolPrice || PriceGuide)
            {
                MKMBotSettings s;
                if (botSettings.GenerateBotSettings(out s))
                {
                    bot.SetSettings(s);
                    buttonImport.Enabled      = false;
                    buttonAppraise.Enabled    = false;
                    buttonExport.Enabled      = false;
                    buttonExportToMKM.Enabled = false;

                    buttonAppraise.Text = "Appraising...";
                    await Task.Run(() => appraise(MKMToolPrice, PriceGuide));

                    if (PriceGuide)
                    {
                        checkBoxExportPriceGuide.Checked = true;
                        checkBoxExportPriceGuide.Enabled = true;
                    }
                    if (MKMToolPrice)
                    {
                        checkBoxExportToolPrices.Checked = true;
                        checkBoxExportToolPrices.Enabled = true;
                    }

                    buttonImport.Enabled      = true;
                    buttonAppraise.Enabled    = true;
                    buttonExport.Enabled      = true;
                    buttonExportToMKM.Enabled = true;
                    buttonAppraise.Text       = "Appraise";
                }
                else
                {
                    MainView.Instance.LogMainWindow("Appraisal abandoned, incorrect setting parameters.");
                }
            }
            else
            {
                MainView.Instance.LogMainWindow("No price selected for appraisal.");
            }
        }