Example #1
0
        public void LoadFile()
        {
            var openFileDialog = new OpenFileDialog
            {
                DefaultExt  = ".log",
                Filter      = "Log files (.log)|*.log|Text files (.txt)|*.txt|All files (*.*)|*.*",
                Multiselect = true
            };

            bool?selected = openFileDialog.ShowDialog();

            if (selected != true)
            {
                return;
            }

            foreach (var filePath in openFileDialog.FileNames)
            {
                if (Files.Any(f => f.FilePath == filePath))
                {
                    continue;
                }

                var tailFile = new TailFile(filePath);
                Files.Add(tailFile);
                _tailReader.AddFile(tailFile);
            }
        }
Example #2
0
 public ChangeColorViewModel(TailFile file)
 {
     _file = file;
 }
Example #3
0
        public void LoadFile()
        {
            var openFileDialog = new OpenFileDialog
            {
                DefaultExt = ".log",
                Filter = "Log files (.log)|*.log|Text files (.txt)|*.txt|All files (*.*)|*.*",
                Multiselect = true
            };

            bool? selected = openFileDialog.ShowDialog();
            if (selected != true)
                return;

            foreach (var filePath in openFileDialog.FileNames)
            {
                if (Files.Any(f => f.FilePath == filePath))
                    continue;

                var tailFile = new TailFile(filePath);
                Files.Add(tailFile);
                _tailReader.AddFile(tailFile);
            }
        }
Example #4
0
 public void AddFile(TailFile tailFile)
 {
     _tailFiles.Add(tailFile);
 }
Example #5
0
 public ChangeColorViewModel(TailFile file)
 {
     _file = file;
 }
Example #6
0
 public void AddFile(TailFile tailFile)
 {
     _tailFiles.Add(tailFile);
 }