コード例 #1
0
        public void LoadFiles()
        {
            firstColumnResize = true;
            listView.Items.Clear();
            DSLOGFiles.Clear();
            if (Path == null)
            {
                return; //Throw something
            }
            if (Directory.Exists(Path))
            {
                DSLOGFileEntryCache cache  = new DSLOGFileEntryCache($"{Path}\\.dslog2.2.cache");
                CacheLoadingDialog  dialog = new CacheLoadingDialog(cache, DSLOGFiles, Path);
                dialog.ShowDialog();
                FillInMissingFMSEventInfo();
                cache.SaveCache();
                listView.BeginUpdate();
                foreach (var entry in DSLOGFiles.Values)
                {
                    listView.Items.Add(entry.ToListViewItem(AllowFillInEventNames));
                }
                listView.EndUpdate();
                //sroll down to bottom (need to use timer cuz it's weird
                timerScrollToBottom.Start();
                CreateFileWatcher();
            }

            InitFilterCombo();
            FilterLogs();
            timerFileUpdate.Start();
        }
コード例 #2
0
        public CacheLoadingDialog(DSLOGFileEntryCache cache, Dictionary <string, DSLOGFileEntry> fileList, string path)
        {
            InitializeComponent();
            Cache      = cache;
            DSLOGFiles = fileList;
            Path       = path;
            DirectoryInfo dslogDir = new DirectoryInfo(Path);

            Files = dslogDir.GetFiles("*.dslog");
            backgroundWorker1.WorkerReportsProgress = true;

            this.Visible = false;
        }