public JamCommanderMainForm() { InitializeComponent(); paneLeft = new ShellListViewPane { Dock = DockStyle.Fill }; paneRight = new ShellListViewPane { Dock = DockStyle.Fill }; tableLayoutPanel1.Controls.Add(paneLeft, 0, 0); tableLayoutPanel1.Controls.Add(paneRight, 2, 0); }
/// <summary> /// Event handler that gets called every time a new pane is focused. It updates all the ShellControlConnector Properties where needed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FocusChanged(object sender, EventArgs e) { ShellControlConnector connector = getFocusedPane().ShellControlConnector; focusedPane = getFocusedPane(); thumbnailImage1.ShellControlConnector = connector; if (previewForm != null) { previewForm.FilePreview.ShellControlConnector = connector; } if (treeViewForm != null) { treeViewForm.TreeView.ShellControlConnector = connector; } connector.FullRefreshControls(getFocusedPane().ShellListView); }
private void JamCommander_Load(object sender, EventArgs e) { //Left Pane paneLeft.OnQuitButtonClick += OnQuitButton; paneLeft.OnFocusChange += FocusChanged; focusedPane = paneLeft; //Start out with the left pane focused //Right Pane paneRight.OnQuitButtonClick += OnQuitButton; paneRight.OnFocusChange += FocusChanged; //Thumbnail Image this.SizeChanged += delegate(object _sender, EventArgs _e) { thumbnailImage1.Margin = new Padding(3, paneRight.ShellListView.Top, 3, 3); }; thumbnailImage1.Margin = new Padding(3, paneRight.ShellListView.Top, 3, 3); //Other forms are created at the start of the program and just displayed when needed previewForm = new PreviewForm(); previewForm.FilePreview.ShellControlConnector = focusedPane.ShellControlConnector; }