Ejemplo n.º 1
0
 private void OnExplorerVM_TryOpenExplorer(ExplorerViewModel argSender, string argItemPath)
 {
     try
     {
         Process.Start("explorer.exe", argItemPath);
     }
     catch
     {
         this.RunCommand(String.Format("start \"{0}\"", argItemPath));
     }
 }
Ejemplo n.º 2
0
        private void OnExplorerVM_FolderChanged(ExplorerViewModel argSender, string argItemPath)
        {
            char tmpOldDrive = this.CurrentFolder[0];
            char tmpNewDrive = argItemPath[0];

            this.RunCommand("cd " + argItemPath);

            if (tmpOldDrive != tmpNewDrive)
            {
                this.RunCommand(String.Format("{0}:", tmpNewDrive));
            }
        }
Ejemplo n.º 3
0
        protected override void InitializeRuntimeMode()
        {
            base.InitializeRuntimeMode();
            this.IsBusy = false;
            this.AutoSyncWithCurrentFolder = true;

            this.explorerVM                  = new ExplorerViewModel(this.Dispatcher);
            this.ExplorerVM.ItemChosen      += OnExplorerVM_ItemChosen;
            this.ExplorerVM.TryOpenExplorer += OnExplorerVM_TryOpenExplorer;
            this.ExplorerVM.FolderChanged   += OnExplorerVM_FolderChanged;
            this.ExplorerVM.RunFile         += OnExplorerVM_RunFile;
        }
Ejemplo n.º 4
0
 private void OnExplorerVM_ItemChosen(ExplorerViewModel argSender, string argItemPath)
 {
     this.CurrentCommand += argItemPath;
 }
Ejemplo n.º 5
0
 private void OnExplorerVM_RunFile(ExplorerViewModel argSender, string argItemPath)
 {
     this.RunCommand(argItemPath);
 }