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