Exemple #1
0
 private void buttonClear_Click(object sender, EventArgs e)
 {
     try
     {
         var apMeter = new APMeter(Properties.Settings.Default.PathToGame);
         textBoxApCount.Text = String.Empty;
         apMeter.ClearLog();
     }
     catch (Exception)
     {
         textBoxApCount.Text = "Error";
     }
 }
Exemple #2
0
        private void buttonCount_Click(object sender, EventArgs e)
        {
            try
            {
                var apMeter = new APMeter(Properties.Settings.Default.PathToGame);
                int count   = apMeter.CountAp();

                var format = (NumberFormatInfo)CultureInfo.InvariantCulture.NumberFormat.Clone();
                format.NumberGroupSeparator   = " ";
                format.NumberDecimalSeparator = ",";

                string strCount = count.ToString();
                if (count > 100)
                {
                    strCount = count.ToString("0,0", format);
                }

                textBoxApCount.Text = strCount;
            }
            catch (Exception)
            {
                textBoxApCount.Text = "Error";
            }
        }