//************************************************************************* // Constructor: AddSelectedVerticesToGroupDialog() // /// <summary> /// Initializes a new instance of the <see /// cref="AddSelectedVerticesToGroupDialog" /> class. /// </summary> /// /// <param name="workbook"> /// Workbook containing the graph data. /// </param> //************************************************************************* public AddSelectedVerticesToGroupDialog ( Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(workbook != null); m_oWorkbook = workbook; m_sGroupName = null; m_bIsNewGroup = false; InitializeComponent(); // Instantiate an object that saves and retrieves the user settings for // this dialog. Note that the object automatically saves the settings // when the form closes. m_oAddSelectedVerticesToGroupDialogUserSettings = new AddSelectedVerticesToGroupDialogUserSettings(this); ICollection <String> oUniqueGroupNames; if (ExcelTableUtil.TryGetUniqueTableColumnStringValues(m_oWorkbook, WorksheetNames.Groups, TableNames.Groups, GroupTableColumnNames.Name, out oUniqueGroupNames)) { cbxGroupName.DataSource = oUniqueGroupNames.ToArray(); } DoDataExchange(false); AssertValid(); }