Exemple #1
0
        private void navigate(NavigationItem navItem)
        {
            panelView.Controls.Clear();
            var view = NavigationFactory.create(navItem.View, navItem.Parameters);

            panelView.Controls.Add(view);
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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();
        }
Exemple #4
0
 private void btnBank_Click(object sender, EventArgs e)
 {
     navigate(NavigationFactory.create(NavigationType.BankAccount));
 }
Exemple #5
0
 private void btnWatchlists_Click(object sender, EventArgs e)
 {
     navigate(NavigationFactory.create(NavigationType.Watchlists));
 }
Exemple #6
0
 private void btnDepot_Click(object sender, EventArgs e)
 {
     navigate(NavigationFactory.create(NavigationType.Depot));
 }