private void AddHistoryItemToListView(HistoryItem hi, int index)
        {
            var item = new ListViewItem("")
            {
                Tag = hi,
                Text = hi.ToHHMMSS()
            };

            if (index > _undoIndex)
            {
                item.UseItemStyleForSubItems = true;
                item.Font = new Font(item.Font.FontFamily, item.Font.SizeInPoints, FontStyle.Italic);
                item.ForeColor = Color.Gray;
            }
            var subItem = new ListViewItem.ListViewSubItem(item, hi.Description);
            item.SubItems.Add(subItem);
            listViewHistory.Items.Add(item);
        }
Exemplo n.º 2
0
        private void AddHistoryItemToListView(HistoryItem hi, int index)
        {
            var item = new ListViewItem("")
                           {
                               Tag = hi,
                               Text = string.Format("{0:00}:{1:00}:{2:00}",
                                                    hi.Timestamp.Hour,
                                                    hi.Timestamp.Minute,
                                                    hi.Timestamp.Second)
                           };

            if (index > _undoIndex)
            {
                item.UseItemStyleForSubItems = true;
                item.Font = new Font(item.Font.FontFamily, item.Font.SizeInPoints, FontStyle.Italic);
                item.ForeColor = Color.Gray;
            }
            var subItem = new ListViewItem.ListViewSubItem(item, hi.Description);
            item.SubItems.Add(subItem);
            listViewHistory.Items.Add(item);
        }