Update x altri test gestione MDI
This commit is contained in:
Generated
+2
-2
@@ -587,7 +587,7 @@
|
||||
//
|
||||
this.displTimer.Tick += new System.EventHandler(this.displTimer_Tick);
|
||||
//
|
||||
// MainForm
|
||||
// AdapterForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
@@ -599,7 +599,7 @@
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "MainForm";
|
||||
this.Name = "AdapterForm";
|
||||
this.Text = "IOB-WIN";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Shown += new System.EventHandler(this.MainForm_Shown);
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TestForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TestForm.Designer.cs">
|
||||
<DependentUpon>TestForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="utils.cs" />
|
||||
<Content Include="dump\dump.c" />
|
||||
<Content Include="dump\dump.exe">
|
||||
|
||||
Generated
+51
-15
@@ -30,7 +30,12 @@
|
||||
{
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.windowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.checkForUpdatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openChildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.closeChildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// statusStrip1
|
||||
@@ -45,37 +50,64 @@
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.openChildToolStripMenuItem,
|
||||
this.closeChildToolStripMenuItem,
|
||||
this.windowToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1048, 24);
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1048, 28);
|
||||
this.menuStrip1.TabIndex = 2;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 27);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1048, 100);
|
||||
this.tableLayoutPanel1.TabIndex = 3;
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.checkForUpdatesToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// windowToolStripMenuItem
|
||||
//
|
||||
this.windowToolStripMenuItem.Name = "windowToolStripMenuItem";
|
||||
this.windowToolStripMenuItem.Size = new System.Drawing.Size(76, 24);
|
||||
this.windowToolStripMenuItem.Text = "&Window";
|
||||
//
|
||||
// checkForUpdatesToolStripMenuItem
|
||||
//
|
||||
this.checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
|
||||
this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(205, 26);
|
||||
this.checkForUpdatesToolStripMenuItem.Text = "Check for &Updates";
|
||||
//
|
||||
// openChildToolStripMenuItem
|
||||
//
|
||||
this.openChildToolStripMenuItem.Name = "openChildToolStripMenuItem";
|
||||
this.openChildToolStripMenuItem.Size = new System.Drawing.Size(69, 24);
|
||||
this.openChildToolStripMenuItem.Text = "Child +";
|
||||
this.openChildToolStripMenuItem.Click += new System.EventHandler(this.openChildToolStripMenuItem_Click);
|
||||
//
|
||||
// closeChildToolStripMenuItem
|
||||
//
|
||||
this.closeChildToolStripMenuItem.Name = "closeChildToolStripMenuItem";
|
||||
this.closeChildToolStripMenuItem.Size = new System.Drawing.Size(65, 24);
|
||||
this.closeChildToolStripMenuItem.Text = "Child -";
|
||||
this.closeChildToolStripMenuItem.Click += new System.EventHandler(this.closeChildToolStripMenuItem_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1048, 807);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.IsMdiContainer = true;
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "MainForm";
|
||||
this.Text = "IOB MANAGER";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -85,6 +117,10 @@
|
||||
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem checkForUpdatesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem windowToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openChildToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem closeChildToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -16,5 +16,37 @@ namespace IOB_WIN
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected void closeActiveChild()
|
||||
{
|
||||
if (this.HasChildren)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.ActiveMdiChild.Close();
|
||||
this.LayoutMdi(MdiLayout.TileHorizontal);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
protected void openChild()
|
||||
{
|
||||
TestForm child = new TestForm();
|
||||
child.MdiParent = this;
|
||||
child.Show();
|
||||
this.LayoutMdi(MdiLayout.TileHorizontal);
|
||||
}
|
||||
|
||||
private void closeChildToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
closeActiveChild();
|
||||
}
|
||||
|
||||
private void openChildToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
openChild();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace IOB_WIN
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new AdapterForm());
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+38
@@ -0,0 +1,38 @@
|
||||
namespace IOB_WIN
|
||||
{
|
||||
partial class TestForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Text = "TestForm";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace IOB_WIN
|
||||
{
|
||||
public partial class TestForm : Form
|
||||
{
|
||||
public TestForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user