void BuildComponents(string defaultServer) { mSearchField = new SearchField(); mSearchField.downOrUpArrowKeyPressed += SearchField_OnDownOrUpArrowKeyPressed; RepositoriesListHeaderState headerState = RepositoriesListHeaderState.Default; TreeHeaderSettings.Load(headerState, UnityConstants.REPOSITORIES_TABLE_SETTINGS_NAME, (int)RepositoriesListColumn.Name); mRepositoriesListView = new RepositoriesListView( headerState, RepositoriesListHeaderState.GetColumnNames(), OkButtonAction); mRepositoriesListView.Reload(); mFillRepositoriesTable = new FillRepositoriesTable( new LocalRepositoriesProvider()); mState = new State() { Server = defaultServer, ProgressData = new ProgressControlsForDialogs.Data() }; KnownServersListOperations.GetCombinedServers( true, new List <string>(), mProgressControls, this, CmConnection.Get().GetProfileManager()); }
internal RepositoriesListView( RepositoriesListHeaderState headerState, List <string> columnNames, Action doubleClickAction) : base(new TreeViewState()) { mColumnNames = columnNames; mDoubleClickAction = doubleClickAction; multiColumnHeader = new MultiColumnHeader(headerState); multiColumnHeader.canSort = true; multiColumnHeader.sortingChanged += SortingChanged; mColumnComparers = RepositoriesTableDefinition.BuildColumnComparers(); rowHeight = UnityConstants.TREEVIEW_ROW_HEIGHT; showAlternatingRowBackgrounds = false; }