コード例 #1
0
        private void OpenIsoSuccess(PaneViewModelBase pane, string path, LoadCommand cmdParam)
        {
            IsBusy = false;
            var isoContentViewModel = (IsoContentViewModel)pane;

            switch (cmdParam)
            {
            case LoadCommand.Load:
                EventAggregator.GetEvent <OpenNestedPaneEvent>().Publish(new OpenNestedPaneEventArgs(this, pane));
                break;

            case LoadCommand.Extract:
                var targetPath = WindowManager.ShowFolderBrowserDialog(path, Resx.FolderBrowserDescriptionIsoExtract);
                if (string.IsNullOrWhiteSpace(targetPath))
                {
                    return;
                }
                SilentTargetPath = targetPath;
                isoContentViewModel.SelectAllCommand.Execute(null);
                EventAggregator.GetEvent <ExecuteFileOperationEvent>().Publish(new ExecuteFileOperationEventArgs(FileOperation.Copy, isoContentViewModel, this, null));
                break;

            case LoadCommand.Convert:
                isoContentViewModel.ConvertToGod(Path.GetDirectoryName(path));
                break;
            }
        }
コード例 #2
0
 private void PaneLoaded(PaneViewModelBase pane)
 {
     if (!LeftPane.IsLoaded || !RightPane.IsLoaded)
     {
         return;
     }
     EventAggregator.GetEvent <ShellInitializedEvent>().Publish(new ShellInitializedEventArgs());
 }
コード例 #3
0
        private void FtpConnectError(PaneViewModelBase pane, Exception exception)
        {
            IsBusy = false;
            var connectionName = ((FtpContentViewModel)pane).Connection.Name;

            if (exception is SomethingWentWrongException)
            {
                WindowManager.ShowErrorMessage(exception);
            }
            else
            {
                WindowManager.ShowMessage(Resx.ConnectionFailed, string.Format(Resx.CantConnectToFtp, connectionName, exception.Message));
            }
            ConnectedFtp = null;
        }
コード例 #4
0
 private void FtpConnectSuccess(PaneViewModelBase pane)
 {
     IsBusy = false;
     EventAggregator.GetEvent <OpenNestedPaneEvent>().Publish(new OpenNestedPaneEventArgs(this, pane));
 }
コード例 #5
0
 private void OpenIsoError(PaneViewModelBase pane, Exception exception)
 {
     IsBusy = false;
     WindowManager.ShowMessage(Resx.OpenFailed, string.Format("{0}: {1}", string.Format(Resx.CantOpenFile, CurrentRow.ComputedName), exception.Message));
 }