private void btnAdd1_Click(object sender, EventArgs e) { ServerInfo server = Util.Servers.Values.First(entry => entry.Name == cboServer2.Text); InfoNotifyInfo info = InfoNotifyInfo.Create(server, txtChannel2.Text, txtItem2.Text, cboStyle2.Text); if (info == null) { return; } _AddInfoNotify(info); }
private void _InitInfoNotifies() { var infos = Util.INI["SETTING"]["INFONOTIFY"].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (var item in infos) { var info = item.Split('|'); var inn = InfoNotifyInfo.Create(info); if (inn == null) { continue; } _AddInfoNotify(inn); } }