Created
October 5, 2012 12:58
-
-
Save akhal3d96/3839691 to your computer and use it in GitHub Desktop.
Kemia2y - Function -
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void my() | |
{ | |
string findtxt,findtxt2; | |
findtxt = entry1.Text; | |
findtxt2=entry2.Text; | |
string [] element = {"H","He","Li","Br","Be","C","N","O","F","Ne","Na","Mg","Al","Si","P","S","Cl","Ar","K","Ca"}; | |
int [] valency = {1,0,1,2,3,4,3,2,1,0,1,2,3,4,5,2,1,0,1,2,}; | |
int st = Array.IndexOf(element,findtxt); //رقم مكان القيمة المُدخلة في entry1 | |
int sc = Array.IndexOf(element,findtxt2);//رقم مكان القيمة المُدخلة في entry2 | |
if (sc == st) | |
{ | |
sc = 1 ; st = 1; | |
label3.Text = element[st]+valency[sc]+" "+element[sc]+valency[st]; | |
} | |
//label3.Text = element[st]+valency[sc]+" "+element[sc]+valency[st]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment