public void TestGUI() { Form form = new Form(); form.Size = new Size(600, 800); SessionData session = new SessionData { Username = ScpConfig.UserName, Password = ScpConfig.Password, Host = ScpConfig.KnownHost, Port = 22 }; BrowserPresenter presenter = new BrowserPresenter( "Remote", new RemoteBrowserModel(ScpConfig.DefaultOptions), session, new MockFileTransferPresenter()); BrowserView view = new BrowserView( presenter, RemoteBrowserModel.NewDirectory("/home/" + ScpConfig.UserName)); view.Dock = DockStyle.Fill; form.Controls.Add(view); form.ShowDialog(); }
public void TestGUI() { BrowserPresenter presenter = new BrowserPresenter( "Local", new LocalBrowserModel(), new SessionData(), new MockFileTransferPresenter()); string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); BrowserView view = new BrowserView(presenter, new BrowserFileInfo(new DirectoryInfo(dir))); view.Dock = DockStyle.Fill; Form form = new Form(); form.Size = new Size(600, 800); form.Controls.Add(view); form.ShowDialog(); }
public void RunCombinedView() { Form form = new Form(); SessionData session = new SessionData { SessionId = "Test/SessionId", SessionName = "Test SessionName", Username = ScpConfig.UserName, Password = ScpConfig.Password, Host = ScpConfig.KnownHost, Port = 22 }; FileTransferPresenter fileTransferPresenter = new FileTransferPresenter(ScpConfig.DefaultOptions); FileTransferView fileTransferView = new FileTransferView(fileTransferPresenter) { Dock = DockStyle.Bottom }; BrowserView localBrowserView = new BrowserView( new BrowserPresenter("Local", new LocalBrowserModel(), session, fileTransferPresenter), new BrowserFileInfo(new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)))); localBrowserView.Dock = DockStyle.Fill; BrowserView remoteBrowserView = new BrowserView( new BrowserPresenter("Remote", new RemoteBrowserModel(ScpConfig.DefaultOptions), session, fileTransferPresenter), RemoteBrowserModel.NewDirectory("/home/" + ScpConfig.UserName)); remoteBrowserView.Dock = DockStyle.Fill; SplitContainer browserPanel = new SplitContainer() { Dock = DockStyle.Fill, SplitterDistance = 75, }; browserPanel.Panel1.Controls.Add(localBrowserView); browserPanel.Panel2.Controls.Add(remoteBrowserView); form.Controls.Add(browserPanel); form.Controls.Add(fileTransferView); form.Size = new Size(1024, 768); form.Show(); }