MP3 progress

This commit is contained in:
2022-11-03 14:47:04 -05:00
parent ab47a38924
commit 669b1a8d54
65 changed files with 674 additions and 30 deletions

View File

@@ -29,25 +29,88 @@
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.inputTextBox = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.outputTextBox = new System.Windows.Forms.TextBox();
this.calculateButton = new System.Windows.Forms.Button();
this.exitButton = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.inputTextBox);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(200, 100);
this.groupBox1.Size = new System.Drawing.Size(200, 55);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
this.groupBox1.Text = "Enter n to calculate a factorial";
//
// inputTextBox
//
this.inputTextBox.Location = new System.Drawing.Point(6, 22);
this.inputTextBox.Name = "inputTextBox";
this.inputTextBox.Size = new System.Drawing.Size(188, 23);
this.inputTextBox.TabIndex = 0;
this.inputTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.outputTextBox);
this.groupBox2.Location = new System.Drawing.Point(12, 73);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(200, 54);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Output";
//
// outputTextBox
//
this.outputTextBox.Location = new System.Drawing.Point(6, 22);
this.outputTextBox.Name = "outputTextBox";
this.outputTextBox.ReadOnly = true;
this.outputTextBox.Size = new System.Drawing.Size(188, 23);
this.outputTextBox.TabIndex = 0;
this.outputTextBox.Text = "0";
this.outputTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// calculateButton
//
this.calculateButton.Location = new System.Drawing.Point(12, 133);
this.calculateButton.Name = "calculateButton";
this.calculateButton.Size = new System.Drawing.Size(100, 23);
this.calculateButton.TabIndex = 2;
this.calculateButton.Text = "Calculate!";
this.calculateButton.UseVisualStyleBackColor = true;
this.calculateButton.Click += new System.EventHandler(this.calculateButton_Click);
//
// exitButton
//
this.exitButton.Location = new System.Drawing.Point(112, 133);
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(100, 23);
this.exitButton.TabIndex = 3;
this.exitButton.Text = "Exit";
this.exitButton.UseVisualStyleBackColor = true;
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ClientSize = new System.Drawing.Size(223, 170);
this.Controls.Add(this.exitButton);
this.Controls.Add(this.calculateButton);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "Form1";
this.Text = "Form1";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
@@ -55,5 +118,10 @@
#endregion
private GroupBox groupBox1;
private TextBox inputTextBox;
private GroupBox groupBox2;
private TextBox outputTextBox;
private Button calculateButton;
private Button exitButton;
}
}

View File

@@ -6,5 +6,39 @@ namespace Factorial_CalebFontenot
{
InitializeComponent();
}
private void exitButton_Click(object sender, EventArgs e)
{
this.Close();
}
private void calculateButton_Click(object sender, EventArgs e)
{
// Reset focus to inputTextBox.
inputTextBox.Focus();
// Define variables
long n, factorial = 0;
if (!long.TryParse(inputTextBox.Text, out n)) {
MessageBox.Show("non numeric input.");
}
// Check to see if the number given is not negative
if (!(n <= 0))
{
// Calculate factorial.
factorial = n;
for (int i = (int)n; i > 2; i--)
{
factorial *= (i - 1);
}
outputTextBox.Text = factorial.ToString("N");
}
else {
MessageBox.Show("Invalid input, non-negative number entered.");
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"Factorial_CalebFontenot/1.0.0": {
"runtime": {
"Factorial_CalebFontenot.dll": {}
}
}
}
},
"libraries": {
"Factorial_CalebFontenot/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@@ -0,0 +1,15 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "6.0.0"
}
]
}
}

View File

@@ -13,4 +13,4 @@ build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Factorial_CalebFontenot
build_property.ProjectDir = Z:\home\caleb\Documents\ASDV-C-Sharp\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\
build_property.ProjectDir = Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\

View File

@@ -0,0 +1,17 @@
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\bin\Debug\net6.0-windows\Factorial_CalebFontenot.exe
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\bin\Debug\net6.0-windows\Factorial_CalebFontenot.deps.json
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\bin\Debug\net6.0-windows\Factorial_CalebFontenot.runtimeconfig.json
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\bin\Debug\net6.0-windows\Factorial_CalebFontenot.dll
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\bin\Debug\net6.0-windows\Factorial_CalebFontenot.pdb
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.csproj.AssemblyReference.cache
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.Form1.resources
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.csproj.GenerateResource.cache
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.GeneratedMSBuildEditorConfig.editorconfig
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.AssemblyInfoInputs.cache
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.AssemblyInfo.cs
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.csproj.CoreCompileInputs.cache
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.dll
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\refint\Factorial_CalebFontenot.dll
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.pdb
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\Factorial_CalebFontenot.genruntimeconfig.cache
Z:\media\DataEXT4\Documents\ASDV C#\MP3\Factorial_CalebFontenot\Factorial_CalebFontenot\obj\Debug\net6.0-windows\ref\Factorial_CalebFontenot.dll

View File

@@ -13,8 +13,7 @@
],
"additionalProbingPaths": [
"C:\\Users\\caleb\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\caleb\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
"C:\\Users\\caleb\\.nuget\\packages"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true

View File

@@ -0,0 +1 @@
1d534fffc3af4ce56aa02c38a988828bb96719d6

View File

@@ -1,24 +1,20 @@
{
"format": 1,
"restore": {
"Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj": {}
"Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj": {}
},
"projects": {
"Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj": {
"Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectUniqueName": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectName": "Factorial_CalebFontenot",
"projectPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"packagesPath": "C:\\Users\\caleb\\.nuget\\packages\\",
"outputPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\obj\\",
"outputPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\caleb\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
@@ -62,7 +58,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400\\RuntimeIdentifierGraph.json"
}
}
}

View File

@@ -5,12 +5,11 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\caleb\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\caleb\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\caleb\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View File

@@ -8,24 +8,19 @@
"net6.0-windows7.0": []
},
"packageFolders": {
"C:\\Users\\caleb\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
"C:\\Users\\caleb\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectUniqueName": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectName": "Factorial_CalebFontenot",
"projectPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"packagesPath": "C:\\Users\\caleb\\.nuget\\packages\\",
"outputPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\obj\\",
"outputPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\caleb\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
@@ -69,7 +64,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400\\RuntimeIdentifierGraph.json"
}
}
}

View File

@@ -1,8 +1,8 @@
{
"version": 2,
"dgSpecHash": "7WvA2SPszjxrqlfLKbSju43AiLsNDiFRvVgYDaUAnI0+wBF9JRdMnK8fQ3LG89WhiZZaAk32zIx4DkZK21uiDA==",
"dgSpecHash": "9yf7dfZJ+w915a+g6c86SYr3gIycagQV7Tx9UMkWCM/sM0aPJIZQ+RuUsGp+SOt4mCIf52HWnb39vtRTSEhR/w==",
"success": true,
"projectFilePath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"projectFilePath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\MP3\\Factorial_CalebFontenot\\Factorial_CalebFontenot\\Factorial_CalebFontenot.csproj",
"expectedPackageFiles": [],
"logs": []
}