Exemplo n.º 1
0
        /// <summary>
        /// indicates what the last selected items were
        /// </summary>
        private void restoreRecentItems()
        {
            //Reset the color on all items
            foreach (ListViewItem lvi in lvwIssueList.Items)
            {
                lvi.BackColor = colorNeutral;
            }

            //For each recent item (if any), find it in the list and set the color
            foreach (var item in FormSettings.GetRecentItems())
            {
                findIssue(item, colorRecent, colorNeutral, true);
            }
        }
Exemplo n.º 2
0
        private void loadSettings()
        {
            var settings = new FormSettings();

            settings.LoadFormSettings();

            //Set size
            if (!settings.FormSize.IsEmpty)
            {
                Size = settings.FormSize;
            }

            //Set Description window
            splitContainer1.Panel2Collapsed = settings.HideDescription;
            if (settings.DescriptionHeight != 0)
            {
                splitContainer1.SplitterDistance = settings.DescriptionHeight;
            }

            //Include Summary
            chkIncludeSummary.Checked = settings.IncludeSummary;
        }
Exemplo n.º 3
0
        private void saveSettings()
        {
            //Save Form Size, Description Window, Sort Info
            var formSettings = new FormSettings
                           {
                               FormSize = Size,
                               HideDescription = splitContainer1.Panel2Collapsed,
                               DescriptionHeight = splitContainer1.SplitterDistance,
                               SortColumn = lvwColumnSorter.SortColumn,
                               SortOrder = lvwColumnSorter.Order,
                               ColumnsDisplay = new Dictionary<int, int>(),
                               IncludeSummary = chkIncludeSummary.Checked
                           };

            //Save Columns list
            foreach (ColumnHeader column in lvwIssueList.Columns)
            {
                if (column.Tag == null || column.Tag.ToString() != HiddenTag)
                {
                    formSettings.ColumnsDisplay.Add(column.Index, column.DisplayIndex);
                }
                else
                {
                    //Flag hidden column with negative display index
                    formSettings.ColumnsDisplay.Add(column.Index, -1 * column.DisplayIndex);
                }

            }

            //Do Save
            formSettings.SaveAllSettings();
        }
Exemplo n.º 4
0
        private void loadSettings()
        {
            var settings = new FormSettings();
            settings.LoadFormSettings();

            //Set size
            if (!settings.FormSize.IsEmpty)
            {
                Size = settings.FormSize;
            }

            //Set Description window
            splitContainer1.Panel2Collapsed = settings.HideDescription;
            if (settings.DescriptionHeight != 0)
            {
                splitContainer1.SplitterDistance = settings.DescriptionHeight;
            }

            //Include Summary
            chkIncludeSummary.Checked = settings.IncludeSummary;
        }
Exemplo n.º 5
0
        private void loadListViewSettings()
        {
            var formSettings = new FormSettings();
            formSettings.LoadListSettings();

            lvwIssueList.SuspendLayout();

            //Get Sorting settings
            lvwColumnSorter.SortColumn = formSettings.SortColumn;
            lvwColumnSorter.Order = formSettings.SortOrder;

            //Redo sort
            if (lvwColumnSorter.SortColumn != 0)
            {
                lvwIssueList.Sort();
            }

            //Redo column re-arrange
            foreach (var column in formSettings.ColumnsDisplay)
            {
                var lvwColumn = lvwIssueList.Columns[column.Key];
                lvwColumn.DisplayIndex = Math.Abs(column.Value);

                //Check if we have a hidden column
                if (column.Value >= 0)
                {
                    continue;
                }
                lvwColumn.Tag = HiddenTag;
                    lvwColumn.Width = 0;
                }

            lvwIssueList.ResumeLayout();
        }
Exemplo n.º 6
0
 /// <summary>
 /// Save list of currently selected items to registry
 /// </summary>
 /// <param name="listItems">lists <see cref="feedItems"/> selected</param>
 private static void saveRecentItems(IEnumerable <FeedItem> listItems)
 {
     FormSettings.SaveRecentItems(listItems);
 }