//==Cut a Circular Pocket indt makr===
int betu = 92 ;
string ut1  =  Application.StartupPath.Substring(0,2); 
char ut2  = (char)betu ;
string ut3  =  Application.StartupPath.Substring(2); 
string ut4 =ut1 + ut2 + ut3 +   "/Wizards/Allinone/UCCNC_wizards.exe" ;
string ut5 = Application.StartupPath ;
string ut6 = ut5 + ut2 + "Wizards" + ut2 + "Allinone" + ut2 + "adatcsere.txt" ;
string ut7 =ut1 + ut2 + ut3 + "/Wizards/Allinone/fibonacci.tap";
string ut8 = ut5 + ut2 + "Wizards" + ut2 + "Allinone" + ut2 + "file.txt" ;
            string text1 = "1";
            string text2 = "2";
			string textend= "kilpve";
            string s1 = "1";
            string s2 = "2";
            string kilep = "";
            string beolvas = "L";
			string tapfile = "";

//MessageBox.Show(ut7);  
//______________________________uccnc elrsi utvonala-------------
//  System.IO.File.WriteAllText("C:"+ut2+"utvonal.txt",Application.StartupPath);
//================varzsl indtsa =======
          System.Diagnostics.Process proc; // Declare New Process
            System.Diagnostics.ProcessStartInfo procInfo = new System.Diagnostics.ProcessStartInfo(); // Declare New Process Starting Information

            procInfo.UseShellExecute = true;
            procInfo.FileName = ut4; 
            //procInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized; 

            proc = System.Diagnostics.Process.Start(procInfo); 
           System.IO.File.WriteAllText(ut6, text1);
            proc.WaitForExit(1000); 
  //===========kommunikci===========
          do
            {
            System.Threading.Thread.Sleep(1000);
                String[] lines = System.IO.File.ReadAllLines(ut6);
				String[]tap_file = System.IO.File.ReadAllLines(ut8);
                System.Console.WriteLine("Contents of adatcsere.txt = ");
                foreach (string tap__file in tap_file)
				{
					tapfile = tap__file;
				}
				
				foreach (string line in lines)
                {
                   kilep = line;
				   
                    if (line == s1)
                    {
                        System.IO.File.WriteAllText(ut6, text2);
                        //MessageBox.Show(line);
                    }
                    if (line == s2)
                    {
                        System.IO.File.WriteAllText(ut6, text1);
						//MessageBox.Show(line);
                    }
                    if (line == beolvas)
                    {
                        System.IO.File.WriteAllText(ut6, text1);
						//MessageBox.Show(tapfile);
                       exec.mainform.filenametoload =tapfile; 
                       exec.mainform.loadfile(); 
					}
					
                }
            }
            while (kilep != "E");
  System.IO.File.WriteAllText(ut6, textend);



