RecentDocs recentfiles = LifetimeService.Instance.Container.Resolve<RecentDocs>();//21Dec2013 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 }
public Window1(IUnityContainer container, IAnalyticsService analytics, IDashBoardService dashBoardService) { InitializeComponent(); try { //// rest of the old code // AssociateShortcutToolbarCommands(); //18Mar2014 recentfiles.recentitemclick = RecentItem_Click; // _analyticService = analytics; MainWindowMenuFactory mf = new MainWindowMenuFactory(Menu, maintoolbar, dashBoardService, "test"); Menu.Items.Insert(Menu.Items.Count - 2, omh.OutputMenu); RefreshRecent();//recent menu Menu.Items.Insert(Menu.Items.Count - 2, chmh.CommandHistMenu); RDataShowWarningDialogCheck = false; } catch (Exception ex)//17Jan2014 { MessageBox.Show(BSky.GlobalResources.Properties.UICtrlResources.MenuGenerationFailedMsg); 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; container.RegisterInstance <IUIController>(layoutController); AddGetModelControlToGrid();//Adding to the right of toolbar in its own grid. }
RecentDocs recentfiles = LifetimeService.Instance.Container.Resolve <RecentDocs>(); //21Dec2013 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 }