From e4ea66b5dc3ec2cc5f5fa3b44ae3c83f8537fdcd Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Sun, 3 Jun 2012 08:08:47 +0800 Subject: [PATCH] APM Planner 1.1.91 fix datasource binding exception. --- .../Controls/BackstageView/BackstageView.cs | 14 +- .../ConfigFlightModes.Designer.cs | 4 + .../ConfigurationView/ConfigFlightModes.resx | 4 +- Tools/ArdupilotMegaPlanner/Msi/installer.wxs | 368 +++++++++--------- .../Properties/AssemblyInfo.cs | 2 +- 5 files changed, 202 insertions(+), 190 deletions(-) diff --git a/Tools/ArdupilotMegaPlanner/Controls/BackstageView/BackstageView.cs b/Tools/ArdupilotMegaPlanner/Controls/BackstageView/BackstageView.cs index 0f9e0591b1..45c5e2d68a 100644 --- a/Tools/ArdupilotMegaPlanner/Controls/BackstageView/BackstageView.cs +++ b/Tools/ArdupilotMegaPlanner/Controls/BackstageView/BackstageView.cs @@ -249,22 +249,24 @@ namespace ArdupilotMega.Controls.BackstageView { // deactivate the old page _activePage.Page.Close(); - Pages.ForEach(x => - { - x.Page.Visible = false; - }); + // Pages.ForEach(x => + // { + // x.Page.Visible = false; + // }); + // deactivate button _activePage.Page.Visible = false; var oldButton = this.pnlMenu.Controls.OfType().Single(b => b.Tag == _activePage); oldButton.IsSelected = false; + // ensure fields have been init + associatedPage.Page.DoLoad(new EventArgs()); + // show it associatedPage.Page.Visible = true; var newButton = this.pnlMenu.Controls.OfType().Single(b => b.Tag == associatedPage); newButton.IsSelected = true; _activePage = associatedPage; - - _activePage.Page.DoLoad(new EventArgs()); } public void Close() diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs index a9c3c3d324..23b51bcdcb 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs @@ -120,6 +120,10 @@ this.lbl_currentmode.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.currentStateBindingSource, "mode", true)); this.lbl_currentmode.Name = "lbl_currentmode"; // + // currentStateBindingSource + // + this.currentStateBindingSource.DataSource = typeof(ArdupilotMega.CurrentState); + // // label12 // resources.ApplyResources(this.label12, "label12"); diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.resx index 5fe9928d4b..a87aca3c3e 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.resx +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFlightModes.resx @@ -946,7 +946,7 @@ BUT_SaveModes - ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4536.38105, Culture=neutral, PublicKeyToken=null $this @@ -973,6 +973,6 @@ ConfigFlightModes - System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4536.38105, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/Msi/installer.wxs b/Tools/ArdupilotMegaPlanner/Msi/installer.wxs index c8fa517040..342ffa31d7 100644 --- a/Tools/ArdupilotMegaPlanner/Msi/installer.wxs +++ b/Tools/ArdupilotMegaPlanner/Msi/installer.wxs @@ -2,14 +2,14 @@ - + - - + + @@ -31,209 +31,215 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + @@ -275,26 +281,26 @@ - - - - - - - - - + + + + + + + + - - - + + + - - - - + + + + + @@ -315,7 +321,7 @@ - +