-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathUsageDataRequest.cs
39 lines (33 loc) · 1.18 KB
/
UsageDataRequest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// This file is part of iRacingReplayDirector.
//
// Copyright 2016 Dean Netherton
// https://github.com/vipoo/iRacingReplayDirector.net
using iRacingSDK.Support;
using System;
using System.Windows.Forms;
namespace iRacingReplayDirector
{
partial class UsageDataRequest : Form
{
public UsageDataRequest()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Settings.Default.SendUsageData = this.sendUsageData.Checked;
Settings.Default.Save();
TraceInfo.WriteLine(Settings.Default.SendUsageData ? "User has accepted usage data submission" : "user has declined usage data submission");
this.Close();
}
private void UsageDataRequest_Load(object sender, EventArgs e)
{
var a = new Random().Next(int.MaxValue);
var b = new Random().Next(int.MaxValue);
var trackingId = (long)a * (long)int.MaxValue + (long)b;
Settings.Default.TrackingID = trackingId.ToString();
Settings.Default.Save();
this.trackingId.Text = Settings.Default.TrackingID;
}
}
}