示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TraceLab.UI.GTK.MainWindow"/> class.
        /// </summary>
        public MainWindow(ApplicationContext dataContext)
        {
            m_applicationContext = dataContext;

            // Init dock frame
            m_dockFrame = new DockFrame();
            m_dockFrame.CompactGuiLevel = 5;

            // Init component info panel
            m_infoPanelFactory = new InfoPanelFactory(m_applicationContext, m_dockFrame);

            //build the window
            CreateWindow();

            //set window application view model to all UI panels in current chrome
            //note, that application vm should not be set before m_windowShell.ShowAll is called
            SetApplicationViewModel(m_applicationContext.Application);

            // initiate action handlers for all actions in application
            new ActionHandlers(dataContext);

            //attach handler to closing event of a main window
            this.WindowShell.DeleteEvent += MainWindow_DeleteEvent;

            m_mainWindowCounter++;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TraceLab.UI.GTK.MainWindow"/> class.
        /// </summary>
        public MainWindow(ApplicationContext dataContext)
        {
            m_applicationContext = dataContext;

            // Init dock frame
            m_dockFrame = new DockFrame();
            m_dockFrame.CompactGuiLevel = 5;

            // Init component info panel
            m_infoPanelFactory = new InfoPanelFactory(m_applicationContext, m_dockFrame);

            //build the window
            CreateWindow();
            
            //set window application view model to all UI panels in current chrome
            //note, that application vm should not be set before m_windowShell.ShowAll is called
            SetApplicationViewModel(m_applicationContext.Application);
            
            // initiate action handlers for all actions in application
            new ActionHandlers(dataContext);
            
            //attach handler to closing event of a main window
            this.WindowShell.DeleteEvent += MainWindow_DeleteEvent;
            
            m_mainWindowCounter++;
        }