Upload
duke-togo
View
213
Download
0
Embed Size (px)
Citation preview
7/23/2019 banana kong
http://slidepdf.com/reader/full/banana-kong 1/4
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;
using System.Threading.Tasks;using System.indows.!orms;
namespace "ekaka#$alkulator% pu&lic partial class !orm' ( !orm % &ool plus ) *alse; &ool minus ) *alse; &ool multiply ) *alse; &ool di#ide ) *alse; &ool equal ) *alse; pu&lic !orm'+, %
-nitialieComponent+,; /
pri#ate #oid !orm'0Load+o&1ect sender2 3#ent4rgs e, %
/
pri#ate #oid &utton'0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7'7; /
pri#ate #oid Checki*3qual+, % i* +equal, % text5ox'.Text ) 77; equal ) *alse; /
/
pri#ate #oid &utton80Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 787;
/
pri#ate #oid &utton90Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 797; /
pri#ate #oid &utton:0Click+o&1ect sender2 3#ent4rgs e, %
7/23/2019 banana kong
http://slidepdf.com/reader/full/banana-kong 2/4
Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7:7;
/
pri#ate #oid &utton0Click+o&1ect sender2 3#ent4rgs e, %
Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 77; /
pri#ate #oid &utton<0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7<7; /
pri#ate #oid &utton=0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7=7;
/
pri#ate #oid &utton>0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7>7;
/
pri#ate #oid &utton?0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7?7; /
pri#ate #oid &utton'@0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; text5ox'.Text ) text5ox'.Text 6 7@7; /
pri#ate #oid &utton'<0Click+o&1ect sender2 3#ent4rgs e, % Checki*3qual+,; i* +text5ox'.Text.Contains+7.7,, % return;
/ else% text5ox'.Text ) text5ox'.Text 6 7.7; /
/
pri#ate #oid &utton':0Click+o&1ect sender2 3#ent4rgs e, % i* +text5ox'.Text.Contains+7A7,,
7/23/2019 banana kong
http://slidepdf.com/reader/full/banana-kong 3/4
% text5ox'.Text ) text5ox'.Text.Bemo#e+@2 ',; / else
% text5ox'.Text ) 7A7 6 text5ox'.Text; /
/
pri#ate #oid &utton'90Click+o&1ect sender2 3#ent4rgs e, % i* +text5ox'.Text )) 77, % return; / else
% plus ) true; text5ox'.Tag ) text5ox'.Text; text5ox'.Text ) 77; / /
pri#ate #oid &utton'=0Click+o&1ect sender2 3#ent4rgs e, % equal ) true; i* +plus, % decimal dec ) Con#ert.ToDecimal+text5ox'.Tag, 6 Con#ert.ToDecimal+text5ox'.Text,; text5ox'.Text ) dec.ToString+,; / i* +multiply, % decimal dec ) Con#ert.ToDecimal+text5ox'.Tag, Con#ert.ToDecimal+text5ox'.Text,;
text5ox'.Text ) dec.ToString+,; / i* +minus, % decimal dec ) Con#ert.ToDecimal+text5ox'.Tag, A Con#ert.ToDecimal+text5ox'.Text,; text5ox'.Text ) dec.ToString+,; / i* +di#ide, % decimal dec ) Con#ert.ToDecimal+text5ox'.Tag, Con#ert.ToDecimal+text5ox'.Text,; text5ox'.Text ) dec.ToString+,;
/
/
pri#ate #oid minus0Click+o&1ect sender2 3#ent4rgs e, % i* +text5ox'.Text )) 77, % return; / else % minus ) true; text5ox'.Tag ) text5ox'.Text;
7/23/2019 banana kong
http://slidepdf.com/reader/full/banana-kong 4/4
text5ox'.Text ) 77; / /
pri#ate #oid &utton''0Click+o&1ect sender2 3#ent4rgs e, % i* +text5ox'.Text )) 77,
% return; / else % multiply ) true; text5ox'.Tag ) text5ox'.Text; text5ox'.Text ) 77; / /
pri#ate #oid &utton'0Click+o&1ect sender2 3#ent4rgs e, % i* +text5ox'.Text )) 77,
% return; / else % di#ide ) true; text5ox'.Tag ) text5ox'.Text; text5ox'.Text ) 77; / /
pri#ate #oid &utton'80Click+o&1ect sender2 3#ent4rgs e, % plus ) minus ) multiply ) di#ide ) equal) *alse; text5ox'.Text ) 77; text5ox'.Tag ) 77;
/
pri#ate #oid text5ox'0TextChanged+o&1ect sender2 3#ent4rgs e, % text5ox'.Text4lign ) Eoriontal4lignment.Bight;
/
//