Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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 = true;
        }
Exemplo n.º 3
0
        internal RepositoriesListView(
            RepositoriesListHeaderState headerState,
            Action doubleClickAction)
            : base(new TreeViewState())
        {
            multiColumnHeader                 = new MultiColumnHeader(headerState);
            multiColumnHeader.canSort         = true;
            multiColumnHeader.sortingChanged += SortingChanged;

            mColumnNames = new List <string>();
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.NameColumn));
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.ServerColumn));

            mColumnComparers = RepositoriesTableDefinition.BuildColumnComparers();

            mDoubleClickAction = doubleClickAction;

            showAlternatingRowBackgrounds = true;
            rowHeight = UnityConstants.TREEVIEW_ROW_HEIGHT;
        }