123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758 |
- #include "StdAfx.h"
- #include "WeightScaleSensor.h"
- #include "antmessage.h"
- void WeightScaleSensor::ANT_eventNotification(UCHAR ucEventCode_, UCHAR* pucEventBuffer_)
- {
- switch(ucEventCode_)
- {
- case EVENT_TX:
- HandleTransmit((UCHAR*) pucEventBuffer_);
- break;
- case EVENT_RX_BROADCAST:
- HandleReceive((UCHAR*) pucEventBuffer_);
- break;
- case MESG_OPEN_CHANNEL_ID:
- AllowChangesProfile(FALSE);
- break;
- case MESG_CLOSE_CHANNEL_ID:
- AllowChangesProfile(TRUE);
- break;
- default:
- break;
- }
- }
- void WeightScaleSensor::InitializeSim()
- {
-
- wsPages->usBodyWeight100 = WeightScale::WEIGHT_COMPUTING;
- wsPages->usHydrationP100 = (USHORT) (this->numericUpDown_Hydration->Value * 100);
- wsPages->usBodyFatP100 = (USHORT) (this->numericUpDown_BodyFat->Value * 100);
- wsPages->usActiveMetRate4 = (USHORT) (this->numericUpDown_ActiveMetRate->Value * 4);
- wsPages->usBasalMetRate4= (USHORT) (this->numericUpDown_BasalMetRate->Value * 4);
- wsPages->usMuscleMass100 = (USHORT) (this->numericUpDown_MuscleMass->Value * 100);
- wsPages->ucBoneMass10 = (UCHAR) (this->numericUpDown_BoneMass->Value * 10);
-
- commonPages->usMfgID = System::Convert::ToUInt16(this->textboxMfgID->Text);
- commonPages->usModelNum = System::Convert::ToUInt16(this->textboxModelNum->Text);
- commonPages->ucHwVersion= System::Convert::ToByte(this->textboxHwVer->Text);
- commonPages->ucSwVersion = System::Convert::ToByte(this->textboxSwVer->Text);
- commonPages->ulSerialNum = System::Convert::ToUInt32(this->textboxSerialNum->Text);
-
- uprofUndef = gcnew WeightScaleUserProfile();
- uprofU1 = gcnew WeightScaleUserProfile((USHORT) 1, WeightScaleUserProfile::GENDER_MALE, (UCHAR) 47, (UCHAR) 170, WeightScaleUserProfile::ACTIVITY_LOW, WeightScaleUserProfile::PRIORITY_WATCH, WeightScaleUserProfile::NOT_ATHLETE);
- uprofU2 = gcnew WeightScaleUserProfile((USHORT) 5, WeightScaleUserProfile::GENDER_FEMALE, (UCHAR) 25, (UCHAR) 162, WeightScaleUserProfile::ACTIVITY_HIGH, WeightScaleUserProfile::PRIORITY_WATCH, WeightScaleUserProfile::IS_ATHLETE);
- uprofU3 = gcnew WeightScaleUserProfile((USHORT) 12, WeightScaleUserProfile::GENDER_MALE, (UCHAR) 8, (UCHAR) 117, WeightScaleUserProfile::ACTIVITY_CHILD, WeightScaleUserProfile::PRIORITY_WATCH, WeightScaleUserProfile::NOT_ATHLETE);
-
-
- bTxAdvanced = FALSE;
- bTxUserProfile = FALSE;
- bTxPage2 = TRUE;
- bTxPage3 = TRUE;
- bTxPage4 = TRUE;
- }
- void WeightScaleSensor::HandleTransmit(UCHAR* pucTxBuffer_)
- {
- static UCHAR ucMsgCount = 0;
- UCHAR ucPageNum = WeightScale::PAGE_BODY_WEIGHT;
- if(bTxAdvanced && wsPages->usBodyWeight100 < WeightScale::WEIGHT_COMPUTING)
- {
- if(ucMsgCount % 4 == 1 && bTxAdvanced && bTxPage2)
- ucPageNum = WeightScale::PAGE_BODY_COMPOSITION;
- if(ucMsgCount % 4 == 2 && bTxAdvanced && bTxPage3)
- ucPageNum = WeightScale::PAGE_METABOLIC_INFO;
- if(ucMsgCount % 4 == 3 && bTxAdvanced && bTxPage4)
- ucPageNum = WeightScale::PAGE_BODY_MASS;
- }
- if(ucMsgCount == (WeightScale::INTERVAL_COMMON-1))
- ucPageNum = CommonData::PAGE80;
- if(++ucMsgCount >= (WeightScale::INTERVAL_COMMON*2))
- {
- ucPageNum = CommonData::PAGE81;
- ucMsgCount = 0;
- }
- if(bTxUserProfile)
- {
- ucPageNum = WeightScale::PAGE_USER_PROFILE;
- bTxUserProfile = FALSE;
- }
- switch(ucPageNum)
- {
- case WeightScale::PAGE_BODY_WEIGHT:
- case WeightScale::PAGE_BODY_COMPOSITION:
- case WeightScale::PAGE_METABOLIC_INFO:
- case WeightScale::PAGE_BODY_MASS:
- case WeightScale::PAGE_USER_PROFILE:
- try
- {
- wsPages->Encode(ucPageNum, pucTxBuffer_);
- }
- catch(WeightScale::Error^ errorWeightScale)
- {
- }
- break;
- case CommonData::PAGE80:
- case CommonData::PAGE81:
- try
- {
- commonPages->Encode(ucPageNum, pucTxBuffer_);
- }
- catch(CommonData::Error^ errorCommon)
- {
- }
- break;
- default:
- break;
- }
- UpdateDisplay();
- }
- void WeightScaleSensor::HandleReceive(UCHAR* pucRxBuffer_)
- {
- UCHAR ucPageNum = pucRxBuffer_[0];
- if(ucPageNum == WeightScale::PAGE_USER_PROFILE)
- {
- try
- {
- wsPages->Decode(pucRxBuffer_);
- }
- catch(WeightScale::Error^ errorWeightScale)
- {
- }
- UpdateDisplayCapabilities();
- ProcessReceivedProfile();
- }
- }
- void WeightScaleSensor::ProcessReceivedProfile()
- {
- this->labelStatusProfileRx->Text = L"User Profile Received";
-
- wsPages->capabScale->bDisplayExchange = wsPages->capabDisplay->bDisplayExchange;
-
- if(wsPages->capabDisplay->bDisplayExchange)
- {
-
- if(wsPages->uprofDisplay->usID != WeightScaleUserProfile::PROFILE_UNDEF)
- {
-
-
-
- if(wsPages->uprofActive->usID == wsPages->uprofDisplay->usID)
- {
- this->labelStatusProfileMatch->Text = L"User Profile Match";
-
- if(!(WeightScaleUserProfile::isEqual(wsPages->uprofActive, wsPages->uprofDisplay)))
- this->labelStatusProfileUpdate->Text = L"User Profile Updated";
- }
- else
- {
- this->labelStatusProfileNew->Text = L"New User Profile";
- }
-
- WeightScaleUserProfile::copyProfile(wsPages->uprofDisplay, wsPages->uprofActive);
- UpdateDisplayActiveProfile();
- wsPages->capabScale->bScaleSet = TRUE;
- bTxAdvanced = TRUE;
- }
- else
- {
-
-
-
- if(wsPages->uprofActive->usID != WeightScaleUserProfile::PROFILE_UNDEF)
- {
-
- bTxUserProfile = TRUE;
- this->labelStatusProfileSent->Text = L"Sent User Profile";
-
- bTxAdvanced = TRUE;
- }
- }
- }
- }
- void WeightScaleSensor::UpdateDisplay()
- {
-
- if(wsPages->usBodyWeight100 == WeightScale::WEIGHT_COMPUTING)
- this->labelWeight->Text = "Comp";
- else if (wsPages->usBodyWeight100 == WeightScale::WEIGHT_INVALID)
- this->labelWeight->Text = "Invalid";
- else
- this->labelWeight->Text = System::Convert::ToString((double) wsPages->usBodyWeight100 / 100);
- this->labelProfileActive->Text = Convert::ToString(wsPages->uprofActive->usID);
- if(bTxPage2 && bTxAdvanced && wsPages->usBodyWeight100 < WeightScale::WEIGHT_COMPUTING)
- {
- if(wsPages->usHydrationP100 == WeightScale::WEIGHT_COMPUTING)
- this->label_Hydration->Text = "Comp";
- else if (wsPages->usHydrationP100 == WeightScale::WEIGHT_INVALID)
- this->label_Hydration->Text = "Invalid";
- else
- this->label_Hydration->Text = System::Convert::ToString((double) wsPages->usHydrationP100 / 100);
- if(wsPages->usBodyFatP100 == WeightScale::WEIGHT_COMPUTING)
- this->label_BodyFat->Text = "Comp";
- else if (wsPages->usBodyFatP100 == WeightScale::WEIGHT_INVALID)
- this->label_BodyFat->Text = "Invalid";
- else
- this->label_BodyFat->Text = System::Convert::ToString((double) wsPages->usBodyFatP100 / 100);
- }
- else
- {
- this->label_Hydration->Text = "---";
- this->label_BodyFat->Text = "---";
- }
- if(bTxPage3 && bTxAdvanced && wsPages->usBodyWeight100 < WeightScale::WEIGHT_COMPUTING)
- {
- if(wsPages->usActiveMetRate4 == WeightScale::WEIGHT_COMPUTING)
- this->label_ActiveMetRate->Text = "Comp";
- else if (wsPages->usActiveMetRate4 == WeightScale::WEIGHT_INVALID)
- this->label_ActiveMetRate->Text = "Invalid";
- else
- this->label_ActiveMetRate->Text = System::Convert::ToString((double) wsPages->usActiveMetRate4 / 4);
- if(wsPages->usBasalMetRate4 == WeightScale::WEIGHT_COMPUTING)
- this->label_BasalMetRate->Text = "Comp";
- else if (wsPages->usBasalMetRate4 == WeightScale::WEIGHT_INVALID)
- this->label_BasalMetRate->Text = "Invalid";
- else
- this->label_BasalMetRate->Text = System::Convert::ToString((double) wsPages->usBasalMetRate4 / 4);
- }
- else
- {
- this->label_ActiveMetRate->Text = "---";
- this->label_BasalMetRate->Text = "---";
- }
- }
- void WeightScaleSensor::UpdateDisplayActiveProfile()
- {
-
- this->labelProfileActive->Text = System::Convert::ToString(wsPages->uprofActive->usID);
- this->labelProfileActive2->Text = System::Convert::ToString(wsPages->uprofActive->usID);
- if(wsPages->uprofActive->ucGender == WeightScaleUserProfile::GENDER_FEMALE)
- this->labelGenderActive->Text = L"Female";
- if(wsPages->uprofActive->ucGender == WeightScaleUserProfile::GENDER_MALE)
- this->labelGenderActive->Text = L"Male";
- this->labelAgeActive->Text = System::Convert::ToString(wsPages->uprofActive->ucAge);
- this->labelHeightActive->Text = System::Convert::ToString(wsPages->uprofActive->ucHeight);
- this->labelDescriptionActive->Text = System::Convert::ToString(wsPages->uprofActive->ucDescription);
- if (wsPages->uprofActive->bAthlete == TRUE)
- this->labelLifestyle->Text = "Athlete";
- else
- this->labelLifestyle->Text = "Standard";
-
- this->numericUpDownActivityLevel->Value = wsPages->uprofActive->ucDescription;
- this->numericUpDownAge->Value = wsPages->uprofActive->ucAge;
- this->numericUpDownHeight->Value = wsPages->uprofActive->ucHeight;
- if (wsPages->uprofActive->ucGender == WeightScaleUserProfile::GENDER_MALE)
- this->radioButtonMale->Checked = TRUE;
- else
- this->radioButtonFemale->Checked = TRUE;
- if (wsPages->uprofActive->usID <= WeightScaleUserProfile::PROFILE_SCALE_MAX)
- this->numericUpDownProfile->Value = wsPages->uprofActive->usID;
- else
- this->numericUpDownProfile->Value = 0;
- if(wsPages->uprofActive->bAthlete == TRUE)
- this->radioButtonLifetimeActivityTrue->Checked = TRUE;
- else
- this->radioButtonLifetimeActivityFalse->Checked = TRUE;
- }
- void WeightScaleSensor::UpdateDisplayCapabilities()
- {
-
- if(wsPages->capabDisplay->bScaleSet)
- this->labelProfileSetScale->Text = L"Yes";
- else
- this->labelProfileSetScale->Text = L"No";
- if(wsPages->capabDisplay->bScaleExchange)
- this->labelExchangeScale->Text = L"Yes";
- else
- this->labelExchangeScale->Text = L"No";
- if(wsPages->capabDisplay->bAntfs)
- this->labelAntfsRx->Text = L"Yes";
- else
- this->labelAntfsRx->Text = L"No";
- if(wsPages->capabDisplay->bDisplayExchange)
- this->labelExchangeDisplay->Text = L"Yes";
- else
- this->labelExchangeDisplay->Text = L"No";
- }
- void WeightScaleSensor::SelectPresetProfile()
- {
- if(this->radioButtonUser1->Checked)
- WeightScaleUserProfile::copyProfile(uprofU1, wsPages->uprofScale);
- if(this->radioButtonUser2->Checked)
- WeightScaleUserProfile::copyProfile(uprofU2, wsPages->uprofScale);
- if(this->radioButtonUser3->Checked)
- WeightScaleUserProfile::copyProfile(uprofU3, wsPages->uprofScale);
- if(this->radioButtonGuest->Checked)
- {
-
- this->numericUpDownProfile->Enabled = TRUE;
- this->numericUpDownAge->Enabled = TRUE;
- this->numericUpDownHeight->Enabled = TRUE;
- this->radioButtonFemale->Enabled = TRUE;
- this->radioButtonMale->Enabled = TRUE;
- this->numericUpDownActivityLevel->Enabled = TRUE;
- this->groupBoxLifetimeActivity->Enabled = TRUE;
- SelectCustomProfile();
- }
- else
- {
-
- this->numericUpDownProfile->Enabled = FALSE;
- this->numericUpDownAge->Enabled = FALSE;
- this->numericUpDownHeight->Enabled = FALSE;
- this->radioButtonFemale->Enabled = FALSE;
- this->radioButtonMale->Enabled = FALSE;
- this->numericUpDownActivityLevel->Enabled = FALSE;
- this->groupBoxLifetimeActivity->Enabled = FALSE;
- }
-
- if((wsPages->uprofActive->usID == WeightScaleUserProfile::PROFILE_UNDEF) || (wsPages->uprofActive->usID <= WeightScaleUserProfile::PROFILE_SCALE_MAX))
- {
- WeightScaleUserProfile::copyProfile(wsPages->uprofScale, wsPages->uprofActive);
- UpdateDisplayActiveProfile();
- }
- }
- void WeightScaleSensor::SelectCustomProfile()
- {
- if(wsPages->capabScale->bScaleSet && this->radioButtonGuest->Checked)
- {
-
- wsPages->uprofScale->usID = (USHORT) (this->numericUpDownProfile->Value);
- wsPages->uprofScale->ucAge = (UCHAR) (this->numericUpDownAge->Value);
- wsPages->uprofScale->ucHeight = (UCHAR) (this->numericUpDownHeight->Value);
- wsPages->uprofScale->ucDescription = (UCHAR) (this->numericUpDownActivityLevel->Value);
- if(this->radioButtonFemale->Checked)
- wsPages->uprofScale->ucGender = WeightScaleUserProfile::GENDER_FEMALE;
- else if(this->radioButtonMale->Checked)
- wsPages->uprofScale->ucGender = WeightScaleUserProfile::GENDER_MALE;
- else
- wsPages->uprofScale->ucGender = WeightScaleUserProfile::GENDER_UNDEF;
- if (this->radioButtonLifetimeActivityTrue->Checked == TRUE)
- wsPages->uprofScale->bAthlete = TRUE;
- else
- wsPages->uprofScale->bAthlete = FALSE;
- }
-
-
-
-
- if((wsPages->uprofActive->usID == WeightScaleUserProfile::PROFILE_UNDEF) || (wsPages->uprofActive->usID == wsPages->uprofScale->usID) || (wsPages->uprofActive->usID <= WeightScaleUserProfile::PROFILE_SCALE_MAX))
- {
- WeightScaleUserProfile::copyProfile(wsPages->uprofScale, wsPages->uprofActive);
- UpdateDisplayActiveProfile();
- }
- }
- System::Void WeightScaleSensor::checkBoxProfileSet_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if(this->checkBoxProfileSet->Checked == TRUE)
- {
- this->groupBox2->Enabled = TRUE;
- SelectPresetProfile();
-
- wsPages->capabScale->bScaleSet = TRUE;
- }
- else
- {
- this->groupBox2->Enabled = FALSE;
- WeightScaleUserProfile::copyProfile(uprofUndef, wsPages->uprofScale);
-
- if(wsPages->uprofActive->usID <= WeightScaleUserProfile::PROFILE_SCALE_MAX)
- {
- WeightScaleUserProfile::copyProfile(wsPages->uprofScale, wsPages->uprofActive);
- UpdateDisplayActiveProfile();
- }
- wsPages->capabScale->bScaleSet = FALSE;
-
- }
- }
- System::Void WeightScaleSensor::checkBoxExchange_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if(this->checkBoxExchange->Checked)
- wsPages->capabScale->bScaleExchange = TRUE;
- else
- wsPages->capabScale->bScaleExchange = FALSE;
-
- }
- System::Void WeightScaleSensor::checkBoxAntfs_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if(this->checkBoxAntfs->Checked)
- wsPages->capabScale->bAntfs = TRUE;
- else
- wsPages->capabScale->bAntfs = FALSE;
-
- }
- void WeightScaleSensor::SelectWeightStatus()
- {
- if (this->radioButtonWeightValid->Checked)
- {
- this->numericUpDownWeight->Enabled = TRUE;
- wsPages->usBodyWeight100 = (USHORT) (this->numericUpDownWeight->Value * 100);
- }
- else
- {
- this->numericUpDownWeight->Enabled = FALSE;
- this->label_Hydration->Text = "---";
- this->label_BodyFat->Text = "---";
- this->label_ActiveMetRate->Text = "---";
- this->label_BasalMetRate->Text = "---";
- if (this->radioButtonWieghtComputing->Checked == TRUE)
- {
- wsPages->usBodyWeight100 = WeightScale::WEIGHT_COMPUTING;
- }
- if (this->radioButtonWeightError->Checked == TRUE)
- {
- wsPages->usBodyWeight100 = WeightScale::WEIGHT_INVALID;
- }
- }
- }
- void WeightScaleSensor::SelectPages()
- {
- bTxPage2 = (BOOL) (this->checkBox_TxPage2->Checked);
- bTxPage3 = (BOOL) (this->checkBox_TxPage3->Checked);
- bTxPage4 = (BOOL) (this->checkBox_TxPage4->Checked);
- }
- System::Void WeightScaleSensor::buttonUpdateGlobal_Click(System::Object^ sender, System::EventArgs^ e)
- {
- this->labelError->Visible = false;
- try
- {
- commonPages->usMfgID = System::Convert::ToUInt16(this->textboxMfgID->Text);
- commonPages->usModelNum = System::Convert::ToUInt16(this->textboxModelNum->Text);
- commonPages->ucHwVersion = System::Convert::ToByte(this->textboxHwVer->Text);
- commonPages->ucSwVersion = System::Convert::ToByte(this->textboxSwVer->Text);
- if(!this->checkBox_InvalidSerial->Checked)
- commonPages->ulSerialNum = System::Convert::ToUInt32(this->textboxSerialNum->Text);
- else
- commonPages->ulSerialNum = 0xFFFFFFFF;
- }
- catch(...)
- {
- this->labelError->Visible = true;
- this->labelError->Text = L"Invalid input";
- }
-
- }
- System::Void WeightScaleSensor::buttonReset_Click(System::Object^ sender, System::EventArgs^ e)
- {
-
- bTxAdvanced = FALSE;
- bTxUserProfile = FALSE;
-
- radioButtonWieghtComputing->Checked = TRUE;
-
- this->labelStatusProfileMatch->Text= "---";
- this->labelStatusProfileNew->Text = "---";
- this->labelStatusProfileRx->Text = "---";
- this->labelStatusProfileSent->Text = "---";
- this->labelStatusProfileUpdate->Text = "---";
- }
- void WeightScaleSensor::AllowChangesProfile(BOOL bNoSession_)
- {
- if(bNoSession_)
- {
- this->checkBoxProfileSet->Enabled = true;
- this->radioButtonUser1->Enabled = true;
- this->radioButtonUser2->Enabled = true;
- this->radioButtonGuest->Enabled = true;
- this->radioButtonGuest->Enabled = true;
- if(this->radioButtonGuest->Checked)
- {
- this->numericUpDownProfile->Enabled = true;
- this->numericUpDownAge->Enabled = true;
- this->numericUpDownHeight->Enabled = true;
- this->radioButtonFemale->Enabled = true;
- this->radioButtonMale->Enabled = true;
- this->numericUpDownActivityLevel->Enabled = true;
- this->groupBoxLifetimeActivity->Enabled = true;
- }
- }
- else
- {
- this->checkBoxProfileSet->Enabled = false;
- this->radioButtonUser1->Enabled = false;
- this->radioButtonUser2->Enabled = false;
- this->radioButtonGuest->Enabled = false;
- this->radioButtonGuest->Enabled = false;
- this->numericUpDownProfile->Enabled = false;
- this->numericUpDownAge->Enabled = false;
- this->numericUpDownHeight->Enabled = false;
- this->radioButtonFemale->Enabled = false;
- this->radioButtonMale->Enabled = false;
- this->numericUpDownActivityLevel->Enabled = false;
- this->groupBoxLifetimeActivity->Enabled = false;
- }
- }
- System::Void WeightScaleSensor::numericUpDownWeight_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->usBodyWeight100 = (USHORT) (this->numericUpDownWeight->Value * 100);
- }
- System::Void WeightScaleSensor::numericUpDown_Hydration_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->usHydrationP100 = (USHORT) (this->numericUpDown_Hydration->Value * 100);
- }
- System::Void WeightScaleSensor::numericUpDown_BodyFat_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->usBodyFatP100 = (USHORT) (this->numericUpDown_BodyFat->Value * 100);
- }
- System::Void WeightScaleSensor::numericUpDown_ActiveMetRate_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->usActiveMetRate4 = (USHORT) (this->numericUpDown_ActiveMetRate->Value * 4);
- }
- System::Void WeightScaleSensor::numericUpDown_BasalMetRate_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->usBasalMetRate4 = (USHORT) (this->numericUpDown_BasalMetRate->Value * 4);
- }
- System::Void WeightScaleSensor::numericUpDown_MuscleMass_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->usMuscleMass100 = (USHORT) (this->numericUpDown_MuscleMass->Value * 100);
- }
- System::Void WeightScaleSensor::numericUpDown_BoneMass_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- wsPages->ucBoneMass10 = (UCHAR) (this->numericUpDown_BoneMass->Value * 10);
- }
- System::Void WeightScaleSensor::checkBox_InvalidSerial_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if(this->checkBox_InvalidSerial->Checked)
- this->textboxSerialNum->Enabled = false;
- else
- this->textboxSerialNum->Enabled = true;
- }
|