Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aula5_2", "Aula5_2\Aula5_2.csproj", "{AD7558B9-9BB4-432D-B1B2-DE1B29C8C37C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AD7558B9-9BB4-432D-B1B2-DE1B29C8C37C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD7558B9-9BB4-432D-B1B2-DE1B29C8C37C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD7558B9-9BB4-432D-B1B2-DE1B29C8C37C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AD7558B9-9BB4-432D-B1B2-DE1B29C8C37C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/App.config
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/Aula5_2.csproj
Debug
AnyCPU
{AD7558B9-9BB4-432D-B1B2-DE1B29C8C37C}
WinExe
Properties
Aula5_2
Aula5_2
v4.5
512
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
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/bin/Debug/Aula5_2.exe
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/bin/Debug/Aula5_2.exe.config
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/bin/Debug/Aula5_2.pdb
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/bin/Debug/Aula5_2.vshost.exe
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/bin/Debug/Aula5_2.vshost.exe.config
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/bin/Debug/Aula5_2.vshost.exe.manifest
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/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 Aula5_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// Declaração de variaveis
int S, N1, N2;
// Usuário Bom
try
{
// Entradas
N1 = int.Parse(textBox1.Text);
N2 = int.Parse(textBox2.Text);
// Converte texto para numero inteiro
S = ( N1 + 2 * N2 ) / 3;
// Precessamento
// Saida
label4.Text = S.ToString();
// Converte numero inteiro para texto
}// Fim usuário bom
// Usuário Ruim
catch (Exception)
{
MessageBox.Show("Entradas inválidas", "Erro",
MessageBoxButtons.OK, MessageBoxIcon.Error);
textBox1.Text = "";
textBox2.Text = "";
// Limpa entradas
label4.Text = "";
// Limpa Saida
textBox1.Focus();
// volta cursor para o textBox1
}// Fim usuário Ruim
}
private void button2_Click(object sender, EventArgs e)
{
// Limpar Tudo
textBox1.Text = "";
textBox2.Text = "";
// Limpa entradas
label4.Text = "";
// Limpa Saida
textBox1.Focus();
// volta cursor para o textBox1
}
private void button3_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Deseja realmente sair ?", "Finalizando o programa",
MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1) == DialogResult.Yes)
Close();
}
}
}
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/Form1.Designer.cs
namespace Aula5_2
{
partial class Form1
{
/// <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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 39);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Nota P1:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 78);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(49, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Nota P2:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 214);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(70, 13);
this.label3.TabIndex = 2;
this.label3.Text = "Média Final =";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(88, 214);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(0, 13);
this.label4.TabIndex = 3;
//
// button1
//
this.button1.BackColor
= System.Drawing.Color.SkyBlue;
this.button1.Location = new System.Drawing.Point(12, 146);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 4;
this.button1.Text = "&Calcular";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.SkyBlue;
this.button2.Location = new System.Drawing.Point(108, 146);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 5;
this.button2.Text = "&Limpar";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.BackColor = System.Drawing.Color.SkyBlue;
this.button3.Location = new System.Drawing.Point(204, 146);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 6;
this.button3.Text = "&Sair";
this.button3.UseVisualStyleBackColor = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(81, 36);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(29, 20);
this.textBox1.TabIndex = 7;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(81, 75);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(29, 20);
this.textBox2.TabIndex = 8;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Desktop;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Calculo de Média";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
}
}
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/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
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/Aula5_2.csproj.FileListAbsolute.txt
C:\Users\13099593\Documents\Aula5_2\Aula5_2\bin\Debug\Aula5_2.exe.config
C:\Users\13099593\Documents\Aula5_2\Aula5_2\bin\Debug\Aula5_2.exe
C:\Users\13099593\Documents\Aula5_2\Aula5_2\bin\Debug\Aula5_2.pdb
C:\Users\13099593\Documents\Aula5_2\Aula5_2\obj\Debug\Aula5_2.Form1.resources
C:\Users\13099593\Documents\Aula5_2\Aula5_2\obj\Debug\Aula5_2.Properties.Resources.resources
C:\Users\13099593\Documents\Aula5_2\Aula5_2\obj\Debug\Aula5_2.csproj.GenerateResource.Cache
C:\Users\13099593\Documents\Aula5_2\Aula5_2\obj\Debug\Aula5_2.exe
C:\Users\13099593\Documents\Aula5_2\Aula5_2\obj\Debug\Aula5_2.pdb
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/Aula5_2.csproj.GenerateResource.Cache
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/Aula5_2.exe
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/Aula5_2.Form1.resources
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/Aula5_2.pdb
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/Aula5_2.Properties.Resources.resources
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Aula5_2
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/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("Aula5_2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Aula5_2")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[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("73a3d10a-aea1-4313-a817-dc27dd344e1a")]
// 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")]
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/Properties/Resources.Designer.cs
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18047
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aula5_2.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// 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()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[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("Aula5_2.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/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
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/Properties/Settings.Designer.cs
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18047
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aula5_2.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;
}
}
}
}
Aula05 - Soma N�meros (desafio)/Calculadora/Aula5_2/Properties/Settings.settings
Aula05 - Soma N�meros (desafio)/Calculadora/Projeto.doc
Informática para Engenharia Puc-Campinas
Descrição do Projeto: Calculadora
Desenvolvido por: Igor Felisberto Magalhães
Data: 28/08/2013
Versão: 1.0
Layout do Formulário:
Objeto
Propriedades
Valor
Form1
Text
Calculo de Média
StartPosition
Centerscreen
BackColor
Desktop
Label1
Text
Nota P1:
Label2
Text
Nota P2:
Label3
Text
Média Final =
Label4
Text
TextBox1
MaxLenght
5
TextBox2
MaxLenght
5
Button1
Text
&Calcular
BackColor
SkyBlue
Button2
Text
&Limpar
BackColor
SkyBlue
Button3
Text
&Sair
BackColor
SkyBlue
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 Aula5_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// Declaração de variaveis
int S, N1, N2;
// Usuário Bom
try
{
// Entradas
N1 = int.Parse(textBox1.Text);
N2 = int.Parse(textBox2.Text);
// Converte texto para numero inteiro
S = ( N1 + 2 * N2 ) / 3;
// Precessamento
// Saida
label4.Text = S.ToString();
// Converte numero inteiro para texto
}// Fim usuário bom
// Usuário Ruim
catch (Exception)
{
MessageBox.Show("Entradas
inválidas", "Erro",
MessageBoxButtons.OK, MessageBoxIcon.Error);
textBox1.Text = "";
textBox2.Text = "";
// Limpa entradas
label4.Text = "";
// Limpa Saida
textBox1.Focus();
// volta cursor para o textBox1
}// Fim usuário Ruim
}
private void button2_Click(object sender, EventArgs e)
{
// Limpar Tudo
textBox1.Text = "";
textBox2.Text = "";
// Limpa entradas
label4.Text = "";
// Limpa Saida
textBox1.Focus();
// volta cursor para o textBox1
}
private void button3_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Deseja realmente sair ?", "Finalizando o programa",
MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1) == DialogResult.Yes)
Close();
}
}
}
�PAGE �
Projeto