Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
 public ChangeColorViewModel(TailFile file)
 {
     _file = file;
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 public void AddFile(TailFile tailFile)
 {
     _tailFiles.Add(tailFile);
 }
Ejemplo n.º 5
0
 public ChangeColorViewModel(TailFile file)
 {
     _file = file;
 }
Ejemplo n.º 6
0
 public void AddFile(TailFile tailFile)
 {
     _tailFiles.Add(tailFile);
 }