private void SetEncounterTimeout_Click(object sender, RoutedEventArgs e) { AlwaysOnTop.IsChecked = false; Inputbox input = new Inputbox("Encounter Timeout", "何秒経過すればエンカウントを終了させますか?", Properties.Settings.Default.EncounterTimeout.ToString()) { Owner = this }; input.ShowDialog(); if (Int32.TryParse(input.ResultText, out int x)) { if (0 < x) { 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; }
private void ChangeInterval_Click(object sender, RoutedEventArgs e) { AlwaysOnTop.IsChecked = false; Inputbox input = new Inputbox("OverParse", ".csvファイルの読み取り間隔を変更します... (単位:ms)", 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; }
private void SetEncounterTimeout_Click(object sender, RoutedEventArgs e) { AlwaysOnTop.IsChecked = false; Inputbox input = new Inputbox("Encounter Timeout", "Please input the amount of seconds you would like for the Encounter Timeout", 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("Could not read your input. Please use numbers only."); } } AlwaysOnTop.IsChecked = Properties.Settings.Default.AlwaysOnTop; }