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

            PopulateActions();
        }
        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();
        }
        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);
        }
Beispiel #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);
        }
Beispiel #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());
        }
 private LoginController(WindowController c)
 {
     _view    = ObjectFactory.GetInstance <ILoginView>();
     _browser = c;
     InitEventHandlers();
 }
Beispiel #7
0
 public PromptPasswordController(WindowController c)
 {
     _browser = c;
 }
Beispiel #8
0
 public UploadPromptController(WindowController parent, Transfer transfer) : base(parent, transfer)
 {
 }
Beispiel #9
0
 public PromptLoginController(WindowController c) : base(c)
 {
     _browser = c;
 }
Beispiel #10
0
 public HostKeyController(WindowController c)
 {
     _parent = c;
 }
Beispiel #11
0
 public UploadPromptController(WindowController parent, Transfer transfer, SessionPool source, SessionPool destination)
     : base(parent, transfer, source, destination)
 {
     TransferPromptModel = new UploadPromptModel(this, source, destination, Transfer);
 }
 private HostKeyController(WindowController c)
 {
     _parent = c;
 }
Beispiel #13
0
 public CommandController(WindowController parent, SessionPool session)
     : this(parent, session, ObjectFactory.GetInstance <ICommandView>())
 {
 }