コード例 #1
0
 private void OnExplorerVM_TryOpenExplorer(ExplorerViewModel argSender, string argItemPath)
 {
     try
     {
         Process.Start("explorer.exe", argItemPath);
     }
     catch
     {
         this.RunCommand(String.Format("start \"{0}\"", argItemPath));
     }
 }
コード例 #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));
            }
        }
コード例 #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;
        }
コード例 #4
0
 private void OnExplorerVM_ItemChosen(ExplorerViewModel argSender, string argItemPath)
 {
     this.CurrentCommand += argItemPath;
 }
コード例 #5
0
 private void OnExplorerVM_RunFile(ExplorerViewModel argSender, string argItemPath)
 {
     this.RunCommand(argItemPath);
 }