internal void SetSliderStop(uiImageTrackbar.TrackbarColorType tct) { switch (tct) { case uiImageTrackbar.TrackbarColorType.Red: if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Gamma((iRedSlider - m_frmMain.itRed.tbMain.Value) * 1, 1, 1); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add((iRedSlider - m_frmMain.itRed.tbMain.Value) * 1); ArgList.Add(1); ArgList.Add(1); m_Controller.Automation_AddOperation(Constants.Operations.Gamma, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add((iRedSlider - m_frmMain.itRed.tbMain.Value) * 1); ArgList.Add(1); ArgList.Add(1); bmpOutput = m_Controller.BatchOp(Constants.Operations.Gamma, ArgList); } iRedSlider = m_frmMain.itRed.tbMain.Value; break; case uiImageTrackbar.TrackbarColorType.Blue: if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Gamma(1, 1, (iBlueSlider - m_frmMain.itBlue.tbMain.Value) * 1); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(1); ArgList.Add(1); ArgList.Add((iBlueSlider - m_frmMain.itBlue.tbMain.Value) * 1); m_Controller.Automation_AddOperation(Constants.Operations.Gamma, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(1); ArgList.Add(1); ArgList.Add((iBlueSlider - m_frmMain.itBlue.tbMain.Value) * 1); bmpOutput = m_Controller.BatchOp(Constants.Operations.Gamma, ArgList); } break; case uiImageTrackbar.TrackbarColorType.Green: if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Gamma(1, (iGreenSlider - m_frmMain.itGreen.tbMain.Value) * 1, 1); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(1); ArgList.Add((iGreenSlider - m_frmMain.itGreen.tbMain.Value) * 1); ArgList.Add(1); m_Controller.Automation_AddOperation(Constants.Operations.Gamma, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(1); ArgList.Add((iGreenSlider - m_frmMain.itGreen.tbMain.Value) * 1); ArgList.Add(1); bmpOutput = m_Controller.BatchOp(Constants.Operations.Gamma, ArgList); } break; case uiImageTrackbar.TrackbarColorType.Hue: if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Hue(m_frmMain.itHue.tbMain.Value - iHueSlider); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(m_frmMain.itHue.tbMain.Value - iHueSlider); m_Controller.Automation_AddOperation(Constants.Operations.Hue, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(m_frmMain.itHue.tbMain.Value - iHueSlider); bmpOutput = m_Controller.BatchOp(Constants.Operations.Hue, ArgList); } break; case uiImageTrackbar.TrackbarColorType.Luminosity: if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Luminosity((m_frmMain.itLuminosity.tbMain.Value - iLumSlider) * 0.01f); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add((m_frmMain.itLuminosity.tbMain.Value - iLumSlider) * 0.01f); m_Controller.Automation_AddOperation(Constants.Operations.Luminosity, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add((m_frmMain.itLuminosity.tbMain.Value - iLumSlider) * 0.01f); bmpOutput = m_Controller.BatchOp(Constants.Operations.Luminosity, ArgList); } break; case uiImageTrackbar.TrackbarColorType.Saturation: if (m_frmMain.rbDoSingle.Checked) { bmpOutput = m_Controller.Saturation(((m_frmMain.itSaturation.tbMain.Value - iSatSlider) * 0.1f)); } else if (m_frmMain.rbAddToAuto.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(((m_frmMain.itSaturation.tbMain.Value - iSatSlider) * 0.1f)); m_Controller.Automation_AddOperation(Constants.Operations.Saturation, ArgList); } else if (m_frmMain.rbBatch.Checked) { List <object> ArgList = new List <object>(); ArgList.Add(((m_frmMain.itSaturation.tbMain.Value - iSatSlider) * 0.1f)); bmpOutput = m_Controller.BatchOp(Constants.Operations.Saturation, ArgList); } break; case uiImageTrackbar.TrackbarColorType.Brightness: break; default: break; } }
internal void SetSliderStop(uiImageTrackbar.TrackbarColorType tct) { switch (tct) { case uiImageTrackbar.TrackbarColorType.Red: if (!m_bAutoMode) { bmpOutput = m_Controller.Gamma((iRedSlider - m_frmMain.itRed.tbMain.Value) * 1, 1, 1); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Red"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add((iRedSlider - m_frmMain.itRed.tbMain.Value) * 1); ArgList.Add(1); ArgList.Add(1); m_Controller.Automation_AddOperation(Constants.Operations.Gamma, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Red"); } iRedSlider = m_frmMain.itRed.tbMain.Value; break; case uiImageTrackbar.TrackbarColorType.Blue: if (!m_bAutoMode) { bmpOutput = m_Controller.Gamma(1, 1, (iBlueSlider - m_frmMain.itBlue.tbMain.Value) * 1); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Blue"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add(1); ArgList.Add(1); ArgList.Add((iBlueSlider - m_frmMain.itBlue.tbMain.Value) * 1); m_Controller.Automation_AddOperation(Constants.Operations.Gamma, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Blue"); } break; case uiImageTrackbar.TrackbarColorType.Green: if (!m_bAutoMode) { bmpOutput = m_Controller.Gamma(1, (iGreenSlider - m_frmMain.itGreen.tbMain.Value) * 1, 1); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Green"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add(1); ArgList.Add((iGreenSlider - m_frmMain.itGreen.tbMain.Value) * 1); ArgList.Add(1); m_Controller.Automation_AddOperation(Constants.Operations.Gamma, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Green"); } break; case uiImageTrackbar.TrackbarColorType.Hue: if (!m_bAutoMode) { bmpOutput = m_Controller.Hue(m_frmMain.itHue.tbMain.Value - iHueSlider); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Hue"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add(m_frmMain.itHue.tbMain.Value - iHueSlider); m_Controller.Automation_AddOperation(Constants.Operations.Hue, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Hue"); } break; case uiImageTrackbar.TrackbarColorType.Luminosity: if (!m_bAutoMode) { bmpOutput = m_Controller.Luminosity((m_frmMain.itLuminosity.tbMain.Value - iLumSlider) * 0.01f); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Luminosity"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add((m_frmMain.itLuminosity.tbMain.Value - iLumSlider) * 0.01f); m_Controller.Automation_AddOperation(Constants.Operations.Luminosity, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Luminosity"); } break; case uiImageTrackbar.TrackbarColorType.Saturation: if (!m_bAutoMode) { bmpOutput = m_Controller.Saturation(((m_frmMain.itSaturation.tbMain.Value - iSatSlider) * 0.1f)); m_frmMain.tlImageHistory.AddElement(new Bitmap(1, 1), "Saturation"); } else if (m_bAutoMode) { List <object> ArgList = new List <object>(); ArgList.Add(((m_frmMain.itSaturation.tbMain.Value - iSatSlider) * 0.1f)); m_Controller.Automation_AddOperation(Constants.Operations.Saturation, ArgList); m_frmMain.tlAutomationActions.AddElement(new Bitmap(1, 1), "Saturation"); } break; case uiImageTrackbar.TrackbarColorType.Brightness: break; default: break; } }