コード例 #1
0
        protected TransferPromptController(WindowController parent, Transfer transfer)
        {
            View       = ObjectFactory.GetInstance <ITransferPromptView>();
            _parent    = parent;
            Transfer   = transfer;
            View.Title = Locale.localizedString(TransferName);

            PopulateActions();
        }
コード例 #2
0
        protected TransferPromptController(WindowController parent, Transfer transfer, SessionPool source, SessionPool destination)
        {
            View        = ObjectFactory.GetInstance <ITransferPromptView>();
            _parent     = parent;
            Transfer    = transfer;
            Source      = source;
            Destination = destination;
            View.Title  = LocaleFactory.localizedString(TransferName);

            PopulateActions();
        }
コード例 #3
0
        public static ConnectionController Instance(WindowController parent)
        {
            ConnectionController c;

            if (!Controllers.TryGetValue(parent, out c))
            {
                c = new ConnectionController(new Host(ProtocolFactory.get().forName(PreferencesFactory.get().getProperty("connection.protocol.default"))));
                Controllers.Add(parent, c);
                parent.View.ViewClosedEvent += delegate
                {
                    Controllers.Remove(parent);
                    c.View.Close();
                };
            }
            return(c);
        }
コード例 #4
0
        public static ConnectionController Instance(WindowController parent)
        {
            ConnectionController c;

            if (!Controllers.TryGetValue(parent, out c))
            {
                c = new ConnectionController();
                Controllers.Add(parent, c);
                parent.View.ViewClosedEvent += delegate
                {
                    Controllers.Remove(parent);
                    //todo c muss wohl auch noch abgeräumt werden
                };
            }
            return(c);
        }
コード例 #5
0
        public static TransferPromptController Create(WindowController parent, Transfer transfer)
        {
            // create the controller in the thread that has created the view of the TransferController (parent)
            TransferPromptController promptController = null;

            if (transfer is DownloadTransfer)
            {
                parent.Invoke(delegate { promptController = new DownloadPromptController(parent, transfer); }, true);
                return(promptController);
            }

            if (transfer is UploadTransfer)
            {
                parent.Invoke(delegate { promptController = new UploadPromptController(parent, transfer); }, true);
                return(promptController);
            }
            if (transfer is SyncTransfer)
            {
                parent.Invoke(delegate { promptController = new SyncPromptController(parent, transfer); }, true);
                return(promptController);
            }
            throw new ArgumentException(transfer.toString());
        }
コード例 #6
0
 private LoginController(WindowController c)
 {
     _view    = ObjectFactory.GetInstance <ILoginView>();
     _browser = c;
     InitEventHandlers();
 }
コード例 #7
0
 public PromptPasswordController(WindowController c)
 {
     _browser = c;
 }
コード例 #8
0
 public UploadPromptController(WindowController parent, Transfer transfer) : base(parent, transfer)
 {
 }
コード例 #9
0
 public PromptLoginController(WindowController c) : base(c)
 {
     _browser = c;
 }
コード例 #10
0
 public HostKeyController(WindowController c)
 {
     _parent = c;
 }
コード例 #11
0
 public UploadPromptController(WindowController parent, Transfer transfer, SessionPool source, SessionPool destination)
     : base(parent, transfer, source, destination)
 {
     TransferPromptModel = new UploadPromptModel(this, source, destination, Transfer);
 }
コード例 #12
0
 private HostKeyController(WindowController c)
 {
     _parent = c;
 }
コード例 #13
0
 public CommandController(WindowController parent, SessionPool session)
     : this(parent, session, ObjectFactory.GetInstance <ICommandView>())
 {
 }