示例#1
0
        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();
            }
        }
        private void Window_Initialized(object sender, EventArgs e)
        {
            Log.InfoFormat("SCP Driver Installer {0} [Built: {1}]", Assembly.GetExecutingAssembly().GetName().Version,
                AssemblyHelper.LinkerTimestamp);

            _installer = Difx.Instance;
            _installer.OnLogEvent += Logger;

            var info = OsInfoHelper.OsInfo;
            _valid = OsInfoHelper.OsParse(info);

            Log.InfoFormat("{0} detected", info);

            // is MSVC already installed?
            _viewModel.InstallMsvc2010Redist = !OsInfoHelper.IsVc2010Installed;
            _viewModel.InstallMsvc2013Redist = !OsInfoHelper.IsVc2013Installed;

            // unblock system files
            foreach (var fInfo in Directory.GetFiles(GlobalConfiguration.AppDirectory, "*.*", SearchOption.AllDirectories)
                .Where(s => s.EndsWith(".dll") || s.EndsWith(".inf") || s.EndsWith(".sys") || s.EndsWith(".cat"))
                .Select(file => new FileInfo(file))
                .Where(fInfo => fInfo.Unblock()))
            {
                Log.InfoFormat("Unblocked file {0}", fInfo.Name);
            }

            // get all local USB devices
            foreach (var usbDevice in WdiWrapper.Instance.UsbDeviceList)
            {
                BluetoothStackPanel.Children.Add(new CheckBox
                {
                    Content = usbDevice
                });

                DualShock3StackPanel.Children.Add(new CheckBox
                {
                    Content = usbDevice
                });

                DualShock4StackPanel.Children.Add(new CheckBox
                {
                    Content = usbDevice
                });
            }
        }
        private void Window_Initialized(object sender, EventArgs e)
        {
            Log.InfoFormat("SCP Driver Installer {0} [Built: {1}]", Assembly.GetExecutingAssembly().GetName().Version,
                AssemblyHelper.LinkerTimestamp);

            _installer = Difx.Instance;
            _installer.OnLogEvent += Logger;

            var info = OsInfoHelper.OsInfo;
            _valid = OsInfoHelper.OsParse(info);

            Log.InfoFormat("{0} detected", info);

            // is MSVC already installed?
            _viewModel.InstallMsvc2010Redist = !OsInfoHelper.IsVc2010Installed;
            _viewModel.InstallMsvc2013Redist = !OsInfoHelper.IsVc2013Installed;

            // unblock system files
            foreach (var fInfo in Directory.GetFiles(WorkingDirectory, "*.*", SearchOption.AllDirectories)
                .Where(s => s.EndsWith(".dll") || s.EndsWith(".inf") || s.EndsWith(".sys") || s.EndsWith(".cat"))
                .Select(file => new FileInfo(file))
                .Where(fInfo => fInfo.Unblock()))
            {
                Log.InfoFormat("Unblocked file {0}", fInfo.Name);
            }
        }
        private void Window_Initialized(object sender, EventArgs e)
        {
            Log.InfoFormat("SCP Driver Installer {0} [Built: {1}]", Assembly.GetExecutingAssembly().GetName().Version,
                AssemblyHelper.LinkerTimestamp);

            _installer = Difx.Instance;
            _installer.OnLogEvent += Logger;

            var info = OsInfoHelper.OsInfo;
            _valid = OsInfoHelper.OsParse(info);

            Log.InfoFormat("{0} detected", info);

            // get all local USB devices
            foreach (var usbDevice in WdiWrapper.Instance.UsbDeviceList)
            {
                BluetoothStackPanel.Children.Add(new CheckBox
                {
                    Content = usbDevice
                });

                DualShock3StackPanel.Children.Add(new CheckBox
                {
                    Content = usbDevice
                });

                DualShock4StackPanel.Children.Add(new CheckBox
                {
                    Content = usbDevice
                });
            }
        }
示例#5
0
        private void Window_Initialized(object sender, EventArgs e)
        {
            Log.InfoFormat("SCP Driver Installer {0} [Built: {1}]", Assembly.GetExecutingAssembly().GetName().Version,
                AssemblyHelper.LinkerTimestamp);

            _installer = Difx.Instance;
            _installer.OnLogEvent += Logger;

            var info = OsInfoHelper.OsInfo;

            Log.InfoFormat("{0} detected", info);
        }