public static Difx Factory() { Difx RetVal = null; if (Environment.Is64BitProcess) { RetVal = new Difx_64(); } else { RetVal = new Difx_32(); } return(RetVal); }
public ScpForm() { InitializeComponent(); Configuration(); StringBuilder sb = new StringBuilder(); sb.AppendFormat("SCP Driver Installer {0} [{1}]", Application.ProductVersion, DateTime.Now); sb.AppendLine(); sb.AppendLine(); Installer = Difx.Factory(); Installer.onLogEvent += Logger; String Info = OSInfo(); Valid = OSParse(Info); sb.Append("Detected - "); sb.Append(Info); sb.AppendLine(); tbOutput.AppendText(sb.ToString()); sb.Clear(); if (Valid == OSType.INVALID) { btnInstall.Enabled = false; btnUninstall.Enabled = false; sb.AppendLine("Could not find a valid configuration."); } else { btnInstall.Enabled = true; btnUninstall.Enabled = true; sb.AppendFormat("Selected {0} configuration.", Valid); } sb.AppendLine(); sb.AppendLine(); tbOutput.AppendText(sb.ToString()); }
private void ScpForm_Load(object sender, EventArgs e) { Log.InfoFormat("SCP Driver Installer {0} [{1}]", Application.ProductVersion, DateTime.Now); _installer = Difx.Instance; _installer.OnLogEvent += Logger; var info = OsInfoHelper.OsInfo; _valid = OsInfoHelper.OsParse(info); Log.InfoFormat("{0} detected", info); if (_valid == OsType.Invalid) { btnInstall.Enabled = false; btnUninstall.Enabled = false; Log.Error("Could not find a valid configuration"); } else { btnInstall.Enabled = true; btnUninstall.Enabled = true; Log.InfoFormat("Selected {0} configuration", _valid); } Icon = Resources.Scp_All; if (!OsInfoHelper.IsVc2013Installed) { MessageBox.Show(Resources.ScpForm_VcppMissingText, Resources.ScpForm_VcppMissingHead, MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } }