mirror of
https://github.com/4sval/FModel.git
synced 2026-03-29 05:05:33 -05:00
Simplify Settings & UpdateModeSettings
This commit is contained in:
parent
2a17fbfc80
commit
987b812c1f
|
|
@ -33,51 +33,32 @@ namespace FModel.Forms
|
|||
checkBox_tryToOpen.Checked = Properties.Settings.Default.tryToOpenAssets;
|
||||
|
||||
//MERGER
|
||||
textBox3.Text = Properties.Settings.Default.mergerFileName;
|
||||
checkBoxSaveAsMergeImages.Checked = Properties.Settings.Default.mergerImagesSaveAs;
|
||||
imgsPerRow.Value = Properties.Settings.Default.mergerImagesRow;
|
||||
textBox3.Text = Properties.Settings.Default.mergerFileName;
|
||||
checkBoxSaveAsMergeImages.Checked = Properties.Settings.Default.mergerImagesSaveAs;
|
||||
imgsPerRow.Value = Properties.Settings.Default.mergerImagesRow;
|
||||
|
||||
//WATERMARK
|
||||
button1.Enabled = Properties.Settings.Default.isWatermark;
|
||||
checkBox7.Checked = Properties.Settings.Default.isWatermark;
|
||||
trackBar1.Enabled = Properties.Settings.Default.isWatermark;
|
||||
trackBar2.Enabled = Properties.Settings.Default.isWatermark;
|
||||
trackBar1.Value = Properties.Settings.Default.wOpacity;
|
||||
trackBar2.Value = Properties.Settings.Default.wSize;
|
||||
button1.Enabled = Properties.Settings.Default.isWatermark;
|
||||
checkBox7.Checked = Properties.Settings.Default.isWatermark;
|
||||
trackBar1.Enabled = Properties.Settings.Default.isWatermark;
|
||||
trackBar2.Enabled = Properties.Settings.Default.isWatermark;
|
||||
trackBar1.Value = Properties.Settings.Default.wOpacity;
|
||||
trackBar2.Value = Properties.Settings.Default.wSize;
|
||||
|
||||
//FEATURED
|
||||
checkBox8.Checked = Properties.Settings.Default.loadFeaturedImage;
|
||||
if (!Properties.Settings.Default.loadFeaturedImage)
|
||||
if (File.Exists(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
if (File.Exists(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.wOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize), (522 - Properties.Settings.Default.wSize) / 2, (522 - Properties.Settings.Default.wSize) / 2, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.wOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize), (522 - Properties.Settings.Default.wSize) / 2, (522 - Properties.Settings.Default.wSize) / 2, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (Properties.Settings.Default.loadFeaturedImage)
|
||||
{
|
||||
if (File.Exists(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.wOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize), (522 - Properties.Settings.Default.wSize) / 2, (522 - Properties.Settings.Default.wSize) / 2, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
_oldLanguage = Properties.Settings.Default.IconLanguage;
|
||||
|
|
@ -107,32 +88,26 @@ namespace FModel.Forms
|
|||
MessageBox.Show(@"Please, restart FModel to apply your new output path", @"FModel Output Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
Properties.Settings.Default.eEmail = textBox4.Text;
|
||||
Properties.Settings.Default.ePassword = textBox5.Text;
|
||||
Properties.Settings.Default.eEmail = textBox4.Text;
|
||||
Properties.Settings.Default.ePassword = textBox5.Text;
|
||||
|
||||
Properties.Settings.Default.challengesDebug = checkBox2.Checked;
|
||||
Properties.Settings.Default.challengesDebug = checkBox2.Checked;
|
||||
Properties.Settings.Default.challengesWatermark = textBox6.Text;
|
||||
|
||||
Properties.Settings.Default.tryToOpenAssets = checkBox_tryToOpen.Checked;
|
||||
Properties.Settings.Default.tryToOpenAssets = checkBox_tryToOpen.Checked;
|
||||
|
||||
//MERGER
|
||||
Properties.Settings.Default.mergerFileName = textBox3.Text;
|
||||
Properties.Settings.Default.mergerImagesSaveAs = checkBoxSaveAsMergeImages.Checked;
|
||||
Properties.Settings.Default.mergerImagesRow = Decimal.ToInt32(imgsPerRow.Value);
|
||||
Properties.Settings.Default.mergerFileName = textBox3.Text;
|
||||
Properties.Settings.Default.mergerImagesSaveAs = checkBoxSaveAsMergeImages.Checked;
|
||||
Properties.Settings.Default.mergerImagesRow = Decimal.ToInt32(imgsPerRow.Value);
|
||||
|
||||
//WATERMARK
|
||||
if (checkBox7.Checked)
|
||||
Properties.Settings.Default.isWatermark = true;
|
||||
if (checkBox7.Checked == false)
|
||||
Properties.Settings.Default.isWatermark = false;
|
||||
Properties.Settings.Default.wSize = trackBar2.Value;
|
||||
Properties.Settings.Default.wOpacity = trackBar1.Value;
|
||||
Properties.Settings.Default.isWatermark = checkBox7.Checked;
|
||||
Properties.Settings.Default.wSize = trackBar2.Value;
|
||||
Properties.Settings.Default.wOpacity = trackBar1.Value;
|
||||
|
||||
//FEATURED
|
||||
if (checkBox8.Checked)
|
||||
Properties.Settings.Default.loadFeaturedImage = true;
|
||||
if (checkBox8.Checked == false)
|
||||
Properties.Settings.Default.loadFeaturedImage = false;
|
||||
Properties.Settings.Default.loadFeaturedImage = checkBox8.Checked;
|
||||
|
||||
//LOCRES
|
||||
Properties.Settings.Default.IconLanguage = comboBox1.SelectedItem.ToString();
|
||||
|
|
@ -159,34 +134,16 @@ namespace FModel.Forms
|
|||
Properties.Settings.Default.Save();
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
if (checkBox8.Checked == false)
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -195,86 +152,41 @@ namespace FModel.Forms
|
|||
#region RESIZE WATERMARK
|
||||
private void trackBar2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox8.Checked == false)
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
private void trackBar1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox8.Checked == false)
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void checkBox7_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox7.Checked == false)
|
||||
{
|
||||
button1.Enabled = false;
|
||||
trackBar1.Enabled = false;
|
||||
trackBar2.Enabled = false;
|
||||
}
|
||||
if (checkBox7.Checked)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
trackBar1.Enabled = true;
|
||||
trackBar2.Enabled = true;
|
||||
}
|
||||
button1.Enabled = checkBox7.Checked;
|
||||
trackBar1.Enabled = checkBox7.Checked;
|
||||
trackBar2.Enabled = checkBox7.Checked;
|
||||
}
|
||||
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e)
|
||||
|
|
@ -320,16 +232,8 @@ namespace FModel.Forms
|
|||
|
||||
private void CheckBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox1.Checked)
|
||||
{
|
||||
textBox4.UseSystemPasswordChar = false;
|
||||
textBox5.UseSystemPasswordChar = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox4.UseSystemPasswordChar = true;
|
||||
textBox5.UseSystemPasswordChar = true;
|
||||
}
|
||||
textBox4.UseSystemPasswordChar = !checkBox1.Checked;
|
||||
textBox5.UseSystemPasswordChar = !checkBox1.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
|
@ -21,37 +21,18 @@ namespace FModel.Forms
|
|||
|
||||
//FEATURED
|
||||
checkBox8.Checked = Properties.Settings.Default.UMFeatured;
|
||||
if (Properties.Settings.Default.UMFeatured == false)
|
||||
if (File.Exists(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
if (File.Exists(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.UMOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize), (522 - Properties.Settings.Default.UMSize) / 2, (522 - Properties.Settings.Default.UMSize) / 2, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.UMOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize), (522 - Properties.Settings.Default.UMSize) / 2, (522 - Properties.Settings.Default.UMSize) / 2, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (Properties.Settings.Default.UMFeatured)
|
||||
{
|
||||
if (File.Exists(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.UMOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize), (522 - Properties.Settings.Default.UMSize) / 2, (522 - Properties.Settings.Default.UMSize) / 2, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
//WATERMARK
|
||||
|
|
@ -75,69 +56,24 @@ namespace FModel.Forms
|
|||
|
||||
private void optionsOKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox2.Checked)
|
||||
Properties.Settings.Default.UMCosmetics = true;
|
||||
if (checkBox2.Checked == false)
|
||||
Properties.Settings.Default.UMCosmetics = false;
|
||||
if (checkBox5.Checked)
|
||||
Properties.Settings.Default.UMVariants = true;
|
||||
if (checkBox5.Checked == false)
|
||||
Properties.Settings.Default.UMVariants = false;
|
||||
if (checkBox3.Checked)
|
||||
Properties.Settings.Default.UMConsumablesWeapons = true;
|
||||
if (checkBox3.Checked == false)
|
||||
Properties.Settings.Default.UMConsumablesWeapons = false;
|
||||
if (checkBox4.Checked)
|
||||
Properties.Settings.Default.UMTraps = true;
|
||||
if (checkBox4.Checked == false)
|
||||
Properties.Settings.Default.UMTraps = false;
|
||||
if (checkBox6.Checked)
|
||||
Properties.Settings.Default.UMChallenges = true;
|
||||
if (checkBox6.Checked == false)
|
||||
Properties.Settings.Default.UMChallenges = false;
|
||||
if (checkBox8.Checked)
|
||||
Properties.Settings.Default.UMFeatured = true;
|
||||
if (checkBox8.Checked == false)
|
||||
Properties.Settings.Default.UMFeatured = false;
|
||||
if (checkBox7.Checked)
|
||||
Properties.Settings.Default.UMWatermark = true;
|
||||
if (checkBox7.Checked == false)
|
||||
Properties.Settings.Default.UMWatermark = false;
|
||||
if (checkBox9.Checked)
|
||||
Properties.Settings.Default.UMTCosmeticsVariants = true;
|
||||
if (checkBox9.Checked == false)
|
||||
Properties.Settings.Default.UMTCosmeticsVariants = false;
|
||||
if (checkBox14.Checked)
|
||||
Properties.Settings.Default.UMTLoading = true;
|
||||
if (checkBox14.Checked == false)
|
||||
Properties.Settings.Default.UMTLoading = false;
|
||||
if (checkBox1.Checked)
|
||||
Properties.Settings.Default.UMTWeapons = true;
|
||||
if (checkBox1.Checked == false)
|
||||
Properties.Settings.Default.UMTWeapons = false;
|
||||
if (checkBox10.Checked)
|
||||
Properties.Settings.Default.UMTBanners = true;
|
||||
if (checkBox10.Checked == false)
|
||||
Properties.Settings.Default.UMTBanners = false;
|
||||
if (checkBox11.Checked)
|
||||
Properties.Settings.Default.UMTFeaturedIMGs = true;
|
||||
if (checkBox11.Checked == false)
|
||||
Properties.Settings.Default.UMTFeaturedIMGs = false;
|
||||
if (checkBox12.Checked)
|
||||
Properties.Settings.Default.UMTAthena = true;
|
||||
if (checkBox12.Checked == false)
|
||||
Properties.Settings.Default.UMTAthena = false;
|
||||
if (checkBox13.Checked)
|
||||
Properties.Settings.Default.UMTDevices = true;
|
||||
if (checkBox13.Checked == false)
|
||||
Properties.Settings.Default.UMTDevices = false;
|
||||
if (checkBox15.Checked)
|
||||
Properties.Settings.Default.UMTVehicles = true;
|
||||
if (checkBox15.Checked == false)
|
||||
Properties.Settings.Default.UMTVehicles = false;
|
||||
Properties.Settings.Default.UMCosmetics = checkBox2.Checked;
|
||||
Properties.Settings.Default.UMVariants = checkBox5.Checked;
|
||||
Properties.Settings.Default.UMConsumablesWeapons = checkBox3.Checked;
|
||||
Properties.Settings.Default.UMTraps = checkBox4.Checked;
|
||||
Properties.Settings.Default.UMChallenges = checkBox6.Checked;
|
||||
Properties.Settings.Default.UMFeatured = checkBox8.Checked;
|
||||
Properties.Settings.Default.UMWatermark = checkBox7.Checked;
|
||||
Properties.Settings.Default.UMTCosmeticsVariants = checkBox9.Checked;
|
||||
Properties.Settings.Default.UMTLoading = checkBox14.Checked;
|
||||
Properties.Settings.Default.UMTWeapons = checkBox1.Checked;
|
||||
Properties.Settings.Default.UMTBanners = checkBox10.Checked;
|
||||
Properties.Settings.Default.UMTFeaturedIMGs = checkBox11.Checked;
|
||||
Properties.Settings.Default.UMTAthena = checkBox12.Checked;
|
||||
Properties.Settings.Default.UMTDevices = checkBox13.Checked;
|
||||
Properties.Settings.Default.UMTVehicles = checkBox15.Checked;
|
||||
|
||||
Properties.Settings.Default.UMSize = trackBar2.Value;
|
||||
Properties.Settings.Default.UMOpacity = trackBar1.Value;
|
||||
Properties.Settings.Default.UMSize = trackBar2.Value;
|
||||
Properties.Settings.Default.UMOpacity = trackBar1.Value;
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
Close();
|
||||
|
|
@ -157,33 +93,16 @@ namespace FModel.Forms
|
|||
Properties.Settings.Default.Save();
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
if (checkBox8.Checked == false)
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -192,114 +111,55 @@ namespace FModel.Forms
|
|||
#region RESIZE WATERMARK
|
||||
private void trackBar2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox8.Checked == false)
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
private void trackBar1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox8.Checked == false)
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void checkBox7_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox7.Checked == false)
|
||||
{
|
||||
button1.Enabled = false;
|
||||
trackBar1.Enabled = false;
|
||||
trackBar2.Enabled = false;
|
||||
}
|
||||
if (checkBox7.Checked)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
trackBar1.Enabled = true;
|
||||
trackBar2.Enabled = true;
|
||||
}
|
||||
button1.Enabled = checkBox7.Checked;
|
||||
trackBar1.Enabled = checkBox7.Checked;
|
||||
trackBar2.Enabled = checkBox7.Checked;
|
||||
}
|
||||
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox8.Checked == false)
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
}
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
#region MOVE PANEL
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user