} // private void SettingsEditorModeTripleColumn_Load(object sender, EventArgs e) { ManualUpdateLock++; comboFirstColumn.DataSource = ColumnsList.AsReadOnly(); comboSecondColumn.DataSource = ColumnsNoneList.AsReadOnly(); comboThirdColumn.DataSource = ColumnsNoneList.AsReadOnly(); switch (Columns.Count) { case 0: comboFirstColumn.SelectedValue = UiBroadcastListColumn.NumberAndName; comboSecondColumn.SelectedValue = UiBroadcastListColumn.None; comboThirdColumn.SelectedValue = UiBroadcastListColumn.None; break; case 1: comboFirstColumn.SelectedValue = Columns[0]; comboSecondColumn.SelectedValue = UiBroadcastListColumn.None; comboThirdColumn.SelectedValue = UiBroadcastListColumn.None; break; case 2: comboFirstColumn.SelectedValue = Columns[0]; comboSecondColumn.SelectedValue = Columns[1]; comboThirdColumn.SelectedValue = UiBroadcastListColumn.None; break; default: comboFirstColumn.SelectedValue = Columns[0]; comboSecondColumn.SelectedValue = Columns[1]; comboThirdColumn.SelectedValue = Columns[2]; break; } // switch ManualUpdateLock--; } // SettingsEditorModeTripleColumn_Load
} // SelectedSort private void SettingsEditorSorting_Load(object sender, EventArgs e) { if (DesignMode) { ColumnsNoneList = UiBroadcastListManager.GetSortedColumnNames(true); Sort = new List <UiBroadcastListSortColumn>(); } // if SortColumns = new UiBroadcastListSortColumn[3]; for (int index = 0; index < Math.Min(3, Sort.Count); index++) { SortColumns[index] = Sort[index]; } // for for (int index = Sort.Count; index < 3; index++) { SortColumns[index] = new UiBroadcastListSortColumn(UiBroadcastListColumn.None, false); } // for if (Sort.Count == 0) { SortColumns[0] = new UiBroadcastListSortColumn(UiBroadcastListColumn.Number, false); } // if ManualUpdateLock++; comboThirdColumn.DataSource = ColumnsNoneList.AsReadOnly(); comboSecondColumn.DataSource = ColumnsNoneList.AsReadOnly(); comboFirstColumn.DataSource = ColumnsNoneList.AsReadOnly(); comboThirdColumn.SelectedValue = SortColumns[2].Column; comboSecondColumn.SelectedValue = SortColumns[1].Column; comboFirstColumn.SelectedValue = SortColumns[0].Column; SetButtonDirectionStatus(buttonFirstDirection, 0, SortColumns[0].IsAscending); SetButtonDirectionStatus(buttonSecondDirection, 1, SortColumns[1].IsAscending); SetButtonDirectionStatus(buttonThirdDirection, 2, SortColumns[2].IsAscending); checkGlobalSorting.Visible = ShowUseGlobalSort; checkGlobalSorting.Checked = UseGlobalSort; EnableCombos(); ManualUpdateLock--; } // SettingsEditorSorting_Load