# HG changeset patch
# User StephaneLenclud
# Date 1488128410 -3600
# Node ID f90d1e1019322768345d0d44510fca9204a36119
# Parent 10f0de70b69bf4ea58b9fadd3b3249be4e779d72
Published v1.4.5
Disable static display layout in release build.
diff -r 10f0de70b69b -r f90d1e101932 Server/FormMain.cs
--- a/Server/FormMain.cs Sun Jan 15 18:49:06 2017 +0100
+++ b/Server/FormMain.cs Sun Feb 26 18:00:10 2017 +0100
@@ -255,8 +255,22 @@
}
#if !DEBUG
- //When not debugging we want the screen to be empty until a client takes over
+ // When not debugging we want the screen to be empty until a client takes over
ClearLayout(iTableLayoutPanelCurrentClient);
+
+ // Display layout should be empty too
+ // TODO: Eventually we will need to dynamically create and destroy our client table layout
+ DoClearLayout(iTableLayoutPanelDisplay);
+ iTableLayoutPanelDisplay.ColumnCount = 1;
+ iTableLayoutPanelDisplay.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
+ iTableLayoutPanelDisplay.RowCount = 1;
+ iTableLayoutPanelDisplay.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
+ //
+ iTableLayoutPanelDisplay.SetRowSpan(iTableLayoutPanelCurrentClient, 1);
+ iTableLayoutPanelDisplay.SetColumnSpan(iTableLayoutPanelCurrentClient, 1);
+ iTableLayoutPanelDisplay.Controls.Add(iTableLayoutPanelCurrentClient,0,0);
+
+ // Is that needed? Why just in release?
iCurrentClientData = null;
#else
//When developing we want at least one client for testing
@@ -1625,14 +1639,23 @@
while (aPanel.Controls.Count>0)
{
// Dispose our last item
- aPanel.Controls[aPanel.Controls.Count-1].Dispose();
+ aPanel.Controls[aPanel.Controls.Count - 1].Dispose();
}
+ DoClearLayout(aPanel);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ static private void DoClearLayout(TableLayoutPanel aPanel)
+ {
aPanel.Controls.Clear();
aPanel.RowStyles.Clear();
aPanel.ColumnStyles.Clear();
aPanel.RowCount = 0;
- aPanel.ColumnCount = 0;
+ aPanel.ColumnCount = 0;
}
///
@@ -2274,7 +2297,7 @@
///
/// Update our display table layout.
- /// Will instanciated every field control as defined by our client.
+ /// Will instanciate every field control as defined by our client.
/// Fields must be specified by rows from the left.
///
///
@@ -2412,8 +2435,11 @@
picture.Margin = new System.Windows.Forms.Padding(0);
picture.Name = "pictureBox" + aField;
- // Make sure visualization is running
- iAudioManager.AddVisualizer();
+ // Make sure visualization is running
+ if (iAudioManager != null) // When closing main form with multiple client audio manager can be null. I guess we should fix the core issue instead.
+ {
+ iAudioManager.AddVisualizer();
+ }
// Notify audio manager when we don't need audio visualizer anymore
picture.Disposed += (sender, e) =>
diff -r 10f0de70b69b -r f90d1e101932 Server/SharpDisplayManager.csproj
--- a/Server/SharpDisplayManager.csproj Sun Jan 15 18:49:06 2017 +0100
+++ b/Server/SharpDisplayManager.csproj Sun Feb 26 18:00:10 2017 +0100
@@ -34,11 +34,11 @@
index.htm
false
0
- 1.4.3.0
+ 1.4.5.0
false
true
true
- true
+ false
AnyCPU
@@ -88,10 +88,10 @@
true
- 5BAED0690B4D99A5D9E89E562A8B9A2BE342929E
+ 83A2785F3A22E7BD2E504F7D873075F2903F7812
- SharpDisplayManager_TemporaryKey.pfx
+ SharpDisplayManager_1_TemporaryKey.pfx
true
diff -r 10f0de70b69b -r f90d1e101932 Server/SharpDisplayManager_TemporaryKey.pfx
Binary file Server/SharpDisplayManager_TemporaryKey.pfx has changed