Skip to content

Commit

Permalink
InputBox: optimize usage
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Apr 12, 2020
1 parent 2526175 commit 12054b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Controls/fftui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private void BUT_run_Click(object sender, EventArgs e)
{Color.Red, Color.Green, Color.Black, Color.Violet, Color.Blue, Color.Orange};

int hz = 8000;
InputBox.Show("sample rate", "nter source file sample rate", ref hz);
InputBox.Show("fft sample rate", "nter source file sample rate", ref hz);

double[] buffer = new double[1 << bins];

Expand Down
2 changes: 1 addition & 1 deletion GCSViews/ConfigurationView/ConfigTerminal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ private void BUT_RebootAPM_Click(object sender, EventArgs e)
term = new SSHTerminal(TXT_terminal);
SSHTerminal = true;
string ip = "";
InputBox.Show("", "Enter IP:port", ref ip);
InputBox.Show("SSH Remote", "Enter IP:port", ref ip);
term.SSH_ConnectionInfo(ip);
}
}
Expand Down
4 changes: 2 additions & 2 deletions GCSViews/FlightData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ void chk_box_hud_UserItem_CheckedChanged(object sender, EventArgs e)
if (Settings.Instance["hud1_useritem_" + checkbox.Name] != null)
prefix = Settings.Instance["hud1_useritem_" + checkbox.Name];

if (DialogResult.Cancel == InputBox.Show("Header", "Please enter your item prefix", ref prefix))
if (DialogResult.Cancel == InputBox.Show("Hud Header", "Please enter your item prefix", ref prefix))
{
checkbox.Checked = false;
return;
Expand Down Expand Up @@ -2539,7 +2539,7 @@ private void groundColorToolStripMenuItem_Click(object sender, EventArgs e)
private void Gspeed_DoubleClick(object sender, EventArgs e)
{
string max = "60";
if (DialogResult.OK == InputBox.Show("Enter Max", "Enter Max Speed", ref max))
if (DialogResult.OK == InputBox.Show("Enter Max Speed", "Enter Max Speed", ref max))
{
Gspeed.MaxValue = float.Parse(max);
Settings.Instance["GspeedMAX"] = Gspeed.MaxValue.ToString();
Expand Down
5 changes: 3 additions & 2 deletions GCSViews/SITL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)

public async Task StartSwarmSeperate()
{
var max = 10.0;
var max = 10;

if (InputBox.Show("how many?", "how many?", ref max) != DialogResult.OK)
return;
Expand Down Expand Up @@ -661,7 +661,8 @@ public async Task StartSwarmSeperate()

public async void StartSwarmChain()
{
var max = 10.0;
var max = 10;

if (InputBox.Show("how many?", "how many?", ref max) != DialogResult.OK)
return;

Expand Down

0 comments on commit 12054b3

Please sign in to comment.