Fixed a problem resizing panels of main window. Several panels was not resizing correctly from time to time.

I have fixed it checking the Resize Event on Main panel control, and setting the size of the child to the parent size. Now it seems to work correctly (if it happens in more places, it will have to be done this way also)
This commit is contained in:
Adolfo Gómez 2013-02-13 12:06:45 +00:00
parent b601ac9e41
commit 50ff0c1da1
12 changed files with 107 additions and 83 deletions

View File

@ -29,18 +29,31 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AuthsPanel));
this.splitContainer1 = new UdsAdmin.controls.SplitContainerEx();
this.listView = new System.Windows.Forms.ListView();
this.name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.typeName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.comments = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.priority = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.splitContainer1 = new SplitContainerEx();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.listView);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// listView
//
this.listView.AutoArrange = false;
@ -77,19 +90,6 @@
//
resources.ApplyResources(this.priority, "priority");
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.listView);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// logViewer1
//
resources.ApplyResources(this.logViewer1, "logViewer1");
@ -102,6 +102,7 @@
this.Controls.Add(this.splitContainer1);
this.Name = "AuthsPanel";
this.VisibleChanged += new System.EventHandler(this.UsersPanel_VisibleChanged);
this.Resize += new System.EventHandler(this.AuthsPanel_Resize);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);

View File

@ -131,5 +131,11 @@ namespace UdsAdmin.controls.panel
logViewer1.setLogs(data.ToArray());
}
private void AuthsPanel_Resize(object sender, EventArgs e)
{
// Workaround to "dock" not fitting the content correctly
splitContainer1.Size = this.Size;
}
}
}

View File

@ -117,6 +117,17 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="splitContainer1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="name.Text" xml:space="preserve">
<value>Name</value>
</data>
@ -136,14 +147,12 @@
<data name="priority.Width" type="System.Int32, mscorlib">
<value>73</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="listView.LabelWrap" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="listView.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
@ -165,15 +174,6 @@
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
@ -241,7 +241,7 @@
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>UdsAdmin.controls.SplitContainerEx, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>

View File

@ -14,6 +14,7 @@ namespace UdsAdmin.controls.panel
public ChartPanel()
{
InitializeComponent();
ResizeRedraw = true;
}
protected override void Dispose(bool disposing)
@ -29,8 +30,6 @@ namespace UdsAdmin.controls.panel
{
this.components = new System.ComponentModel.Container();
this.DoubleBuffered = true;
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();

View File

@ -31,8 +31,6 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeployedServicePanel));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.splitContainer1 = new UdsAdmin.controls.SplitContainerEx();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
@ -56,24 +54,26 @@
this.label10 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.inUseChart = new UdsAdmin.controls.panel.ChartPanel();
this.assignedChart = new UdsAdmin.controls.panel.ChartPanel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
@ -86,20 +86,6 @@
this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.tableLayoutPanel2);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.inUseChart, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.assignedChart, 0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
@ -116,7 +102,7 @@
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.tableLayoutPanel1);
resources.ApplyResources(this.panel1, "panel1");
@ -264,6 +250,20 @@
resources.ApplyResources(this.logViewer1, "logViewer1");
this.logViewer1.Name = "logViewer1";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.tableLayoutPanel2);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.inUseChart, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.assignedChart, 0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// inUseChart
//
resources.ApplyResources(this.inUseChart, "inUseChart");
@ -278,15 +278,13 @@
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.tabControl1);
this.Name = "DeployedServicePanel";
this.VisibleChanged += new System.EventHandler(this.DeployedServicePanel_VisibleChanged);
this.Resize += new System.EventHandler(this.DeployedServicePanel_Resize);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
@ -294,6 +292,8 @@
this.panel1.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false);
}

View File

@ -150,5 +150,11 @@ namespace UdsAdmin.controls.panel
}
private void DeployedServicePanel_Resize(object sender, EventArgs e)
{
// Workaround to "dock" not fitting the content correctly
tabControl1.Size = this.Size;
}
}
}

View File

@ -118,6 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tabControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -214,7 +217,7 @@
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 27</value>
<value>3, 28</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -250,7 +253,7 @@
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 48</value>
<value>3, 50</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -289,7 +292,7 @@
<value>NoControl</value>
</data>
<data name="lName.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 4</value>
<value>233, 4</value>
</data>
<data name="lName.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -325,7 +328,7 @@
<value>NoControl</value>
</data>
<data name="lComments.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 25</value>
<value>233, 26</value>
</data>
<data name="lComments.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -361,7 +364,7 @@
<value>NoControl</value>
</data>
<data name="lBaseService.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 46</value>
<value>233, 48</value>
</data>
<data name="lBaseService.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -394,7 +397,7 @@
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 69</value>
<value>3, 72</value>
</data>
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -433,7 +436,7 @@
<value>NoControl</value>
</data>
<data name="lOsManager.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 67</value>
<value>233, 70</value>
</data>
<data name="lOsManager.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -469,7 +472,7 @@
<value>NoControl</value>
</data>
<data name="lInitial.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 88</value>
<value>233, 92</value>
</data>
<data name="lInitial.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -505,7 +508,7 @@
<value>NoControl</value>
</data>
<data name="cacheLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 112</value>
<value>3, 117</value>
</data>
<data name="cacheLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -544,7 +547,7 @@
<value>NoControl</value>
</data>
<data name="lCache.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 109</value>
<value>233, 114</value>
</data>
<data name="lCache.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -580,7 +583,7 @@
<value>NoControl</value>
</data>
<data name="cacheL2Label.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 133</value>
<value>3, 139</value>
</data>
<data name="cacheL2Label.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -619,7 +622,7 @@
<value>NoControl</value>
</data>
<data name="lL2Cache.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 130</value>
<value>233, 136</value>
</data>
<data name="lL2Cache.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -655,7 +658,7 @@
<value>NoControl</value>
</data>
<data name="lMax.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 151</value>
<value>233, 158</value>
</data>
<data name="lMax.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -691,7 +694,7 @@
<value>NoControl</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 175</value>
<value>3, 183</value>
</data>
<data name="label6.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -730,7 +733,7 @@
<value>NoControl</value>
</data>
<data name="lState.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 172</value>
<value>233, 180</value>
</data>
<data name="lState.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -766,7 +769,7 @@
<value>NoControl</value>
</data>
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 91</value>
<value>3, 95</value>
</data>
<data name="label10.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -805,7 +808,7 @@
<value>NoControl</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 154</value>
<value>3, 161</value>
</data>
<data name="label7.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -838,7 +841,7 @@
<value>10</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>367, 215</value>
<value>460, 223</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
@ -856,7 +859,7 @@
<value>1</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="groupLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lComments" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lBaseService" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lOsManager" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lInitial" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lCache" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheL2Label" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lL2Cache" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lMax" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label6" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lState" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label10" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label7" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="groupLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lComments" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lBaseService" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lOsManager" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lInitial" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lCache" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheL2Label" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lL2Cache" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lMax" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label6" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lState" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label10" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label7" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,50,Percent,50" /&gt;&lt;Rows Styles="Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -865,7 +868,7 @@
<value>0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>721, 398</value>
<value>721, 397</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
@ -904,7 +907,7 @@
<value>0, 0, 0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>721, 68</value>
<value>721, 69</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -937,7 +940,7 @@
<value>721, 474</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>398</value>
<value>397</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</value>
@ -1092,9 +1095,6 @@
<data name="&gt;&gt;tabPage2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tabControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
@ -1123,7 +1123,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>735, 507</value>
<value>731, 503</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DeployedServicePanel</value>

View File

@ -90,9 +90,9 @@
//
// tabControl1
//
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
@ -151,10 +151,12 @@
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.tabControl1);
this.DoubleBuffered = true;
this.Name = "DeployedServicesPanel";
this.VisibleChanged += new System.EventHandler(this.UsersPanel_VisibleChanged);
this.Resize += new System.EventHandler(this.DeployedServicesPanel_Resize);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);

View File

@ -178,6 +178,11 @@ namespace UdsAdmin.controls.panel
updateLogs();
}
private void DeployedServicesPanel_Resize(object sender, EventArgs e)
{
// Workaround to "dock" not fitting the content correctly
tabControl1.Size = this.Size;
}
}
}

View File

@ -162,6 +162,9 @@
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tabControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -381,9 +384,6 @@
<data name="&gt;&gt;tabPage2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tabControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>

View File

@ -21,6 +21,8 @@ namespace UdsAdmin.controls.panel
{
InitializeComponent();
ResizeRedraw = true;
listView.ListViewItemSorter = _listSorter = new gui.ListViewSorter(listView, new int[] { 3, 5 });
levelFilterCombo.Items.AddRange(new string[] { xmlrpc.Constants.LEVEL_DEBUG, xmlrpc.Constants.LEVEL_INFO,

View File

@ -463,14 +463,17 @@ namespace UdsAdmin.gui
// Hides all visible controls
foreach (Control ctrl in panel.Controls)
ctrl.Hide();
//panel.Controls.Clear();
string key = getKey(selected);
if (panel.Controls.ContainsKey(key))
{
panel.Controls[key].Show();
}
else // Don't exists, creates a new panel associated with the tree view and initializes it
{
Control ctrl;
switch( selected.Name )
switch (selected.Name)
{
case USERS:
{