public AboutViewModel(FontHelper.FontInfo monospacedFont) { MonospacedFont = monospacedFont; InfoPEBakeryVersion = Global.Const.ProgramVersionStrFull; InfoBuildDate = "Build " + Global.BuildDate.ToString("yyyyMMdd"); string hostArch = "unknown"; switch (RuntimeInformation.ProcessArchitecture) { case Architecture.X86: hostArch = "x86"; break; case Architecture.X64: hostArch = "x64"; break; case Architecture.Arm64: hostArch = "ARM64"; break; // Technically speaking, Microsoft does not support WPF on ARMv7. case Architecture.Arm: hostArch = "ARM"; break; } InfoHostEnv = $"Host: {Environment.OSVersion.VersionString} {hostArch}"; LicenseText = Properties.Resources.LicenseSimple; }
public AboutViewModel(FontHelper.FontInfo monospacedFont) { MonospacedFont = monospacedFont; InfoPEBakeryVersion = Global.Const.ProgramVersionStrFull; InfoBuildDate = "Build " + Global.BuildDate.ToString("yyyyMMdd"); LicenseText = Properties.Resources.LicenseSimple; }
public void Default() { UseCustomTitle = false; CustomTitle = string.Empty; // Every Windows PC has notepad pre-installed. UseCustomEditor = false; CustomEditorPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "System32", "notepad.exe"); // Every Windows PC has Consolas pre-installed. MonospacedFont = new FontHelper.FontInfo(new FontFamily("Consolas"), FontWeights.Regular, 12); ScaleFactor = 100; DisplayShellExecuteConOut = true; InterfaceSize = InterfaceSize.Adaptive; }
public UtilityWindow(FontHelper.FontInfo monoFont) { Interlocked.Increment(ref Count); _m = new UtilityViewModel(monoFont); InitializeComponent(); DataContext = _m; // Populate projects List <Project> projects = Global.Projects.ProjectList; for (int i = 0; i < projects.Count; i++) { Project p = projects[i]; _m.Projects.Add(new Tuple <string, Project>(p.ProjectName, p)); if (p.ProjectName.Equals(Global.MainViewModel.CurMainTree.Script.Project.ProjectName, StringComparison.Ordinal)) { _m.SelectedProjectIndex = i; } } }
public UtilityViewModel(FontHelper.FontInfo monoFont) { MonoFont = monoFont; }
public AboutWindow(FontHelper.FontInfo monoFont) { InitializeComponent(); DataContext = new AboutViewModel(monoFont); }