private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("图片1不能为空"); return; } if (textBox2.Text == "") { MessageBox.Show("保存文件不能为空"); return; } if (textBox3.Text == "") { var generator = new VTFGenerator(textBox1.Text, textBox2.Text); generator.ProcessProgress += process_process; generator.ProcessingComplete += process_comlete; generator.Process(checkBox1.Checked); } else { var generator = new VTFGenerator(textBox1.Text, textBox3.Text, textBox2.Text); generator.ProcessProgress += process_process; generator.ProcessingComplete += process_comlete; generator.Process(checkBox1.Checked); } }
public void Animation_NoFading_Alpha_Stripes() { const string testInputFile = @"TestInputs\256_stripe_animated.gif"; const string actualOutputFile = @"ActualOutputs\256_alpha_stripe_animated.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(true); }
public void StaticImage_NoFading_Alpha_Stripes() { const string testInputFile = @"TestInputs\256_test_stripes.png"; const string actualOutputFile = @"ActualOutputs\256_alpha_stripes.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(true); }
public void StaticImage_NoFading_Alpha() { const string testInputFile = @"TestInputs\256_Static_NoAlpha.jpg"; const string actualOutputFile = @"ActualOutputs\256_Static_Alpha.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(true); }
public void WeirdSize() { const string testInputFile = @"TestInputs\510x510.gif"; const string actualOutputFile = @"ActualOutputs\weirdsize.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(false); }
public void StaticImage_Fading_NoAlpha() { const string smallInputFile = @"TestInputs\256_Static_NoAlpha.jpg"; const string bigInputFile = @"TestInputs\256_test_stripes.png"; const string actualOutputFile = @"ActualOutputs\256_Static_Fading_NoAlpha.vtf"; VTFGenerator generator = new VTFGenerator(smallInputFile, bigInputFile, actualOutputFile); generator.Process(false); }