private void timer1_Tick(object sender, EventArgs e) { this.ms += this.timer1.Interval; this.label3.Text = this.ms.ToString(); if (this.creator.Finished) { this.result = this.creator.Result; this.resultBox.Image = this.result; this.checkSavebuttonEnabled(); this.timer1.Stop(); this.creator = null; this.ms = 0; } }
private void createResultButton_Click(object sender, EventArgs e) { this.resultBox.Image = this.loading; bool alphaOnly = this.alphaOnlyToggle.Checked; Color minThreshold = this.minColorButton.BackColor; Color maxThreshold = this.maxColorButton.BackColor; bool tiled = this.tiledTextureToggle.Checked; double xScale = double.Parse(this.scaleX.Text); double yScale = double.Parse(this.scaleY.Text); this.creator = new Imagecreator(alphaOnly, minThreshold, maxThreshold, tiled, xScale, yScale, this.outline, this.texture); this.timer1.Start(); this.creator.Start(); }