BlueSky.Window1.Window1 C# (CSharp) Method

Window1() public method

public Window1 ( IUnityContainer container, IAnalyticsService analytics, IDashBoardService dashBoardService ) : System
container IUnityContainer
analytics IAnalyticsService
dashBoardService IDashBoardService
return System
        public Window1(IUnityContainer container, IAnalyticsService analytics, IDashBoardService dashBoardService)
        {
            InitializeComponent();
            ///loading file when its double clicked ////

            try
            {

                //// rest of the old code //
                AssociateShortcutToolbarCommands();//18Mar2014
                recentfiles.recentitemclick = RecentItem_Click;//
                _analyticService = analytics;
                MainWindowMenuFactory mf = new MainWindowMenuFactory(Menu, maintoolbar, dashBoardService);
                Menu.Items.Insert(Menu.Items.Count - 2, omh.OutputMenu);//place output menu just before 2nd-last item.
                RefreshRecent();//recent menu
                Menu.Items.Insert(Menu.Items.Count - 2, chmh.CommandHistMenu);//04Mar2013 //place output menu just before 2nd-last item
            }
            catch (Exception ex)//17Jan2014
            {
                MessageBox.Show("Menus can't be generated...");
                logService.WriteToLogLevel("Menus can't be generated.\n" + ex.StackTrace, LogLevelEnum.Fatal);
                this.Close();
                return;
            }

            this.WindowState = System.Windows.WindowState.Normal;
            this.Dispatcher.UnhandledException += new DispatcherUnhandledExceptionEventHandler(Dispatcher_UnhandledException);
            UIControllerService layoutController = container.Resolve<UIControllerService>();

            layoutController.DocGroup = documentContainer;
            //layoutController.LayoutManager = DockContainer;
            container.RegisterInstance<IUIController>(layoutController);
            //its too early to call it here. BlueSky R pacakge is not yet loaded   SetRDefaults();//30Sep2014
            
        }