Пример #1
0
        private void AddDirectory(LogBasePathInfo info)
        {
            ListViewItem lvi = new ListViewItem(info.LogBasePath);

            lvi.Tag = info;
            lvi.SubItems.Add(CommonFormats.DateTimeToShortString(info.UpdatedTime.ToLocalTime()));
            lvi.SubItems.Add(Tx.DataSize(info.Size));
            LogDirsListView.Items.Add(lvi);
            info.ListViewItem = lvi;
        }
Пример #2
0
        private void LogSelectionView_FontChanged(object sender, EventArgs args)
        {
            int width;

            isUpdatingColumns = true;

            width = TextRenderer.MeasureText(LastUpdateHeader.Text, Font).Width;
            for (int days = 0; days >= -8; days--)
            {
                width = Math.Max(width, TextRenderer.MeasureText(CommonFormats.DateTimeToShortString(DateTime.Now.AddDays(days)), Font).Width);
            }
            LastUpdateHeader.Width = width + 6;

            width            = TextRenderer.MeasureText(SizeHeader.Text, Font).Width;
            width            = Math.Max(width, TextRenderer.MeasureText("9999 MB", Font).Width);
            SizeHeader.Width = width + 6;

            isUpdatingColumns = false;
        }
Пример #3
0
 private void UpdateDirectory(LogBasePathInfo info)
 {
     info.ListViewItem.SubItems[1].Text = CommonFormats.DateTimeToShortString(info.UpdatedTime.ToLocalTime());
     info.ListViewItem.SubItems[2].Text = Tx.DataSize(info.Size);
 }