#pragma once

#include "../Common/Resource.h"


// MechMind grabber parameters dialog
class MechMindParamDialog : public CDialog
{
public:
  MechMindParamDialog(std::string expMode, std::string expTime) : CDialog(IDD_MECHMIND_PARAMETERS),
    exposureMode(expMode), exposureTime(expTime)
  {}

protected:
  DECLARE_MESSAGE_MAP()

  virtual void DoDataExchange(CDataExchange* pDX)
  {
    DDX_Control(pDX, IDC_EDIT_EXPOSURE_MODE, expMode_ctrl);
    DDX_Control(pDX, IDC_EDIT_EXPOSURE_TIME, expTime_ctrl);
  }

  virtual BOOL OnInitDialog()
  {
    CDialog::OnInitDialog();

    expMode_ctrl.SetWindowText(CString(exposureMode.c_str()));
    expTime_ctrl.SetWindowText(CString(exposureTime.c_str()));

    return TRUE;
  }

  void OnOK()
  {
    CString str = _T("");

    expMode_ctrl.GetWindowTextW(str);
    exposureMode = CT2A(str.GetString());

    expTime_ctrl.GetWindowTextW(str);
    exposureTime = CT2A(str.GetString());

    CDialog::EndDialog(1);
  }

  CMFCEditBrowseCtrl expMode_ctrl, expTime_ctrl;

public:
  std::string exposureMode, exposureTime;
};

BEGIN_MESSAGE_MAP(MechMindParamDialog, CDialog)
END_MESSAGE_MAP()

