private void butAdd_Click(object sender, System.EventArgs e) { System.Collections.ArrayList allZone = ZoneInfo.getAllZone(); if (allZone.Count >= EcoGlobalVar.gl_maxZoneNum) { EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Zone_MaxNum, new string[] { EcoGlobalVar.gl_maxZoneNum.ToString() })); return; } ZoneInfoDlg zoneInfoDlg = new ZoneInfoDlg(this, -1L); zoneInfoDlg.ShowDialog(this); }
private void butModify_Click(object sender, System.EventArgs e) { TreeNode selectedNode = this.tvZone.SelectedNode; if (selectedNode == null) { return; } string text = selectedNode.Tag.ToString(); string[] array = text.Split(new char[] { '|' }); string value = array[3]; ZoneInfoDlg zoneInfoDlg = new ZoneInfoDlg(this, System.Convert.ToInt64(value)); zoneInfoDlg.ShowDialog(this); }