public void Run() { if (wnd == null) { wm = new MainWM(dataRows); wnd = new MainWindow(wm); wnd.OpenJobDesignerClicked += delegate { new JobDesignerVM(Data).Run(); }; wnd.OpenSpeciesDesignerClicked += delegate { new SpeciesDesignerVM(Data).Run(); }; wnd.OpenNpcOverviewClicked += delegate { new OverviewVM().Run(); }; wnd.OpenTalentSettingsClicked += delegate { new SettingsVM(Data).Run(); }; wnd.Closing += delegate { SaveSettings(); }; wnd.GenerateClicked += delegate { Generate(); }; wnd.ReloadJsonClicked += delegate { Init(); }; } wnd.Show(); Init(); }
public MainWindow(MainWM wm) { InitializeComponent(); DataContext = wm; }