private void 参数配置ToolStripMenuItem_Click(object sender, EventArgs e) { Form_Setting dlg = new Form_Setting(); //当小窗口ok时,自动连接服务器 if (dlg.ShowDialog(this) == DialogResult.OK) { string info = ""; this.ConnectionServer(out info); } }
// 窗体加载 private void MainForm_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.SIPServerUrl)) { Form_Setting dlg = new Form_Setting(); dlg.ShowDialog(this); } this.EnableControlsForConnection(false); // 当配置了SIP2服务器地址时,自动连接服务器 if (string.IsNullOrEmpty(this.SIPServerUrl) == false) { string info = ""; this.ConnectionServer(out info); } //SIPUtility.Logger.Info("test"); //SIPUtility.Logger.Error("error1"); //SIPUtility.Logger.Warn("警告"); }