Example #1
0
        private MenuButton ConstrucRecentExperimentsMenuButton()
        {
            Menu recentExperimentsMenu = new Menu();

            foreach (RecentExperimentReference recentExp in m_applicationContext.Application.RecentExperiments) 
            {
                RecentExperimentMenuItem item = new RecentExperimentMenuItem(recentExp);
                item.Image = new Image(s_traceLabIcon);
                item.ExposeEvent += GtkMenuHelper.DrawImageMenuItemImage; 
                item.Activated += OpenExperiment;
                recentExperimentsMenu.Append(item);
            }

            recentExperimentsMenu.ShowAll();
            MenuButton recentExperimentButton = new MenuButton(new Image(Stock.Open, IconSize.SmallToolbar), recentExperimentsMenu, true);
            recentExperimentButton.TooltipText = "Select recent opened experiment";
            return recentExperimentButton;
        }
Example #2
0
        private MenuButton ConstrucRecentExperimentsMenuButton()
        {
            Menu recentExperimentsMenu = new Menu();

            foreach (RecentExperimentReference recentExp in m_applicationContext.Application.RecentExperiments)
            {
                RecentExperimentMenuItem item = new RecentExperimentMenuItem(recentExp);
                item.Image        = new Image(s_traceLabIcon);
                item.ExposeEvent += GtkMenuHelper.DrawImageMenuItemImage;
                item.Activated   += OpenExperiment;
                recentExperimentsMenu.Append(item);
            }

            recentExperimentsMenu.ShowAll();
            MenuButton recentExperimentButton = new MenuButton(new Image(Stock.Open, IconSize.SmallToolbar), recentExperimentsMenu, true);

            recentExperimentButton.TooltipText = "Select recent opened experiment";
            return(recentExperimentButton);
        }
Example #3
0
        private void OpenExperiment(object sender, EventArgs e)
        {
            RecentExperimentMenuItem item = (RecentExperimentMenuItem)sender;

            OpenExperimentAction.OpenExperiment(item.RecentExperimentReference.FullPath, m_applicationContext);
        }