コード例 #1
0
 public override CommandResult InternalExecute(ICommandTarget target, params IAdaptable[] args) {
     ITerminalControlHost host = TerminalCommandTarget.AsOpenTerminal(target);
     if (host.Terminal.CurrentModalTerminalTask != null) {
         //TODO 関連付けられたXZModemDialogをActivateするようにしたい
         return CommandResult.Ignored;
     }
     else {
         XZModemDialog dlg = new XZModemDialog();
         dlg.Owner = CommandTargetUtil.AsViewOrLastActivatedView(target).ParentForm.AsForm();
         dlg.Initialize(host.Terminal);
         dlg.Show();
         return CommandResult.Succeeded;
     }
 }
コード例 #2
0
 public override bool CanExecute(ICommandTarget target)
 {
     return(TerminalCommandTarget.AsOpenTerminal(target) != null);
 }