You are on page 1of 120

"

"

883599

' :
:
:. . 302470398
, ' : 13/20 ,

.
, .
Windows .
. C #
.
, ,
.
- , ,
,
.
2

1
2
3
4
19
32
3

, .
- . - -
xy y=f(x (
: f

- , .
xyz z=f(x,y (
2
: f
) .
.( - ) (
.
4

-
:
" Number calculator " , " Function
manager (one variable - "(
" Function manager (two variables . (
" - " start ."
5
-
" number calculator : "
.( )
. "
"- clear "- ," backspace "- " help "
: .
" sin "- ") 2 "
" - sin(2 " "(" - ."
sin(2 "- ."( backspace "
" - clear " " 0 . "
"=" -
:
6
:
.
7
- -
" function manager (one variable "(
: -
,( ) :
Functions ,( ) Window ,( )
options ( ) Function Keyboard )
.(
-
) .
( ,
.
8
-

. 7 .
, ,
,
.
,
- Draw " .( )
" - dy/dx : ."=
- Color :
.
" define custom colors :<<
9
:
: "
10
-
xy .

.( , )
.
-
.
:
Axis Options -
: no axis , - Just axis -"
, Axis with marks - - Axis with marks and values -
:
11
Show Grid -
:
Back Color -
:
12
Axis Color -
:
-
:
13
Apply -
.
Function KeyBoard -
-
, .

( )
- Copy to function .
14
- -
" function manager (two variables "(
: -
,( ) :
Functions ,( ) Window ,( )
options ( ) Function Keyboard )
.(
-
. .

, ,
)
. (
-

" - . Draw ."
15
-
x - y .
- x
.( , )
- y .
-
.
.
Function KeyBoard -
-
.
( )
- Copy to function .
-
16
17
18
19
20

" ExpressionType.cs -"

ExpressionType .
)
sin, cos log , ( x y .
f(x)=(x+3)*sin(x^2+6 : (
: Left ExpressionType , -
Right ExpressionType , - TypeChar char
- ValueNumber double
.
-
public ExpressionType()-
constructor null - , - TypeChar - 0 - ValueNumber .
public ExpressionType( char TypeChar, double ValueNumber)-
constructor null - , - TypeChar -
ValueNumber .
public ExpressionType( char TypeChar, double ValueNumber,
ExpressionType Left, ExpressionType Right) -
constructor .( )
public double Calculate( double XValue, double YValue)-
- x XValue -
y YValue - .
*
3
x
+ sin
x
^
6
2
+
21
1 .
1.1 . - ) XValue - YValue (
2 .
2.1 . TypeChar Calculate(Left - ( Calculate(Right (
: x - y .
. :
public ExpressionType DerivativeByX() -
x - .
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]

,
_

,
_

1
]
1


+

+ +
) ( )) ( ( )) ( (
) (
) (
)) ( ln(
) ( )) ( sin( )) ( cos(
) ( )) ( cos( ) ( sin(
) ( / ) ( ) ( ) ( ) ( ) ( / ) (
) ( ) ( ) ( ) ( ) ( * ) (
) ( ) ( ) ( ) (
) ( ) ( ) ( ) (
2
x g
dx
d
x g f
dx
d
x g f
dx
d
x f
x f
dx
d
x f
dx
d
x f
dx
d
x f x f
dx
d
x f
dx
d
x f x f
dx
d
x g x g
dx
d
x f x f
dx
d
x g x g x f
dx
d
x f
dx
d
x g x g
dx
d
x f x g x f
dx
d
x g
dx
d
x f
dx
d
x g x f
dx
d
x g
dx
d
x f
dx
d
x g x f
dx
d
. ,
. :
: ExpressionType .
public ExpressionType RecSimplify -()
, ,
.
.
. :
- . :
Ex=ex.RecSimplify();
22
public ExpressionType Simplify() -
, ,
.
. RecSimplify .
. :
. . :
public override string ToString() -
. .

.
. :
. :
public static bool RemoveUselessBrackets( ref string SourceString) -
- .
)) 2+56 (( - 2+56 . .
. :
:
.
public static int FindCharNotInBrackets( string ExpressionString, char
ToFind) -
. .
. :
- . : 1 .
private static string CutString( ref string Original, int Idx)-
.

.
23
. :
:
.
public static ExpressionType FromString( string ExpressionString)-
.
:
1. RemoveUselessBrackets
2. For all the chars by the order - +, -, *, /, ^, c represents cos, s represents sin, n
represents ln, l represents log, x, y
2.1. find the char not in brackets
2.2. cut the string
2.3 Right=FromStrin(right string)
2.4. Left=FromString(left string)
3. if didnt find any of the chars
3.1 return string to number
. WrongFormatExeption
.
. :
. :
24
Main Form.cs
- . Form .
ListBox Button
.
-
private void ChooseButton_Click( object sender, EventArgs e) -
- ListBox . Threads
MainForm .
- : ListBox .
. :
25
" NumberCalc.cs -"
- . Form . 26
Button(25 ( textBox )
.(
: , .
private void button1_Click( object sender, EventArgs e)-

. .
. :
. :
26
- " Point3DType.cs -"
. - -
Value float (x, y, z ,
.(
-
public Point3DType( float Xdef, float Ydef, float Zdef) -
constructor .
. :
: Value .
public PointF Projection( int x0, int y0, float zoom) -
xy .
) : 0,0,0 - ( x0 - y0
) x0,y0) - zoom .
. :
public static Point3DType operator *( Transformation3DType Transform,
Point3DType P) -
. ( )
. :
. - :
public static Point3DType operator -( Point3DType x1, Point3DType x2)-
.( )
: 2 .
. :
public static Point3DType operator +( Point3DType x1, Point3DType x2)-
.( )
: 2 .
. :
public static Point3DType operator *( double d, Point3DType P)-
.( )
27
. :
:
.
28
" Transformation3DType.cs -"
. -
Value float .
-
public Transformation3DType( float [,] NewValue) -
constructor .
: NewValue .
: Value=NewValue .
public static Transformation3DType ShiftTransform( float Sx, float Sy,
float Sz)-
.
) : x, y - z .(
- : Sx x, Sy y - Sz
z .
public static Transformation3DType ScaleTransform( float Sx, float Sy,
float Sz) -
.
) : x, y - z .(
- : Sx x, Sy y - Sz
z .
public static Transformation3DType RotateXTransform( double teta) -
- x .
. :
: x - teta .
public static Transformation3DType RotateYTransform( double teta) -
- y .
. :
: y - teta .
public static Transformation3DType RotateZTransform( double teta) -
29
- z .
. :
: z - teta .
public static Transformation3DType operator *( Transformation3DType
Transform1, Transformation3DType TRansform2) -
. ( )
. :
. :
30
- Function1.cs -
- . Form .
-
public Function1()-
. InitializeComponent
" visual studio )
.(
private void ApplyWindowButton_Click( object sender, EventArgs e)-
ApplyWindowButton .
- WindowGroupBox .
- Text .
- : Text XMinTextBox, XMaxTextBox,
XStepTextBox, YMinTextBox, YMaxTextBox - YStepTextBox .
:
WindowXMin = XMinTextBox.Text
WindowYMin = YMinTextBox.Text
WindowXMax = XMaxTextBox.Text
WindowYMax = YMaxTextBox.Text
WindowXStep = XStepTextBox.Text
WindowYStep = YStepTextBox.Text
private void CalculateDerivativeButton_Click( object sender, EventArgs
e)-
CalculateDerivativeButton[I .[
FunctionTextBox[I].Text - DerivativeTextBox[I].Text .
- : FunctionTextBox[I].Text .
- : DerivativeTextBox[I].Text .
private void ChangeGraphColorButton_Click( object sender, EventArgs
e)-
ChangeGraphColorButton[I .[
.
. :
. :
31
private void FunctionPictureBox_Click( object sender, EventArgs e)-
FunctionPictureBox .
OptionsGroupBox - x - y .
. :
: MouseXLabel.Text - MouseYLabel.Text - x - y
.
private void GraphPictureBox_Paint( object sender, PaintEventArgs e)-
.
: .
1. x1=WindowXMin, y1=Function.Calculate(x2)
2. for I from WindowXMin+resolution to WindowXMax
2.1. x2=I, y2=Function.Calculate(I)
2.2. Draw line between (x1,y1) and (x2,y2)
2.3. x1=x2, y1=y2
. ,
. :
- : FunctionTextBox
.
32
- Function2.cs -
- . Form .
-
public Function2()-
. InitializeComponent
" visual studio .( )
private void ApplyWindowButton_Click( object sender, EventArgs e)-
ApplyWindowButton .
- WindowGroupBox .
- Text .
- : Text XMinTextBox, XMaxTextBox,
XStepTextBox, YMinTextBox, YMaxTextBox - YStepTextBox .
:
WindowXMin = XMinTextBox.Text
WindowYMin = YMinTextBox.Text
WindowXMax = XMaxTextBox.Text
WindowYMax = YMaxTextBox.Text
WindowXStep = XStepTextBox.Text
WindowYStep = YStepTextBox.Text
- WindowXMin, WindowXMax, WindowYMin - WindowYMax
- WindowYStep - WindowXStep ( )
.
.

- . ZoomOutButton,
ZoomInButton, RotateUpButton, RotateDownButton, RotateLeftButton,
RotateRightButton, RotateClockwiseButton, RotateContrClockwiseButton,
ShiftUpButton, ShiftDownButton, ShiftLeftButton - ShiftRightButton .
Transform
.
private void GraphPictureBox_Paint( object sender, PaintEventArgs e) -
.
" .
33
WindowXStep WundowYStep .
, .
.
.
.
: FunctionTextBox .
. :
34

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Data;
using System.Drawing;
using System.Text;
using System.Threading;
namespace MathLab
{
//filename: program.cs
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
//WrongFormatException
class WrongFormatException : Exception
{
string WrongString;

public WrongFormatException() : base() { }
public WrongFormatException(string NewString)
{
WrongString = NewString;
}
}
//filename: ExpressionType.cs
class ExpressionType
{
private char TypeChar;
private double ValueNumber;
private ExpressionType Right;
private ExpressionType Left;
public ExpressionType()
{
Right = null;
Left = null;
TypeChar = ' ';
ValueNumber = 0.0;
}
public ExpressionType(char TypeChar,double ValueNumber)
{
35
Right = null;
Left = null;
this.TypeChar = TypeChar;
this.ValueNumber = ValueNumber;
}
public ExpressionType(char TypeChar, double ValueNumber,
ExpressionType Left, ExpressionType Right)
{
this.Right = Right;
this.Left = Left;
this.TypeChar = TypeChar;
this.ValueNumber = ValueNumber;
}
public double Calculate(double XValue, double YValue)
{
switch (TypeChar)
{
case '+': return Left.Calculate(XValue, YValue) +
Right.Calculate(XValue, YValue);
case '*': return Left.Calculate(XValue, YValue) *
Right.Calculate(XValue, YValue);
case '-': return Left.Calculate(XValue, YValue) -
Right.Calculate(XValue, YValue);
case '/': return Left.Calculate(XValue, YValue) /
Right.Calculate(XValue, YValue);
case '^': return
Math.Pow(Left.Calculate(XValue,YValue),Right.Calculate(XValue,YValue)
);
case 'c': return Math.Cos(Left.Calculate(XValue,
YValue));
case 's': return
Math.Sin(Left.Calculate(XValue,YValue));
case 'l': return Math.Log(Right.Calculate(XValue,
YValue), Left.Calculate(XValue, YValue));
case 'n': return ValueNumber;
case 'e': return Math.E;
case 'p': return Math.PI;
case 'x': return XValue;
case 'y': return YValue;
default: return 0;
}
}
public ExpressionType DerivativeByX()
{
switch (TypeChar)
{
case 'n': return new ExpressionType('n', 0);
case 'e': return new ExpressionType('n',0);
case 'p': return new ExpressionType('n',0);
case 'x': return new ExpressionType('n', 1);
case 'y': return new ExpressionType('n', 0);
case '+': return new ExpressionType('+', -1,
Left.DerivativeByX(), Right.DerivativeByX());
case '-': return new ExpressionType('-', -1,
Left.DerivativeByX(), Right.DerivativeByX());
case '*': return new ExpressionType('+', -1, new
ExpressionType('*', -1, Left.DerivativeByX(), Right), new
ExpressionType('*', -1, Left, Right.DerivativeByX()));
36
case '/': return new ExpressionType('/', -1, new
ExpressionType('-', -1, new ExpressionType('*', -1,
Left.DerivativeByX(), Right), new ExpressionType('*', -1, Left,
Right.DerivativeByX())), new ExpressionType('^', -1, Right, new
ExpressionType('n', 2)));
case '^': return new ExpressionType('*', -1, this,
new ExpressionType('+', -1, new ExpressionType('*', -1, new
ExpressionType('l', -1, new ExpressionType('e', -1), Left),
Right.DerivativeByX()), new ExpressionType('*', -1, new
ExpressionType('/', -1, Left.DerivativeByX(), Left), Right)));
case 'l': return new ExpressionType('/', -1, new
ExpressionType('-', -1, new ExpressionType('*', -1, Left, new
ExpressionType('/', -1, Right.DerivativeByX(), Right)), new
ExpressionType('*', -1, new ExpressionType('/', -1,
Left.DerivativeByX(), Left), Right)), new ExpressionType('^', -1, new
ExpressionType('l', -1, new ExpressionType('e', -1), Left), new
ExpressionType('n', 2)));
case 's': return new ExpressionType('*', -1,
Left.DerivativeByX(), new ExpressionType('c', -1, Left, null));
case 'c': return new ExpressionType('-', -1, new
ExpressionType('n', 0), new ExpressionType('*', -1,
Left.DerivativeByX(), new ExpressionType('s', -1, Left, null)));
default: return new ExpressionType();
}
}
public ExpressionType RecSimplify()
{
if(this == null)
return this;
if (this.Left == null && this.Right == null)
return this;
if (Left != null)
Left = Left.RecSimplify();
if (Right != null)
Right = Right.RecSimplify();
if ((Left.TypeChar == 'n' || Left.TypeChar == 'e' ||
Left.TypeChar == 'p') && (Right.TypeChar == 'n' || Right.TypeChar ==
'e' || Right.TypeChar == 'p'))
return new ExpressionType('n', Calculate(0, 0));
if (this.TypeChar == '*' && Left.TypeChar == 'n' &&
Left.ValueNumber == 0)
return new ExpressionType('n', Calculate(0, 0));
if (this.TypeChar == '*' && Right.TypeChar == 'n' &&
Right.ValueNumber == 0)
return new ExpressionType('n', 0);
if (this.TypeChar == '+' && Left.TypeChar == 'n' &&
Left.ValueNumber == 0)
return Right;
if (this.TypeChar == '+' && Right.TypeChar == 'n' &&
Right.ValueNumber == 0)
return Left;
return this;
}
public ExpressionType Simplify()
{
ExpressionType Res = this.RecSimplify();
Left = Res.Left;
Right = Res.Right;
TypeChar = Res.TypeChar;
37
ValueNumber = Res.ValueNumber;
return this;
}
public override string ToString()
{
switch (TypeChar)
{
case 'n': return string.Format("{0}", ValueNumber);
case 'x': return "x";
case 'y': return "y";
case 'e': return "e";
case 'p': return "pi";
case '+': return "(" + Left.ToString() + ")+(" +
Right.ToString() + ")";
case '-': return "(" + Left.ToString() + ")-(" +
Right.ToString() + ")";
case '*': return "(" + Left.ToString() + ")*(" +
Right.ToString() + ")";
case '/': return "(" + Left.ToString() + ")/(" +
Right.ToString() + ")";
case '^': return "(" + Left.ToString() + ")^(" +
Right.ToString() + ")";
case 'c': return "cos(" + Left.ToString() + ")";
case 's': return "sin(" + Left.ToString() + ")";
case 'l': return "(" + Left.ToString() + ")log(" +
Right.ToString() + ")";
default: return "";
}
}
public static bool RemoveUselessBrackets(ref string
SourceString)
{
bool flag=true;
int length=SourceString.Length,brack=0;
for (int i = 0; i < length; i++)
{
if (SourceString[i] == '(')
brack++;
else
{
if (SourceString[i] == ')')
brack--;
else
if (brack == 0)
flag = false;
}
}
if (flag)
{
SourceString=SourceString.Remove(0, 1);
SourceString=SourceString.Remove(SourceString.Length
- 1, 1);
}
return flag;
}
public static int FindCharNotInBrackets(string
ExpressionString,char ToFind)
{
38
int length = ExpressionString.Length, brack = 0;
for (int i = 0; i < length; i++)
{
if (ExpressionString[i] == '(')
brack++;
if (ExpressionString[i] == ')')
brack--;
if (brack == 0 && ExpressionString[i] == ToFind)
return i;
}
return -1;
}
private static string CutString(ref string Original,int Idx)
{
string Second = "";
int i;
for (i = 0; i<Idx; i++)
Second = Second + string.Format("{0}", Original[i]);
Original = Original.Remove(0, i + 1);
return Second;
}
public static ExpressionType FromString(string
ExpressionString)
{
int place;
string Second;
if (ExpressionString == "")
return new ExpressionType('n', 0);
while (RemoveUselessBrackets(ref ExpressionString)) ;
place = FindCharNotInBrackets(ExpressionString, '+');
if (place != -1)
{
Second = CutString(ref ExpressionString, place);
return new ExpressionType('+', -1,
FromString(ExpressionString), FromString(Second));
}
else
{
place = FindCharNotInBrackets(ExpressionString, '-');
if (place != -1)
{
Second = CutString(ref ExpressionString, place);
return new ExpressionType('-', -1,
FromString(Second), FromString(ExpressionString));
}
else
{
place = FindCharNotInBrackets(ExpressionString,
'*');
if (place != -1)
{
Second = CutString(ref ExpressionString,
place);
return new ExpressionType('*', -1,
FromString(Second), FromString(ExpressionString));
}
else
{
39
place =
FindCharNotInBrackets(ExpressionString, '/');
if (place != -1)
{
Second = CutString(ref ExpressionString,
place);
return new ExpressionType('/', -1,
FromString(Second), FromString(ExpressionString));
}
else
{
place =
FindCharNotInBrackets(ExpressionString, '^');
if (place != -1)
{
Second = CutString(ref
ExpressionString, place);
return new ExpressionType('^', -1,
FromString(Second), FromString(ExpressionString));
}
else
{
place=FindCharNotInBrackets(Expressio
nString,'c');
if (place != -1)
{
ExpressionString =
ExpressionString.Remove(0, 3);
return new ExpressionType('c',
-1, FromString(ExpressionString), null);
}
else
{
place=FindCharNotInBrackets(Expre
ssionString,'s');
if (place != -1)
{
ExpressionString =
ExpressionString.Remove(0, 3);
return new
ExpressionType('s', -1, FromString(ExpressionString), null);
}
else
{
place =
FindCharNotInBrackets(ExpressionString, 'x');
if (place != -1)
return new
ExpressionType('x', -1);
else
{
place =
FindCharNotInBrackets(ExpressionString, 'y');
if (place != -1)
return new
ExpressionType('y', -1);
else
{
place =
FindCharNotInBrackets(ExpressionString, 'n');
if (place != -1)
40
return new
ExpressionType('l', -1, new ExpressionType('e', -1),
FromString(ExpressionString.Remove(0, 2)));
else
{
place =
FindCharNotInBrackets(ExpressionString, 'l');
if (place != -1)
{
Second =
CutString(ref ExpressionString, place);
return new
ExpressionType('l', -1, FromString(Second),
FromString(ExpressionString.Remove(0, 2)));
}
else
{
if
(ExpressionString == "e")
return
new ExpressionType('e', -1);
else
{
if
(ExpressionString == "pi")
retur
n new ExpressionType('p', -1);
else
{
try
{
r
eturn new ExpressionType('n', Convert.ToDouble(ExpressionString));
}
catch
{
t
hrow new WrongFormatException(ExpressionString);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}

//filename: MainForm.cs
public partial class MainForm : Form
{
public MainForm()
{
41
InitializeComponent();
}
private void RunNumerCalc()
{
Application.Run(new NumerCalc());
}
private void RunFunction1()
{
Application.Run(new Function1());
}
private void RunFunction2()
{
Application.Run(new Function2());
}
private void ChooseButton_Click(object sender, EventArgs e)
{
ThreadStart ProgStart;
Thread Prog;
switch (ProgramsListBox.SelectedIndex)
{
case 0:
ProgStart = new ThreadStart(RunNumerCalc);
Prog = new Thread(ProgStart);
Prog.Start();
break;
case 1:
ProgStart = new ThreadStart(RunFunction1);
Prog = new Thread(ProgStart);
Prog.Start();
break;
case 2:
ProgStart = new ThreadStart(RunFunction2);
Prog = new Thread(ProgStart);
Prog.Start();
break;
}
Close();
}
/// <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);
}
42
#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.ProgramsListBox = new
System.Windows.Forms.ListBox();
this.ChooseButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft
Sans Serif", 10F, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((byte)(177)));
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Margin = new System.Windows.Forms.Padding(4,
0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(173, 34);
this.label1.TabIndex = 0;
this.label1.Text = "Choose one of the\r\noptions and
click start:";
//
// ProgramsListBox
//
this.ProgramsListBox.FormattingEnabled = true;
this.ProgramsListBox.ItemHeight = 16;
this.ProgramsListBox.Items.AddRange(new object[] {
"Number calculator",
"Function manager (one variable)",
"Function manager (two variables)"});
this.ProgramsListBox.Location = new
System.Drawing.Point(65, 37);
this.ProgramsListBox.Name = "ProgramsListBox";
this.ProgramsListBox.Size = new System.Drawing.Size(207,
84);
this.ProgramsListBox.TabIndex = 0;
//
// ChooseButton
//
this.ChooseButton.Location = new
System.Drawing.Point(216, 129);
this.ChooseButton.Name = "ChooseButton";
this.ChooseButton.Size = new System.Drawing.Size(75, 23);
this.ChooseButton.TabIndex = 0;
this.ChooseButton.Text = "start";
this.ChooseButton.UseVisualStyleBackColor = true;
this.ChooseButton.Click += new
System.EventHandler(this.ChooseButton_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F,
16F);
43
this.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(303, 164);
this.Controls.Add(this.ChooseButton);
this.Controls.Add(this.ProgramsListBox);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("Microsoft Sans
Serif", 10F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(177)));
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "MainForm";
this.Text = "MainForm";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox ProgramsListBox;
private System.Windows.Forms.Button ChooseButton;
}
//filename: NumberCalc.cs
public partial class NumerCalc : Form
{
private Boolean IsPressed;
public NumerCalc()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
IsPressed = false;
}
private void button1_Click(object sender, EventArgs e)
{
ExpressionType Expression;
try
{
Expression =
ExpressionType.FromString(textBox1.Text);
}
catch
{
MessageBox.Show("the string:\n:" + textBox1.Text +
"\ncan not represent an expression", "Wrong Format",
MessageBoxButtons.OK);
return;
}
Result_TextBox.Text = string.Format("{0}",
Expression.Calculate(0, 0));
IsPressed = false;
}
private void ButtonDigit0_Click(object sender, EventArgs e)
{
44
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "0";
IsPressed = true;
}
private void ButtonDigit1_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "1";
IsPressed = true;
}
private void ButtonDigit2_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "2";
IsPressed = true;
}
private void ButtonDigit3_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "3";
IsPressed = true;
}
private void ButtonDigit4_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "4";
IsPressed = true;
}
private void ButtonDigit5_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "5";
IsPressed = true;
}
private void ButtonDigit6_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "6";
IsPressed = true;
}
private void ButtonDigit7_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "7";
IsPressed = true;
}
45
private void ButtonDigit8_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "8";
IsPressed = true;
}
private void ButtonDigit9_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "9";
IsPressed = true;
}
private void ButtonLBrack_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "(";
IsPressed = true;
}
private void ButtonRBrack_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += ")";
IsPressed = true;
}
private void ButtonDiv_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "/";
IsPressed = true;
}
private void ButtonMult_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "*";
IsPressed = true;
}
private void ButtonMinus_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "-";
IsPressed = true;
}
private void ButtonPlus_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
46
textBox1.Text += "+";
IsPressed = true;
}
private void ButtonClear_Click(object sender, EventArgs e)
{
textBox1.Text = "0";
IsPressed = false;
}
private void ButtonBackspace_Click(object sender, EventArgs
e)
{
textBox1.Text = textBox1.Text.Remove(textBox1.Text.Length
- 1);
if (!IsPressed)
textBox1.Text = "0";
}
private void ButtonLn_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "ln(";
IsPressed = true;
}
private void ButtonSin_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "sin(";
IsPressed = true;
}
private void ButtonCos_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "cos(";
IsPressed = true;
}
private void ButtonDeg_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "^";
IsPressed = true;
}
private void ButtonLog_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "log";
IsPressed = true;
}
private void ButtonPi_Click(object sender, EventArgs e)
{
47
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "pi";
IsPressed = true;
}
private void ButtonE_Click(object sender, EventArgs e)
{
if (!IsPressed)
textBox1.Text = "";
textBox1.Text += "e";
IsPressed = true;
}
/// <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.Result_TextBox = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.ButtonDigit2 = new System.Windows.Forms.Button();
this.ButtonDigit3 = new System.Windows.Forms.Button();
this.ButtonDigit4 = new System.Windows.Forms.Button();
this.ButtonDigit5 = new System.Windows.Forms.Button();
this.ButtonDigit6 = new System.Windows.Forms.Button();
this.ButtonDigit7 = new System.Windows.Forms.Button();
this.ButtonDigit8 = new System.Windows.Forms.Button();
this.ButtonDigit9 = new System.Windows.Forms.Button();
this.ButtonDigit1 = new System.Windows.Forms.Button();
this.ButtonRBrack = new System.Windows.Forms.Button();
this.ButtonLBrack = new System.Windows.Forms.Button();
this.ButtonDiv = new System.Windows.Forms.Button();
this.ButtonDigit0 = new System.Windows.Forms.Button();
this.ButtonMult = new System.Windows.Forms.Button();
this.ButtonMinus = new System.Windows.Forms.Button();
this.ButtonPlus = new System.Windows.Forms.Button();
this.ButtonBackspace = new System.Windows.Forms.Button();
this.ButtonClear = new System.Windows.Forms.Button();
48
this.ButtonLn = new System.Windows.Forms.Button();
this.ButtonDeg = new System.Windows.Forms.Button();
this.ButtonSin = new System.Windows.Forms.Button();
this.ButtonCos = new System.Windows.Forms.Button();
this.ButtonLog = new System.Windows.Forms.Button();
this.ButtonPi = new System.Windows.Forms.Button();
this.ButtonE = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// Result_TextBox
//
this.Result_TextBox.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Right)));
this.Result_TextBox.Location = new
System.Drawing.Point(47, 40);
this.Result_TextBox.Name = "Result_TextBox";
this.Result_TextBox.ReadOnly = true;
this.Result_TextBox.Size = new System.Drawing.Size(186,
20);
this.Result_TextBox.TabIndex = 0;
this.Result_TextBox.Text = "0";
//
// button1
//
this.button1.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Right)));
this.button1.Location = new System.Drawing.Point(15, 40);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(26, 20);
this.button1.TabIndex = 1;
this.button1.Text = "=";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new
System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Anchor =
((System.Windows.Forms.AnchorStyles)
(((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(15,
12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(218, 20);
this.textBox1.TabIndex = 2;
this.textBox1.Text = "0";
//
// ButtonDigit2
//
this.ButtonDigit2.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit2.Location = new System.Drawing.Point(52,
211);
49
this.ButtonDigit2.Name = "ButtonDigit2";
this.ButtonDigit2.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit2.TabIndex = 3;
this.ButtonDigit2.Text = "2";
this.ButtonDigit2.UseVisualStyleBackColor = true;
this.ButtonDigit2.Click += new
System.EventHandler(this.ButtonDigit2_Click);
//
// ButtonDigit3
//
this.ButtonDigit3.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit3.Location = new System.Drawing.Point(89,
211);
this.ButtonDigit3.Name = "ButtonDigit3";
this.ButtonDigit3.Size = new System.Drawing.Size(29, 23);
this.ButtonDigit3.TabIndex = 4;
this.ButtonDigit3.Text = "3";
this.ButtonDigit3.UseVisualStyleBackColor = true;
this.ButtonDigit3.Click += new
System.EventHandler(this.ButtonDigit3_Click);
//
// ButtonDigit4
//
this.ButtonDigit4.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit4.Location = new System.Drawing.Point(15,
182);
this.ButtonDigit4.Name = "ButtonDigit4";
this.ButtonDigit4.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit4.TabIndex = 5;
this.ButtonDigit4.Text = "4";
this.ButtonDigit4.UseVisualStyleBackColor = true;
this.ButtonDigit4.Click += new
System.EventHandler(this.ButtonDigit4_Click);
//
// ButtonDigit5
//
this.ButtonDigit5.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit5.Location = new System.Drawing.Point(52,
182);
this.ButtonDigit5.Name = "ButtonDigit5";
this.ButtonDigit5.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit5.TabIndex = 6;
this.ButtonDigit5.Text = "5";
this.ButtonDigit5.UseVisualStyleBackColor = true;
this.ButtonDigit5.Click += new
System.EventHandler(this.ButtonDigit5_Click);
//
// ButtonDigit6
//
this.ButtonDigit6.Anchor =
((System.Windows.Forms.AnchorStyles)
50
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit6.Location = new System.Drawing.Point(89,
182);
this.ButtonDigit6.Name = "ButtonDigit6";
this.ButtonDigit6.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit6.TabIndex = 7;
this.ButtonDigit6.Text = "6";
this.ButtonDigit6.UseVisualStyleBackColor = true;
this.ButtonDigit6.Click += new
System.EventHandler(this.ButtonDigit6_Click);
//
// ButtonDigit7
//
this.ButtonDigit7.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit7.Location = new System.Drawing.Point(15,
153);
this.ButtonDigit7.Name = "ButtonDigit7";
this.ButtonDigit7.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit7.TabIndex = 8;
this.ButtonDigit7.Text = "7";
this.ButtonDigit7.UseVisualStyleBackColor = true;
this.ButtonDigit7.Click += new
System.EventHandler(this.ButtonDigit7_Click);
//
// ButtonDigit8
//
this.ButtonDigit8.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit8.Location = new System.Drawing.Point(52,
153);
this.ButtonDigit8.Name = "ButtonDigit8";
this.ButtonDigit8.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit8.TabIndex = 9;
this.ButtonDigit8.Text = "8";
this.ButtonDigit8.UseVisualStyleBackColor = true;
this.ButtonDigit8.Click += new
System.EventHandler(this.ButtonDigit8_Click);
//
// ButtonDigit9
//
this.ButtonDigit9.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit9.Location = new System.Drawing.Point(89,
153);
this.ButtonDigit9.Name = "ButtonDigit9";
this.ButtonDigit9.Size = new System.Drawing.Size(29, 23);
this.ButtonDigit9.TabIndex = 10;
this.ButtonDigit9.Text = "9";
this.ButtonDigit9.UseVisualStyleBackColor = true;
this.ButtonDigit9.Click += new
System.EventHandler(this.ButtonDigit9_Click);
//
// ButtonDigit1
51
//
this.ButtonDigit1.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit1.Location = new System.Drawing.Point(15,
211);
this.ButtonDigit1.Name = "ButtonDigit1";
this.ButtonDigit1.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit1.TabIndex = 11;
this.ButtonDigit1.Text = "1";
this.ButtonDigit1.UseVisualStyleBackColor = true;
this.ButtonDigit1.Click += new
System.EventHandler(this.ButtonDigit1_Click);
//
// ButtonRBrack
//
this.ButtonRBrack.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonRBrack.Location = new System.Drawing.Point(88,
124);
this.ButtonRBrack.Name = "ButtonRBrack";
this.ButtonRBrack.Size = new System.Drawing.Size(30, 23);
this.ButtonRBrack.TabIndex = 12;
this.ButtonRBrack.Text = ")";
this.ButtonRBrack.UseVisualStyleBackColor = true;
this.ButtonRBrack.Click += new
System.EventHandler(this.ButtonRBrack_Click);
//
// ButtonLBrack
//
this.ButtonLBrack.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonLBrack.Location = new System.Drawing.Point(52,
124);
this.ButtonLBrack.Name = "ButtonLBrack";
this.ButtonLBrack.Size = new System.Drawing.Size(30, 23);
this.ButtonLBrack.TabIndex = 13;
this.ButtonLBrack.Text = "(";
this.ButtonLBrack.UseVisualStyleBackColor = true;
this.ButtonLBrack.Click += new
System.EventHandler(this.ButtonLBrack_Click);
//
// ButtonDiv
//
this.ButtonDiv.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDiv.Location = new System.Drawing.Point(124,
124);
this.ButtonDiv.Name = "ButtonDiv";
this.ButtonDiv.Size = new System.Drawing.Size(28, 23);
this.ButtonDiv.TabIndex = 14;
this.ButtonDiv.Text = "/";
this.ButtonDiv.UseVisualStyleBackColor = true;
52
this.ButtonDiv.Click += new
System.EventHandler(this.ButtonDiv_Click);
//
// ButtonDigit0
//
this.ButtonDigit0.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit0.Location = new System.Drawing.Point(15,
124);
this.ButtonDigit0.Name = "ButtonDigit0";
this.ButtonDigit0.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit0.TabIndex = 15;
this.ButtonDigit0.Text = "0";
this.ButtonDigit0.UseVisualStyleBackColor = true;
this.ButtonDigit0.Click += new
System.EventHandler(this.ButtonDigit0_Click);
//
// ButtonMult
//
this.ButtonMult.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonMult.Location = new System.Drawing.Point(124,
153);
this.ButtonMult.Name = "ButtonMult";
this.ButtonMult.Size = new System.Drawing.Size(28, 23);
this.ButtonMult.TabIndex = 16;
this.ButtonMult.Text = "*";
this.ButtonMult.UseVisualStyleBackColor = true;
this.ButtonMult.Click += new
System.EventHandler(this.ButtonMult_Click);
//
// ButtonMinus
//
this.ButtonMinus.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonMinus.Location = new System.Drawing.Point(124,
182);
this.ButtonMinus.Name = "ButtonMinus";
this.ButtonMinus.Size = new System.Drawing.Size(28, 23);
this.ButtonMinus.TabIndex = 17;
this.ButtonMinus.Text = "-";
this.ButtonMinus.UseVisualStyleBackColor = true;
this.ButtonMinus.Click += new
System.EventHandler(this.ButtonMinus_Click);
//
// ButtonPlus
//
this.ButtonPlus.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonPlus.Location = new System.Drawing.Point(124,
211);
this.ButtonPlus.Name = "ButtonPlus";
this.ButtonPlus.Size = new System.Drawing.Size(28, 23);
53
this.ButtonPlus.TabIndex = 18;
this.ButtonPlus.Text = "+";
this.ButtonPlus.UseVisualStyleBackColor = true;
this.ButtonPlus.Click += new
System.EventHandler(this.ButtonPlus_Click);
//
// ButtonBackspace
//
this.ButtonBackspace.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonBackspace.Location = new
System.Drawing.Point(158, 182);
this.ButtonBackspace.Name = "ButtonBackspace";
this.ButtonBackspace.Size = new System.Drawing.Size(75,
23);
this.ButtonBackspace.TabIndex = 19;
this.ButtonBackspace.Text = "backspace";
this.ButtonBackspace.UseVisualStyleBackColor = true;
this.ButtonBackspace.Click += new
System.EventHandler(this.ButtonBackspace_Click);
//
// ButtonClear
//
this.ButtonClear.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonClear.Location = new System.Drawing.Point(158,
211);
this.ButtonClear.Name = "ButtonClear";
this.ButtonClear.Size = new System.Drawing.Size(75, 23);
this.ButtonClear.TabIndex = 20;
this.ButtonClear.Text = "clear";
this.ButtonClear.UseVisualStyleBackColor = true;
this.ButtonClear.Click += new
System.EventHandler(this.ButtonClear_Click);
//
// ButtonLn
//
this.ButtonLn.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonLn.Location = new System.Drawing.Point(52,
66);
this.ButtonLn.Name = "ButtonLn";
this.ButtonLn.Size = new System.Drawing.Size(30, 23);
this.ButtonLn.TabIndex = 21;
this.ButtonLn.Text = "ln(";
this.ButtonLn.UseVisualStyleBackColor = true;
this.ButtonLn.Click += new
System.EventHandler(this.ButtonLn_Click);
//
// ButtonDeg
//
this.ButtonDeg.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
54
this.ButtonDeg.Location = new System.Drawing.Point(15,
66);
this.ButtonDeg.Name = "ButtonDeg";
this.ButtonDeg.Size = new System.Drawing.Size(31, 23);
this.ButtonDeg.TabIndex = 22;
this.ButtonDeg.Text = "^";
this.ButtonDeg.UseVisualStyleBackColor = true;
this.ButtonDeg.Click += new
System.EventHandler(this.ButtonDeg_Click);
//
// ButtonSin
//
this.ButtonSin.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonSin.Location = new System.Drawing.Point(15,
95);
this.ButtonSin.Name = "ButtonSin";
this.ButtonSin.Size = new System.Drawing.Size(67, 23);
this.ButtonSin.TabIndex = 23;
this.ButtonSin.Text = "sin(";
this.ButtonSin.UseVisualStyleBackColor = true;
this.ButtonSin.Click += new
System.EventHandler(this.ButtonSin_Click);
//
// ButtonCos
//
this.ButtonCos.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonCos.Location = new System.Drawing.Point(89,
95);
this.ButtonCos.Name = "ButtonCos";
this.ButtonCos.Size = new System.Drawing.Size(63, 23);
this.ButtonCos.TabIndex = 24;
this.ButtonCos.Text = "cos(";
this.ButtonCos.UseVisualStyleBackColor = true;
this.ButtonCos.Click += new
System.EventHandler(this.ButtonCos_Click);
//
// ButtonLog
//
this.ButtonLog.Location = new System.Drawing.Point(89,
66);
this.ButtonLog.Name = "ButtonLog";
this.ButtonLog.Size = new System.Drawing.Size(63, 23);
this.ButtonLog.TabIndex = 25;
this.ButtonLog.Text = "log";
this.ButtonLog.UseVisualStyleBackColor = true;
this.ButtonLog.Click += new
System.EventHandler(this.ButtonLog_Click);
//
// ButtonPi
//
this.ButtonPi.Location = new System.Drawing.Point(158,
94);
this.ButtonPi.Name = "ButtonPi";
this.ButtonPi.Size = new System.Drawing.Size(27, 23);
this.ButtonPi.TabIndex = 27;
55
this.ButtonPi.Text = "pi";
this.ButtonPi.UseVisualStyleBackColor = true;
this.ButtonPi.Click += new
System.EventHandler(this.ButtonPi_Click);
//
// ButtonE
//
this.ButtonE.Location = new System.Drawing.Point(158,
124);
this.ButtonE.Name = "ButtonE";
this.ButtonE.Size = new System.Drawing.Size(27, 23);
this.ButtonE.TabIndex = 28;
this.ButtonE.Text = "e";
this.ButtonE.UseVisualStyleBackColor = true;
this.ButtonE.Click += new
System.EventHandler(this.ButtonE_Click);
//
// NumerCalc
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F,
13F);
this.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(234, 252);
this.Controls.Add(this.ButtonE);
this.Controls.Add(this.ButtonPi);
this.Controls.Add(this.ButtonLog);
this.Controls.Add(this.ButtonCos);
this.Controls.Add(this.ButtonSin);
this.Controls.Add(this.ButtonDeg);
this.Controls.Add(this.ButtonLn);
this.Controls.Add(this.ButtonClear);
this.Controls.Add(this.ButtonBackspace);
this.Controls.Add(this.ButtonPlus);
this.Controls.Add(this.ButtonMinus);
this.Controls.Add(this.ButtonMult);
this.Controls.Add(this.ButtonDigit0);
this.Controls.Add(this.ButtonDiv);
this.Controls.Add(this.ButtonLBrack);
this.Controls.Add(this.ButtonRBrack);
this.Controls.Add(this.ButtonDigit1);
this.Controls.Add(this.ButtonDigit9);
this.Controls.Add(this.ButtonDigit8);
this.Controls.Add(this.ButtonDigit7);
this.Controls.Add(this.ButtonDigit6);
this.Controls.Add(this.ButtonDigit5);
this.Controls.Add(this.ButtonDigit4);
this.Controls.Add(this.ButtonDigit3);
this.Controls.Add(this.ButtonDigit2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.Result_TextBox);
this.Name = "NumerCalc";
this.Text = "Number Calculator";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
56
private System.Windows.Forms.TextBox Result_TextBox;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button ButtonDigit2;
private System.Windows.Forms.Button ButtonDigit3;
private System.Windows.Forms.Button ButtonDigit4;
private System.Windows.Forms.Button ButtonDigit5;
private System.Windows.Forms.Button ButtonDigit6;
private System.Windows.Forms.Button ButtonDigit7;
private System.Windows.Forms.Button ButtonDigit8;
private System.Windows.Forms.Button ButtonDigit9;
private System.Windows.Forms.Button ButtonDigit1;
private System.Windows.Forms.Button ButtonRBrack;
private System.Windows.Forms.Button ButtonLBrack;
private System.Windows.Forms.Button ButtonDiv;
private System.Windows.Forms.Button ButtonDigit0;
private System.Windows.Forms.Button ButtonMult;
private System.Windows.Forms.Button ButtonMinus;
private System.Windows.Forms.Button ButtonPlus;
private System.Windows.Forms.Button ButtonBackspace;
private System.Windows.Forms.Button ButtonClear;
private System.Windows.Forms.Button ButtonLn;
private System.Windows.Forms.Button ButtonDeg;
private System.Windows.Forms.Button ButtonSin;
private System.Windows.Forms.Button ButtonCos;
private System.Windows.Forms.Button ButtonLog;
private System.Windows.Forms.Button ButtonPi;
private System.Windows.Forms.Button ButtonE;
}
//filename: Function1.cs
public partial class Function1 : Form
{
float WindowXMin;
float WindowYMin;
float WindowXMax;
float WindowYMax;
float WindowXStep;
float WindowYStep;
TextBox[] FunctionTextBox;
TextBox[] DerivativeTextBox;
Button[] CalculateDerivativeButton;
Button[] ChangeGraphColorButton;
CheckBox[] FunctionDrawCheckBox;
Label[] FunctionLabel;
Color[] GraphColor;
Color GraphBackColor;
Color AxisColor;
const float resolution = 0.01F;
private Boolean IsPressed;
public Function1()
{
InitializeComponent();
AxisComboBox.SelectedIndex = 2;
57
IsPressed = false;
FunctionTextBox = new TextBox[7];
DerivativeTextBox = new TextBox[7];
CalculateDerivativeButton = new Button[7];
ChangeGraphColorButton = new Button[7];
FunctionDrawCheckBox = new CheckBox[7];
FunctionLabel = new Label[7];
GraphColor=new Color[7];
GraphColor[0]=Color.Red;
GraphColor[1]=Color.Yellow;
GraphColor[2]=Color.Blue;
GraphColor[3]=Color.Fuchsia;
GraphColor[4]=Color.Pink;
GraphColor[5]=Color.Coral;
GraphColor[6]=Color.LawnGreen;
GraphBackColor = Color.Black;
AxisColor = Color.White;
for (int i = 0; i < 7; i++)
{
FunctionTextBox[i] = new TextBox();
DerivativeTextBox[i] = new TextBox();
CalculateDerivativeButton[i] = new Button();
FunctionDrawCheckBox[i] = new CheckBox();
ChangeGraphColorButton[i] = new Button();
FunctionLabel[i] = new Label();
FunctionTextBox[i].Text = "0";
DerivativeTextBox[i].Text = "0";
FunctionDrawCheckBox[i].Text = "draw";
CalculateDerivativeButton[i].Text = "dy/dx=";
ChangeGraphColorButton[i].Text = "Color";
FunctionLabel[i].Text=string.Format("function{0}:
y=",i);
CalculateDerivativeButton[i].BackColor = Color.Black;
CalculateDerivativeButton[i].ForeColor =
GraphColor[i];
FunctionDrawCheckBox[i].BackColor = Color.Black;
FunctionDrawCheckBox[i].ForeColor = GraphColor[i];
ChangeGraphColorButton[i].BackColor = Color.Black;
ChangeGraphColorButton[i].ForeColor = GraphColor[i];
FunctionLabel[i].BackColor = Color.Black;
FunctionLabel[i].ForeColor = GraphColor[i];
FunctionDrawCheckBox[i].Size = new Size(50, 23);
DerivativeTextBox[i].Size = new Size(340, 23);
CalculateDerivativeButton[i].Size = new Size(45, 23);
FunctionTextBox[i].Size = new Size(340, 20);
ChangeGraphColorButton[i].Size = new Size(45, 23);
FunctionLabel[i].Size = new Size(80, 18);
FunctionDrawCheckBox[i].Location = new Point(440, 12
+ 28 * i);
DerivativeTextBox[i].Location = new Point(542, 12 +
28 * i);
FunctionTextBox[i].Location = new Point(94, 14 + 28 *
i);
58
CalculateDerivativeButton[i].Location = new
Point(490, 12 + 28 * i);
ChangeGraphColorButton[i].Location = new Point(887,
12 + 28 * i);
FunctionLabel[i].Location = new Point(14, 15 + 28 *
i);
FunctionDrawCheckBox[i].Checked = false;
CalculateDerivativeButton[i].TabIndex = 1000 + i;
ChangeGraphColorButton[i].TabIndex = 2000 + i;
CalculateDerivativeButton[i].Click += new
EventHandler(CalculateDerivativeButton_Click);
ChangeGraphColorButton[i].Click += new
EventHandler(ChangeGraphColorButton_Click);
FunctionGroupBox.Controls.Add(FunctionDrawCheckBox[i]
);
FunctionGroupBox.Controls.Add(FunctionTextBox[i]);
FunctionGroupBox.Controls.Add(DerivativeTextBox[i]);
FunctionGroupBox.Controls.Add(CalculateDerivativeButt
on[i]);
FunctionGroupBox.Controls.Add(ChangeGraphColorButton[
i]);
FunctionGroupBox.Controls.Add(FunctionLabel[i]);
}
FunctionDrawCheckBox[0].Checked = true;
}
private void GraphPictureBox_Paint(object sender,
PaintEventArgs e)
{
float min, max, step,Yzero,Xzero;
FunctionPictureBox.BackColor = GraphBackColor;
Pen LinePen = new Pen(AxisColor);
e.Graphics.DrawRectangle(LinePen, 0, 0,
FunctionPictureBox.Width-1, FunctionPictureBox.Height-1);
Xzero = FunctionPictureBox.Width * WindowXMin /
(WindowXMin - WindowXMax);
Yzero = FunctionPictureBox.Height * WindowYMax /
(WindowYMax - WindowYMin);
min = WindowXMin;
max = WindowXMax;
step = WindowXStep;
if (AxisComboBox.SelectedIndex != 0)
{
if (min <= 0 && max >= 0)
{
LinePen.Width++;
e.Graphics.DrawLine(LinePen, Xzero, 0, Xzero,
FunctionPictureBox.Height);
e.Graphics.DrawString(VertAxisNameTextBox.Text,
new Font(FontFamily.GenericSansSerif, 8), new SolidBrush(AxisColor),
new PointF(Xzero + 5, 5));
LinePen.Width--;
}
if (AxisComboBox.SelectedIndex != 1)
{
for (float i = 0; i < max; i += step)
59
{
e.Graphics.DrawLine(LinePen, Xzero +
(FunctionPictureBox.Width - Xzero) * i / max, Yzero - 5, Xzero +
(FunctionPictureBox.Width - Xzero) * i / max, Yzero + 5);
if (AxisComboBox.SelectedIndex != 2)
e.Graphics.DrawString(string.Format("{0}"
, (double)(int)(i * 1000)/1000), new
Font(FontFamily.GenericSansSerif, 8), new SolidBrush(Color.White),
new PointF(Xzero + (FunctionPictureBox.Width - Xzero) * i / max - 4,
Yzero - 18));
}
for (float i = 0; i > min; i -= step)
{
e.Graphics.DrawLine(LinePen, Xzero - Xzero *
i / min, Yzero - 5, Xzero - Xzero * i / min, Yzero + 5);
if (AxisComboBox.SelectedIndex != 2)
e.Graphics.DrawString(string.Format("{0}"
, (double)(int)(i * 1000)/1000), new
Font(FontFamily.GenericSansSerif, 8), new SolidBrush(Color.White),
new PointF(Xzero + (FunctionPictureBox.Width - Xzero) * i / max - 4,
Yzero - 18));
}
}
}
min = WindowYMin;
max = WindowYMax;
step = WindowYStep;
if (AxisComboBox.SelectedIndex != 0)
{
if (min <= 0 && max >= 0)
{
LinePen.Width++;
e.Graphics.DrawLine(LinePen, 0, Yzero,
FunctionPictureBox.Width, Yzero);
e.Graphics.DrawString(HorizAxisNameTextBox.Text,
new Font(FontFamily.GenericSansSerif, 8), new SolidBrush(AxisColor),
new PointF(FunctionPictureBox.Width-10, Yzero-20));
LinePen.Width--;
}
if (AxisComboBox.SelectedIndex != 1)
{
for (float i = 0; i < max; i += step)
{
e.Graphics.DrawLine(LinePen, Xzero - 5, Yzero
* (max - i) / max, Xzero + 5, Yzero * (max - i) / max);
if(AxisComboBox.SelectedIndex!=2)
e.Graphics.DrawString(string.Format("{0}"
, (double)(int)(i*1000)/1000), new
Font(FontFamily.GenericSansSerif,8), new SolidBrush(Color.White), new
PointF(Xzero+5,Yzero * (max - i) / max-4));
}
for (float i = 0; i > min; i -= step)
{
e.Graphics.DrawLine(LinePen, Xzero - 5, Yzero
* (min + i) / min, Xzero + 5, Yzero * (min + i) / min);
if (AxisComboBox.SelectedIndex != 2)
e.Graphics.DrawString(string.Format("{0}"
, (double)(int)(i * 1000)/1000), new
Font(FontFamily.GenericSansSerif, 8), new SolidBrush(Color.White),
new PointF(Xzero + 5, Yzero * (max - i) / max - 4));
}
60
}
}
if (ShowGridCheckBox.Checked)
{
max = WindowYMax;
min = WindowYMin;
for (float i = 0; i < max; i += step)
e.Graphics.DrawLine(LinePen, 0, Yzero * (max - i)
/ max, FunctionPictureBox.Width, Yzero * (max - i) / max);
for (float i = 0; i > min; i -= step)
e.Graphics.DrawLine(LinePen, 0, Yzero * (min + i)
/ min, FunctionPictureBox.Width, Yzero * (min + i) / min);
max = WindowXMax;
min = WindowXMin;
for (float i = 0; i < max; i += step)
e.Graphics.DrawLine(LinePen, Xzero +
(FunctionPictureBox.Width - Xzero) * i / max, 0, Xzero +
(FunctionPictureBox.Width - Xzero) * i / max,
FunctionPictureBox.Height);
for (float i = 0; i > min; i -= step)
e.Graphics.DrawLine(LinePen, Xzero - Xzero * i /
min, 0, Xzero - Xzero * i / min, FunctionPictureBox.Height);
}
for (int i = 0; i < 7; i++)
{
if (FunctionDrawCheckBox[i].Checked)
{
Pen GraphPen = new Pen(GraphColor[i]);
ExpressionType Function = new ExpressionType();
float x1, y1, x2, y2;
try
{
Function =
ExpressionType.FromString(FunctionTextBox[i].Text);
}
catch
{
MessageBox.Show("The string:\n" +
FunctionTextBox[i].Text + "\ncan not represent a fuction", "Wrong
Format", MessageBoxButtons.OK);
return;
}
Function = Function.Simplify();
x1 = WindowXMin;
y1 = Convert.ToSingle(Function.Calculate(x1, 0));
for (float j = WindowXMin + resolution; j <=
WindowXMax; j += resolution)
{
x2 = j;
y2 = Convert.ToSingle(Function.Calculate(x2,
0));
if (y1 >= WindowYMin && y2 >= WindowYMin &&
y1 <= WindowYMax && y2 <= WindowYMax)
e.Graphics.DrawLine(GraphPen,
FunctionPictureBox.Width * (x1 - WindowXMin) / (WindowXMax -
WindowXMin), FunctionPictureBox.Height + FunctionPictureBox.Height *
(-y1 + WindowYMin) / (WindowYMax - WindowYMin),
FunctionPictureBox.Width * (x2 - WindowXMin) / (WindowXMax -
61
WindowXMin), FunctionPictureBox.Height + FunctionPictureBox.Height *
(-y2 + WindowYMin) / (WindowYMax - WindowYMin));
x1 = x2;
y1 = y2;
}
}
}
}
private void ApplyWindowButton_Click(object sender, EventArgs
e)
{
try
{
WindowXMin = Convert.ToSingle(XMinTextBox.Text);
WindowYMin = Convert.ToSingle(YMinTextBox.Text);
WindowXMax = Convert.ToSingle(XMaxTextBox.Text);
WindowYMax = Convert.ToSingle(YMaxTextBox.Text);
WindowXStep = Convert.ToSingle(XStepTextBox.Text);
WindowYStep = Convert.ToSingle(YStepTextBox.Text);
}
catch
{
MessageBox.Show("one of the Window strings can not
represent a number", "Wrong Format", MessageBoxButtons.OK);
}
this.Refresh();
}
private void Function1_Load(object sender, EventArgs e)
{
WindowXMin = Convert.ToSingle(XMinTextBox.Text);
WindowYMin = Convert.ToSingle(YMinTextBox.Text);
WindowXMax = Convert.ToSingle(XMaxTextBox.Text);
WindowYMax = Convert.ToSingle(YMaxTextBox.Text);
WindowXStep = Convert.ToSingle(XStepTextBox.Text);
WindowYStep = Convert.ToSingle(YStepTextBox.Text);
}
private void DrawFunctionsButton_Click(object sender,
EventArgs e)
{
this.Refresh();
}
private void CalculateDerivativeButton_Click(object sender,
EventArgs e)
{
Button Me = (Button)sender;
ExpressionType Function =
ExpressionType.FromString(FunctionTextBox[Me.TabIndex - 1000].Text);
Function = Function.DerivativeByX();
Function = Function.Simplify();
DerivativeTextBox[Me.TabIndex - 1000].Text =
Function.ToString();
}
private void ChangeGraphColorButton_Click(object sender,
EventArgs e)
{
Button Me = (Button)sender;
62
ColorDialog ChangeColorDialog = new ColorDialog();
int Idx=Me.TabIndex-2000;
ChangeColorDialog.ShowDialog();
GraphColor[Idx] = ChangeColorDialog.Color;
ChangeGraphColorButton[Idx].ForeColor = GraphColor[Idx];
FunctionDrawCheckBox[Idx].ForeColor = GraphColor[Idx];
CalculateDerivativeButton[Idx].ForeColor =
GraphColor[Idx];
FunctionLabel[Idx].ForeColor = GraphColor[Idx];
Refresh();
}
private void ApplyOptionsButton_Click(object sender,
EventArgs e)
{
Refresh();
}
private void BackGroundColorButton_Click(object sender,
EventArgs e)
{
ColorDialog ChangeColorDialog = new ColorDialog();
ChangeColorDialog.ShowDialog();
GraphBackColor = ChangeColorDialog.Color;
BackGroundColorButton.BackColor = GraphBackColor;
Refresh();
}
private void AxisColorButton_Click(object sender, EventArgs
e)
{
ColorDialog ChangeColorDialog = new ColorDialog();
ChangeColorDialog.ShowDialog();
AxisColor = ChangeColorDialog.Color;
AxisColorButton.BackColor = AxisColor;
Refresh();
}
private void FunctionPictureBox_Click(object sender,
EventArgs e)
{
MouseEventArgs MousePos = (MouseEventArgs)e;
MouseXLabel.Text = string.Format("x={0}", (WindowXMax-
WindowXMin) * MousePos.X/FunctionPictureBox.Width+WindowXMin);
MouseYLabel.Text = string.Format("y={0}", WindowXMax-
(WindowXMax-WindowXMin)* MousePos.Y/FunctionPictureBox.Height);
}
private void ButtonDigit0_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "0";
IsPressed = true;
}
private void ButtonDigit1_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
63
KeyBoardTextBox.Text += "1";
IsPressed = true;
}
private void ButtonDigit2_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "2";
IsPressed = true;
}
private void ButtonDigit3_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "3";
IsPressed = true;
}
private void ButtonDigit4_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "4";
IsPressed = true;
}
private void ButtonDigit5_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "5";
IsPressed = true;
}
private void ButtonDigit6_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "6";
IsPressed = true;
}
private void ButtonDigit7_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "7";
IsPressed = true;
}
private void ButtonDigit8_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "8";
IsPressed = true;
}
private void ButtonDigit9_Click(object sender, EventArgs e)
64
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "9";
IsPressed = true;
}
private void ButtonLBrack_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "(";
IsPressed = true;
}
private void ButtonRBrack_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += ")";
IsPressed = true;
}
private void ButtonDiv_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "/";
IsPressed = true;
}
private void ButtonMult_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "*";
IsPressed = true;
}
private void ButtonMinus_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "-";
IsPressed = true;
}
private void ButtonPlus_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "+";
IsPressed = true;
}
private void ButtonClear_Click(object sender, EventArgs e)
{
KeyBoardTextBox.Text = "0";
IsPressed = false;
}
65
private void ButtonBackspace_Click(object sender, EventArgs
e)
{
KeyBoardTextBox.Text =
KeyBoardTextBox.Text.Remove(KeyBoardTextBox.Text.Length - 1);
if (!IsPressed)
KeyBoardTextBox.Text = "0";
}
private void ButtonLn_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "ln(";
IsPressed = true;
}
private void ButtonSin_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "sin(";
IsPressed = true;
}
private void ButtonCos_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "cos(";
IsPressed = true;
}
private void ButtonDeg_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "^";
IsPressed = true;
}
private void ButtonLog_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "log";
IsPressed = true;
}
private void CopyFromKeyboardButton_Click(object sender,
EventArgs e)
{
FunctionTextBox[FunctionKeyBoardChoseComboBox.SelectedInd
ex].Text = KeyBoardTextBox.Text;
}
private void ButtonX_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "x";
66
IsPressed = true;
}
private void ButtonPi_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "pi";
IsPressed = true;
}
private void ButtonE_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "e";
IsPressed = true;
}
/// <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.FunctionPictureBox = new
System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.YMaxTextBox = new System.Windows.Forms.TextBox();
this.YMinTextBox = new System.Windows.Forms.TextBox();
this.XMaxTextBox = new System.Windows.Forms.TextBox();
this.XMinTextBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.WindowGroupBox = new
System.Windows.Forms.GroupBox();
this.ApplyWindowButton = new
System.Windows.Forms.Button();
67
this.label8 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.XStepTextBox = new System.Windows.Forms.TextBox();
this.YStepTextBox = new System.Windows.Forms.TextBox();
this.OptionsGroupBox = new
System.Windows.Forms.GroupBox();
this.FunctionKeyBoardGroupBox = new
System.Windows.Forms.GroupBox();
this.ButtonPi = new System.Windows.Forms.Button();
this.ButtonE = new System.Windows.Forms.Button();
this.ButtonX = new System.Windows.Forms.Button();
this.CopyFromKeyboardButton = new
System.Windows.Forms.Button();
this.FunctionKeyBoardChoseComboBox = new
System.Windows.Forms.ComboBox();
this.ButtonLog = new System.Windows.Forms.Button();
this.ButtonCos = new System.Windows.Forms.Button();
this.ButtonSin = new System.Windows.Forms.Button();
this.ButtonDeg = new System.Windows.Forms.Button();
this.ButtonLn = new System.Windows.Forms.Button();
this.ButtonClear = new System.Windows.Forms.Button();
this.ButtonBackspace = new System.Windows.Forms.Button();
this.ButtonPlus = new System.Windows.Forms.Button();
this.ButtonMinus = new System.Windows.Forms.Button();
this.ButtonMult = new System.Windows.Forms.Button();
this.ButtonDigit0 = new System.Windows.Forms.Button();
this.ButtonDiv = new System.Windows.Forms.Button();
this.ButtonLBrack = new System.Windows.Forms.Button();
this.ButtonRBrack = new System.Windows.Forms.Button();
this.ButtonDigit1 = new System.Windows.Forms.Button();
this.ButtonDigit9 = new System.Windows.Forms.Button();
this.ButtonDigit8 = new System.Windows.Forms.Button();
this.ButtonDigit7 = new System.Windows.Forms.Button();
this.ButtonDigit6 = new System.Windows.Forms.Button();
this.ButtonDigit5 = new System.Windows.Forms.Button();
this.ButtonDigit4 = new System.Windows.Forms.Button();
this.ButtonDigit3 = new System.Windows.Forms.Button();
this.ButtonDigit2 = new System.Windows.Forms.Button();
this.KeyBoardTextBox = new
System.Windows.Forms.TextBox();
this.MouseYLabel = new System.Windows.Forms.Label();
this.MouseXLabel = new System.Windows.Forms.Label();
this.VertAxisNameTextBox = new
System.Windows.Forms.TextBox();
this.HorizAxisNameTextBox = new
System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.AxisColorButton = new System.Windows.Forms.Button();
this.BackGroundColorButton = new
System.Windows.Forms.Button();
this.ShowGridCheckBox = new
System.Windows.Forms.CheckBox();
this.ApplyOptionsButton = new
System.Windows.Forms.Button();
this.label16 = new System.Windows.Forms.Label();
this.AxisComboBox = new System.Windows.Forms.ComboBox();
this.FunctionGroupBox = new
System.Windows.Forms.GroupBox();
this.DrawFunctionsButton = new
System.Windows.Forms.Button();
68
((System.ComponentModel.ISupportInitialize)
(this.FunctionPictureBox)).BeginInit();
this.WindowGroupBox.SuspendLayout();
this.OptionsGroupBox.SuspendLayout();
this.FunctionKeyBoardGroupBox.SuspendLayout();
this.FunctionGroupBox.SuspendLayout();
this.SuspendLayout();
//
// FunctionPictureBox
//
this.FunctionPictureBox.BackColor =
System.Drawing.SystemColors.ControlText;
this.FunctionPictureBox.Location = new
System.Drawing.Point(12, 12);
this.FunctionPictureBox.Name = "FunctionPictureBox";
this.FunctionPictureBox.Size = new
System.Drawing.Size(580, 475);
this.FunctionPictureBox.TabIndex = 0;
this.FunctionPictureBox.TabStop = false;
this.FunctionPictureBox.Click += new
System.EventHandler(this.FunctionPictureBox_Click);
this.FunctionPictureBox.Paint += new
System.Windows.Forms.PaintEventHandler(this.GraphPictureBox_Paint);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(11, 53);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(45, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Vertical-";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(84, 53);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(27, 13);
this.label3.TabIndex = 3;
this.label3.Text = "from";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(84, 22);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(27, 13);
this.label4.TabIndex = 4;
this.label4.Text = "from";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(6, 26);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(57, 13);
this.label5.TabIndex = 5;
this.label5.Text = "Horizontal-";
//
// YMaxTextBox
69
//
this.YMaxTextBox.Location = new System.Drawing.Point(224,
51);
this.YMaxTextBox.Name = "YMaxTextBox";
this.YMaxTextBox.Size = new System.Drawing.Size(76, 20);
this.YMaxTextBox.TabIndex = 6;
this.YMaxTextBox.Text = "10";
//
// YMinTextBox
//
this.YMinTextBox.Location = new System.Drawing.Point(119,
50);
this.YMinTextBox.Name = "YMinTextBox";
this.YMinTextBox.Size = new System.Drawing.Size(77, 20);
this.YMinTextBox.TabIndex = 7;
this.YMinTextBox.Text = "-10";
//
// XMaxTextBox
//
this.XMaxTextBox.Location = new System.Drawing.Point(224,
19);
this.XMaxTextBox.Name = "XMaxTextBox";
this.XMaxTextBox.Size = new System.Drawing.Size(76, 20);
this.XMaxTextBox.TabIndex = 8;
this.XMaxTextBox.Text = "10";
//
// XMinTextBox
//
this.XMinTextBox.Location = new System.Drawing.Point(119,
18);
this.XMinTextBox.Name = "XMinTextBox";
this.XMinTextBox.Size = new System.Drawing.Size(77, 20);
this.XMinTextBox.TabIndex = 9;
this.XMinTextBox.Text = "-10";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(202, 54);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(16, 13);
this.label6.TabIndex = 10;
this.label6.Text = "to";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(202, 22);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(16, 13);
this.label7.TabIndex = 11;
this.label7.Text = "to";
//
// WindowGroupBox
//
this.WindowGroupBox.BackColor =
System.Drawing.SystemColors.Control;
this.WindowGroupBox.BackgroundImageLayout =
System.Windows.Forms.ImageLayout.None;
this.WindowGroupBox.Controls.Add(this.ApplyWindowButton);
this.WindowGroupBox.Controls.Add(this.label7);
70
this.WindowGroupBox.Controls.Add(this.label8);
this.WindowGroupBox.Controls.Add(this.label6);
this.WindowGroupBox.Controls.Add(this.label1);
this.WindowGroupBox.Controls.Add(this.XMinTextBox);
this.WindowGroupBox.Controls.Add(this.XStepTextBox);
this.WindowGroupBox.Controls.Add(this.XMaxTextBox);
this.WindowGroupBox.Controls.Add(this.YStepTextBox);
this.WindowGroupBox.Controls.Add(this.YMinTextBox);
this.WindowGroupBox.Controls.Add(this.label3);
this.WindowGroupBox.Controls.Add(this.YMaxTextBox);
this.WindowGroupBox.Controls.Add(this.label2);
this.WindowGroupBox.Controls.Add(this.label5);
this.WindowGroupBox.Controls.Add(this.label4);
this.WindowGroupBox.ImeMode =
System.Windows.Forms.ImeMode.NoControl;
this.WindowGroupBox.Location = new
System.Drawing.Point(598, 12);
this.WindowGroupBox.Name = "WindowGroupBox";
this.WindowGroupBox.Size = new System.Drawing.Size(418,
109);
this.WindowGroupBox.TabIndex = 12;
this.WindowGroupBox.TabStop = false;
this.WindowGroupBox.Text = "window";
//
// ApplyWindowButton
//
this.ApplyWindowButton.Location = new
System.Drawing.Point(323, 80);
this.ApplyWindowButton.Name = "ApplyWindowButton";
this.ApplyWindowButton.Size = new System.Drawing.Size(75,
23);
this.ApplyWindowButton.TabIndex = 12;
this.ApplyWindowButton.Text = "apply";
this.ApplyWindowButton.UseVisualStyleBackColor = true;
this.ApplyWindowButton.Click += new
System.EventHandler(this.ApplyWindowButton_Click);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(306, 21);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(27, 13);
this.label8.TabIndex = 3;
this.label8.Text = "step";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(306, 53);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 0;
this.label1.Text = "step";
//
// XStepTextBox
//
this.XStepTextBox.Location = new
System.Drawing.Point(339, 18);
this.XStepTextBox.Name = "XStepTextBox";
this.XStepTextBox.Size = new System.Drawing.Size(67, 20);
71
this.XStepTextBox.TabIndex = 2;
this.XStepTextBox.Text = "1";
//
// YStepTextBox
//
this.YStepTextBox.Location = new
System.Drawing.Point(339, 50);
this.YStepTextBox.Name = "YStepTextBox";
this.YStepTextBox.Size = new System.Drawing.Size(67, 20);
this.YStepTextBox.TabIndex = 1;
this.YStepTextBox.Text = "1";
//
// OptionsGroupBox
//
this.OptionsGroupBox.Controls.Add(this.FunctionKeyBoardGr
oupBox);
this.OptionsGroupBox.Controls.Add(this.MouseYLabel);
this.OptionsGroupBox.Controls.Add(this.MouseXLabel);
this.OptionsGroupBox.Controls.Add(this.VertAxisNameTextBo
x);
this.OptionsGroupBox.Controls.Add(this.HorizAxisNameTextB
ox);
this.OptionsGroupBox.Controls.Add(this.label10);
this.OptionsGroupBox.Controls.Add(this.label9);
this.OptionsGroupBox.Controls.Add(this.AxisColorButton);
this.OptionsGroupBox.Controls.Add(this.BackGroundColorBut
ton);
this.OptionsGroupBox.Controls.Add(this.ShowGridCheckBox);
this.OptionsGroupBox.Controls.Add(this.ApplyOptionsButton
);
this.OptionsGroupBox.Controls.Add(this.label16);
this.OptionsGroupBox.Controls.Add(this.AxisComboBox);
this.OptionsGroupBox.Location = new
System.Drawing.Point(598, 127);
this.OptionsGroupBox.Name = "OptionsGroupBox";
this.OptionsGroupBox.Size = new System.Drawing.Size(418,
360);
this.OptionsGroupBox.TabIndex = 13;
this.OptionsGroupBox.TabStop = false;
this.OptionsGroupBox.Text = "options";
//
// FunctionKeyBoardGroupBox
//
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonPi)
;
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonE);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonX);
this.FunctionKeyBoardGroupBox.Controls.Add(this.CopyFromK
eyboardButton);
this.FunctionKeyBoardGroupBox.Controls.Add(this.FunctionK
eyBoardChoseComboBox);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonLog
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonCos
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonSin
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDeg
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonLn)
;
72
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonCle
ar);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonBac
kspace);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonPlu
s);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonMin
us);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonMul
t);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it0);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDiv
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonLBr
ack);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonRBr
ack);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it1);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it9);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it8);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it7);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it6);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it5);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it4);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it3);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it2);
this.FunctionKeyBoardGroupBox.Controls.Add(this.KeyBoardT
extBox);
this.FunctionKeyBoardGroupBox.Location = new
System.Drawing.Point(175, 46);
this.FunctionKeyBoardGroupBox.Name =
"FunctionKeyBoardGroupBox";
this.FunctionKeyBoardGroupBox.Size = new
System.Drawing.Size(237, 279);
this.FunctionKeyBoardGroupBox.TabIndex = 13;
this.FunctionKeyBoardGroupBox.TabStop = false;
this.FunctionKeyBoardGroupBox.Text = "Function Keyboard";
//
// ButtonPi
//
this.ButtonPi.Location = new System.Drawing.Point(149,
184);
this.ButtonPi.Name = "ButtonPi";
this.ButtonPi.Size = new System.Drawing.Size(35, 23);
this.ButtonPi.TabIndex = 79;
this.ButtonPi.Text = "pi";
this.ButtonPi.UseVisualStyleBackColor = true;
this.ButtonPi.Click += new
System.EventHandler(this.ButtonPi_Click);
//
// ButtonE
73
//
this.ButtonE.Location = new System.Drawing.Point(190,
184);
this.ButtonE.Name = "ButtonE";
this.ButtonE.Size = new System.Drawing.Size(33, 23);
this.ButtonE.TabIndex = 78;
this.ButtonE.Text = "e";
this.ButtonE.UseVisualStyleBackColor = true;
this.ButtonE.Click += new
System.EventHandler(this.ButtonE_Click);
//
// ButtonX
//
this.ButtonX.Location = new System.Drawing.Point(116,
127);
this.ButtonX.Name = "ButtonX";
this.ButtonX.Size = new System.Drawing.Size(26, 23);
this.ButtonX.TabIndex = 77;
this.ButtonX.Text = "x";
this.ButtonX.UseVisualStyleBackColor = true;
this.ButtonX.Click += new
System.EventHandler(this.ButtonX_Click);
//
// CopyFromKeyboardButton
//
this.CopyFromKeyboardButton.Location = new
System.Drawing.Point(6, 46);
this.CopyFromKeyboardButton.Name =
"CopyFromKeyboardButton";
this.CopyFromKeyboardButton.Size = new
System.Drawing.Size(217, 23);
this.CopyFromKeyboardButton.TabIndex = 76;
this.CopyFromKeyboardButton.Text = "Copy To Function";
this.CopyFromKeyboardButton.UseVisualStyleBackColor =
true;
this.CopyFromKeyboardButton.Click += new
System.EventHandler(this.CopyFromKeyboardButton_Click);
//
// FunctionKeyBoardChoseComboBox
//
this.FunctionKeyBoardChoseComboBox.FormattingEnabled =
true;
this.FunctionKeyBoardChoseComboBox.Items.AddRange(new
object[] {
"function #1",
"function #2",
"function #3",
"function #4",
"function #5",
"function #6",
"function #7"});
this.FunctionKeyBoardChoseComboBox.Location = new
System.Drawing.Point(6, 19);
this.FunctionKeyBoardChoseComboBox.Name =
"FunctionKeyBoardChoseComboBox";
this.FunctionKeyBoardChoseComboBox.Size = new
System.Drawing.Size(218, 21);
this.FunctionKeyBoardChoseComboBox.TabIndex = 75;
//
// ButtonLog
//
74
this.ButtonLog.Location = new System.Drawing.Point(80,
97);
this.ButtonLog.Name = "ButtonLog";
this.ButtonLog.Size = new System.Drawing.Size(63, 23);
this.ButtonLog.TabIndex = 74;
this.ButtonLog.Text = "log";
this.ButtonLog.UseVisualStyleBackColor = true;
this.ButtonLog.Click += new
System.EventHandler(this.ButtonLog_Click);
//
// ButtonCos
//
this.ButtonCos.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonCos.Location = new System.Drawing.Point(64,
126);
this.ButtonCos.Name = "ButtonCos";
this.ButtonCos.Size = new System.Drawing.Size(46, 23);
this.ButtonCos.TabIndex = 73;
this.ButtonCos.Text = "cos(";
this.ButtonCos.UseVisualStyleBackColor = true;
this.ButtonCos.Click += new
System.EventHandler(this.ButtonCos_Click);
//
// ButtonSin
//
this.ButtonSin.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonSin.Location = new System.Drawing.Point(6,
126);
this.ButtonSin.Name = "ButtonSin";
this.ButtonSin.Size = new System.Drawing.Size(52, 23);
this.ButtonSin.TabIndex = 72;
this.ButtonSin.Text = "sin(";
this.ButtonSin.UseVisualStyleBackColor = true;
this.ButtonSin.Click += new
System.EventHandler(this.ButtonSin_Click);
//
// ButtonDeg
//
this.ButtonDeg.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDeg.Location = new System.Drawing.Point(6,
97);
this.ButtonDeg.Name = "ButtonDeg";
this.ButtonDeg.Size = new System.Drawing.Size(31, 23);
this.ButtonDeg.TabIndex = 71;
this.ButtonDeg.Text = "^";
this.ButtonDeg.UseVisualStyleBackColor = true;
this.ButtonDeg.Click += new
System.EventHandler(this.ButtonDeg_Click);
//
// ButtonLn
//
75
this.ButtonLn.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonLn.Location = new System.Drawing.Point(43,
97);
this.ButtonLn.Name = "ButtonLn";
this.ButtonLn.Size = new System.Drawing.Size(30, 23);
this.ButtonLn.TabIndex = 70;
this.ButtonLn.Text = "ln(";
this.ButtonLn.UseVisualStyleBackColor = true;
this.ButtonLn.Click += new
System.EventHandler(this.ButtonLn_Click);
//
// ButtonClear
//
this.ButtonClear.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonClear.Location = new System.Drawing.Point(149,
242);
this.ButtonClear.Name = "ButtonClear";
this.ButtonClear.Size = new System.Drawing.Size(75, 23);
this.ButtonClear.TabIndex = 69;
this.ButtonClear.Text = "clear";
this.ButtonClear.UseVisualStyleBackColor = true;
this.ButtonClear.Click += new
System.EventHandler(this.ButtonClear_Click);
//
// ButtonBackspace
//
this.ButtonBackspace.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonBackspace.Location = new
System.Drawing.Point(149, 213);
this.ButtonBackspace.Name = "ButtonBackspace";
this.ButtonBackspace.Size = new System.Drawing.Size(75,
23);
this.ButtonBackspace.TabIndex = 68;
this.ButtonBackspace.Text = "backspace";
this.ButtonBackspace.UseVisualStyleBackColor = true;
this.ButtonBackspace.Click += new
System.EventHandler(this.ButtonBackspace_Click);
//
// ButtonPlus
//
this.ButtonPlus.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonPlus.Location = new System.Drawing.Point(115,
242);
this.ButtonPlus.Name = "ButtonPlus";
this.ButtonPlus.Size = new System.Drawing.Size(28, 23);
this.ButtonPlus.TabIndex = 67;
this.ButtonPlus.Text = "+";
this.ButtonPlus.UseVisualStyleBackColor = true;
76
this.ButtonPlus.Click += new
System.EventHandler(this.ButtonPlus_Click);
//
// ButtonMinus
//
this.ButtonMinus.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonMinus.Location = new System.Drawing.Point(115,
213);
this.ButtonMinus.Name = "ButtonMinus";
this.ButtonMinus.Size = new System.Drawing.Size(28, 23);
this.ButtonMinus.TabIndex = 66;
this.ButtonMinus.Text = "-";
this.ButtonMinus.UseVisualStyleBackColor = true;
this.ButtonMinus.Click += new
System.EventHandler(this.ButtonMinus_Click);
//
// ButtonMult
//
this.ButtonMult.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonMult.Location = new System.Drawing.Point(115,
184);
this.ButtonMult.Name = "ButtonMult";
this.ButtonMult.Size = new System.Drawing.Size(28, 23);
this.ButtonMult.TabIndex = 65;
this.ButtonMult.Text = "*";
this.ButtonMult.UseVisualStyleBackColor = true;
this.ButtonMult.Click += new
System.EventHandler(this.ButtonMult_Click);
//
// ButtonDigit0
//
this.ButtonDigit0.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit0.Location = new System.Drawing.Point(6,
155);
this.ButtonDigit0.Name = "ButtonDigit0";
this.ButtonDigit0.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit0.TabIndex = 64;
this.ButtonDigit0.Text = "0";
this.ButtonDigit0.UseVisualStyleBackColor = true;
this.ButtonDigit0.Click += new
System.EventHandler(this.ButtonDigit0_Click);
//
// ButtonDiv
//
this.ButtonDiv.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDiv.Location = new System.Drawing.Point(115,
155);
this.ButtonDiv.Name = "ButtonDiv";
this.ButtonDiv.Size = new System.Drawing.Size(28, 23);
77
this.ButtonDiv.TabIndex = 63;
this.ButtonDiv.Text = "/";
this.ButtonDiv.UseVisualStyleBackColor = true;
this.ButtonDiv.Click += new
System.EventHandler(this.ButtonDiv_Click);
//
// ButtonLBrack
//
this.ButtonLBrack.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonLBrack.Location = new System.Drawing.Point(43,
155);
this.ButtonLBrack.Name = "ButtonLBrack";
this.ButtonLBrack.Size = new System.Drawing.Size(30, 23);
this.ButtonLBrack.TabIndex = 62;
this.ButtonLBrack.Text = "(";
this.ButtonLBrack.UseVisualStyleBackColor = true;
this.ButtonLBrack.Click += new
System.EventHandler(this.ButtonLBrack_Click);
//
// ButtonRBrack
//
this.ButtonRBrack.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonRBrack.Location = new System.Drawing.Point(79,
155);
this.ButtonRBrack.Name = "ButtonRBrack";
this.ButtonRBrack.Size = new System.Drawing.Size(30, 23);
this.ButtonRBrack.TabIndex = 61;
this.ButtonRBrack.Text = ")";
this.ButtonRBrack.UseVisualStyleBackColor = true;
this.ButtonRBrack.Click += new
System.EventHandler(this.ButtonRBrack_Click);
//
// ButtonDigit1
//
this.ButtonDigit1.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit1.Location = new System.Drawing.Point(6,
242);
this.ButtonDigit1.Name = "ButtonDigit1";
this.ButtonDigit1.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit1.TabIndex = 60;
this.ButtonDigit1.Text = "1";
this.ButtonDigit1.UseVisualStyleBackColor = true;
this.ButtonDigit1.Click += new
System.EventHandler(this.ButtonDigit1_Click);
//
// ButtonDigit9
//
this.ButtonDigit9.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
78
this.ButtonDigit9.Location = new System.Drawing.Point(80,
184);
this.ButtonDigit9.Name = "ButtonDigit9";
this.ButtonDigit9.Size = new System.Drawing.Size(29, 23);
this.ButtonDigit9.TabIndex = 59;
this.ButtonDigit9.Text = "9";
this.ButtonDigit9.UseVisualStyleBackColor = true;
this.ButtonDigit9.Click += new
System.EventHandler(this.ButtonDigit9_Click);
//
// ButtonDigit8
//
this.ButtonDigit8.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit8.Location = new System.Drawing.Point(43,
184);
this.ButtonDigit8.Name = "ButtonDigit8";
this.ButtonDigit8.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit8.TabIndex = 58;
this.ButtonDigit8.Text = "8";
this.ButtonDigit8.UseVisualStyleBackColor = true;
this.ButtonDigit8.Click += new
System.EventHandler(this.ButtonDigit8_Click);
//
// ButtonDigit7
//
this.ButtonDigit7.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit7.Location = new System.Drawing.Point(6,
184);
this.ButtonDigit7.Name = "ButtonDigit7";
this.ButtonDigit7.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit7.TabIndex = 57;
this.ButtonDigit7.Text = "7";
this.ButtonDigit7.UseVisualStyleBackColor = true;
this.ButtonDigit7.Click += new
System.EventHandler(this.ButtonDigit7_Click);
//
// ButtonDigit6
//
this.ButtonDigit6.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit6.Location = new System.Drawing.Point(80,
213);
this.ButtonDigit6.Name = "ButtonDigit6";
this.ButtonDigit6.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit6.TabIndex = 56;
this.ButtonDigit6.Text = "6";
this.ButtonDigit6.UseVisualStyleBackColor = true;
this.ButtonDigit6.Click += new
System.EventHandler(this.ButtonDigit6_Click);
//
// ButtonDigit5
//
79
this.ButtonDigit5.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit5.Location = new System.Drawing.Point(43,
213);
this.ButtonDigit5.Name = "ButtonDigit5";
this.ButtonDigit5.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit5.TabIndex = 55;
this.ButtonDigit5.Text = "5";
this.ButtonDigit5.UseVisualStyleBackColor = true;
this.ButtonDigit5.Click += new
System.EventHandler(this.ButtonDigit5_Click);
//
// ButtonDigit4
//
this.ButtonDigit4.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit4.Location = new System.Drawing.Point(6,
213);
this.ButtonDigit4.Name = "ButtonDigit4";
this.ButtonDigit4.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit4.TabIndex = 54;
this.ButtonDigit4.Text = "4";
this.ButtonDigit4.UseVisualStyleBackColor = true;
this.ButtonDigit4.Click += new
System.EventHandler(this.ButtonDigit4_Click);
//
// ButtonDigit3
//
this.ButtonDigit3.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit3.Location = new System.Drawing.Point(80,
242);
this.ButtonDigit3.Name = "ButtonDigit3";
this.ButtonDigit3.Size = new System.Drawing.Size(29, 23);
this.ButtonDigit3.TabIndex = 53;
this.ButtonDigit3.Text = "3";
this.ButtonDigit3.UseVisualStyleBackColor = true;
this.ButtonDigit3.Click += new
System.EventHandler(this.ButtonDigit3_Click);
//
// ButtonDigit2
//
this.ButtonDigit2.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)));
this.ButtonDigit2.Location = new System.Drawing.Point(43,
242);
this.ButtonDigit2.Name = "ButtonDigit2";
this.ButtonDigit2.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit2.TabIndex = 52;
this.ButtonDigit2.Text = "2";
this.ButtonDigit2.UseVisualStyleBackColor = true;
this.ButtonDigit2.Click += new
System.EventHandler(this.ButtonDigit2_Click);
80
//
// KeyBoardTextBox
//
this.KeyBoardTextBox.Anchor =
((System.Windows.Forms.AnchorStyles)
(((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.KeyBoardTextBox.Location = new
System.Drawing.Point(6, 74);
this.KeyBoardTextBox.Name = "KeyBoardTextBox";
this.KeyBoardTextBox.Size = new System.Drawing.Size(217,
20);
this.KeyBoardTextBox.TabIndex = 51;
this.KeyBoardTextBox.Text = "0";
//
// MouseYLabel
//
this.MouseYLabel.AutoSize = true;
this.MouseYLabel.Location = new System.Drawing.Point(6,
336);
this.MouseYLabel.Name = "MouseYLabel";
this.MouseYLabel.Size = new System.Drawing.Size(164, 13);
this.MouseYLabel.TabIndex = 12;
this.MouseYLabel.Text = "Click on the graph to see Y
value";
//
// MouseXLabel
//
this.MouseXLabel.AutoSize = true;
this.MouseXLabel.Location = new System.Drawing.Point(6,
314);
this.MouseXLabel.Name = "MouseXLabel";
this.MouseXLabel.Size = new System.Drawing.Size(164, 13);
this.MouseXLabel.TabIndex = 11;
this.MouseXLabel.Text = "Click on the graph to see X
value";
//
// VertAxisNameTextBox
//
this.VertAxisNameTextBox.Location = new
System.Drawing.Point(119, 117);
this.VertAxisNameTextBox.Name = "VertAxisNameTextBox";
this.VertAxisNameTextBox.Size = new
System.Drawing.Size(43, 20);
this.VertAxisNameTextBox.TabIndex = 10;
this.VertAxisNameTextBox.Text = "y";
//
// HorizAxisNameTextBox
//
this.HorizAxisNameTextBox.Location = new
System.Drawing.Point(119, 92);
this.HorizAxisNameTextBox.Name = "HorizAxisNameTextBox";
this.HorizAxisNameTextBox.Size = new
System.Drawing.Size(43, 20);
this.HorizAxisNameTextBox.TabIndex = 9;
this.HorizAxisNameTextBox.Text = "x";
//
// label10
//
this.label10.AutoSize = true;
81
this.label10.Location = new System.Drawing.Point(18,
120);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(95, 13);
this.label10.TabIndex = 8;
this.label10.Text = "Vertical axis name:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(6, 94);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(107, 13);
this.label9.TabIndex = 7;
this.label9.Text = "Horizontal axis name:";
//
// AxisColorButton
//
this.AxisColorButton.BackColor =
System.Drawing.Color.White;
this.AxisColorButton.Location = new
System.Drawing.Point(87, 63);
this.AxisColorButton.Name = "AxisColorButton";
this.AxisColorButton.Size = new System.Drawing.Size(75,
23);
this.AxisColorButton.TabIndex = 6;
this.AxisColorButton.Text = "Axis Color";
this.AxisColorButton.UseVisualStyleBackColor = false;
this.AxisColorButton.Click += new
System.EventHandler(this.AxisColorButton_Click);
//
// BackGroundColorButton
//
this.BackGroundColorButton.BackColor =
System.Drawing.Color.Black;
this.BackGroundColorButton.ForeColor =
System.Drawing.Color.White;
this.BackGroundColorButton.Location = new
System.Drawing.Point(6, 63);
this.BackGroundColorButton.Name =
"BackGroundColorButton";
this.BackGroundColorButton.Size = new
System.Drawing.Size(75, 23);
this.BackGroundColorButton.TabIndex = 5;
this.BackGroundColorButton.Text = "Back Color";
this.BackGroundColorButton.UseVisualStyleBackColor =
false;
this.BackGroundColorButton.Click += new
System.EventHandler(this.BackGroundColorButton_Click);
//
// ShowGridCheckBox
//
this.ShowGridCheckBox.AutoSize = true;
this.ShowGridCheckBox.Location = new
System.Drawing.Point(270, 15);
this.ShowGridCheckBox.Name = "ShowGridCheckBox";
this.ShowGridCheckBox.Size = new System.Drawing.Size(75,
17);
this.ShowGridCheckBox.TabIndex = 4;
this.ShowGridCheckBox.Text = "Show Grid";
this.ShowGridCheckBox.UseVisualStyleBackColor = true;
82
//
// ApplyOptionsButton
//
this.ApplyOptionsButton.Location = new
System.Drawing.Point(337, 331);
this.ApplyOptionsButton.Name = "ApplyOptionsButton";
this.ApplyOptionsButton.Size = new
System.Drawing.Size(75, 23);
this.ApplyOptionsButton.TabIndex = 3;
this.ApplyOptionsButton.Text = "Apply Options";
this.ApplyOptionsButton.UseVisualStyleBackColor = true;
this.ApplyOptionsButton.Click += new
System.EventHandler(this.ApplyOptionsButton_Click);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(6, 16);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(68, 13);
this.label16.TabIndex = 1;
this.label16.Text = "Axis Options:";
//
// AxisComboBox
//
this.AxisComboBox.FormattingEnabled = true;
this.AxisComboBox.Items.AddRange(new object[] {
"No axis",
"Just axis",
"Axis with marks",
"Axis with marks and values"});
this.AxisComboBox.Location = new System.Drawing.Point(80,
13);
this.AxisComboBox.Name = "AxisComboBox";
this.AxisComboBox.Size = new System.Drawing.Size(184,
21);
this.AxisComboBox.TabIndex = 0;
//
// FunctionGroupBox
//
this.FunctionGroupBox.BackColor =
System.Drawing.SystemColors.ControlText;
this.FunctionGroupBox.Controls.Add(this.DrawFunctionsButt
on);
this.FunctionGroupBox.ForeColor =
System.Drawing.Color.Gold;
this.FunctionGroupBox.Location = new
System.Drawing.Point(12, 493);
this.FunctionGroupBox.Name = "FunctionGroupBox";
this.FunctionGroupBox.Size = new
System.Drawing.Size(1004, 213);
this.FunctionGroupBox.TabIndex = 14;
this.FunctionGroupBox.TabStop = false;
this.FunctionGroupBox.Text = "Functions";
//
// DrawFunctionsButton
//
this.DrawFunctionsButton.BackColor =
System.Drawing.SystemColors.HotTrack;
this.DrawFunctionsButton.Font = new
System.Drawing.Font("Microsoft Sans Serif", 13F,
83
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(177)));
this.DrawFunctionsButton.Location = new
System.Drawing.Point(976, 16);
this.DrawFunctionsButton.Name = "DrawFunctionsButton";
this.DrawFunctionsButton.Size = new
System.Drawing.Size(22, 191);
this.DrawFunctionsButton.TabIndex = 23;
this.DrawFunctionsButton.Text = "Draw";
this.DrawFunctionsButton.UseVisualStyleBackColor = false;
this.DrawFunctionsButton.Click += new
System.EventHandler(this.DrawFunctionsButton_Click);
//
// Function1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F,
13F);
this.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1016, 701);
this.Controls.Add(this.FunctionGroupBox);
this.Controls.Add(this.OptionsGroupBox);
this.Controls.Add(this.FunctionPictureBox);
this.Controls.Add(this.WindowGroupBox);
this.MaximizeBox = false;
this.Name = "Function1";
this.Text = "Function with one variable";
this.WindowState =
System.Windows.Forms.FormWindowState.Maximized;
this.Load += new
System.EventHandler(this.Function1_Load);
((System.ComponentModel.ISupportInitialize)
(this.FunctionPictureBox)).EndInit();
this.WindowGroupBox.ResumeLayout(false);
this.WindowGroupBox.PerformLayout();
this.OptionsGroupBox.ResumeLayout(false);
this.OptionsGroupBox.PerformLayout();
this.FunctionKeyBoardGroupBox.ResumeLayout(false);
this.FunctionKeyBoardGroupBox.PerformLayout();
this.FunctionGroupBox.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox FunctionPictureBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox YMaxTextBox;
private System.Windows.Forms.TextBox YMinTextBox;
private System.Windows.Forms.TextBox XMaxTextBox;
private System.Windows.Forms.TextBox XMinTextBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.GroupBox WindowGroupBox;
private System.Windows.Forms.TextBox XStepTextBox;
private System.Windows.Forms.TextBox YStepTextBox;
private System.Windows.Forms.Label label1;
84
private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox OptionsGroupBox;
private System.Windows.Forms.GroupBox FunctionGroupBox;
private System.Windows.Forms.Button ApplyWindowButton;
private System.Windows.Forms.Button DrawFunctionsButton;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.ComboBox AxisComboBox;
private System.Windows.Forms.Button ApplyOptionsButton;
private System.Windows.Forms.CheckBox ShowGridCheckBox;
private System.Windows.Forms.Button AxisColorButton;
private System.Windows.Forms.Button BackGroundColorButton;
private System.Windows.Forms.TextBox VertAxisNameTextBox;
private System.Windows.Forms.TextBox HorizAxisNameTextBox;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label MouseYLabel;
private System.Windows.Forms.Label MouseXLabel;
private System.Windows.Forms.GroupBox
FunctionKeyBoardGroupBox;
private System.Windows.Forms.Button CopyFromKeyboardButton;
private System.Windows.Forms.ComboBox
FunctionKeyBoardChoseComboBox;
private System.Windows.Forms.Button ButtonLog;
private System.Windows.Forms.Button ButtonCos;
private System.Windows.Forms.Button ButtonSin;
private System.Windows.Forms.Button ButtonDeg;
private System.Windows.Forms.Button ButtonLn;
private System.Windows.Forms.Button ButtonClear;
private System.Windows.Forms.Button ButtonBackspace;
private System.Windows.Forms.Button ButtonPlus;
private System.Windows.Forms.Button ButtonMinus;
private System.Windows.Forms.Button ButtonMult;
private System.Windows.Forms.Button ButtonDigit0;
private System.Windows.Forms.Button ButtonDiv;
private System.Windows.Forms.Button ButtonLBrack;
private System.Windows.Forms.Button ButtonRBrack;
private System.Windows.Forms.Button ButtonDigit1;
private System.Windows.Forms.Button ButtonDigit9;
private System.Windows.Forms.Button ButtonDigit8;
private System.Windows.Forms.Button ButtonDigit7;
private System.Windows.Forms.Button ButtonDigit6;
private System.Windows.Forms.Button ButtonDigit5;
private System.Windows.Forms.Button ButtonDigit4;
private System.Windows.Forms.Button ButtonDigit3;
private System.Windows.Forms.Button ButtonDigit2;
private System.Windows.Forms.TextBox KeyBoardTextBox;
private System.Windows.Forms.Button ButtonX;
private System.Windows.Forms.Button ButtonPi;
private System.Windows.Forms.Button ButtonE;
}
//filename: Point3DType.cs
class Point3DType
{
private float[] Value;
const float factor=10;
public Point3DType(float Xdef, float Ydef, float Zdef)
{
Value = new float[4];
85
Value[0] = Xdef;
Value[1] = Ydef;
Value[2] = Zdef;
Value[3] = 1f;
}
public Point3DType()
{
Value = new float[4];
Value[0] = 0f;
Value[1] = 0f;
Value[2] = 0f;
Value[3] = 1f;
}
public PointF Projection(int x0, int y0, float zoom)
{
PointF res = new Point();
if (Math.Abs(this.z+factor)>0.01)
{
res.X = x0 + zoom * factor * this.x / (this.z +
factor);
res.Y = y0 + zoom * factor * this.y / (this.z +
factor);
}
return res;
}
public static Point3DType operator *(Transformation3DType
Transform, Point3DType P)
{
Point3DType res = new Point3DType();
for (int i = 0; i < 4; i++)
{
res[i] = 0;
for (int j = 0; j < 4; j++)
res[i] += Transform[i, j] * P[j];
}
return res;
}
public static Point3DType operator -(Point3DType x1,
Point3DType x2)
{
return new Point3DType(x1.x - x2.x, x1.y - x2.y, x1.z -
x2.z);
}
public static Point3DType operator +(Point3DType x1,
Point3DType x2)
{
return new Point3DType(x1.x + x2.x, x1.y + x2.y, x1.z +
x2.z);
}
public static Point3DType operator *(double d, Point3DType P)
{
return new Point3DType((float)(d * P.x), (float)(d *
P.y), (float)(d * P.z));
}
86
public float x
{
get
{
return Value[0];
}
set
{
Value[0] = value;
}
}
public float y
{
get
{
return Value[1];
}
set
{
Value[1] = value;
}
}
public float z
{
get
{
return Value[2];
}
set
{
Value[2] = value;
}
}
public float this[int Idx]
{
get
{
return Value[Idx];
}
set
{
Value[Idx] = value;
}
}
}
//filename: Transformation3DType
class Transformation3DType
{
private float[,] Value;
public Transformation3DType(float[,] NewValue)
{
Value = new float[4, 4];
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
Value[i, j] = NewValue[i, j];
87
}
public Transformation3DType()
{
Value = new float[4, 4];
for(int i=0;i<4;i++)
for (int j = 0; j < 4; j++)
{
if (i == j)
Value[i, j] = 1;
else
Value[i, j] = 0;
}
}
public static Transformation3DType ShiftTransform(float Sx,
float Sy, float Sz)
{
Transformation3DType res = new Transformation3DType();
res[0, 3] = Sx;
res[1, 3] = Sy;
res[2, 3] = Sz;
return res;
}
public static Transformation3DType ScaleTransform(float Sx,
float Sy, float Sz)
{
Transformation3DType res = new Transformation3DType();
res[0, 0] = Sx;
res[1, 1] = Sy;
res[2, 2] = Sz;
return res;
}
public static Transformation3DType RotateXTransform(double
teta)
{
Transformation3DType res = new Transformation3DType();
res[1, 1] = (float)Math.Cos(teta);
res[1, 2] = (float)Math.Sin(teta);
res[2, 1] = (float)((-1) * Math.Sin(teta));
res[2, 2] = (float)Math.Cos(teta);
return res;
}
public static Transformation3DType RotateYTransform(double
teta)
{
Transformation3DType res = new Transformation3DType();
res[0, 0] = (float)Math.Cos(teta);
res[2, 0] = (float)Math.Sin(teta);
res[0, 2] = (float)((-1) * Math.Sin(teta));
res[2, 2] = (float)Math.Cos(teta);
return res;
}
public static Transformation3DType RotateZTransform(double
teta)
{
Transformation3DType res = new Transformation3DType();
88
res[1, 1] = (float)Math.Cos(teta);
res[1, 0] = (float)Math.Sin(teta);
res[0, 1] = (float)((-1) * Math.Sin(teta));
res[0, 0] = (float)Math.Cos(teta);
return res;
}
public static Transformation3DType operator
*(Transformation3DType Transform1, Transformation3DType TRansform2)
{
Transformation3DType Result = new Transformation3DType();
for(int i=0;i<4;i++)
for (int j = 0; j < 4; j++)
{
Result[i,j]=0;
for (int k = 0; k < 4; k++)
Result[i, j] += Transform1[i, k] *
TRansform2[k, j];
}
return Result;

}
public float this[int i,int j]
{
get
{
return Value[i, j];
}
set
{
Value[i, j] = value;
}
}
}
//filename: function2.cs
public partial class Function2 : Form
{
float WindowXMin=-10;
float WindowYMin=-10;
float WindowXMax=10;
float WindowYMax=10;
float WindowXStep=1;
float WindowYStep=1;
Transformation3DType Transform;
float zoom = 80f;
Color GraphColor;
Color AxisColor;
const float resolution = 0.1F;
float ShiftJump = 5f;
Boolean IsPressed;
public Function2()
{
InitializeComponent();
Transform = new Transformation3DType();
89
Transform = Transformation3DType.ShiftTransform(0, 0, 20)
* Transformation3DType.RotateXTransform(-3 * Math.PI / 4) *
Transformation3DType.RotateZTransform(Math.PI / 4);
IsPressed = false;
GraphColor = Color.Red;
AxisColor = Color.White;
}
private void ApplyWindowButton_Click(object sender, EventArgs
e)
{
try
{
WindowXMin = Convert.ToSingle(XMinTextBox.Text);
WindowYMin = Convert.ToSingle(YMinTextBox.Text);
WindowXMax = Convert.ToSingle(XMaxTextBox.Text);
WindowYMax = Convert.ToSingle(YMaxTextBox.Text);
WindowXStep = Convert.ToSingle(XStepTextBox.Text);
WindowYStep = Convert.ToSingle(YStepTextBox.Text);
}
catch
{
MessageBox.Show("one of the Window strings can not
represent a number", "Wrong Format", MessageBoxButtons.OK);
}
WindowXMax = (float)((int)(WindowXMax / WindowXStep)) *
WindowXStep;
WindowYMax = (float)((int)(WindowYMax / WindowYStep)) *
WindowYStep;
WindowXMin = (float)((int)(WindowXMin / WindowXStep)) *
WindowXStep;
WindowYMin = (float)((int)(WindowYMin / WindowYStep)) *
WindowYStep;
this.Refresh();
}
private float CalculateZ(PointF P)
{
Point3DType Temp = new Point3DType(P.X, P.Y, 0);
Temp = Transform * Temp;
return Temp.z;
}
private void GraphPictureBox_Paint(object sender,
PaintEventArgs e)
{
int x0 = GraphPictureBox.Width / 2;
int y0 = GraphPictureBox.Height / 2;
int segments;
try
{
segments =
Convert.ToInt32(NumOfSegmentsTextBox.Text);
}
catch
{
90
MessageBox.Show("The value that represents the\n
number of segments (graph options group box)\n is not a number",
"Wrong Format", MessageBoxButtons.OK);
segments = 2;
NumOfSegmentsTextBox.Text = "2";
}
PointF[] PolyPoints = new PointF[segments * 4];
int XRange = (int)Math.Abs((WindowXMax - WindowXMin) /
WindowXStep), YRange = (int)Math.Abs((WindowYMax - WindowYMin) /
WindowYStep);
bool[,] IsDrawn = new bool[XRange,YRange];
for (int i = 0; i < XRange; i++)
for (int j = 0; j < YRange; j++)
IsDrawn[i, j] = false;
float X, Y;
DrawingProgressBar.Maximum = YRange * XRange;
#region Finding farest point
Point3DType P1 = new Point3DType(WindowXMin, WindowYMin,
0);
Point3DType P2 = new Point3DType(WindowXMin, WindowYMax,
0);
Point3DType P3 = new Point3DType(WindowXMax, WindowYMin,
0);
Point3DType P4 = new Point3DType(WindowXMax, WindowYMax,
0);
P1 = Transform * P1;
P2 = Transform * P2;
P3 = Transform * P3;
P4 = Transform * P4;
float temp;
if (P2.z >= P1.z && P2.z >= P3.z && P2.z >= P4.z)
{
temp = WindowYMin;
WindowYMin = WindowYMax;
WindowYMax = temp;
WindowYStep = -WindowYStep;
}
if (P3.z >= P1.z && P3.z >= P2.z && P3.z >= P4.z)
{
temp = WindowXMin;
WindowXMin = WindowXMax;
WindowXMax = temp;
WindowXStep = -WindowXStep;
}
if (P4.z >= P1.z && P4.z >= P2.z && P4.z >= P3.z)
{
temp = WindowXMin;
WindowXMin = WindowXMax;
WindowXMax = temp;
WindowXStep = -WindowXStep;
91
temp = WindowYMin;
WindowYMin = WindowYMax;
WindowYMax = temp;
WindowYStep = -WindowYStep;
}
#endregion
Pen GraphPen = new Pen(GraphColor);
SolidBrush GraphBrush = new SolidBrush(Color.Black);
ExpressionType Function = new ExpressionType();
try
{
Function =
ExpressionType.FromString(FunctionTextBox.Text);
}
catch
{
MessageBox.Show("The string:\n" +
FunctionTextBox.Text + "\ncan not represent a fuction", "Wrong
Format", MessageBoxButtons.OK);
return;
}
for (float XMax = WindowXMin; (WindowXMax - XMax) *
WindowXStep >= 0; XMax += WindowXStep)
{
int i;
for (X = WindowXMin, i=0; (XMax - X) * WindowXStep >
0; X += WindowXStep, i++)
{
int j;
for (j = 0, Y = WindowYMin; j<YRange &&
IsDrawn[i, j] ; j++, Y += WindowYStep) ;
for (; CalculateZ(new PointF(X, Y)) >=
CalculateZ(new PointF(XMax, WindowYMin)) && (WindowYMax-
Y)*WindowYStep>0; Y += WindowYStep, j++)
{
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X + k
* WindowXStep / segments, Y, (float)Function.Calculate(X + k *
WindowXStep / segments, Y));
Temp = Transform * Temp;
PolyPoints[k] = Temp.Projection(x0, y0,
zoom);

}
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X +
WindowXStep, Y + k * WindowYStep / segments,
(float)Function.Calculate(X + WindowXStep, Y + k * WindowYStep /
segments));
Temp = Transform * Temp;
PolyPoints[k + segments] =
Temp.Projection(x0, y0, zoom);
}
for (int k = 0; k < segments; k++)
{
92
Point3DType Temp = new Point3DType(X +
WindowXStep * (1 - k / segments), Y + WindowYStep,
(float)Function.Calculate(X + WindowXStep * (1 - k / segments), Y +
WindowYStep));
Temp = Transform * Temp;
PolyPoints[k + segments * 2] =
Temp.Projection(x0, y0, zoom);
}
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X, Y +
WindowYStep * (1 - k / segments), (float)Function.Calculate(X, Y +
WindowYStep * (1 - k / segments)));
Temp = Transform * Temp;
PolyPoints[k+segments*3] =
Temp.Projection(x0, y0, zoom);
}
e.Graphics.FillPolygon(GraphBrush,
PolyPoints);
e.Graphics.DrawPolygon(GraphPen, PolyPoints);
IsDrawn[i, j] = true;
DrawingProgressBar.Value++;
if (X * WindowXStep < 0 && (X + WindowXStep)
* WindowXStep >= 0)
{
Point3DType Start = new Point3DType(0, Y,
0);
Start = Transform * Start;
Point3DType End = new Point3DType(0, Y +
WindowYStep, 0);
End = Transform * End;
e.Graphics.DrawLine(new Pen(AxisColor),
Start.Projection(x0, y0, zoom), End.Projection(x0, y0, zoom));
}
if (Y * WindowYStep < 0 && (Y + WindowYStep)
* WindowYStep >= 0)
{
Point3DType Start = new Point3DType(X, 0,
0);
Start = Transform * Start;
Point3DType End = new
Point3DType(X+WindowXStep, 0, 0);
End = Transform * End;
e.Graphics.DrawLine(new Pen(AxisColor),
Start.Projection(x0, y0, zoom), End.Projection(x0, y0, zoom));
}
if (X * WindowXStep < 0 && (X + WindowXStep)
* WindowXStep >= 0 && Y * WindowYStep < 0 && (Y + WindowYStep) *
WindowYStep >= 0)
{
Point3DType Start = new Point3DType(0, 0,
Math.Min(WindowXMin, WindowYMin));
Start = Transform * Start;
Point3DType End = new Point3DType(0, 0,
Math.Max(WindowXMax, WindowYMax));
End = Transform * End;
e.Graphics.DrawLine(new Pen(AxisColor),
Start.Projection(x0, y0, zoom), End.Projection(x0, y0, zoom));
}
}
}
93
}
for (float YMax = WindowYMin; (WindowYMax - YMax) *
WindowYStep >= 0; YMax += WindowYStep)
{
int i;
for (i = 0, X = WindowXMin; (WindowXMax - X) *
WindowXStep > 0; X += WindowXStep, i++)
{
int j;
for (j = 0, Y = WindowYMin;j<YRange && IsDrawn[i,
j] ; j++, Y += WindowYStep) ;
for (; CalculateZ(new PointF(X, Y)) >=
CalculateZ(new PointF(WindowXMax, YMax)) && (WindowYMax - Y) *
WindowYStep > 0; Y += WindowYStep, j++)
{
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X + k
* WindowXStep / segments, Y, (float)Function.Calculate(X + k *
WindowXStep / segments, Y));
Temp = Transform * Temp;
PolyPoints[k] = Temp.Projection(x0, y0,
zoom);
}
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X +
WindowXStep, Y + k * WindowYStep / segments,
(float)Function.Calculate(X + WindowXStep, Y + k * WindowYStep /
segments));
Temp = Transform * Temp;
PolyPoints[k + segments] =
Temp.Projection(x0, y0, zoom);
}
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X +
WindowXStep * (1 - k / segments), Y + WindowYStep,
(float)Function.Calculate(X + WindowXStep * (1 - k / segments), Y +
WindowYStep));
Temp = Transform * Temp;
PolyPoints[k + segments * 2] =
Temp.Projection(x0, y0, zoom);
}
for (int k = 0; k < segments; k++)
{
Point3DType Temp = new Point3DType(X, Y +
WindowYStep * (1 - k / segments), (float)Function.Calculate(X, Y +
WindowYStep * (1 - k / segments)));
Temp = Transform * Temp;
PolyPoints[k + segments * 3] =
Temp.Projection(x0, y0, zoom);
}
e.Graphics.FillPolygon(GraphBrush,
PolyPoints);
e.Graphics.DrawPolygon(GraphPen, PolyPoints);
IsDrawn[i, j] = true;
DrawingProgressBar.Value++;
if (X * WindowXStep < 0 && (X + WindowXStep)
* WindowXStep >= 0)
94
{
Point3DType Start = new Point3DType(0, Y,
0);
Start = Transform * Start;
Point3DType End = new Point3DType(0, Y +
WindowYStep, 0);
End = Transform * End;
e.Graphics.DrawLine(new Pen(AxisColor),
Start.Projection(x0, y0, zoom), End.Projection(x0, y0, zoom));
}
if (Y * WindowYStep < 0 && (Y + WindowYStep)
* WindowYStep >= 0)
{
Point3DType Start = new Point3DType(X, 0,
0);
Start = Transform * Start;
Point3DType End = new Point3DType(X +
WindowXStep, 0, 0);
End = Transform * End;
e.Graphics.DrawLine(new Pen(AxisColor),
Start.Projection(x0, y0, zoom), End.Projection(x0, y0, zoom));
}
if (X * WindowXStep < 0 && (X + WindowXStep)
* WindowXStep >= 0 && Y * WindowYStep < 0 && (Y + WindowYStep) *
WindowYStep >= 0)
{
Point3DType Start = new Point3DType(0, 0,
Math.Min(WindowXMin,WindowYMin));
Start = Transform * Start;
Point3DType End = new Point3DType(0, 0,
Math.Max(WindowXMax, WindowYMax));
End = Transform * End;
e.Graphics.DrawLine(new Pen(AxisColor),
Start.Projection(x0, y0, zoom), End.Projection(x0, y0, zoom));
}
}
}
}
DrawingProgressBar.Value = 0;
}
private void ZoomInButton_Click(object sender, EventArgs e)
{
Transform = Transformation3DType.ShiftTransform(0, 0,
ShiftJump) * Transform;
this.Refresh();
}
private void ZoomOutButton_Click(object sender, EventArgs e)
{
Transform = Transformation3DType.ShiftTransform(0, 0,
ShiftJump) * Transform;
this.Refresh();
}
private void RotateUpButton_Click(object sender, EventArgs e)
{
//Transform =
Transformation3DType.ShiftTransform(CenterPoint.Inverted()) *
Transform;
95
Transform = Transformation3DType.RotateXTransform(-0.05)
* Transform;
//Transform =
Transformation3DType.ShiftTransform(CenterPoint) * Transform;
this.Refresh();
}
private void RotateDownButton_Click(object sender, EventArgs
e)
{
//Transform =
Transformation3DType.ShiftTransform(CenterPoint.Inverted()) *
Transform;
Transform = Transformation3DType.RotateXTransform(0.05) *
Transform;
//Transform =
Transformation3DType.ShiftTransform(CenterPoint) * Transform;
this.Refresh();
}
private void RotateRightButton_Click(object sender, EventArgs
e)
{
//Transform =
Transformation3DType.ShiftTransform(CenterPoint.Inverted()) *
Transform;
Transform = Transformation3DType.RotateYTransform(-0.05)
* Transform;
//Transform =
Transformation3DType.ShiftTransform(CenterPoint) * Transform;
this.Refresh();
}
private void RotateLeftButton_Click(object sender, EventArgs
e)
{
//Transform =
Transformation3DType.ShiftTransform(CenterPoint.Inverted()) *
Transform;
Transform = Transformation3DType.RotateYTransform(0.05) *
Transform;
//Transform =
Transformation3DType.ShiftTransform(CenterPoint) * Transform;
this.Refresh();
}
private void RotateContrClockwiseButton_Click(object sender,
EventArgs e)
{
//Transform =
Transformation3DType.ShiftTransform(CenterPoint.Inverted()) *
Transform;
Transform = Transformation3DType.RotateZTransform(-0.05)
* Transform;
//Transform =
Transformation3DType.ShiftTransform(CenterPoint) * Transform;
this.Refresh();
}
private void RotateClockwiseButton_Click(object sender,
EventArgs e)
96
{
//Transform =
Transformation3DType.ShiftTransform(CenterPoint.Inverted()) *
Transform;
Transform = Transformation3DType.RotateZTransform(0.05) *
Transform;
//Transform =
Transformation3DType.ShiftTransform(CenterPoint) * Transform;
this.Refresh();
}
private void DrawFunctionsButton_Click(object sender,
EventArgs e)
{
this.Refresh();
}
private void ShiftUpButton_Click(object sender, EventArgs e)
{
Transform = Transformation3DType.ShiftTransform(0,
-ShiftJump, 0) * Transform;
this.Refresh();
}
private void ShiftRightButton_Click(object sender, EventArgs
e)
{
Transform =
Transformation3DType.ShiftTransform(ShiftJump, 0, 0) * Transform;
this.Refresh();
}
private void ShiftDownButton_Click(object sender, EventArgs
e)
{
Transform = Transformation3DType.ShiftTransform(0,
ShiftJump, 0) * Transform;
this.Refresh();
}
private void ShiftLeftButton_Click(object sender, EventArgs
e)
{
Transform = Transformation3DType.ShiftTransform(-
ShiftJump, 0, 0) * Transform;
this.Refresh();
}
private void ButtonDigit0_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "0";
IsPressed = true;
}
private void ButtonDigit1_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "1";
97
IsPressed = true;
}
private void ButtonDigit2_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "2";
IsPressed = true;
}
private void ButtonDigit3_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "3";
IsPressed = true;
}
private void ButtonDigit4_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "4";
IsPressed = true;
}
private void ButtonDigit5_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "5";
IsPressed = true;
}
private void ButtonDigit6_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "6";
IsPressed = true;
}
private void ButtonDigit7_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "7";
IsPressed = true;
}
private void ButtonDigit8_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "8";
IsPressed = true;
}
private void ButtonDigit9_Click(object sender, EventArgs e)
{
98
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "9";
IsPressed = true;
}
private void ButtonLBrack_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "(";
IsPressed = true;
}
private void ButtonRBrack_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += ")";
IsPressed = true;
}
private void ButtonDiv_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "/";
IsPressed = true;
}
private void ButtonMult_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "*";
IsPressed = true;
}
private void ButtonMinus_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "-";
IsPressed = true;
}
private void ButtonPlus_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "+";
IsPressed = true;
}
private void ButtonClear_Click(object sender, EventArgs e)
{
KeyBoardTextBox.Text = "0";
IsPressed = false;
}
99
private void ButtonBackspace_Click(object sender, EventArgs
e)
{
KeyBoardTextBox.Text =
KeyBoardTextBox.Text.Remove(KeyBoardTextBox.Text.Length - 1);
if (!IsPressed)
KeyBoardTextBox.Text = "0";
}
private void ButtonLn_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "ln(";
IsPressed = true;
}
private void ButtonSin_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "sin(";
IsPressed = true;
}
private void ButtonCos_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "cos(";
IsPressed = true;
}
private void ButtonDeg_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "^";
IsPressed = true;
}
private void ButtonLog_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "log";
IsPressed = true;
}
private void CopyFromKeyboardButton_Click(object sender,
EventArgs e)
{
FunctionTextBox.Text = KeyBoardTextBox.Text;
}
private void ButtonX_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "x";
IsPressed = true;
100
}
private void button4_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "y";
IsPressed = true;
}
private void ButtonE_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "e";
IsPressed = true;
}
private void ButtonPi_Click(object sender, EventArgs e)
{
if (!IsPressed)
KeyBoardTextBox.Text = "";
KeyBoardTextBox.Text += "pi";
IsPressed = true;
}
// <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.FunctionGroupBox = new
System.Windows.Forms.GroupBox();
this.FunctionTextBox = new
System.Windows.Forms.TextBox();
this.DrawFunctionsButton = new
System.Windows.Forms.Button();
this.label17 = new System.Windows.Forms.Label();
this.GrphOptionsGroupBox = new
System.Windows.Forms.GroupBox();
101
this.NumOfSegmentsTextBox = new
System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.FunctionKeyBoardGroupBox = new
System.Windows.Forms.GroupBox();
this.ButtonPi = new System.Windows.Forms.Button();
this.ButtonE = new System.Windows.Forms.Button();
this.ButtonY = new System.Windows.Forms.Button();
this.ButtonX = new System.Windows.Forms.Button();
this.CopyFromKyBoardButton = new
System.Windows.Forms.Button();
this.ButtonLog = new System.Windows.Forms.Button();
this.ButtonCos = new System.Windows.Forms.Button();
this.ButtonSin = new System.Windows.Forms.Button();
this.ButtonDeg = new System.Windows.Forms.Button();
this.ButtonLn = new System.Windows.Forms.Button();
this.ButtonClear = new System.Windows.Forms.Button();
this.ButtonBackspace = new System.Windows.Forms.Button();
this.ButtonPlus = new System.Windows.Forms.Button();
this.ButtonMinus = new System.Windows.Forms.Button();
this.ButtonMult = new System.Windows.Forms.Button();
this.ButtonDigit0 = new System.Windows.Forms.Button();
this.ButtonDiv = new System.Windows.Forms.Button();
this.ButtonLBrack = new System.Windows.Forms.Button();
this.ButtonRBrack = new System.Windows.Forms.Button();
this.ButtonDigit1 = new System.Windows.Forms.Button();
this.ButtonDigit9 = new System.Windows.Forms.Button();
this.ButtonDigit8 = new System.Windows.Forms.Button();
this.ButtonDigit7 = new System.Windows.Forms.Button();
this.ButtonDigit6 = new System.Windows.Forms.Button();
this.ButtonDigit5 = new System.Windows.Forms.Button();
this.ButtonDigit4 = new System.Windows.Forms.Button();
this.ButtonDigit3 = new System.Windows.Forms.Button();
this.KeyBoardTextBox = new
System.Windows.Forms.TextBox();
this.ButtonDigit2 = new System.Windows.Forms.Button();
this.DrawingProgressBar = new
System.Windows.Forms.ProgressBar();
this.GraphPictureBox = new
System.Windows.Forms.PictureBox();
this.WindowGroupBox = new
System.Windows.Forms.GroupBox();
this.ApplyWindowButton = new
System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.XMinTextBox = new System.Windows.Forms.TextBox();
this.XStepTextBox = new System.Windows.Forms.TextBox();
this.XMaxTextBox = new System.Windows.Forms.TextBox();
this.YStepTextBox = new System.Windows.Forms.TextBox();
this.YMinTextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.YMaxTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.RotateRightButton = new
System.Windows.Forms.Button();
102
this.RotateDownButton = new
System.Windows.Forms.Button();
this.RotateLeftButton = new
System.Windows.Forms.Button();
this.RotateUpButton = new System.Windows.Forms.Button();
this.RotateClockwiseButton = new
System.Windows.Forms.Button();
this.RotateContrClockwiseButton = new
System.Windows.Forms.Button();
this.ZoomOutButton = new System.Windows.Forms.Button();
this.ZoomInButton = new System.Windows.Forms.Button();
this.ShiftUpButton = new System.Windows.Forms.Button();
this.ShiftDownButton = new System.Windows.Forms.Button();
this.ShiftLeftButton = new System.Windows.Forms.Button();
this.ShiftRightButton = new
System.Windows.Forms.Button();
this.FunctionGroupBox.SuspendLayout();
this.GrphOptionsGroupBox.SuspendLayout();
this.FunctionKeyBoardGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)
(this.GraphPictureBox)).BeginInit();
this.WindowGroupBox.SuspendLayout();
this.SuspendLayout();
//
// FunctionGroupBox
//
this.FunctionGroupBox.BackColor =
System.Drawing.SystemColors.ControlText;
this.FunctionGroupBox.Controls.Add(this.FunctionTextBox);
this.FunctionGroupBox.Controls.Add(this.DrawFunctionsButt
on);
this.FunctionGroupBox.Controls.Add(this.label17);
this.FunctionGroupBox.ForeColor =
System.Drawing.Color.Gold;
this.FunctionGroupBox.Location = new
System.Drawing.Point(14, 645);
this.FunctionGroupBox.Name = "FunctionGroupBox";
this.FunctionGroupBox.Size = new
System.Drawing.Size(1004, 61);
this.FunctionGroupBox.TabIndex = 18;
this.FunctionGroupBox.TabStop = false;
this.FunctionGroupBox.Text = "Functions";
//
// FunctionTextBox
//
this.FunctionTextBox.Location = new
System.Drawing.Point(36, 19);
this.FunctionTextBox.Name = "FunctionTextBox";
this.FunctionTextBox.Size = new System.Drawing.Size(867,
20);
this.FunctionTextBox.TabIndex = 24;
this.FunctionTextBox.Text = "0";
//
// DrawFunctionsButton
//
this.DrawFunctionsButton.BackColor =
System.Drawing.SystemColors.HotTrack;
this.DrawFunctionsButton.Font = new
System.Drawing.Font("Microsoft Sans Serif", 13F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(177)));
103
this.DrawFunctionsButton.Location = new
System.Drawing.Point(909, 13);
this.DrawFunctionsButton.Name = "DrawFunctionsButton";
this.DrawFunctionsButton.Size = new
System.Drawing.Size(81, 31);
this.DrawFunctionsButton.TabIndex = 23;
this.DrawFunctionsButton.Text = "Draw";
this.DrawFunctionsButton.UseVisualStyleBackColor = false;
this.DrawFunctionsButton.Click += new
System.EventHandler(this.DrawFunctionsButton_Click);
//
// label17
//
this.label17.AutoSize = true;
this.label17.ForeColor =
System.Drawing.SystemColors.ActiveCaptionText;
this.label17.Location = new System.Drawing.Point(12, 23);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(18, 13);
this.label17.TabIndex = 16;
this.label17.Text = "z=";
//
// GrphOptionsGroupBox
//
this.GrphOptionsGroupBox.Controls.Add(this.NumOfSegmentsT
extBox);
this.GrphOptionsGroupBox.Controls.Add(this.label10);
this.GrphOptionsGroupBox.Controls.Add(this.FunctionKeyBoa
rdGroupBox);
this.GrphOptionsGroupBox.Controls.Add(this.DrawingProgres
sBar);
this.GrphOptionsGroupBox.Location = new
System.Drawing.Point(600, 125);
this.GrphOptionsGroupBox.Name = "GrphOptionsGroupBox";
this.GrphOptionsGroupBox.Size = new
System.Drawing.Size(418, 514);
this.GrphOptionsGroupBox.TabIndex = 17;
this.GrphOptionsGroupBox.TabStop = false;
this.GrphOptionsGroupBox.Text = "Graph Options";
//
// NumOfSegmentsTextBox
//
this.NumOfSegmentsTextBox.Location = new
System.Drawing.Point(258, 13);
this.NumOfSegmentsTextBox.Name = "NumOfSegmentsTextBox";
this.NumOfSegmentsTextBox.Size = new
System.Drawing.Size(28, 20);
this.NumOfSegmentsTextBox.TabIndex = 16;
this.NumOfSegmentsTextBox.Text = "2";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(6, 16);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(265, 52);
this.label10.TabIndex = 15;
this.label10.Text = "number of segments (the resolution
of the drawing):\r\n\r\n(If the number of the sege" +
"nts is higher the resolution\r\n is better but it
would take more time to draw the" +
104
" graph)";
//
// FunctionKeyBoardGroupBox
//
this.FunctionKeyBoardGroupBox.Anchor =
((System.Windows.Forms.AnchorStyles)
((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Right)));
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonPi)
;
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonE);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonY);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonX);
this.FunctionKeyBoardGroupBox.Controls.Add(this.CopyFromK
yBoardButton);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonLog
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonCos
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonSin
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDeg
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonLn)
;
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonCle
ar);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonBac
kspace);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonPlu
s);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonMin
us);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonMul
t);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it0);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDiv
);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonLBr
ack);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonRBr
ack);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it1);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it9);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it8);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it7);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it6);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it5);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it4);
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it3);
this.FunctionKeyBoardGroupBox.Controls.Add(this.KeyBoardT
extBox);
105
this.FunctionKeyBoardGroupBox.Controls.Add(this.ButtonDig
it2);
this.FunctionKeyBoardGroupBox.Location = new
System.Drawing.Point(167, 227);
this.FunctionKeyBoardGroupBox.Name =
"FunctionKeyBoardGroupBox";
this.FunctionKeyBoardGroupBox.Size = new
System.Drawing.Size(237, 250);
this.FunctionKeyBoardGroupBox.TabIndex = 14;
this.FunctionKeyBoardGroupBox.TabStop = false;
this.FunctionKeyBoardGroupBox.Text = "Function Keyboard";
//
// ButtonPi
//
this.ButtonPi.Location = new System.Drawing.Point(189,
155);
this.ButtonPi.Name = "ButtonPi";
this.ButtonPi.Size = new System.Drawing.Size(34, 23);
this.ButtonPi.TabIndex = 80;
this.ButtonPi.Text = "pi";
this.ButtonPi.UseVisualStyleBackColor = true;
this.ButtonPi.Click += new
System.EventHandler(this.ButtonPi_Click);
//
// ButtonE
//
this.ButtonE.Location = new System.Drawing.Point(149,
155);
this.ButtonE.Name = "ButtonE";
this.ButtonE.Size = new System.Drawing.Size(34, 23);
this.ButtonE.TabIndex = 79;
this.ButtonE.Text = "e";
this.ButtonE.UseVisualStyleBackColor = true;
this.ButtonE.Click += new
System.EventHandler(this.ButtonE_Click);
//
// ButtonY
//
this.ButtonY.Location = new System.Drawing.Point(149,
126);
this.ButtonY.Name = "ButtonY";
this.ButtonY.Size = new System.Drawing.Size(34, 23);
this.ButtonY.TabIndex = 78;
this.ButtonY.Text = "y";
this.ButtonY.UseVisualStyleBackColor = true;
this.ButtonY.Click += new
System.EventHandler(this.button4_Click);
//
// ButtonX
//
this.ButtonX.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonX.Location = new System.Drawing.Point(189,
126);
this.ButtonX.Name = "ButtonX";
this.ButtonX.Size = new System.Drawing.Size(34, 23);
this.ButtonX.TabIndex = 77;
this.ButtonX.Text = "x";
this.ButtonX.UseVisualStyleBackColor = true;
this.ButtonX.Click += new
System.EventHandler(this.ButtonX_Click);
106
//
// CopyFromKyBoardButton
//
this.CopyFromKyBoardButton.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.CopyFromKyBoardButton.Location = new
System.Drawing.Point(9, 39);
this.CopyFromKyBoardButton.Name =
"CopyFromKyBoardButton";
this.CopyFromKyBoardButton.Size = new
System.Drawing.Size(217, 23);
this.CopyFromKyBoardButton.TabIndex = 76;
this.CopyFromKyBoardButton.Text = "Copy To Function";
this.CopyFromKyBoardButton.UseVisualStyleBackColor =
true;
this.CopyFromKyBoardButton.Click += new
System.EventHandler(this.CopyFromKeyboardButton_Click);
//
// ButtonLog
//
this.ButtonLog.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonLog.Location = new System.Drawing.Point(80,
68);
this.ButtonLog.Name = "ButtonLog";
this.ButtonLog.Size = new System.Drawing.Size(63, 23);
this.ButtonLog.TabIndex = 74;
this.ButtonLog.Text = "log";
this.ButtonLog.UseVisualStyleBackColor = true;
this.ButtonLog.Click += new
System.EventHandler(this.ButtonLog_Click);
//
// ButtonCos
//
this.ButtonCos.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonCos.Location = new System.Drawing.Point(80,
97);
this.ButtonCos.Name = "ButtonCos";
this.ButtonCos.Size = new System.Drawing.Size(63, 23);
this.ButtonCos.TabIndex = 73;
this.ButtonCos.Text = "cos(";
this.ButtonCos.UseVisualStyleBackColor = true;
this.ButtonCos.Click += new
System.EventHandler(this.ButtonCos_Click);
//
// ButtonSin
//
this.ButtonSin.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonSin.Location = new System.Drawing.Point(6,
97);
this.ButtonSin.Name = "ButtonSin";
this.ButtonSin.Size = new System.Drawing.Size(67, 23);
this.ButtonSin.TabIndex = 72;
this.ButtonSin.Text = "sin(";
this.ButtonSin.UseVisualStyleBackColor = true;
this.ButtonSin.Click += new
System.EventHandler(this.ButtonSin_Click);
//
// ButtonDeg
107
//
this.ButtonDeg.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDeg.Location = new System.Drawing.Point(6,
68);
this.ButtonDeg.Name = "ButtonDeg";
this.ButtonDeg.Size = new System.Drawing.Size(31, 23);
this.ButtonDeg.TabIndex = 71;
this.ButtonDeg.Text = "^";
this.ButtonDeg.UseVisualStyleBackColor = true;
this.ButtonDeg.Click += new
System.EventHandler(this.ButtonDeg_Click);
//
// ButtonLn
//
this.ButtonLn.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonLn.Location = new System.Drawing.Point(44,
68);
this.ButtonLn.Name = "ButtonLn";
this.ButtonLn.Size = new System.Drawing.Size(30, 23);
this.ButtonLn.TabIndex = 70;
this.ButtonLn.Text = "ln(";
this.ButtonLn.UseVisualStyleBackColor = true;
this.ButtonLn.Click += new
System.EventHandler(this.ButtonLn_Click);
//
// ButtonClear
//
this.ButtonClear.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonClear.Location = new System.Drawing.Point(149,
213);
this.ButtonClear.Name = "ButtonClear";
this.ButtonClear.Size = new System.Drawing.Size(75, 23);
this.ButtonClear.TabIndex = 69;
this.ButtonClear.Text = "clear";
this.ButtonClear.UseVisualStyleBackColor = true;
this.ButtonClear.Click += new
System.EventHandler(this.ButtonClear_Click);
//
// ButtonBackspace
//
this.ButtonBackspace.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonBackspace.Location = new
System.Drawing.Point(149, 184);
this.ButtonBackspace.Name = "ButtonBackspace";
this.ButtonBackspace.Size = new System.Drawing.Size(75,
23);
this.ButtonBackspace.TabIndex = 68;
this.ButtonBackspace.Text = "backspace";
this.ButtonBackspace.UseVisualStyleBackColor = true;
this.ButtonBackspace.Click += new
System.EventHandler(this.ButtonBackspace_Click);
//
// ButtonPlus
//
this.ButtonPlus.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
108
this.ButtonPlus.Location = new System.Drawing.Point(115,
213);
this.ButtonPlus.Name = "ButtonPlus";
this.ButtonPlus.Size = new System.Drawing.Size(28, 23);
this.ButtonPlus.TabIndex = 67;
this.ButtonPlus.Text = "+";
this.ButtonPlus.UseVisualStyleBackColor = true;
this.ButtonPlus.Click += new
System.EventHandler(this.ButtonPlus_Click);
//
// ButtonMinus
//
this.ButtonMinus.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonMinus.Location = new System.Drawing.Point(115,
184);
this.ButtonMinus.Name = "ButtonMinus";
this.ButtonMinus.Size = new System.Drawing.Size(28, 23);
this.ButtonMinus.TabIndex = 66;
this.ButtonMinus.Text = "-";
this.ButtonMinus.UseVisualStyleBackColor = true;
this.ButtonMinus.Click += new
System.EventHandler(this.ButtonMinus_Click);
//
// ButtonMult
//
this.ButtonMult.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonMult.Location = new System.Drawing.Point(115,
155);
this.ButtonMult.Name = "ButtonMult";
this.ButtonMult.Size = new System.Drawing.Size(28, 23);
this.ButtonMult.TabIndex = 65;
this.ButtonMult.Text = "*";
this.ButtonMult.UseVisualStyleBackColor = true;
this.ButtonMult.Click += new
System.EventHandler(this.ButtonMult_Click);
//
// ButtonDigit0
//
this.ButtonDigit0.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit0.Location = new System.Drawing.Point(6,
126);
this.ButtonDigit0.Name = "ButtonDigit0";
this.ButtonDigit0.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit0.TabIndex = 64;
this.ButtonDigit0.Text = "0";
this.ButtonDigit0.UseVisualStyleBackColor = true;
this.ButtonDigit0.Click += new
System.EventHandler(this.ButtonDigit0_Click);
//
// ButtonDiv
//
this.ButtonDiv.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDiv.Location = new System.Drawing.Point(115,
126);
this.ButtonDiv.Name = "ButtonDiv";
this.ButtonDiv.Size = new System.Drawing.Size(28, 23);
this.ButtonDiv.TabIndex = 63;
109
this.ButtonDiv.Text = "/";
this.ButtonDiv.UseVisualStyleBackColor = true;
this.ButtonDiv.Click += new
System.EventHandler(this.ButtonDiv_Click);
//
// ButtonLBrack
//
this.ButtonLBrack.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonLBrack.Location = new System.Drawing.Point(43,
126);
this.ButtonLBrack.Name = "ButtonLBrack";
this.ButtonLBrack.Size = new System.Drawing.Size(30, 23);
this.ButtonLBrack.TabIndex = 62;
this.ButtonLBrack.Text = "(";
this.ButtonLBrack.UseVisualStyleBackColor = true;
this.ButtonLBrack.Click += new
System.EventHandler(this.ButtonLBrack_Click);
//
// ButtonRBrack
//
this.ButtonRBrack.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonRBrack.Location = new System.Drawing.Point(79,
126);
this.ButtonRBrack.Name = "ButtonRBrack";
this.ButtonRBrack.Size = new System.Drawing.Size(30, 23);
this.ButtonRBrack.TabIndex = 61;
this.ButtonRBrack.Text = ")";
this.ButtonRBrack.UseVisualStyleBackColor = true;
this.ButtonRBrack.Click += new
System.EventHandler(this.ButtonRBrack_Click);
//
// ButtonDigit1
//
this.ButtonDigit1.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit1.Location = new System.Drawing.Point(6,
213);
this.ButtonDigit1.Name = "ButtonDigit1";
this.ButtonDigit1.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit1.TabIndex = 60;
this.ButtonDigit1.Text = "1";
this.ButtonDigit1.UseVisualStyleBackColor = true;
this.ButtonDigit1.Click += new
System.EventHandler(this.ButtonDigit1_Click);
//
// ButtonDigit9
//
this.ButtonDigit9.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit9.Location = new System.Drawing.Point(80,
155);
this.ButtonDigit9.Name = "ButtonDigit9";
this.ButtonDigit9.Size = new System.Drawing.Size(29, 23);
this.ButtonDigit9.TabIndex = 59;
this.ButtonDigit9.Text = "9";
this.ButtonDigit9.UseVisualStyleBackColor = true;
this.ButtonDigit9.Click += new
System.EventHandler(this.ButtonDigit9_Click);
//
110
// ButtonDigit8
//
this.ButtonDigit8.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit8.Location = new System.Drawing.Point(43,
155);
this.ButtonDigit8.Name = "ButtonDigit8";
this.ButtonDigit8.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit8.TabIndex = 58;
this.ButtonDigit8.Text = "8";
this.ButtonDigit8.UseVisualStyleBackColor = true;
this.ButtonDigit8.Click += new
System.EventHandler(this.ButtonDigit8_Click);
//
// ButtonDigit7
//
this.ButtonDigit7.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit7.Location = new System.Drawing.Point(6,
155);
this.ButtonDigit7.Name = "ButtonDigit7";
this.ButtonDigit7.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit7.TabIndex = 57;
this.ButtonDigit7.Text = "7";
this.ButtonDigit7.UseVisualStyleBackColor = true;
this.ButtonDigit7.Click += new
System.EventHandler(this.ButtonDigit7_Click);
//
// ButtonDigit6
//
this.ButtonDigit6.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit6.Location = new System.Drawing.Point(80,
184);
this.ButtonDigit6.Name = "ButtonDigit6";
this.ButtonDigit6.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit6.TabIndex = 56;
this.ButtonDigit6.Text = "6";
this.ButtonDigit6.UseVisualStyleBackColor = true;
this.ButtonDigit6.Click += new
System.EventHandler(this.ButtonDigit6_Click);
//
// ButtonDigit5
//
this.ButtonDigit5.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit5.Location = new System.Drawing.Point(43,
184);
this.ButtonDigit5.Name = "ButtonDigit5";
this.ButtonDigit5.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit5.TabIndex = 55;
this.ButtonDigit5.Text = "5";
this.ButtonDigit5.UseVisualStyleBackColor = true;
this.ButtonDigit5.Click += new
System.EventHandler(this.ButtonDigit5_Click);
//
// ButtonDigit4
//
this.ButtonDigit4.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
111
this.ButtonDigit4.Location = new System.Drawing.Point(6,
184);
this.ButtonDigit4.Name = "ButtonDigit4";
this.ButtonDigit4.Size = new System.Drawing.Size(31, 23);
this.ButtonDigit4.TabIndex = 54;
this.ButtonDigit4.Text = "4";
this.ButtonDigit4.UseVisualStyleBackColor = true;
this.ButtonDigit4.Click += new
System.EventHandler(this.ButtonDigit4_Click);
//
// ButtonDigit3
//
this.ButtonDigit3.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit3.Location = new System.Drawing.Point(80,
213);
this.ButtonDigit3.Name = "ButtonDigit3";
this.ButtonDigit3.Size = new System.Drawing.Size(29, 23);
this.ButtonDigit3.TabIndex = 53;
this.ButtonDigit3.Text = "3";
this.ButtonDigit3.UseVisualStyleBackColor = true;
this.ButtonDigit3.Click += new
System.EventHandler(this.ButtonDigit3_Click);
//
// KeyBoardTextBox
//
this.KeyBoardTextBox.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.KeyBoardTextBox.Location = new
System.Drawing.Point(9, 13);
this.KeyBoardTextBox.Name = "KeyBoardTextBox";
this.KeyBoardTextBox.Size = new System.Drawing.Size(217,
20);
this.KeyBoardTextBox.TabIndex = 51;
this.KeyBoardTextBox.Text = "0";
//
// ButtonDigit2
//
this.ButtonDigit2.Anchor =
System.Windows.Forms.AnchorStyles.Bottom;
this.ButtonDigit2.Location = new System.Drawing.Point(43,
213);
this.ButtonDigit2.Name = "ButtonDigit2";
this.ButtonDigit2.Size = new System.Drawing.Size(30, 23);
this.ButtonDigit2.TabIndex = 52;
this.ButtonDigit2.Text = "2";
this.ButtonDigit2.UseVisualStyleBackColor = true;
this.ButtonDigit2.Click += new
System.EventHandler(this.ButtonDigit2_Click);
//
// DrawingProgressBar
//
this.DrawingProgressBar.Anchor =
((System.Windows.Forms.AnchorStyles)
(((System.Windows.Forms.AnchorStyles.Bottom |
System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.DrawingProgressBar.Location = new
System.Drawing.Point(6, 483);
this.DrawingProgressBar.Name = "DrawingProgressBar";
112
this.DrawingProgressBar.Size = new
System.Drawing.Size(406, 23);
this.DrawingProgressBar.Style =
System.Windows.Forms.ProgressBarStyle.Continuous;
this.DrawingProgressBar.TabIndex = 0;
//
// GraphPictureBox
//
this.GraphPictureBox.BackColor =
System.Drawing.SystemColors.ControlText;
this.GraphPictureBox.Location = new
System.Drawing.Point(14, 12);
this.GraphPictureBox.Name = "GraphPictureBox";
this.GraphPictureBox.Size = new System.Drawing.Size(580,
627);
this.GraphPictureBox.TabIndex = 15;
this.GraphPictureBox.TabStop = false;
this.GraphPictureBox.Paint += new
System.Windows.Forms.PaintEventHandler(this.GraphPictureBox_Paint);
//
// WindowGroupBox
//
this.WindowGroupBox.BackColor =
System.Drawing.SystemColors.Control;
this.WindowGroupBox.BackgroundImageLayout =
System.Windows.Forms.ImageLayout.None;
this.WindowGroupBox.Controls.Add(this.ApplyWindowButton);
this.WindowGroupBox.Controls.Add(this.label7);
this.WindowGroupBox.Controls.Add(this.label8);
this.WindowGroupBox.Controls.Add(this.label6);
this.WindowGroupBox.Controls.Add(this.label1);
this.WindowGroupBox.Controls.Add(this.XMinTextBox);
this.WindowGroupBox.Controls.Add(this.XStepTextBox);
this.WindowGroupBox.Controls.Add(this.XMaxTextBox);
this.WindowGroupBox.Controls.Add(this.YStepTextBox);
this.WindowGroupBox.Controls.Add(this.YMinTextBox);
this.WindowGroupBox.Controls.Add(this.label3);
this.WindowGroupBox.Controls.Add(this.YMaxTextBox);
this.WindowGroupBox.Controls.Add(this.label2);
this.WindowGroupBox.Controls.Add(this.label5);
this.WindowGroupBox.Controls.Add(this.label4);
this.WindowGroupBox.ImeMode =
System.Windows.Forms.ImeMode.NoControl;
this.WindowGroupBox.Location = new
System.Drawing.Point(600, 12);
this.WindowGroupBox.Name = "WindowGroupBox";
this.WindowGroupBox.Size = new System.Drawing.Size(418,
107);
this.WindowGroupBox.TabIndex = 16;
this.WindowGroupBox.TabStop = false;
this.WindowGroupBox.Text = "window";
//
// ApplyWindowButton
//
this.ApplyWindowButton.Location = new
System.Drawing.Point(337, 76);
this.ApplyWindowButton.Name = "ApplyWindowButton";
this.ApplyWindowButton.Size = new System.Drawing.Size(75,
23);
this.ApplyWindowButton.TabIndex = 12;
this.ApplyWindowButton.Text = "apply";
113
this.ApplyWindowButton.UseVisualStyleBackColor = true;
this.ApplyWindowButton.Click += new
System.EventHandler(this.ApplyWindowButton_Click);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(166, 21);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(16, 13);
this.label7.TabIndex = 11;
this.label7.Text = "to";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(290, 21);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(27, 13);
this.label8.TabIndex = 3;
this.label8.Text = "step";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(166, 53);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(16, 13);
this.label6.TabIndex = 10;
this.label6.Text = "to";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(290, 53);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 0;
this.label1.Text = "step";
//
// XMinTextBox
//
this.XMinTextBox.Location = new System.Drawing.Point(67,
18);
this.XMinTextBox.Name = "XMinTextBox";
this.XMinTextBox.Size = new System.Drawing.Size(77, 20);
this.XMinTextBox.TabIndex = 9;
this.XMinTextBox.Text = "-10";
//
// XStepTextBox
//
this.XStepTextBox.Location = new
System.Drawing.Point(323, 18);
this.XStepTextBox.Name = "XStepTextBox";
this.XStepTextBox.Size = new System.Drawing.Size(67, 20);
this.XStepTextBox.TabIndex = 2;
this.XStepTextBox.Text = "1";
//
// XMaxTextBox
//
114
this.XMaxTextBox.Location = new System.Drawing.Point(188,
18);
this.XMaxTextBox.Name = "XMaxTextBox";
this.XMaxTextBox.Size = new System.Drawing.Size(76, 20);
this.XMaxTextBox.TabIndex = 8;
this.XMaxTextBox.Text = "10";
//
// YStepTextBox
//
this.YStepTextBox.Location = new
System.Drawing.Point(323, 50);
this.YStepTextBox.Name = "YStepTextBox";
this.YStepTextBox.Size = new System.Drawing.Size(67, 20);
this.YStepTextBox.TabIndex = 1;
this.YStepTextBox.Text = "1";
//
// YMinTextBox
//
this.YMinTextBox.Location = new System.Drawing.Point(67,
50);
this.YMinTextBox.Name = "YMinTextBox";
this.YMinTextBox.Size = new System.Drawing.Size(77, 20);
this.YMinTextBox.TabIndex = 7;
this.YMinTextBox.Text = "-10";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(34, 53);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(27, 13);
this.label3.TabIndex = 3;
this.label3.Text = "from";
//
// YMaxTextBox
//
this.YMaxTextBox.Location = new System.Drawing.Point(188,
50);
this.YMaxTextBox.Name = "YMaxTextBox";
this.YMaxTextBox.Size = new System.Drawing.Size(76, 20);
this.YMaxTextBox.TabIndex = 6;
this.YMaxTextBox.Text = "10";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(11, 53);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(17, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Y-";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(11, 21);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(17, 13);
this.label5.TabIndex = 5;
this.label5.Text = "X-";
//
115
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(34, 21);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(27, 13);
this.label4.TabIndex = 4;
this.label4.Text = "from";
//
// RotateRightButton
//
this.RotateRightButton.Location = new
System.Drawing.Point(543, 221);
this.RotateRightButton.Name = "RotateRightButton";
this.RotateRightButton.Size = new System.Drawing.Size(51,
23);
this.RotateRightButton.TabIndex = 19;
this.RotateRightButton.Text = "=>";
this.RotateRightButton.UseVisualStyleBackColor = true;
this.RotateRightButton.Click += new
System.EventHandler(this.RotateRightButton_Click);
//
// RotateDownButton
//
this.RotateDownButton.Location = new
System.Drawing.Point(289, 602);
this.RotateDownButton.Name = "RotateDownButton";
this.RotateDownButton.Size = new System.Drawing.Size(23,
37);
this.RotateDownButton.TabIndex = 20;
this.RotateDownButton.Text = "||\r\nv";
this.RotateDownButton.UseVisualStyleBackColor = true;
this.RotateDownButton.Click += new
System.EventHandler(this.RotateDownButton_Click);
//
// RotateLeftButton
//
this.RotateLeftButton.Location = new
System.Drawing.Point(14, 221);
this.RotateLeftButton.Name = "RotateLeftButton";
this.RotateLeftButton.Size = new System.Drawing.Size(52,
23);
this.RotateLeftButton.TabIndex = 21;
this.RotateLeftButton.Text = "<=";
this.RotateLeftButton.UseVisualStyleBackColor = true;
this.RotateLeftButton.Click += new
System.EventHandler(this.RotateLeftButton_Click);
//
// RotateUpButton
//
this.RotateUpButton.Location = new
System.Drawing.Point(289, 12);
this.RotateUpButton.Name = "RotateUpButton";
this.RotateUpButton.Size = new System.Drawing.Size(23,
38);
this.RotateUpButton.TabIndex = 22;
this.RotateUpButton.Text = "^\r\n||";
this.RotateUpButton.UseVisualStyleBackColor = true;
this.RotateUpButton.Click += new
System.EventHandler(this.RotateUpButton_Click);
//
116
// RotateClockwiseButton
//
this.RotateClockwiseButton.Location = new
System.Drawing.Point(13, 599);
this.RotateClockwiseButton.Name =
"RotateClockwiseButton";
this.RotateClockwiseButton.Size = new
System.Drawing.Size(52, 38);
this.RotateClockwiseButton.TabIndex = 23;
this.RotateClockwiseButton.Text = "->\r\n<-";
this.RotateClockwiseButton.UseVisualStyleBackColor =
true;
this.RotateClockwiseButton.Click += new
System.EventHandler(this.RotateClockwiseButton_Click);
//
// RotateContrClockwiseButton
//
this.RotateContrClockwiseButton.Location = new
System.Drawing.Point(14, 555);
this.RotateContrClockwiseButton.Name =
"RotateContrClockwiseButton";
this.RotateContrClockwiseButton.Size = new
System.Drawing.Size(51, 38);
this.RotateContrClockwiseButton.TabIndex = 24;
this.RotateContrClockwiseButton.Text = "<-\r\n->";
this.RotateContrClockwiseButton.UseVisualStyleBackColor =
true;
this.RotateContrClockwiseButton.Click += new
System.EventHandler(this.RotateContrClockwiseButton_Click);
//
// ZoomOutButton
//
this.ZoomOutButton.Location = new
System.Drawing.Point(14, 12);
this.ZoomOutButton.Name = "ZoomOutButton";
this.ZoomOutButton.Size = new System.Drawing.Size(30,
23);
this.ZoomOutButton.TabIndex = 25;
this.ZoomOutButton.Text = "-";
this.ZoomOutButton.UseVisualStyleBackColor = true;
this.ZoomOutButton.Click += new
System.EventHandler(this.ZoomOutButton_Click);
//
// ZoomInButton
//
this.ZoomInButton.Location = new
System.Drawing.Point(564, 12);
this.ZoomInButton.Name = "ZoomInButton";
this.ZoomInButton.Size = new System.Drawing.Size(30, 23);
this.ZoomInButton.TabIndex = 26;
this.ZoomInButton.Text = "+";
this.ZoomInButton.UseVisualStyleBackColor = true;
this.ZoomInButton.Click += new
System.EventHandler(this.ZoomInButton_Click);
//
// ShiftUpButton
//
this.ShiftUpButton.Location = new
System.Drawing.Point(528, 555);
this.ShiftUpButton.Name = "ShiftUpButton";
117
this.ShiftUpButton.Size = new System.Drawing.Size(23,
38);
this.ShiftUpButton.TabIndex = 27;
this.ShiftUpButton.Text = "^\r\n||";
this.ShiftUpButton.UseVisualStyleBackColor = true;
this.ShiftUpButton.Click += new
System.EventHandler(this.ShiftUpButton_Click);
//
// ShiftDownButton
//
this.ShiftDownButton.Location = new
System.Drawing.Point(528, 599);
this.ShiftDownButton.Name = "ShiftDownButton";
this.ShiftDownButton.Size = new System.Drawing.Size(23,
38);
this.ShiftDownButton.TabIndex = 28;
this.ShiftDownButton.Text = "||\r\nv";
this.ShiftDownButton.UseVisualStyleBackColor = true;
this.ShiftDownButton.Click += new
System.EventHandler(this.ShiftDownButton_Click);
//
// ShiftLeftButton
//
this.ShiftLeftButton.Location = new
System.Drawing.Point(480, 588);
this.ShiftLeftButton.Name = "ShiftLeftButton";
this.ShiftLeftButton.Size = new System.Drawing.Size(42,
23);
this.ShiftLeftButton.TabIndex = 29;
this.ShiftLeftButton.Text = "<=";
this.ShiftLeftButton.UseVisualStyleBackColor = true;
this.ShiftLeftButton.Click += new
System.EventHandler(this.ShiftLeftButton_Click);
//
// ShiftRightButton
//
this.ShiftRightButton.Location = new
System.Drawing.Point(556, 588);
this.ShiftRightButton.Name = "ShiftRightButton";
this.ShiftRightButton.Size = new System.Drawing.Size(37,
23);
this.ShiftRightButton.TabIndex = 30;
this.ShiftRightButton.Text = "=>";
this.ShiftRightButton.UseVisualStyleBackColor = true;
this.ShiftRightButton.Click += new
System.EventHandler(this.ShiftRightButton_Click);
//
// Function2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F,
13F);
this.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1016, 701);
this.Controls.Add(this.ShiftRightButton);
this.Controls.Add(this.ShiftLeftButton);
this.Controls.Add(this.ShiftDownButton);
this.Controls.Add(this.ShiftUpButton);
this.Controls.Add(this.ZoomInButton);
this.Controls.Add(this.ZoomOutButton);
this.Controls.Add(this.RotateContrClockwiseButton);
118
this.Controls.Add(this.RotateClockwiseButton);
this.Controls.Add(this.RotateUpButton);
this.Controls.Add(this.RotateLeftButton);
this.Controls.Add(this.RotateDownButton);
this.Controls.Add(this.RotateRightButton);
this.Controls.Add(this.FunctionGroupBox);
this.Controls.Add(this.GrphOptionsGroupBox);
this.Controls.Add(this.GraphPictureBox);
this.Controls.Add(this.WindowGroupBox);
this.MaximizeBox = false;
this.Name = "Function2";
this.Text = "Functions with 2 variables";
this.WindowState =
System.Windows.Forms.FormWindowState.Maximized;
this.FunctionGroupBox.ResumeLayout(false);
this.FunctionGroupBox.PerformLayout();
this.GrphOptionsGroupBox.ResumeLayout(false);
this.GrphOptionsGroupBox.PerformLayout();
this.FunctionKeyBoardGroupBox.ResumeLayout(false);
this.FunctionKeyBoardGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)
(this.GraphPictureBox)).EndInit();
this.WindowGroupBox.ResumeLayout(false);
this.WindowGroupBox.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox FunctionGroupBox;
private System.Windows.Forms.Button DrawFunctionsButton;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.GroupBox GrphOptionsGroupBox;
private System.Windows.Forms.PictureBox GraphPictureBox;
private System.Windows.Forms.GroupBox WindowGroupBox;
private System.Windows.Forms.Button ApplyWindowButton;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox XMinTextBox;
private System.Windows.Forms.TextBox XStepTextBox;
private System.Windows.Forms.TextBox XMaxTextBox;
private System.Windows.Forms.TextBox YStepTextBox;
private System.Windows.Forms.TextBox YMinTextBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox YMaxTextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button RotateRightButton;
private System.Windows.Forms.Button RotateDownButton;
private System.Windows.Forms.Button RotateLeftButton;
private System.Windows.Forms.Button RotateUpButton;
private System.Windows.Forms.Button RotateClockwiseButton;
private System.Windows.Forms.Button
RotateContrClockwiseButton;
private System.Windows.Forms.Button ZoomOutButton;
private System.Windows.Forms.Button ZoomInButton;
private System.Windows.Forms.Button ShiftUpButton;
119
private System.Windows.Forms.Button ShiftDownButton;
private System.Windows.Forms.Button ShiftLeftButton;
private System.Windows.Forms.Button ShiftRightButton;
private System.Windows.Forms.TextBox FunctionTextBox;
private System.Windows.Forms.ProgressBar DrawingProgressBar;
private System.Windows.Forms.GroupBox
FunctionKeyBoardGroupBox;
private System.Windows.Forms.Button ButtonCos;
private System.Windows.Forms.Button ButtonSin;
private System.Windows.Forms.Button ButtonDeg;
private System.Windows.Forms.Button ButtonLn;
private System.Windows.Forms.Button ButtonClear;
private System.Windows.Forms.Button ButtonBackspace;
private System.Windows.Forms.Button ButtonPlus;
private System.Windows.Forms.Button ButtonMinus;
private System.Windows.Forms.Button ButtonMult;
private System.Windows.Forms.Button ButtonDigit0;
private System.Windows.Forms.Button ButtonDiv;
private System.Windows.Forms.Button ButtonLBrack;
private System.Windows.Forms.Button ButtonRBrack;
private System.Windows.Forms.Button ButtonDigit1;
private System.Windows.Forms.Button ButtonDigit9;
private System.Windows.Forms.Button ButtonDigit8;
private System.Windows.Forms.Button ButtonDigit7;
private System.Windows.Forms.Button ButtonDigit6;
private System.Windows.Forms.Button ButtonDigit5;
private System.Windows.Forms.Button ButtonDigit4;
private System.Windows.Forms.Button ButtonDigit3;
private System.Windows.Forms.Button ButtonDigit2;
private System.Windows.Forms.Button ButtonX;
private System.Windows.Forms.Button CopyFromKyBoardButton;
private System.Windows.Forms.Button ButtonLog;
private System.Windows.Forms.TextBox KeyBoardTextBox;
private System.Windows.Forms.Button ButtonY;
private System.Windows.Forms.TextBox NumOfSegmentsTextBox;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button ButtonPi;
private System.Windows.Forms.Button ButtonE;
}
}
}
120

You might also like