[GraphicsTester.GDI] scrollable graphics area
Make the split panel scrollable (to the size of the selected Scenario). This improves the window, but not all Scenario objects have accurate dimensions presently. Changes in the designer files (indentation and deletion of comments) were performed automatically by the visual Visual Studio 2022 (preview) editor.
This commit is contained in:
Родитель
a8feeb0620
Коммит
32e66dc3e1
|
@ -30,74 +30,81 @@ namespace GraphicsTester.GDI
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
GDIDirectGraphicsRenderer gdiDirectGraphicsRenderer1 = new GDIDirectGraphicsRenderer();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.gdiGraphicsView1 = new GDIGraphicsView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.listBox1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.gdiGraphicsView1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1308, 737);
|
||||
this.splitContainer1.SplitterDistance = 436;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(433, 732);
|
||||
this.listBox1.TabIndex = 0;
|
||||
//
|
||||
// gdiGraphicsView1
|
||||
//
|
||||
this.gdiGraphicsView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.gdiGraphicsView1.BackgroundColor = null;
|
||||
this.gdiGraphicsView1.Dirty = false;
|
||||
this.gdiGraphicsView1.Drawable = null;
|
||||
this.gdiGraphicsView1.Location = new System.Drawing.Point(3, 3);
|
||||
this.gdiGraphicsView1.Name = "gdiGraphicsView1";
|
||||
gdiDirectGraphicsRenderer1.BackgroundColor = null;
|
||||
gdiDirectGraphicsRenderer1.Dirty = false;
|
||||
gdiDirectGraphicsRenderer1.Drawable = null;
|
||||
this.gdiGraphicsView1.Renderer = gdiDirectGraphicsRenderer1;
|
||||
this.gdiGraphicsView1.Size = new System.Drawing.Size(862, 731);
|
||||
this.gdiGraphicsView1.TabIndex = 0;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1308, 737);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
Microsoft.Maui.Graphics.GDI.GDIDirectGraphicsRenderer gdiDirectGraphicsRenderer1 = new Microsoft.Maui.Graphics.GDI.GDIDirectGraphicsRenderer();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.gdiGraphicsView1 = new Microsoft.Maui.Graphics.GDI.GDIGraphicsView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.listBox1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.AutoScroll = true;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.gdiGraphicsView1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1526, 850);
|
||||
this.splitContainer1.SplitterDistance = 508;
|
||||
this.splitContainer1.SplitterWidth = 5;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.ItemHeight = 15;
|
||||
this.listBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(503, 844);
|
||||
this.listBox1.TabIndex = 0;
|
||||
//
|
||||
// gdiGraphicsView1
|
||||
//
|
||||
this.gdiGraphicsView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.gdiGraphicsView1.BackgroundColor = null;
|
||||
this.gdiGraphicsView1.Dirty = false;
|
||||
this.gdiGraphicsView1.Drawable = null;
|
||||
this.gdiGraphicsView1.Location = new System.Drawing.Point(4, 3);
|
||||
this.gdiGraphicsView1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.gdiGraphicsView1.Name = "gdiGraphicsView1";
|
||||
gdiDirectGraphicsRenderer1.BackgroundColor = null;
|
||||
gdiDirectGraphicsRenderer1.Dirty = false;
|
||||
gdiDirectGraphicsRenderer1.Drawable = null;
|
||||
this.gdiGraphicsView1.Renderer = gdiDirectGraphicsRenderer1;
|
||||
this.gdiGraphicsView1.Size = new System.Drawing.Size(1006, 843);
|
||||
this.gdiGraphicsView1.TabIndex = 0;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1526, 850);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace GraphicsTester.GDI
|
|||
{
|
||||
var item = ScenarioList.Scenarios[listBox1.SelectedIndex];
|
||||
gdiGraphicsView1.Drawable = item;
|
||||
splitContainer1.Panel2.AutoScrollMinSize = new System.Drawing.Size((int)item.Width, (int)item.Height);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,64 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
|
Загрузка…
Ссылка в новой задаче