Add additional polish

master
Caleb Fontenot 2022-10-03 15:49:04 +07:00
parent c401da8662
commit d9c6c69486
14 changed files with 216 additions and 27 deletions

@ -38,12 +38,12 @@
this.decimalTextBox = new System.Windows.Forms.TextBox();
this.exitButton = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.octalRadioButton = new System.Windows.Forms.RadioButton();
this.decimalRadioButton = new System.Windows.Forms.RadioButton();
this.hexRadioButton = new System.Windows.Forms.RadioButton();
this.binaryRadioButton = new System.Windows.Forms.RadioButton();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.octalTextBox = new System.Windows.Forms.TextBox();
this.octalRadioButton = new System.Windows.Forms.RadioButton();
this.groupBox1.SuspendLayout();
this.binaryGroupBox.SuspendLayout();
this.groupBox2.SuspendLayout();
@ -151,6 +151,18 @@
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Which Base would you like to convert from?";
//
// octalRadioButton
//
this.octalRadioButton.AutoSize = true;
this.octalRadioButton.Location = new System.Drawing.Point(159, 19);
this.octalRadioButton.Name = "octalRadioButton";
this.octalRadioButton.Size = new System.Drawing.Size(50, 17);
this.octalRadioButton.TabIndex = 3;
this.octalRadioButton.TabStop = true;
this.octalRadioButton.Text = "Octal";
this.octalRadioButton.UseVisualStyleBackColor = true;
this.octalRadioButton.CheckedChanged += new System.EventHandler(this.octalRadioButton_CheckedChanged);
//
// decimalRadioButton
//
this.decimalRadioButton.AutoSize = true;
@ -206,18 +218,6 @@
this.octalTextBox.TabIndex = 0;
this.octalTextBox.Text = "0";
//
// octalRadioButton
//
this.octalRadioButton.AutoSize = true;
this.octalRadioButton.Location = new System.Drawing.Point(159, 19);
this.octalRadioButton.Name = "octalRadioButton";
this.octalRadioButton.Size = new System.Drawing.Size(50, 17);
this.octalRadioButton.TabIndex = 3;
this.octalRadioButton.TabStop = true;
this.octalRadioButton.Text = "Octal";
this.octalRadioButton.UseVisualStyleBackColor = true;
this.octalRadioButton.CheckedChanged += new System.EventHandler(this.octalRadioButton_CheckedChanged);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -232,7 +232,7 @@
this.Controls.Add(this.clearButton);
this.Controls.Add(this.computeButton);
this.Name = "Form1";
this.Text = "Base Converter";
this.Text = "Base Converter - Caleb Fontenot";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.binaryGroupBox.ResumeLayout(false);

@ -27,7 +27,7 @@ namespace WindowsFormsApplication1
case "hexTextBox":
hexTextBox.Focus();
break;
case "octalRadioButton":
case "octalTextBox":
octalTextBox.Focus();
break;
case "decimalTextBox":
@ -72,12 +72,16 @@ namespace WindowsFormsApplication1
hexNum = decimalNum;
binNum = decimalNum;
octalNum = decimalNum;
//Refocus the textbox when done.
currentFocus("decimalTextBox");
}
if (octalRadioButton.Checked) {
// The octal radio button is pressed.
hexNum = octalNum;
binNum = octalNum;
decimalNum = octalNum;
//Refocus the textbox when done.
currentFocus("octalTextBox");
}
if (hexRadioButton.Checked)
@ -86,7 +90,8 @@ namespace WindowsFormsApplication1
binNum = hexNum;
decimalNum = hexNum;
octalNum = hexNum;
//Refocus the textbox when done.
currentFocus("hexTextBox");
}
if (binaryRadioButton.Checked)
{
@ -94,12 +99,17 @@ namespace WindowsFormsApplication1
hexNum = binNum;
decimalNum = binNum;
octalNum = binNum;
//Refocus the textbox when done.
currentFocus("binaryTextBox");
}
// Print output
decimalTextBox.Text = decimalNum.ToString();
hexTextBox.Text = hexNum.ToString("X");
binaryTextBox.Text = Convert.ToString(binNum, 2);
octalTextBox.Text = Convert.ToString(octalNum, 8);
}
private void clearButton_Click(object sender, EventArgs e)

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="BaseConverter.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="BaseConverter" asmv2:product="BaseConverter" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" codebase="BaseConverter.exe.manifest" size="3603">
<assemblyIdentity name="BaseConverter.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>cEX9hsGiiCx0dr+SNR+Qk8kAYHI=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="BaseConverter.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="BaseConverter" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<commandLine file="BaseConverter.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!--
UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Core" version="3.5.0.0" publicKeyToken="b77a5c561934e089" language="neutral" processorArchitecture="msil" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" language="neutral" processorArchitecture="msil" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="BaseConverter.exe" size="12800">
<assemblyIdentity name="BaseConverter" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>dZXLG29YzjAwtfDgkFQyhpdG14U=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="BaseConverter.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="BaseConverter" asmv2:product="BaseConverter" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" codebase="BaseConverter.exe.manifest" size="3603">
<assemblyIdentity name="BaseConverter.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>cEX9hsGiiCx0dr+SNR+Qk8kAYHI=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="BaseConverter.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="BaseConverter" asmv2:product="BaseConverter" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" codebase="BaseConverter.exe.manifest" size="3603">
<assemblyIdentity name="BaseConverter.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>cEX9hsGiiCx0dr+SNR+Qk8kAYHI=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>

@ -6,3 +6,7 @@ C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Project
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\bin\Debug\BaseConverter.pdb
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\obj\Debug\BaseConverter.exe
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\obj\Debug\BaseConverter.pdb
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\bin\Debug\BaseConverter.exe.manifest
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\bin\Debug\BaseConverter.application
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\obj\Debug\BaseConverter.exe.manifest
C:\Documents and Settings\Caleb Fontenot\My Documents\Visual Studio 2008\Projects\BaseConverter\BaseConverter\obj\Debug\BaseConverter.application

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="BaseConverter.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="BaseConverter" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<commandLine file="BaseConverter.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!--
UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Core" version="3.5.0.0" publicKeyToken="b77a5c561934e089" language="neutral" processorArchitecture="msil" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" language="neutral" processorArchitecture="msil" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="BaseConverter.exe" size="12800">
<assemblyIdentity name="BaseConverter" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>dZXLG29YzjAwtfDgkFQyhpdG14U=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>