private static void OnLaunchFtdiDriverInstaller(object parameter)
        {
            var installDriver        = false;
            var driverInstallMessage = parameter as string;

            if (driverInstallMessage == null)
            {
                driverInstallMessage = Resources.Strings.LaunchFtdiDriverInstallerCommand_PromptMessage;
                var installDriverResult = INTV.Shared.View.OSMessageBox.Show(driverInstallMessage, Resources.Strings.LaunchFtdiDriverInstallerCommand_PromptTitle, Shared.View.OSMessageBoxButton.YesNo);
                installDriver = installDriverResult == Shared.View.OSMessageBoxResult.Yes;
            }
            else
            {
                var promptToInstallDialog = PromptToInstallFtdiDriverDialog.Create();
                installDriver = promptToInstallDialog.ShowDialog(true) == true;
            }
            if (installDriver)
            {
                try
                {
                    LaunchFtdiDriverInstaller();
                }
                catch (Exception)
                {
                    driverInstallMessage = "Unable to launch FTDI VCP driver installer. Download and install the driver directly from FTDI.";
                    INTV.Shared.View.OSMessageBox.Show(driverInstallMessage, Resources.Strings.LaunchFtdiDriverInstallerCommand_PromptTitle);
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// Creates an instance of the dialog.
        /// </summary>
        /// <returns>The dialog instance.</returns>
        public static PromptToInstallFtdiDriverDialog Create()
        {
            var dialog = new PromptToInstallFtdiDriverDialog();

            return(dialog);
        }