public void Start() { string nm = Datagen.GetFirstName(); client = new Scheme2(); client.EnableDataGenerator = false; client.TimerInterval = 200; Thread t = new Thread(new ThreadStart(client.StartClient)); t.Start(); t.Join(); }
static void Main(string[] args) { int v = 3; if (v == 1) { Scheme2 s = new Scheme2(); s.Start(); } if (v == 2) { Scheme1 s = new Scheme1(); Thread t = s.Start(); t.Join(); } if (v == 3) { Scheme3 s = new Scheme3(); while (true) { s.Start(); } } }