private void TryConnect() { while (!this.shouldExit) { try { LunaConnectionBase luna = new LunaUdp(); base.BeginInvoke((Action) (() => { Program.mainContext.AddForm(new SessionForm(luna)); Close(); }) ); this.shouldExit = true; } catch { } } }
private void TryConnect() { while (!this.shouldExit) { try { LunaConnectionBase luna = new LunaUdp(); base.BeginInvoke((Action)(() => { Program.mainContext.AddForm(new SessionForm(luna)); Close(); }) ); this.shouldExit = true; } catch { } } }