New folder/Lab05-3/.vs/Lab05-3/v16/.suo
New folder/Lab05-3/App.config
New folder/Lab05-3/bin/Debug/Lab05-3.exe
New folder/Lab05-3/bin/Debug/Lab05-3.exe.config
New folder/Lab05-3/bin/Debug/Lab05-3.pdb
New folder/Lab05-3/Form1.cs
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 Lab05_3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnCalculate_Click(object sender, EventArgs e)
{
double price = 0;
int copies = int.Parse(txtCopies.Text);
if (copies <= 100)
{
price = copies * 0.1;
}
else if (copies <= 200)
{
copies = copies - 100;
price = copies * 0.06 + 10;
}
else
{
copies = copies - 200;
price = copies * 0.04 + 16;
}
double vat = 0.21 * price;
double totalPrice = price + vat;
txtPrice.Text = price.ToString();
txtVat.Text = vat.ToString();
txtTotalPrice.Text = totalPrice.ToString();
}
}
}
New folder/Lab05-3/Form1.Designer.cs
namespace Lab05_3
{
partial class Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.lblCopies = new System.Windows.Forms.Label();
this.lblPrice = new System.Windows.Forms.Label();
this.lblVat = new System.Windows.Forms.Label();
this.lblTotalPrice = new System.Windows.Forms.Label();
this.txtCopies = new System.Windows.Forms.TextBox();
this.txtPrice = new System.Windows.Forms.TextBox();
this.txtVat = new System.Windows.Forms.TextBox();
this.txtTotalPrice = new System.Windows.Forms.TextBox();
this.btnCalculate = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblCopies
//
this.lblCopies.AutoSize = true;
this.lblCopies.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCopies.Location = new System.Drawing.Point(81, 67);
this.lblCopies.Name = "lblCopies";
this.lblCopies.Size = new System.Drawing.Size(145, 17);
this.lblCopies.TabIndex = 0;
this.lblCopies.Text = "Number of copies: ";
//
// lblPrice
//
this.lblPrice.AutoSize = true;
this.lblPrice.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblPrice.Location = new System.Drawing.Point(81, 97);
this.lblPrice.Name = "lblPrice";
this.lblPrice.Size = new System.Drawing.Size(50, 17);
this.lblPrice.TabIndex = 1;
this.lblPrice.Text = "Price ";
//
// lblVat
//
this.lblVat.AutoSize = true;
this.lblVat.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblVat.Location = new System.Drawing.Point(81, 134);
this.lblVat.Name = "lblVat";
this.lblVat.Size = new System.Drawing.Size(38, 17);
this.lblVat.TabIndex = 2;
this.lblVat.Text = "VAT";
//
// lblTotalPrice
//
this.lblTotalPrice.AutoSize = true;
this.lblTotalPrice.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTotalPrice.Location = new System.Drawing.Point(81, 171);
this.lblTotalPrice.Name = "lblTotalPrice";
this.lblTotalPrice.Size = new System.Drawing.Size(87, 17);
this.lblTotalPrice.TabIndex = 3;
this.lblTotalPrice.Text = "Total Price";
//
// txtCopies
//
this.txtCopies.Location = new System.Drawing.Point(262, 62);
this.txtCopies.Name = "txtCopies";
this.txtCopies.Size = new System.Drawing.Size(111, 22);
this.txtCopies.TabIndex = 4;
//
// txtPrice
//
this.txtPrice.Location = new System.Drawing.Point(262, 97);
this.txtPrice.Name = "txtPrice";
this.txtPrice.ReadOnly = true;
this.txtPrice.Size = new System.Drawing.Size(111, 22);
this.txtPrice.TabIndex = 5;
//
// txtVat
//
this.txtVat.Location = new System.Drawing.Point(262, 134);
this.txtVat.Name = "txtVat";
this.txtVat.ReadOnly = true;
this.txtVat.Size = new System.Drawing.Size(111, 22);
this.txtVat.TabIndex = 6;
//
// txtTotalPrice
//
this.txtTotalPrice.Location = new System.Drawing.Point(262, 171);
this.txtTotalPrice.Name = "txtTotalPrice";
this.txtTotalPrice.ReadOnly = true;
this.txtTotalPrice.Size = new System.Drawing.Size(111, 22);
this.txtTotalPrice.TabIndex = 7;
//
// btnCalculate
//
this.btnCalculate.Location = new System.Drawing.Point(262, 217);
this.btnCalculate.Name = "btnCalculate";
this.btnCalculate.Size = new System.Drawing.Size(111, 23);
this.btnCalculate.TabIndex = 8;
this.btnCalculate.Text = "Calculate Price";
this.btnCalculate.UseVisualStyleBackColor = true;
this.btnCalculate.Click += new System.EventHandler(this.btnCalculate_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(577, 450);
this.Controls.Add(this.btnCalculate);
this.Controls.Add(this.txtTotalPrice);
this.Controls.Add(this.txtVat);
this.Controls.Add(this.txtPrice);
this.Controls.Add(this.txtCopies);
this.Controls.Add(this.lblTotalPrice);
this.Controls.Add(this.lblVat);
this.Controls.Add(this.lblPrice);
this.Controls.Add(this.lblCopies);
this.Name = "Form1";
this.Text = "Photocopying";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblCopies;
private System.Windows.Forms.Label lblPrice;
private System.Windows.Forms.Label lblVat;
private System.Windows.Forms.Label lblTotalPrice;
private System.Windows.Forms.TextBox txtCopies;
private System.Windows.Forms.TextBox txtPrice;
private System.Windows.Forms.TextBox txtVat;
private System.Windows.Forms.TextBox txtTotalPrice;
private System.Windows.Forms.Button btnCalculate;
}
}
New folder/Lab05-3/Form1.resx
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
New folder/Lab05-3/Lab05-3.csproj
Debug
AnyCPU
{ACABDBA6-901E-4D17-BE82-BC2072264ADB}
WinExe
Lab05_3
Lab05-3
v4.7.2
512
true
true
AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4
Form
Form1.cs
Form1.cs
ResXFileCodeGenerator
Resources.Designer.cs
Designer
True
Resources.resx
SettingsSingleFileGenerator
Settings.Designer.cs
True
Settings.settings
True
New folder/Lab05-3/Lab05-3.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30517.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab05-3", "Lab05-3.csproj", "{ACABDBA6-901E-4D17-BE82-BC2072264ADB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ACABDBA6-901E-4D17-BE82-BC2072264ADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ACABDBA6-901E-4D17-BE82-BC2072264ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACABDBA6-901E-4D17-BE82-BC2072264ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACABDBA6-901E-4D17-BE82-BC2072264ADB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3F916C29-667C-43C7-A627-69DF90EA3DCC}
EndGlobalSection
EndGlobal
New folder/Lab05-3/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
//
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
New folder/Lab05-3/obj/Debug/DesignTimeResolveAssemblyReferences.cache
New folder/Lab05-3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
New folder/Lab05-3/obj/Debug/Lab05_3.Form1.resources
New folder/Lab05-3/obj/Debug/Lab05_3.Properties.Resources.resources
New folder/Lab05-3/obj/Debug/Lab05-3.csproj.CoreCompileInputs.cache
8069502011d0681850e57a53d5a1673222f430a6
New folder/Lab05-3/obj/Debug/Lab05-3.csproj.FileListAbsolute.txt
D:\VisualStudioPrograms\Lab05-3\bin\Debug\Lab05-3.exe.config
D:\VisualStudioPrograms\Lab05-3\bin\Debug\Lab05-3.exe
D:\VisualStudioPrograms\Lab05-3\bin\Debug\Lab05-3.pdb
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05-3.csprojAssemblyReference.cache
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05_3.Form1.resources
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05_3.Properties.Resources.resources
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05-3.csproj.GenerateResource.cache
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05-3.csproj.CoreCompileInputs.cache
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05-3.exe
D:\VisualStudioPrograms\Lab05-3\obj\Debug\Lab05-3.pdb
New folder/Lab05-3/obj/Debug/Lab05-3.csproj.GenerateResource.cache
New folder/Lab05-3/obj/Debug/Lab05-3.csprojAssemblyReference.cache
New folder/Lab05-3/obj/Debug/Lab05-3.exe
New folder/Lab05-3/obj/Debug/Lab05-3.pdb
New folder/Lab05-3/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lab05_3
{
static class Program
{
///
/// The main entry point for the application.
/// [STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
New folder/Lab05-3/Properties/AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Lab05-3")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lab05-3")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("acabdba6-901e-4d17-be82-bc2072264adb")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
New folder/Lab05-3/Properties/Resources.Designer.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// //------------------------------------------------------------------------------
namespace Lab05_3.Properties
{
///
/// A strongly-typed resource class, for looking up localized strings, etc.
/// // This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
///
/// Returns the cached ResourceManager instance used by this class.
/// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lab05_3.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
New folder/Lab05-3/Properties/Resources.resx
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
New folder/Lab05-3/Properties/Settings.Designer.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// //------------------------------------------------------------------------------
namespace Lab05_3.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
New folder/Lab05-3/Properties/Settings.settings
New folder/Lab05-4/.vs/Lab05-4/v16/.suo
New folder/Lab05-4/App.config
New folder/Lab05-4/bin/Debug/Lab05-4.exe
New folder/Lab05-4/bin/Debug/Lab05-4.exe.config
New folder/Lab05-4/bin/Debug/Lab05-4.pdb
New folder/Lab05-4/Form1.cs
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 Lab05_4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnOutcome_Click(object sender, EventArgs e)
{
double income = double.Parse(txtIncome.Text);
double expenditure = double.Parse(txtExpenditure.Text);
if (expenditure > income)
{
double loss = expenditure - income;
lblOutcome.Text = "You made a loss of " + loss.ToString();
}
else if (income > expenditure)
{
double profit = income - expenditure;
lblOutcome.Text = "You made a profit of " + profit.ToString();
}
else
{
lblOutcome.Text = "You broke even";
}
}
}
}
New folder/Lab05-4/Form1.Designer.cs
namespace Lab05_4
{
partial class Form1
{
///
/// Required designer variable.
/// private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
/// ///
true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// private void InitializeComponent()
{
this.lblIncome = new System.Windows.Forms.Label();
this.lblExpenditure = new System.Windows.Forms.Label();
this.txtIncome = new System.Windows.Forms.TextBox();
this.txtExpenditure = new System.Windows.Forms.TextBox();
this.btnOutcome = new System.Windows.Forms.Button();
this.lblOutcome = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblIncome
//
this.lblIncome.AutoSize = true;
this.lblIncome.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblIncome.Location = new System.Drawing.Point(68, 80);
this.lblIncome.Name = "lblIncome";
this.lblIncome.Size = new System.Drawing.Size(59, 17);
this.lblIncome.TabIndex = 0;
this.lblIncome.Text = "Income";
//
// lblExpenditure
//
this.lblExpenditure.AutoSize = true;
this.lblExpenditure.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblExpenditure.Location = new System.Drawing.Point(68, 124);
this.lblExpenditure.Name = "lblExpenditure";
this.lblExpenditure.Size = new System.Drawing.Size(94, 17);
this.lblExpenditure.TabIndex = 1;
this.lblExpenditure.Text = "Expenditure";
//
// txtIncome
//
this.txtIncome.Location = new System.Drawing.Point(206, 80);
this.txtIncome.Name = "txtIncome";
this.txtIncome.Size = new System.Drawing.Size(100, 22);
this.txtIncome.TabIndex = 2;
//
// txtExpenditure
//
this.txtExpenditure.Location = new System.Drawing.Point(206, 124);
this.txtExpenditure.Name = "txtExpenditure";
this.txtExpenditure.Size = new System.Drawing.Size(100, 22);
this.txtExpenditure.TabIndex = 3;
//
// btnOutcome
//
this.btnOutcome.Location = new System.Drawing.Point(206, 172);
this.btnOutcome.Name = "btnOutcome";
this.btnOutcome.Size = new System.Drawing.Size(100, 23);
this.btnOutcome.TabIndex = 4;
this.btnOutcome.Text = "Outcome";
this.btnOutcome.UseVisualStyleBackColor = true;
this.btnOutcome.Click += new System.EventHandler(this.btnOutcome_Click);
//
// lblOutcome
//
this.lblOutcome.AutoSize = true;
this.lblOutcome.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOutcome.Location = new System.Drawing.Point(203, 223);
this.lblOutcome.Name = "lblOutcome";
this.lblOutcome.Size = new System.Drawing.Size(0, 17);
this.lblOutcome.TabIndex = 5;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(459, 327);
this.Controls.Add(this.lblOutcome);
this.Controls.Add(this.btnOutcome);
this.Controls.Add(this.txtExpenditure);
this.Controls.Add(this.txtIncome);
this.Controls.Add(this.lblExpenditure);
this.Controls.Add(this.lblIncome);
this.Name = "Form1";
this.Text = "Profit and Loss";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblIncome;
private System.Windows.Forms.Label lblExpenditure;
private System.Windows.Forms.TextBox txtIncome;
private System.Windows.Forms.TextBox txtExpenditure;
private System.Windows.Forms.Button btnOutcome;
private System.Windows.Forms.Label lblOutcome;
}
}
New folder/Lab05-4/Form1.resx
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
New folder/Lab05-4/Lab05-4.csproj
Debug
AnyCPU
{82215A5D-7119-44A1-8908-8157C3D3D585}
WinExe
Lab05_4
Lab05-4
v4.7.2
512
true
true
AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4
Form
Form1.cs
Form1.cs
ResXFileCodeGenerator
Resources.Designer.cs
Designer
True
Resources.resx
SettingsSingleFileGenerator
Settings.Designer.cs
True
Settings.settings
True
New folder/Lab05-4/Lab05-4.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30517.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab05-4", "Lab05-4.csproj", "{82215A5D-7119-44A1-8908-8157C3D3D585}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{82215A5D-7119-44A1-8908-8157C3D3D585}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82215A5D-7119-44A1-8908-8157C3D3D585}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82215A5D-7119-44A1-8908-8157C3D3D585}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82215A5D-7119-44A1-8908-8157C3D3D585}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {516FEE48-6476-4A28-A65D-9531F1AE83A4}
EndGlobalSection
EndGlobal
New folder/Lab05-4/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
//
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
New folder/Lab05-4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
New folder/Lab05-4/obj/Debug/Lab05_4.Form1.resources
New folder/Lab05-4/obj/Debug/Lab05_4.Properties.Resources.resources
New folder/Lab05-4/obj/Debug/Lab05-4.csproj.CoreCompileInputs.cache
8069502011d0681850e57a53d5a1673222f430a6
New folder/Lab05-4/obj/Debug/Lab05-4.csproj.FileListAbsolute.txt
D:\VisualStudioPrograms\Lab05-4\bin\Debug\Lab05-4.exe.config
D:\VisualStudioPrograms\Lab05-4\bin\Debug\Lab05-4.exe
D:\VisualStudioPrograms\Lab05-4\bin\Debug\Lab05-4.pdb
D:\VisualStudioPrograms\Lab05-4\obj\Debug\Lab05_4.Form1.resources
D:\VisualStudioPrograms\Lab05-4\obj\Debug\Lab05_4.Properties.Resources.resources
D:\VisualStudioPrograms\Lab05-4\obj\Debug\Lab05-4.csproj.GenerateResource.cache
D:\VisualStudioPrograms\Lab05-4\obj\Debug\Lab05-4.csproj.CoreCompileInputs.cache
D:\VisualStudioPrograms\Lab05-4\obj\Debug\Lab05-4.exe
D:\VisualStudioPrograms\Lab05-4\obj\Debug\Lab05-4.pdb
New folder/Lab05-4/obj/Debug/Lab05-4.csproj.GenerateResource.cache
New folder/Lab05-4/obj/Debug/Lab05-4.exe
New folder/Lab05-4/obj/Debug/Lab05-4.pdb
New folder/Lab05-4/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lab05_4
{
static class Program
{
///
/// The main entry point for the application.
/// [STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
New folder/Lab05-4/Properties/AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Lab05-4")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lab05-4")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("82215a5d-7119-44a1-8908-8157c3d3d585")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
New folder/Lab05-4/Properties/Resources.Designer.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// //------------------------------------------------------------------------------
namespace Lab05_4.Properties
{
///
/// A strongly-typed resource class, for looking up localized strings, etc.
/// // This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
///
/// Returns the cached ResourceManager instance used by this class.
/// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lab05_4.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
New folder/Lab05-4/Properties/Resources.resx
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
New folder/Lab05-4/Properties/Settings.Designer.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// //------------------------------------------------------------------------------
namespace Lab05_4.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
New folder/Lab05-4/Properties/Settings.settings
New folder/Lab05Excersice1/.vs/Lab05Excersice1/v16/.suo
New folder/Lab05Excersice1/App.config
New folder/Lab05Excersice1/bin/Debug/Lab05Excersice1.exe
New folder/Lab05Excersice1/bin/Debug/Lab05Excersice1.exe.config
New folder/Lab05Excersice1/bin/Debug/Lab05Excersice1.pdb
New folder/Lab05Excersice1/Form1.cs
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 Lab05Excersice1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
lblGender.Text = "You Selected Male";
grpAge.Enabled = true;
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
lblGender.Text = "You Selected Female";
grpAge.Enabled = true;
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
lblAge.Text = "You are under 20 years";
grpReplies.Enabled = true;
btnsummarise.Enabled = true;
}
private void radioButton4_CheckedChanged(object sender, EventArgs e)
{
lblAge.Text = "You are between 20 and 60 years";
grpReplies.Enabled = true;
btnsummarise.Enabled = true;
}
private void radioButton5_CheckedChanged(object sender, EventArgs e)
{
lblAge.Text = "You are between over 60 years";
grpReplies.Enabled = true;
btnsummarise.Enabled = true;
}
private void btnsummarise_Click(object sender, EventArgs e)
{
lstSummary.Items.Clear();
lstSummary.Items.Add(lblGender.Text);
lstSummary.Items.Add(lblAge.Text);
if (chkDrives.Checked == true)
{
lstSummary.Items.Add(chkDrives.Text);
}
if (chkHouse.Checked == true)
{
lstSummary.Items.Add(chkHouse.Text);
}
if (chkShares.Checked == true)
{
lstSummary.Items.Add(chkShares.Text);
}
}
}
}
New folder/Lab05Excersice1/Form1.Designer.cs
namespace Lab05Excersice1
{
partial class Form1
{
///
/// Required designer variable.
/// private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
/// ///
true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// private void InitializeComponent()
{
this.grpGender = new System.Windows.Forms.GroupBox();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.grpAge = new System.Windows.Forms.GroupBox();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.radioButton5 = new System.Windows.Forms.RadioButton();
this.lblGender = new System.Windows.Forms.Label();
this.lblAge = new System.Windows.Forms.Label();
this.btnsummarise = new System.Windows.Forms.Button();
this.grpReplies = new System.Windows.Forms.GroupBox();
this.chkDrives = new System.Windows.Forms.CheckBox();
this.chkHouse = new System.Windows.Forms.CheckBox();
this.chkShares = new System.Windows.Forms.CheckBox();
this.lblsummary = new System.Windows.Forms.Label();
this.lstSummary = new System.Windows.Forms.ListBox();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.grpGender.SuspendLayout();
this.grpAge.SuspendLayout();
this.grpReplies.SuspendLayout();
this.SuspendLayout();
//
// grpGender
//
this.grpGender.Controls.Add(this.radioButton1);
this.grpGender.Controls.Add(this.radioButton2);
this.grpGender.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.grpGender.Location = new System.Drawing.Point(48, 35);
this.grpGender.Name = "grpGender";
this.grpGender.Size = new System.Drawing.Size(200, 100);
this.grpGender.TabIndex = 0;
this.grpGender.TabStop = false;
this.grpGender.Text = "Gender";
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(6, 52);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(75, 21);
this.radioButton2.TabIndex = 1;
this.radioButton2.Text = "Female";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// grpAge
//
this.grpAge.Controls.Add(this.radioButton5);
this.grpAge.Controls.Add(this.radioButton4);
this.grpAge.Controls.Add(this.radioButton3);
this.grpAge.Enabled = false;
this.grpAge.Location = new System.Drawing.Point(442, 35);
this.grpAge.Name = "grpAge";
this.grpAge.Size = new System.Drawing.Size(232, 119);
this.grpAge.TabIndex = 1;
this.grpAge.TabStop = false;
this.grpAge.Text = "Age";
//
// radioButton3
//
this.radioButton3.AutoSize = true;
this.radioButton3.Location = new System.Drawing.Point(6, 25);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(88, 21);
this.radioButton3.TabIndex = 0;
this.radioButton3.TabStop = true;
this.radioButton3.Text = "Under 20";
this.radioButton3.UseVisualStyleBackColor = true;
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
//
// radioButton4
//
this.radioButton4.AutoSize = true;
this.radioButton4.Location = new System.Drawing.Point(6, 52);
this.radioButton4.Name = "radioButton4";
this.radioButton4.Size = new System.Drawing.Size(81, 21);
this.radioButton4.TabIndex = 1;
this.radioButton4.TabStop = true;
this.radioButton4.Text = "20 to 60";
this.radioButton4.UseVisualStyleBackColor = true;
this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
//
// radioButton5
//
this.radioButton5.AutoSize = true;
this.radioButton5.Location = new System.Drawing.Point(6, 79);
this.radioButton5.Name = "radioButton5";
this.radioButton5.Size = new System.Drawing.Size(80, 21);
this.radioButton5.TabIndex = 2;
this.radioButton5.TabStop = true;
this.radioButton5.Text = "Over 60";
this.radioButton5.UseVisualStyleBackColor = true;
this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
//
// lblGender
//
this.lblGender.AutoSize = true;
this.lblGender.Location = new System.Drawing.Point(45, 150);
this.lblGender.Name = "lblGender";
this.lblGender.Size = new System.Drawing.Size(64, 17);
this.lblGender.TabIndex = 2;
this.lblGender.Text = "Gender: ";
//
// lblAge
//
this.lblAge.AutoSize = true;
this.lblAge.Location = new System.Drawing.Point(439, 166);
this.lblAge.Name = "lblAge";
this.lblAge.Size = new System.Drawing.Size(41, 17);
this.lblAge.TabIndex = 3;
this.lblAge.Text = "Age: ";
//
// btnsummarise
//
this.btnsummarise.Enabled = false;
this.btnsummarise.Location = new System.Drawing.Point(277, 193);
this.btnsummarise.Name = "btnsummarise";
this.btnsummarise.Size = new System.Drawing.Size(125, 41);
this.btnsummarise.TabIndex = 4;
this.btnsummarise.Text = "Summarise";
this.btnsummarise.UseVisualStyleBackColor = true;
this.btnsummarise.Click += new System.EventHandler(this.btnsummarise_Click);
//
// grpReplies
//
this.grpReplies.Controls.Add(this.chkShares);
this.grpReplies.Controls.Add(this.chkHouse);
this.grpReplies.Controls.Add(this.chkDrives);
this.grpReplies.Enabled = false;
this.grpReplies.Location = new System.Drawing.Point(48, 256);
this.grpReplies.Name = "grpReplies";
this.grpReplies.Size = new System.Drawing.Size(200, 117);
this.grpReplies.TabIndex = 5;
this.grpReplies.TabStop = false;
this.grpReplies.Text = "Replies";
//
// chkDrives
//
this.chkDrives.AutoSize = true;
this.chkDrives.Location = new System.Drawing.Point(6, 30);
this.chkDrives.Name = "chkDrives";
this.chkDrives.Size = new System.Drawing.Size(108, 21);
this.chkDrives.TabIndex = 0;
this.chkDrives.Text = "Drives a Car";
this.chkDrives.UseVisualStyleBackColor = true;
//
// chkHouse
//
this.chkHouse.AutoSize = true;
this.chkHouse.Location = new System.Drawing.Point(6, 57);
this.chkHouse.Name = "chkHouse";
this.chkHouse.Size = new System.Drawing.Size(122, 21);
this.chkHouse.TabIndex = 1;
this.chkHouse.Text = "Owns a House";
this.chkHouse.UseVisualStyleBackColor = true;
//
// chkShares
//
this.chkShares.AutoSize = true;
this.chkShares.Location = new System.Drawing.Point(6, 84);
this.chkShares.Name = "chkShares";
this.chkShares.Size = new System.Drawing.Size(114, 21);
this.chkShares.TabIndex = 2;
this.chkShares.Text = "Owns Shares";
this.chkShares.UseVisualStyleBackColor = true;
//
// lblsummary
//
this.lblsummary.AutoSize = true;
this.lblsummary.Location = new System.Drawing.Point(445, 236);
this.lblsummary.Name = "lblsummary";
this.lblsummary.Size = new System.Drawing.Size(75, 17);
this.lblsummary.TabIndex = 7;
this.lblsummary.Text = "Summary: ";
//
// lstSummary
//
this.lstSummary.FormattingEnabled = true;
this.lstSummary.ItemHeight = 16;
this.lstSummary.Location = new System.Drawing.Point(442, 256);
this.lstSummary.Name = "lstSummary";
this.lstSummary.Size = new System.Drawing.Size(232, 116);
this.lstSummary.TabIndex = 8;
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Location = new System.Drawing.Point(6, 25);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(59, 21);
this.radioButton1.TabIndex = 2;
this.radioButton1.Text = "Male";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(729, 450);
this.Controls.Add(this.lstSummary);
this.Controls.Add(this.lblsummary);
this.Controls.Add(this.grpReplies);
this.Controls.Add(this.btnsummarise);
this.Controls.Add(this.lblAge);
this.Controls.Add(this.lblGender);
this.Controls.Add(this.grpAge);
this.Controls.Add(this.grpGender);
this.Name = "Form1";
this.Text = "Profile";
this.grpGender.ResumeLayout(false);
this.grpGender.PerformLayout();
this.grpAge.ResumeLayout(false);
this.grpAge.PerformLayout();
this.grpReplies.ResumeLayout(false);
this.grpReplies.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.GroupBox grpAge;
private System.Windows.Forms.RadioButton radioButton5;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.Label lblGender;
private System.Windows.Forms.Label lblAge;
private System.Windows.Forms.Button btnsummarise;
private System.Windows.Forms.GroupBox grpReplies;
private System.Windows.Forms.CheckBox chkShares;
private System.Windows.Forms.CheckBox chkHouse;
private System.Windows.Forms.CheckBox chkDrives;
private System.Windows.Forms.Label lblsummary;
private System.Windows.Forms.ListBox lstSummary;
private System.Windows.Forms.GroupBox grpGender;
private System.Windows.Forms.RadioButton radioButton1;
}
}
New folder/Lab05Excersice1/Form1.resx
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
New folder/Lab05Excersice1/Lab05Excersice1.csproj
Debug
AnyCPU
{C747A393-4063-411B-AA68-D9DF0E21B916}
WinExe
Lab05Excersice1
Lab05Excersice1
v4.7.2
512
true
true
AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
...