Пример #1
0
        private void SetEncounterTimeout_Click(object sender, RoutedEventArgs e)
        {
            AlwaysOnTop.IsChecked = false;
            InputWindow input = new InputWindow("Encounter Timeout", "Encounter Duration?", Properties.Settings.Default.EncounterTimeout.ToString())
            {
                Owner = this
            };

            input.ShowDialog();
            if (Int32.TryParse(input.ResultText, out int x))
            {
                if (x > 0)
                {
                    Properties.Settings.Default.EncounterTimeout = x;
                }
                else
                {
                    MessageBox.Show("Error");
                }
            }
            else
            {
                if (input.ResultText.Length > 0)
                {
                    MessageBox.Show("Couldn't parse your input. Enter only a number.");
                }
            }

            AlwaysOnTop.IsChecked = Properties.Settings.Default.AlwaysOnTop;
        }
Пример #2
0
        private void ChangeInterval_Click(object sender, RoutedEventArgs e)
        {
            AlwaysOnTop.IsChecked = false;
            InputWindow input = new InputWindow("OverParse", "Changes the damage reading interval (ms) ...\nRecommended to leave this at default 1000!", Properties.Settings.Default.Updateinv.ToString())
            {
                Owner = this
            };

            input.ShowDialog();

            if (Int32.TryParse(input.ResultText, out int x))
            {
                if (x > 49)
                {
                    damageTimer.Interval = new TimeSpan(0, 0, 0, 0, x);
                    Properties.Settings.Default.Updateinv = x;
                }
                else
                {
                    MessageBox.Show("Error");
                }
            }
            else
            {
                if (input.ResultText.Length > 0)
                {
                    MessageBox.Show("Couldn't parse your input. Enter only a number.");
                }
            }

            AlwaysOnTop.IsChecked = Properties.Settings.Default.AlwaysOnTop;
        }