From 6bf0a1d916d2cfd920e7b16df9993435d3f60046 Mon Sep 17 00:00:00 2001 From: Riley McGee <mcgeer@mcmaster.ca> Date: Sun, 20 Nov 2016 23:37:56 -0500 Subject: [PATCH] SaveXbyY --- src/Gifitti/Gifitti/Gifitti.csproj | 9 ++ src/Gifitti/Gifitti/Models/GifModel.cs | 3 - .../View_Models/SaveAsXbyYPrompt.Designer.cs | 113 +++++++++++++++++ .../Gifitti/View_Models/SaveAsXbyYPrompt.cs | 30 +++++ .../Gifitti/View_Models/SaveAsXbyYPrompt.resx | 120 ++++++++++++++++++ 5 files changed, 272 insertions(+), 3 deletions(-) create mode 100644 src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.Designer.cs create mode 100644 src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.cs create mode 100644 src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.resx diff --git a/src/Gifitti/Gifitti/Gifitti.csproj b/src/Gifitti/Gifitti/Gifitti.csproj index 2ec8529..e65476a 100644 --- a/src/Gifitti/Gifitti/Gifitti.csproj +++ b/src/Gifitti/Gifitti/Gifitti.csproj @@ -81,6 +81,12 @@ <Compile Include="View_Models\HelpContext.Designer.cs"> <DependentUpon>HelpContext.cs</DependentUpon> </Compile> + <Compile Include="View_Models\SaveAsXbyYPrompt.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="View_Models\SaveAsXbyYPrompt.Designer.cs"> + <DependentUpon>SaveAsXbyYPrompt.cs</DependentUpon> + </Compile> <EmbeddedResource Include="View_Models\MainForm.resx"> <DependentUpon>MainForm.cs</DependentUpon> </EmbeddedResource> @@ -96,6 +102,9 @@ <EmbeddedResource Include="View_Models\HelpContext.resx"> <DependentUpon>HelpContext.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="View_Models\SaveAsXbyYPrompt.resx"> + <DependentUpon>SaveAsXbyYPrompt.cs</DependentUpon> + </EmbeddedResource> <None Include="packages.config" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> diff --git a/src/Gifitti/Gifitti/Models/GifModel.cs b/src/Gifitti/Gifitti/Models/GifModel.cs index b8636cf..4ac829b 100644 --- a/src/Gifitti/Gifitti/Models/GifModel.cs +++ b/src/Gifitti/Gifitti/Models/GifModel.cs @@ -9,9 +9,6 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; -/// <summary> -/// Model representation of system types -/// </summary> namespace Gifitti.Models { /// <summary> diff --git a/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.Designer.cs b/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.Designer.cs new file mode 100644 index 0000000..17ffac8 --- /dev/null +++ b/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.Designer.cs @@ -0,0 +1,113 @@ +namespace Gifitti.View_Models +{ + partial class SaveAsXbyYPrompt + { + /// <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.HeightTextBox = new System.Windows.Forms.TextBox(); + this.WidthTextBox = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.SaveAsButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // HeightTextBox + // + this.HeightTextBox.AccessibleDescription = "User Input for Height"; + this.HeightTextBox.AccessibleName = "HeightTextBox"; + this.HeightTextBox.Location = new System.Drawing.Point(166, 84); + this.HeightTextBox.Name = "HeightTextBox"; + this.HeightTextBox.Size = new System.Drawing.Size(100, 26); + this.HeightTextBox.TabIndex = 0; + // + // WidthTextBox + // + this.WidthTextBox.AccessibleDescription = "User Input for Width"; + this.WidthTextBox.AccessibleName = "WidthTextBox"; + this.WidthTextBox.Location = new System.Drawing.Point(166, 39); + this.WidthTextBox.Name = "WidthTextBox"; + this.WidthTextBox.Size = new System.Drawing.Size(100, 26); + this.WidthTextBox.TabIndex = 1; + this.WidthTextBox.TextChanged += new System.EventHandler(this.textBox2_TextChanged); + // + // label1 + // + this.label1.AccessibleName = "WidthLabel"; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(37, 45); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(50, 20); + this.label1.TabIndex = 2; + this.label1.Text = "Width"; + // + // label2 + // + this.label2.AccessibleName = "HeightLabel"; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(37, 90); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(56, 20); + this.label2.TabIndex = 3; + this.label2.Text = "Height"; + // + // SaveAsButton + // + this.SaveAsButton.AccessibleName = "SaveAS"; + this.SaveAsButton.Location = new System.Drawing.Point(85, 196); + this.SaveAsButton.Name = "SaveAsButton"; + this.SaveAsButton.Size = new System.Drawing.Size(127, 36); + this.SaveAsButton.TabIndex = 4; + this.SaveAsButton.Text = "Save As..."; + this.SaveAsButton.UseVisualStyleBackColor = true; + this.SaveAsButton.Click += new System.EventHandler(this.button1_Click); + // + // SaveAsXbyYPrompt + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(278, 244); + this.Controls.Add(this.SaveAsButton); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.WidthTextBox); + this.Controls.Add(this.HeightTextBox); + this.Name = "SaveAsXbyYPrompt"; + this.Text = "SaveAsXbyYPrompt"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox HeightTextBox; + private System.Windows.Forms.TextBox WidthTextBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button SaveAsButton; + } +} \ No newline at end of file diff --git a/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.cs b/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.cs new file mode 100644 index 0000000..f1845f0 --- /dev/null +++ b/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.cs @@ -0,0 +1,30 @@ +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 Gifitti.View_Models +{ + public partial class SaveAsXbyYPrompt : Form + { + public SaveAsXbyYPrompt() + { + InitializeComponent(); + } + + private void textBox2_TextChanged(object sender, EventArgs e) + { + + } + + private void button1_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.resx b/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/Gifitti/Gifitti/View_Models/SaveAsXbyYPrompt.resx @@ -0,0 +1,120 @@ +<?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"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file -- GitLab