using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Core.Mes.ClientFrameWork; using System.Threading; using System.Diagnostics; namespace ConService { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //Thread th = new Thread(new ThreadStart(QueryData)); //th.IsBackground = true; //th.Start(); //Application.DoEvents(); QueryData(); //C c = new C(); //try //{ // int x = c.Recursive(10); //} //catch (Exception ex) //{ //} } public void QueryData() { //while (true) //{ string url = "Tcp://127.0.0.1:9999/ServerCommon"; string strOut = ""; ClientCommon._RemotingHelp.InitServerUrlList("ServerCommon", url); object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon", "Core.Mes.ServerCommon.UserInfoManager", "TestQuery", null, out strOut); if (strOut != "") { } //} } public class C { private Stack path #if DEBUG = new Stack(); #else = null; #endif public Stack Path { get { return path; } } [Conditional("DEBUG")] private void Push(int x) { Path.Push(x); } [Conditional("DEBUG")] private void Pop() { Path.Pop(); } public int Recursive(int n) { Push(n); int result = 1; if (n > 1) { result = n * Recursive(n - 1); Therad(); } Pop(); return result; } private void Therad() { int j = 0; if (j == 0) { Therad(); } } } } }