private void navigate(NavigationItem navItem) { panelView.Controls.Clear(); var view = NavigationFactory.create(navItem.View, navItem.Parameters); panelView.Controls.Add(view); }
private void lvWatchlists_MouseDoubleClick(object sender, MouseEventArgs e) { Point mousePos = lvWatchlists.PointToClient(Control.MousePosition); ListViewHitTestInfo hitTest = lvWatchlists.HitTest(mousePos); var firstSelected = hitTest.Item; if (firstSelected?.Tag != null) { var selectedWatchlist = (WatchList)firstSelected.Tag; Parent.Controls.Add(NavigationFactory.create(NavigationType.Watchlist, new NavigationParams() { Watchlist = selectedWatchlist })); Parent.Controls.Remove(this); } }
public FrmMain() { InitializeComponent(); Application.ApplicationExit += new EventHandler(this.onApplicationExit); // sets the current if (current == null) { current = this; panelView.Controls.Add(NavigationFactory.create(NavigationType.Dashboard)); } // Local manager statusStripManager.Visible = false; // Sets the icon Icon = Properties.Resources.LogoIcon; createNavigationTree(); }
private void btnBank_Click(object sender, EventArgs e) { navigate(NavigationFactory.create(NavigationType.BankAccount)); }
private void btnWatchlists_Click(object sender, EventArgs e) { navigate(NavigationFactory.create(NavigationType.Watchlists)); }
private void btnDepot_Click(object sender, EventArgs e) { navigate(NavigationFactory.create(NavigationType.Depot)); }