public void Start(MainWindow main) { // Make sure to initialize Settings static constructor to initialize database path. var a = Settings.SavedFile; Menu = (MenuControl)main.MainMenuContainer.Content; Layers = (LayersControl)main.LayersContainer.Content; RatingViewer = (RatingViewerControl)main.RatingViewerContainer.Content; Icon = main.Icon; Main = main; main.Loaded += Main_Loaded; main.Closing += Main_Closing; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; main.Dispatcher.UnhandledException += Dispatcher_UnhandledException; System.Windows.Forms.Application.ThreadException += Application_ThreadException; // MPC-HC API calls are done through WinForms. Business = new PlayerBusiness(GetNewPlayer()); Windows = new WindowManager(main); }
public static void Instance(MainWindow main) { main.DetachControls(); ManualPlayerWindow NewForm = new ManualPlayerWindow(); NewForm.mainForm = main; SessionCore.Instance.Windows.Show(NewForm); }