コード例 #1
0
ファイル: BuildTools.cs プロジェクト: 0uti/BuildToolsGUI
        /// <summary>
        /// Constructor for the form
        /// </summary>
        public BuildTools(Guid guid, Job job)
        {
            InitializeComponent();
            _job             = job;
            _runner          = new Runner(this, _job);
            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());
        }
コード例 #2
0
ファイル: BuildTools.cs プロジェクト: DemonWav/BuildToolsGUI
        /// <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();
        }