コード例 #1
0
 private void mergeAllBtn_Click(object sender, EventArgs e)
 {
     if (Program.IsPathValid(Program.currentDir))
     {
         CropUtils.MergeAllDir();
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public static void CropTiles(TextBox wBox, TextBox hBox, ComboBox modeBox, bool delSrc)
 {
     CropUtils.TileDir(wBox.GetInt(), hBox.GetInt(), modeBox.SelectedIndex == 1, delSrc);
 }
コード例 #5
0
 public static void CropDivisible(ComboBox divisibleByBox, ComboBox gravBox, CheckBox expandBox)
 {
     CropUtils.CropDivisibleDir(divisibleByBox.GetInt(), GetGravity(gravBox.SelectedIndex), expandBox.Checked);
 }
コード例 #6
0
 public static void CropAbsolute(TextBox wBox, TextBox hBox, ComboBox gravBox)
 {
     CropUtils.CropAbsoluteDir(wBox.GetInt(), hBox.GetInt(), GetGravity(gravBox.SelectedIndex));
 }