| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- 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://172.16.0.105: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<int> path
- #if DEBUG
- = new Stack<int>();
- #else
- = null;
- #endif
- public Stack<int> 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();
- }
- }
- }
- }
- }
|