public object GetRealObject(StreamingContext context)
 {
   // GetRealObject called twice during deserialization for unknown reason
   if (!_Initialized)
   {
     CommandProcessorController Controller = new CmdPromptTabController();
     if (Controller.Start(_CurrentDirectory))
       _RealObject = Controller.OutputBox;
     _Initialized = true;
   }
   return _RealObject;
 }
Beispiel #2
0
 public object GetRealObject(StreamingContext context)
 {
     // GetRealObject called twice during deserialization for unknown reason
     if (!_Initialized)
     {
         CommandProcessorController Controller = new CmdPromptTabController();
         if (Controller.Start(_CurrentDirectory))
         {
             _RealObject = Controller.OutputBox;
         }
         _Initialized = true;
     }
     return(_RealObject);
 }
    public bool Execute(object source, object target)
    {
      var FolderView = (IFolderView)GetService(typeof(IFolderView));
      string CurrentFolderLocalPath = GetFolderLocalPath(FolderView.CurrentFolder);

      CommandProcessorController Controller = new CmdPromptTabController();
      if (Controller.Start(CurrentFolderLocalPath))
      {
        var TabManager = (ITabManager)GetService(typeof(ITabManager));

        ITab Tab = TabManager.AddNewTab(Controller.OutputBox, "Command Processor");
        Tab.Image = ToolboxBitmapAttribute.GetImageFromResource(typeof(NewCmdPromptTabCommand), "application_xp_terminal.png", false);
        Tab.Select();

        return true;
      }

      return false;
    }
        public bool Execute(object source, object target)
        {
            var    FolderView             = (IFolderView)GetService(typeof(IFolderView));
            string CurrentFolderLocalPath = GetFolderLocalPath(FolderView.CurrentFolder);

            CommandProcessorController Controller = new CmdPromptTabController();

            if (Controller.Start(CurrentFolderLocalPath))
            {
                var TabManager = (ITabManager)GetService(typeof(ITabManager));

                ITab Tab = TabManager.AddNewTab(Controller.OutputBox, "Command Processor");
                Tab.Image = ToolboxBitmapAttribute.GetImageFromResource(typeof(NewCmdPromptTabCommand), "application_xp_terminal.png", false);
                Tab.Select();

                return(true);
            }

            return(false);
        }