.


:




:

































 

 

 

 


 

, Windows. .

1.1 . : . .

 

Toolbox: (Label), (TextBox) (Button).

;

;

;

.

.

 

1.3 .

 

Toolbox , . , , , .

Toolbox . Toolbox, , ( ). Toolbox .

, , Text 1.3. Properties, 1.4.

 

 

1.4 Properties button1

 

, Multiline = true.

Text.

.

private void button1_Click(object sender, EventArgs e)

.

Program.cs:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Windows.Forms;

 

namespace WindowsFormsApplication1

{

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());

}

}

}

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.Windows.Forms;

 

namespace WindowsFormsApplication1

{

public partial class Form1: Form

{

public Form1()

{

InitializeComponent();

}

 

private void button1_Click(object sender, EventArgs e)

{

int a,b,c,p;

a = Convert.ToInt32(textBox1.Text);

b = Convert.ToInt32(textBox2.Text);

c = Convert.ToInt32(textBox3.Text);

p = a + b + c;

if (a > 0 && b > 0 && c > 0)

if (a + b > c && a + c > b && b + c > a)

textBox4.Text = " = " + p.ToString();

else

{

textBox4.Text = " ";

}

else

{

textBox4.Text = " 0! ";

}

}

}

}

. .

System , , , , .

System.Collections , , , , , ..

System.ComponentModel .

System.Data , ADO.NET. .

System .Drawing (Graphics Device Interface, GDI), , GDI+. , , , , , .

System.Linq , , , .

System.Windows.Forms , , Microsoft windows Microsoft.NET Frameworks.

 

System System.Windows.Forms, .

( File -> Save All).

10 , , C # , .

, 1_1_ treygolnik, , WindowsFormsAplication 1, WindowsFormsAplication 1 , WindowsFormsAplication 1. csproj. WindowsFormsAplication 1 ( ) bin, obj, Properties , Program. cs Form 1. cs. Form 1, , Form 1. Designer. cs, , .

Visual Studio. Net Form 1. cs.

, , , Form 1. cs.

,

 

 

|$1

{}

*

Q: /;

*

#

*

|

Q:,JSJI

9

 

|$1

 

 



<== | ==>
Visual Studio. Net | ;
:


: 2018-10-15; !; : 179 |


:

:

, .
==> ...

1549 - | 1389 -


© 2015-2024 lektsii.org - -

: 0.016 .