Skip to content

Commit

Permalink
FlightData Tuning: add pop-out button
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Apr 27, 2023
1 parent 8eca489 commit df117e3
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 1 deletion.
14 changes: 14 additions & 0 deletions GCSViews/FlightData.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions GCSViews/FlightData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,7 @@ private void CB_tuning_CheckedChanged(object sender, EventArgs e)
ZedGraphTimer.Stop();
zg1.Visible = false;
}
BTN_tunning_dropout.Visible = zg1.Visible;
}

private void CheckAndBindPreFlightData()
Expand Down Expand Up @@ -2628,6 +2629,7 @@ private void FlightData_Load(object sender, EventArgs e)
prop = new Propagation(gMapControl1);

splitContainer1.Panel1Collapsed = true;
BTN_tunning_dropout.Visible = false;

try
{
Expand Down Expand Up @@ -6200,5 +6202,30 @@ private void jumpToTagToolStripMenuItem_Click(object sender, EventArgs e)
CustomMessageBox.Show(Strings.CommandFailed + ex.ToString(), Strings.ERROR);
}
}

void tuningdropout_FormClosed(object sender, FormClosedEventArgs e)
{
(sender as Form).SaveStartupLocation();
((sender as Form).Tag as Control).Controls.Add(zg1);
splitContainer1.Panel1Collapsed = false;
BTN_tunning_dropout.Visible = true;
CB_tuning.Enabled = true;
}

private void BTN_tunning_dropout_Click(object sender, EventArgs e)
{
Form dropout = new Form();
dropout.Text = "Tuning Dropout";
dropout.Size = new Size(zg1.Width, zg1.Height + 20);
dropout.Tag = zg1.Parent;
dropout.Controls.Add(zg1);
dropout.FormClosed += tuningdropout_FormClosed;
dropout.RestoreStartupLocation();
dropout.Show();

splitContainer1.Panel1Collapsed = true;
BTN_tunning_dropout.Visible = false;
CB_tuning.Enabled = false;
}
}
}
32 changes: 31 additions & 1 deletion GCSViews/FlightData.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5095,6 +5095,36 @@
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="BTN_tunning_dropout.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="BTN_tunning_dropout.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 3</value>
</data>
<data name="BTN_tunning_dropout.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 17</value>
</data>
<data name="BTN_tunning_dropout.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="BTN_tunning_dropout.Text" xml:space="preserve">
<value>Pop Out</value>
</data>
<data name="BTN_tunning_dropout.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;BTN_tunning_dropout.Name" xml:space="preserve">
<value>BTN_tunning_dropout</value>
</data>
<data name="&gt;&gt;BTN_tunning_dropout.Type" xml:space="preserve">
<value>MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BTN_tunning_dropout.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;BTN_tunning_dropout.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="zg1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
Expand All @@ -5120,7 +5150,7 @@
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;zg1.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value>
Expand Down

0 comments on commit df117e3

Please sign in to comment.