Ejemplo n.º 1
0
        private void PathOfListView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key != Key.Enter)
            {
                return;
            }
            var textbox = sender as TextBox;

            if (!_searchFlag)
            {
                if (Directory.Exists(textbox.Text))
                {
                    if (textbox.Name.EndsWith("1"))
                    {
                        fileFiller1.OpenEntry(new Folder(textbox.Text));
                    }
                    else
                    {
                        fileFiller2.OpenEntry(new Folder(textbox.Text));
                    }
                }
                else
                {
                    MessageBox.Show("Folder not found.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
        }
Ejemplo n.º 2
0
        private void Watcher_Created(object sender, FileSystemEventArgs e)
        {
            //For the dynamics
            var    Data = graphicalApp.DataSource;
            Entity elem = null;

            if (Directory.Exists(e.FullPath))
            {
                elem = new Folder(e.FullPath);
            }
            else if (System.IO.File.Exists(e.FullPath))
            {
                elem = new File(e.FullPath);
            }
            dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (ThreadStart) delegate()
            {
                if (elem != null)
                {
                    Data.Add(elem);
                }
            });
        }
Ejemplo n.º 3
0
 public ZippedFolder GetRootFolder(MC.Source.Entries.Directory directory)
 {
     return(new ZippedFolder(this, "", directory));
 }
Ejemplo n.º 4
0
 public void StartWatch(Directory directory)
 {
     watcher.Path = directory.FullPath;
     watcher.EnableRaisingEvents = true;
 }