public UtilityWindow(FontHelper.WPFFont monoFont) { Interlocked.Increment(ref UtilityWindow.Count); m = new UtilityViewModel(monoFont); InitializeComponent(); DataContext = m; Application.Current.Dispatcher.Invoke(() => { MainWindow w = (Application.Current.MainWindow as MainWindow); List <Project> projList = w.Projects.Projects; for (int i = 0; i < projList.Count; i++) { Project proj = projList[i]; m.CodeBox_Projects.Add(new Tuple <string, Project>(proj.ProjectName, proj)); if (proj.ProjectName.Equals(w.CurMainTree.Script.Project.ProjectName, StringComparison.Ordinal)) { m.CodeBox_SelectedProjectIndex = i; } } }); }
public AboutWindow(FontHelper.WPFFont monoFont) { m = new AboutViewModel(monoFont); InitializeComponent(); DataContext = m; }
public AboutViewModel(FontHelper.WPFFont monoFont) { MonoFont = monoFont; // Info_PEBakeryVersion = typeof(App).Assembly.GetName().Version.ToString(); Info_PEBakeryVersion = Properties.Resources.StringVersion; Info_BuildDate = "Build " + Properties.Resources.BuildDate; License_Text = Properties.Resources.LicenseSimple; }