private void mergeAllBtn_Click(object sender, EventArgs e) { if (Program.IsPathValid(Program.currentDir)) { CropUtils.MergeAllDir(); } }
public static void CropRelative(TextBox minSizeBox, TextBox maxSizeBox, ComboBox sizeModeBox, ComboBox gravBox) { int minSize = minSizeBox.GetInt(); int maxSize = minSize; if (!string.IsNullOrWhiteSpace(maxSizeBox.Text)) { maxSize = maxSizeBox.GetInt(); } Gravity grav = GetGravity(gravBox.SelectedIndex); CropUtils.SizeMode sizeMode = CropUtils.SizeMode.Percentage; if (sizeModeBox.SelectedIndex == 1) { sizeMode = CropUtils.SizeMode.Height; } if (sizeModeBox.SelectedIndex == 2) { sizeMode = CropUtils.SizeMode.Width; } if (sizeModeBox.SelectedIndex == 3) { sizeMode = CropUtils.SizeMode.Longer; } if (sizeModeBox.SelectedIndex == 4) { sizeMode = CropUtils.SizeMode.Shorter; } CropUtils.CropRelativeDir(minSize, maxSize, sizeMode, grav); }
public static void CropPadding(TextBox pixMinBox, TextBox pixMaxBox, ComboBox modeBox) { int pixMin = pixMinBox.GetInt(); int pixMax = pixMin; if (!string.IsNullOrWhiteSpace(pixMaxBox.Text)) { pixMax = pixMaxBox.GetInt(); } CropUtils.CropPaddingDir(pixMin, pixMax, modeBox.SelectedIndex == 1); }
public static void CropTiles(TextBox wBox, TextBox hBox, ComboBox modeBox, bool delSrc) { CropUtils.TileDir(wBox.GetInt(), hBox.GetInt(), modeBox.SelectedIndex == 1, delSrc); }
public static void CropDivisible(ComboBox divisibleByBox, ComboBox gravBox, CheckBox expandBox) { CropUtils.CropDivisibleDir(divisibleByBox.GetInt(), GetGravity(gravBox.SelectedIndex), expandBox.Checked); }
public static void CropAbsolute(TextBox wBox, TextBox hBox, ComboBox gravBox) { CropUtils.CropAbsoluteDir(wBox.GetInt(), hBox.GetInt(), GetGravity(gravBox.SelectedIndex)); }