Ejemplo n.º 1
0
void DlgConfigGas::DoCtrlUpdate()
{
  parameters.SetForFlags();
  sequence.SetForFlags();

  CheckRestrictions();
}
Ejemplo n.º 2
0
bool TabbedFolderNodeParameter::CreateNode(CWnd* pParentWnd)
{
  parameters.SetForFlags(); // Before InitDialog i.e. UpdateData
  bool bRc = TabbedFolderNode1::CreateNode(pParentWnd);
  CheckRestrictions();
  return bRc;
}
Ejemplo n.º 3
0
void DlgOutputFileSetupmView::ResetAllControls()
{
  m_uwriteFile.DoCtrlReset();
  m_ugeomFileName.DoCtrlReset();
  m_upropFileName.DoCtrlReset();
  CheckRestrictions();
}
Ejemplo n.º 4
0
bool TabbedFolderNodeOutputFileSetup::CreateNode(CWnd* pParentWnd)
{
  bool bRc = TabbedFolderNode::CreateNode(pParentWnd);

  CheckRestrictions();

  return bRc;
}
Ejemplo n.º 5
0
CWnd* TabbedFolderNodeOutputFileSetup::ShowNode(bool bShow, CRect* pRect)
{
  CWnd* pWnd = TabbedFolderNode::ShowNode(bShow, pRect);

  if (bShow) {
    CheckRestrictions();
  }

  return pWnd;
}
Ejemplo n.º 6
0
BOOL DlgOutputFileSetupStandard::OnInitDialog()
{
  DlgOutputFileSetupBase::OnInitDialog();

  //  convoluted to get arround internal compiler error
  XYForwardOutputFO& temp = xyForwardOutputFO;
  m_uFOdata.Set(this, IDC_COMBO2, temp.xyDataArrayObjRef);

  CheckRestrictions();
  return TRUE;
}
Ejemplo n.º 7
0
void DlgOutputFileSetupProfile::ResetAllControls()
{
    DlgOutputFileSetupBase::ResetAllControls();

    SC_StringArray seqIDs;
    sequence.GetSequenceIDs(seqIDs);
    m_ustartSeq.NewStrings(seqIDs);
    m_uendSeq.NewStrings(seqIDs);

    CheckRestrictions();
}
Ejemplo n.º 8
0
BOOL CSampVarUnitsDlg::OnInitDialog()
{
  // initialize members
  m_svDistribution  = m_sampVarUnits.svDistribution;

  m_distMean.InitVal(m_sampVarUnits.unitIndex, m_sampVarUnits.distMean);
  m_distStdDev.InitVal(m_sampVarUnits.unitIndex, m_sampVarUnits.distStdDev);
  m_distPeak.InitVal(m_sampVarUnits.unitIndex, m_sampVarUnits.distPeak);
  m_distMin.InitVal(m_sampVarUnits.unitIndex, m_sampVarUnits.distMin);
  m_distMax.InitVal(m_sampVarUnits.unitIndex, m_sampVarUnits.distMax);
  m_distLogStdDev = m_sampVarUnits.distLogStdDev ;

  //  set up ctrls
  SC_StringArray sampStrs;
  SampleDistributionBase::GetDistStrings(sampStrs);

  m_usvDistribution.AddMappedEntry(sampStrs[int(SampleDistributionBase::svdNormal)], SampleDistributionBase::svdNormal);
  m_usvDistribution.AddMappedEntry(sampStrs[int(SampleDistributionBase::svdLogNormal)], SampleDistributionBase::svdLogNormal);
  m_usvDistribution.AddMappedEntry(sampStrs[int(SampleDistributionBase::svdUniform)], SampleDistributionBase::svdUniform);
  m_usvDistribution.AddMappedEntry(sampStrs[int(SampleDistributionBase::svdLogUniform)], SampleDistributionBase::svdLogUniform);
  m_usvDistribution.AddMappedEntry(sampStrs[int(SampleDistributionBase::svdTriangular)], SampleDistributionBase::svdTriangular);
  m_usvDistribution.AddMappedEntry(sampStrs[int(SampleDistributionBase::svdLogTriangular)], SampleDistributionBase::svdLogTriangular);

  m_usvDistribution.Set(this, IDC_COMBO1,  (int*) (&m_svDistribution));
  m_usvDistribution.AddCallback(this, 0);

  m_udistMean.Set(this, IDC_COMBO2, IDC_EDIT1, &m_distMean,
                  m_poverrideFormat, m_minMetricVal, m_maxMetricVal);
  m_udistMean.m_uIndexCtrl.AddCallback(this, 1);

  m_udistStdDev.Set(this, IDC_COMBO3, IDC_EDIT2, &m_distStdDev,
                    m_poverrideFormat, m_minMetricVal, m_maxMetricVal);

  m_udistLogStdDev.Set(this, IDC_EDIT3, m_distLogStdDev, SC_DecFormat(3), 0.001, 10.0);

  m_udistPeak.Set(this, IDC_COMBO4, IDC_EDIT4, &m_distPeak,
                  m_poverrideFormat, m_minMetricVal, m_maxMetricVal);
  m_udistPeak.m_uIndexCtrl.AddCallback(this, 2);


  m_udistMin.Set(this, IDC_COMBO5, IDC_EDIT5, &m_distMin,
                 m_poverrideFormat, m_minMetricVal, m_maxMetricVal);
  m_udistMin.m_uIndexCtrl.AddCallback(this, 3);

  m_udistMax.Set(this, IDC_COMBO6, IDC_EDIT6, &m_distMax,
                 m_poverrideFormat, m_minMetricVal, m_maxMetricVal);
  m_udistMin.m_uIndexCtrl.AddCallback(this, 4);

  CDialog::OnInitDialog();

  CheckRestrictions();

  return TRUE;
}
Ejemplo n.º 9
0
BOOL DlgOutputFileSetupProfile::OnInitDialog()
{
    DlgOutputFileSetupBase::OnInitDialog();

    m_ustartSeq.Set(this, IDC_COMBO2, &profileOutputDesc.startSeq);
    m_uendSeq.Set(this, IDC_COMBO3, &profileOutputDesc.endSeq);
    m_utimeStepModulus.Set(this, IDC_EDIT5, profileOutputDesc.timeStepModulus, 1, 10);
    m_uradiusNodeModulus.Set(this, IDC_EDIT6, profileOutputDesc.radiusNodeModulus, 1, 10);

    CheckRestrictions();
    return TRUE;
}
Ejemplo n.º 10
0
void DlgConfigMain::DoCtrlUpdate()
{
  control.SetConsistent();

  sequence.SetForFlags();
  parameters.SetForFlags();
  dataCapture.SetForFlags();
  outputFiles.SetForFlags();
  optimize.SetForFlags();

  CheckRestrictions();
}
Ejemplo n.º 11
0
void TabbedFolderNodeSampling::Show(int nIdent)
{
  CheckRestrictions();

  if (nIdent == SMPN_SamplingResults)
  {
    CWaitCursor w;
    sample.Sample();
  }

  TabbedFolderNode::Show(nIdent);

  if (nIdent == SMPN_CorrelationMatrix)
    m_aNode[SMPN_CorrelationMatrix]->CheckRestrictions();
}
Ejemplo n.º 12
0
void AutoFitUI::Set(CWnd* pParent, int& idStart)
{
    m_udoExtract.Set(pParent, idStart++, aSpec.doExtract);
    m_udoExtract.AddCallback(this);

    for (int i = 0; i < FitAutoSpec::maxSpec; i++)
    {
        m_udoSpec[i].Set(pParent, idStart++, aSpec.doSpec[i]);
        m_udoSpec[i].SetWindowText(aSpec.specID[i]);
        m_udoSpec[i].AddCallback(this);
    }

    categoryOK = true;

    CheckRestrictions();
}
Ejemplo n.º 13
0
BOOL DlgOutputFileSetupmView::OnInitDialog()
{
  CGenericDialog::OnInitDialog();

  m_uwriteFile.Set(this, IDC_CHECK1,  mviewOutputDesc.writeFile);
  m_uwriteFile.AddCallback(this);

  m_ugeomFileName.Set(this, IDC_EDIT1, IDC_BUTTON1, mviewOutputDesc.geomFileName,
                      "mView Geometry Files (*.mGEO)|*.mGEO|All Files (*.*)|*.*|||",
                      "mView geometry output file", "mGEO", false);

  m_upropFileName.Set(this, IDC_EDIT2, IDC_BUTTON2, mviewOutputDesc.propFileName,
                      "mView Property Files (*.mPRP)|*.mPRP|All Files (*.*)|*.*|||",
                      "mView property output file", "mPRP", false);


  CheckRestrictions();
  return TRUE;
}
Ejemplo n.º 14
0
CWnd* TabbedFolderNodeSequence::ShowNode(bool bShow, CRect* pRect)
{
  if (bShow)
  {
    sequence.SetForFlags();
    prevTimes = sequenceTimesFO.sequenceTimesDC.sequenceStartTimes;
    CheckRestrictions();
  }

  CWnd* pWnd = TabbedFolderNode::ShowNode(bShow, pRect);

  if (!bShow) {
    parameters.SetForFlags();
    sequence.SetSequenceTimes(false);
    sequenceTimesFO.DoStatusChk();
    if (!prevTimes.SameAs(sequenceTimesFO.sequenceTimesDC.sequenceStartTimes, 1.0E-06))
      nPreUtilities::ExecuteAndReplot(sequenceTimesFO);
  }

  return pWnd;
}
Ejemplo n.º 15
0
BOOL CAutoFitDlg::OnInitDialog()
{
    AutoFitCheckOK();

    m_uprocessTestZonePressureData.Set(this, IDC_AUTO_MAINPRESSURE, processTestZonePressureData);
    m_uprocessTestZonePressureData.AddCallback(this);

    m_uprocessTestZoneFlowData.Set(this, IDC_AUTO_MAINFLOW, processTestZoneFlowData);
    m_uprocessTestZoneFlowData.AddCallback(this);

    m_uprocessObsWellPressureData.Set(this, IDC_AUTO_OBSPRESSURE, processObsWellPressureData);
    m_uprocessObsWellPressureData.AddCallback(this);

    SC_StringArray dummy;
    obsOK = DataCaptureStaticSupport::GetWellIDs(dummy) && (dummy.Size() > 1);

    int idStart = IDC_CHECK1;

    m_ucartesianSpec.Set(this, idStart);
    m_ucartesianSpec.m_udoExtract.AddCallback(this);

    m_uflowSpec.Set(this, idStart);
    m_uflowSpec.m_udoExtract.AddCallback(this);

    m_uhistSpec.Set(this, idStart);
    m_uhistSpec.m_udoExtract.AddCallback(this);

    m_upulseSpec.Set(this, idStart);
    m_upulseSpec.m_udoExtract.AddCallback(this);

    m_uslugSpec.Set(this, idStart);
    m_uslugSpec.m_udoExtract.AddCallback(this);

    CDialog::OnInitDialog();

    CheckRestrictions();

    return TRUE;
}
Ejemplo n.º 16
0
void DlgVaryPriority::ResetAllControls()
{
    vary.SetForFlags();

    SC_StringArray newVaryPars;
    newVaryPars.SetStringLen(60);
    newVaryPars.Alloc(orderedVary.Size());
    for (int i = 0; i < orderedVary.Size(); i++)
        newVaryPars += orderedVary[i]->GetLongID();

    for (int j = 0; j < 3; j++)
    {
        m_varyPriority[j].ClearEntries();
        if (j < orderedVary.Size())
            m_varyPriority[j].AddBasicEntry(newVaryPars);
        m_varyPriority[j].ResetStrings();
        varyPriority[j] = j;
        m_varyPriority[j].ResetSelection();
    }

    CheckRestrictions();
}
Ejemplo n.º 17
0
void CSampVarUnitsDlg::DoCtrlUpdate(int reason)
{
  int newConvIndex = -1;
  switch (reason) {
  case 0 : {
    CheckRestrictions();
    return;
  }
  case 1 : {
    newConvIndex = m_distMean.GetConvIndex();
    break;
  }
  case 2 : {
    newConvIndex = m_distPeak.GetConvIndex();
    break;
  }
  case 3: {
    newConvIndex = m_distMin.GetConvIndex();
    break;
  }
  case 4: {
    newConvIndex = m_distMax.GetConvIndex();
    break;
  }


  default:
    break;
  }

  m_udistMean.DoUnitConvChange(newConvIndex);
  m_udistStdDev.DoUnitConvChange(newConvIndex);
  m_udistPeak.DoUnitConvChange(newConvIndex);
  m_udistMin.DoUnitConvChange(newConvIndex);
  m_udistMax.DoUnitConvChange(newConvIndex);
}
Ejemplo n.º 18
0
int CFieldHandler::CanPlace(int index, CStoneHandler::CStone *pStone)
{


    /*int x = index%FIELD_WIDTH;
    int y = (index-x)/FIELD_WIDTH;
    int temp = 0;
    int points = 0;
    if(!IsFree(index))
        return 0;   //field not empty

    int dirx = 0;
    int diry = 0;
    if(x > 0)
    {
        if(!IsFree(index-1))
            dirx = -1;
    }

    if(x < FIELD_WIDTH-1)
    {
        if(!IsFree(index+1))
        {
            if(dirx != 0) //dont allow chaining
                return 0;
            dirx = 1;
        }
    }

    if(y > 0)
    {
        if(!IsFree(index-FIELD_WIDTH))
            diry = -FIELD_WIDTH;
    }

    if(y < FIELD_HEIGHT-1)
    {
        if(!IsFree(index+FIELD_WIDTH))
        {
            if(diry != 0) //dont allow chaining
                return 0;
            diry = FIELD_WIDTH;
        }
    }


    for(int i = index; i < (y+1)*FIELD_WIDTH; i += dirx)
    {

    }*/
      if(!IsFree(index))
        return 0;   //field not empty
    if(CheckRestrictions(index) == false)
       return 0;
    int x = index%FIELD_WIDTH;
    int y = (index-x)/FIELD_WIDTH;
    int temp = 0;
    int points = 0;
    for(int i = x-1; i >= 0; --i)
    {
        if(IsFree(i+y*FIELD_WIDTH))
        {
            temp = i+1;
            break;
        }
    }
    unsigned short flags = 0;
    int num_colors = 0;
    int num_shapes = 0;
    int num = 0;
    bool gotNeighbours = false;
    for(int i = temp; i < FIELD_WIDTH; ++i)
    {

        if(num >= 6) //bereits 6 steine gelegt
            return 0;
        if(i == x)
            continue;

      //  if(i-temp >= 5)
        //   return 0;

        if(IsFree(i+y*FIELD_WIDTH))
            break;

        ++num;
         if(!(m_aField[i+y*FIELD_WIDTH].m_Flags & FIELD_COUNTED_X))
            points++;

        if(CStoneHandler::CheckShape(&m_aField[i+y*FIELD_WIDTH], pStone))
            ++num_shapes;
        if(CStoneHandler::CheckColor(&m_aField[i+y*FIELD_WIDTH], pStone))
            ++num_colors;

        if(num_shapes == 0 && (flags & (1<<m_aField[i+y*FIELD_WIDTH].m_pStone->m_Shape)))
        {
            return 0;
        }
        else
            flags |= (1<<m_aField[i+y*FIELD_WIDTH].m_pStone->m_Shape);

         if(num_colors == 0 && (flags & (64<<m_aField[i+y*FIELD_WIDTH].m_pStone->m_Color)))
        {
            return 0;
        }
        else
            flags |= (64<<m_aField[i+y*FIELD_WIDTH].m_pStone->m_Color);

    }

    if(num > 0)
    {
         if(!((num_shapes == 0 && num_colors == num) || (num_shapes == num && num_colors == 0)))
            return 0;
        gotNeighbours = true;
          points += 1;
        if(num == 5)
            points += 6;
    }


    temp = 0;
    flags = 0;
    for(int i = y-1; i >= 0; --i)
    {
        if(IsFree(x+i*FIELD_WIDTH))
        {
            temp = i+1;
            break;
        }
    }

    num_colors = 0;
    num_shapes = 0;
    num = 0;

    for(int i = temp; i < FIELD_HEIGHT; ++i)
    {
         if(num >= 6) //bereits 6 steine gelegt
            return 0;

        if(i == y)
            continue;

       // if(i-temp >= 5) //bereits 6 steine gelegt
       //    return 0;

        if(IsFree(x+i*FIELD_WIDTH))
            break;

        ++num;
        if(!(m_aField[x+i*FIELD_WIDTH].m_Flags & FIELD_COUNTED_Y))
            points++;

        if(CStoneHandler::CheckShape(&m_aField[x+i*FIELD_WIDTH], pStone))
            ++num_shapes;
        if(CStoneHandler::CheckColor(&m_aField[x+i*FIELD_WIDTH], pStone))
            ++num_colors;

        if(num_shapes == 0 && (flags & (1<<m_aField[x+i*FIELD_WIDTH].m_pStone->m_Shape)))
        {
            return 0;
        }
        else
            flags |= (1<<m_aField[x+i*FIELD_WIDTH].m_pStone->m_Shape);

         if(num_colors == 0 && (flags & (64<<m_aField[x+i*FIELD_WIDTH].m_pStone->m_Color)))
        {
            return 0;
        }
        else
            flags |= (64<<m_aField[x+i*FIELD_WIDTH].m_pStone->m_Color);
    }

     if(num > 0)
    {
         if(!((num_shapes == 0 && num_colors == num) || (num_shapes == num && num_colors == 0)))
            return 0;
        gotNeighbours = true;

         points ++;
        if(num == 5)
            points += 6;
    }


    if(!m_IsFirstMove && gotNeighbours)
        return points;
    else if(m_IsFirstMove) // we can lay wherever we want
        return points;
    else
        return 0;
   }
Ejemplo n.º 19
0
void DlgConfigUnits::ResetAllControls()
{
    for (int i = 0; i < maxUnitsCtrl; i++)
        m_unitCtrl[i].DoCtrlReset();
    CheckRestrictions();
}
Ejemplo n.º 20
0
void DlgOutputFileSetupProfile::DoCtrlUpdate()
{
    CheckRestrictions();
}
Ejemplo n.º 21
0
void CAutoFitDlg::DoCtrlUpdate()
{
    CheckRestrictions();
}
Ejemplo n.º 22
0
void AutoFitUI::DoCtrlUpdate()
{
    CheckRestrictions();
}
Ejemplo n.º 23
0
void DlgOutputFileSetupStandard::DoCtrlUpdate()
{
  CheckRestrictions();
}
Ejemplo n.º 24
0
void DlgOutputFileSetupStandard::ResetAllControls()
{
  DlgOutputFileSetupBase::ResetAllControls();
  m_uFOdata.ResetSelection();
  CheckRestrictions();
}
Ejemplo n.º 25
0
void DlgOutputFileSetupmView::DoCtrlUpdate()
{
  CheckRestrictions();
}
Ejemplo n.º 26
0
void DlgSamplingFOSM::DoCtrlUpdate()
{
    CheckRestrictions();
}