public MainWindow()
        {
            InitializeComponent();

            lvLogs.ItemsSource = _logEvents;

            LogExtensions.LogEvent          += OnLogEvent;
            UpdaterUtilities.UpdateResponse += UpdaterUtilities_UpdateResponse;

            var driverVersion = GeforceUtilities.GetDriverVersion();

            Logging.GetFileLogger().Log(Level.Info, $"Driver Version: {(driverVersion != null ? driverVersion.ToString() : "N/A")}");

            var gfeVersion = GeforceUtilities.GetGeForceExperienceVersion();

            Logging.GetFileLogger().Log(Level.Info, $"GeForce Experience Version: {(gfeVersion != null ? gfeVersion.ToString() : "N/A")}");

            CheckBackgroundTask();

            chkFileLogging.IsChecked    = Settings.Default.FileLogging;
            chkUpdates.IsChecked        = Settings.Default.StartupUpdate;
            cbTaskTrigger.SelectedIndex = Settings.Default.BackgroundTaskTrigger;

            if (Logging.IsReadOnly)
            {
                chkFileLogging.IsEnabled = false;
                chkFileLogging.Content  += $" ({Properties.Resources.Logging_disabled_on_read_only_device})";
            }

            if (Settings.Default.StartupUpdate)
            {
                btnUpdateCheck.IsEnabled = false;
                UpdaterUtilities.UpdateCheck(false);
            }

            var version = AppUtils.GetVersion();

            tbVersion.Inlines.Clear();
            tbVersion.Inlines.Add(new Run($"{Properties.Resources.Version} {version.ToString(ExtendedVersionFormatFlags.BuildString | ExtendedVersionFormatFlags.Truncated)} "));

            Title += $" v{version.ToString(ExtendedVersionFormatFlags.BuildString | ExtendedVersionFormatFlags.Truncated)} ";

            if (version.Commit != null)
            {
                var link = new Hyperlink(new Run(version.Commit.ToShorthandString()))
                {
                    NavigateUri = new Uri($"{Properties.Resources.GithubUrl}/commit/{AppUtils.GetVersion().Commit}")
                };
                link.RequestNavigate += Hyperlink_OnRequestNavigate;
                tbVersion.Inlines.Add(link);
            }

#if PORTABLE
            Title += $" ({Properties.Resources.Portable})";
#endif
        }
        public FormMain()
        {
            InitializeComponent();

            _tasksControl = new TelemetryControl("Telemetry Tasks")
            {
                Dock = DockStyle.Top
            };
            _tasksControl.CheckStateChanged += telemControl_CheckStateChanged;
            tabPage1.Controls.Add(_tasksControl);
            _servicesControl = new TelemetryControl("Telemetry Services")
            {
                Dock = DockStyle.Top
            };
            _servicesControl.CheckStateChanged += telemControl_CheckStateChanged;
            tabPage1.Controls.Add(_servicesControl);

            txtLicense.Text = Resources.ApplicationLicense;

            LogExtensions.LogEvent          += OnLogEvent;
            UpdaterUtilities.UpdateResponse += UpdaterUtilities_UpdateResponse;

            CheckBackgroundTask();

            chkFileLogging.Checked      = Settings.Default.FileLogging;
            chkUpdates.Checked          = Settings.Default.StartupUpdate;
            cbTaskTrigger.SelectedIndex = Settings.Default.BackgroundTaskTrigger;

            if (Settings.Default.StartupUpdate)
            {
                btnUpdatecheck.Enabled = false;
                UpdaterUtilities.UpdateCheck(false);
            }

            var version = GetVersion();

            lblVersion.Text     = $"{"Version"} {version.ToString(ExtendedVersionFormatFlags.BuildString | ExtendedVersionFormatFlags.CommitShort | ExtendedVersionFormatFlags.Truncated)}";
            lblVersion.LinkArea = version.Commit != null ? new LinkArea(lblVersion.Text.Length - version.Commit.ToShorthandString().Length, version.Commit.ToShorthandString().Length) : new LinkArea(0, 0);
        }
 private void btnUpdatecheck_Click(object sender, RoutedEventArgs e)
 {
     btnUpdateCheck.IsEnabled = false;
     UpdaterUtilities.UpdateCheck(true);
 }