/// <summary> /// Constructor for the form /// </summary> public BuildTools(Guid guid, Job job) { InitializeComponent(); _job = job; _googleAnalytics = new GoogleAnalytics(guid); _runner = new Runner(this, _job, _googleAnalytics); undoBT.Visible = false; progress.Visible = false; versionBox.SelectedIndex = 0; GetVersions(); // delegates _appendDelegate = AppendText; _appendRawDelegate = AppendRawText; _disableDelegate = Disable; _enableDelegate = Enable; _showProgressDelegate = ProgressShow; _hideProgressDelegate = ProgressHide; _indeterminateProgressDelegate = ProgressIndeterminate; _progressPercentDelegate = Progress; _updateVersionsDelegate = UpdateVersions; if (File.Exists(Program.CheckUpdate)) { string text = File.ReadAllText(Program.CheckUpdate); if (string.IsNullOrEmpty(text) || text.Trim().ToLower() == "false") { autoUpdateCB.Checked = false; } } Console.WriteLine(guid.ToString()); new Thread(delegate () { _googleAnalytics.SendEvent("Application", "Start"); }).Start(); }
/// <summary> /// Constructor for the form /// </summary> public BuildTools(Guid guid, Job job) { InitializeComponent(); _job = job; _googleAnalytics = new GoogleAnalytics(guid); _runner = new Runner(this, _job, _googleAnalytics); undoBT.Visible = false; progress.Visible = false; versionBox.SelectedIndex = 0; GetVersions(); // delegates _appendDelegate = AppendText; _appendRawDelegate = AppendRawText; _disableDelegate = Disable; _enableDelegate = Enable; _showProgressDelegate = ProgressShow; _hideProgressDelegate = ProgressHide; _indeterminateProgressDelegate = ProgressIndeterminate; _progressPercentDelegate = Progress; _updateVersionsDelegate = UpdateVersions; if (File.Exists(Program.CheckUpdate)) { string text = File.ReadAllText(Program.CheckUpdate); if (string.IsNullOrEmpty(text) || text.Trim().ToLower() == "false") { autoUpdateCB.Checked = false; } } Console.WriteLine(guid.ToString()); new Thread(delegate() { _googleAnalytics.SendEvent("Application", "Start"); }).Start(); }
/// <summary> /// Constructor for the worker class /// </summary> /// <param name="form">The GUI</param> /// <param name="job">Job Object</param> /// <param name="googleAnalytics">Google Analytics object</param> public Runner(BuildTools form, Job job, GoogleAnalytics googleAnalytics) { _form = form; _job = job; _googleAnalytics = googleAnalytics; }