private void CloseEditListControl() { CloseModalPanel(_editListControl, DevComponents.DotNetBar.Controls.eSlideSide.Right); _editListControl.Dispose(); _editListControl = null; ui_Symbols_ButtonX_EditList.Enabled = true; }
private void ui_Symbols_ButtonX_EditList_Click(object sender, EventArgs e) { if (ui_groups_dataGridViewX_groupsList.SelectedRows.Count == 0) { ToastNotification.Show(ui_groups_dataGridViewX_groupsList, @"Please, select list.", 1000, eToastPosition.TopCenter); return; } ui_Symbols_ButtonX_EditList.Enabled = false; var groupName = ui_groups_dataGridViewX_groupsList.SelectedRows[0].Cells[0].Value.ToString(); var oldGroupInfo = _groups.Find(a => a.GroupName == groupName); _editListControl = new EditListControl { Commands = _commands, textBoxXListName = { Text = oldGroupInfo.GroupName }, }; foreach (var item in _editListControl.cmbHistoricalPeriod.Items) { if (item.ToString() == oldGroupInfo.TimeFrame) { _editListControl.cmbHistoricalPeriod.SelectedItem = item; _editListControl.cmbHistoricalPeriod.Text = item.ToString(); } } foreach (var item in _editListControl.cmbContinuationType.Items) { if (item.ToString() == oldGroupInfo.CntType) { _editListControl.cmbContinuationType.SelectedItem = item; _editListControl.cmbContinuationType.Text = item.ToString(); } } var symbols = DataManager.GetSymbolsInGroup(oldGroupInfo.GroupId); foreach (var symbol in symbols) { _editListControl.lbSelList.Items.Add(symbol.SymbolName); } ShowModalPanel(_editListControl, DevComponents.DotNetBar.Controls.eSlideSide.Right); }