Пример #1
0
        private void menuGroups_Click(object sender, EventArgs e)
        {
            ConnectionGroup connGroupCur = null;

            if (comboConnectionGroups.SelectedIndex > 0)
            {
                connGroupCur = _listConnectionGroups[comboConnectionGroups.SelectedIndex - 1];
            }
            FormCentralConnectionGroups FormCCG = new FormCentralConnectionGroups();

            FormCCG.ShowDialog();
            ConnectionGroups.RefreshCache();
            FillComboGroups(connGroupCur == null ? 0 : connGroupCur.ConnectionGroupNum);          //Reselect the connection group that the user had before.
            FillGrid();
        }
Пример #2
0
		private void menuGroups_Click(object sender,EventArgs e) {
			ConnectionGroup connGroupCur=null;
			if(comboConnectionGroups.SelectedIndex>0) {
				connGroupCur=_listConnectionGroups[comboConnectionGroups.SelectedIndex-1];
			}
			FormCentralConnectionGroups FormCCG=new FormCentralConnectionGroups();
			FormCCG.ShowDialog();
			ConnectionGroups.RefreshCache();
			_listConnectionGroups=ConnectionGroups.GetListt();
			comboConnectionGroups.Items.Clear();
			comboConnectionGroups.Items.Add("All");
			comboConnectionGroups.SelectedIndex=0;//default to "All"
			for(int i=0;i<_listConnectionGroups.Count;i++) {
				comboConnectionGroups.Items.Add(_listConnectionGroups[i].Description);
				if(connGroupCur!=null && connGroupCur.ConnectionGroupNum==_listConnectionGroups[i].ConnectionGroupNum) {
					comboConnectionGroups.SelectedIndex=i+1;//Reselect the connection group that the user had before.
				}
			}
			FillGrid();
		}