internal void Crop() { if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Crop(new Rectangle( Convert.ToInt32(m_frmMain.txtCropUL.Text), Convert.ToInt32(m_frmMain.txtCropUR.Text), Convert.ToInt32(m_frmMain.txtCropLL.Text), Convert.ToInt32(m_frmMain.txtCropLR.Text) )); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(new Rectangle( Convert.ToInt32(m_frmMain.txtCropUL.Text), Convert.ToInt32(m_frmMain.txtCropUR.Text), Convert.ToInt32(m_frmMain.txtCropLL.Text), Convert.ToInt32(m_frmMain.txtCropLR.Text) )); m_Controller.Automation_AddOperation(Constants.Operations.Crop, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(new Rectangle( Convert.ToInt32(m_frmMain.txtCropUL.Text), Convert.ToInt32(m_frmMain.txtCropUR.Text), Convert.ToInt32(m_frmMain.txtCropLL.Text), Convert.ToInt32(m_frmMain.txtCropLR.Text) )); bmpOutput = m_Controller.BatchOp(Constants.Operations.Crop, ArgList); } }
internal void Crop() { if (!m_bAutoMode) { bmpOutput = m_Controller.Crop(m_frmMain.mpbMain.CropBounds); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Resize"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add(m_frmMain.mpbMain.CropBounds); m_Controller.Automation_AddOperation(Constants.Operations.Crop, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Crop"); } }