CreateReposDlg::CreateReposDlg(wxWindow * parent) : CreateReposDlgBase(parent) { m = new Data(); m_choiceType->SetSelection(TYPE_FSFS); m_choiceCompat->SetSelection(COMPAT_DEFAULT); m_checkAddBookmark->SetValue(true); m_notebook->SetSelection(0); { HistoryValidator val(HISTORY_CREATE_REPOS_DIRECTORY); m_comboDir->SetValidator(val); } { HistoryValidator val(HISTORY_CREATE_REPOS_NAME); m_comboName->SetValidator(val); } { HistoryValidator val(HISTORY_CREATE_REPOS_CONFIG_DIRECTORY); m_comboConfigDir->SetValidator(val); } // TODO all this stuff doesnt work. Dont know why :-( // m_comboDirectory->SetMinSize(wxSize(GetCharWidth() * 60, GetCharHeight())); // m_rootSizer->SetSizeHints(this); // m_rootSizer->Fit(this); // // Layout(); CentreOnParent(); CheckValues(); }
void BiomassInterpreter::SetValues(double C_fraction, double H_fraction, double O_fraction, double others_fraction) { C = C_fraction; H = H_fraction; O = O_fraction; others_comp = others_fraction; CheckValues(); }
void ScaleObj::Value(int value) { if (_value == value) return; _value = value; CheckValues(true); }
//--------------------------------------------------------------------------- void __fastcall TForm8::BtnEnableBeaconClick(TObject *Sender) { if (BtnEnableBeacon->IsPressed) { if (CheckValues()) { BeaconDevice1->GUID = FGuid; BeaconDevice1->Major = FMajor; BeaconDevice1->Minor = FMinor; BeaconDevice1->TxPower = FTxPower; } else { BtnEnableBeacon->IsPressed = False; } } if (BtnEnableBeacon->IsPressed) BtnEnableBeacon->Text = "Disable Beacon"; else BtnEnableBeacon->Text = "Enable Beacon"; BeaconDevice1->Enabled = BtnEnableBeacon->IsPressed; ImageControl1->Visible = BeaconDevice1->Enabled; Animation->Enabled = BeaconDevice1->Enabled; PnlBeaconInfo->Enabled = !BeaconDevice1->Enabled; }
MatrixCompletion::MatrixCompletion(const size_t m, const size_t n, const arma::umat& indices, const arma::vec& values, const arma::mat& initialPoint) : m(m), n(n), indices(indices), values(values), sdp(indices.n_cols, 0, initialPoint) { CheckValues(); InitSDP(); }
MatrixCompletion::MatrixCompletion(const size_t m, const size_t n, const arma::umat& indices, const arma::vec& values) : m(m), n(n), indices(indices), values(values), sdp(indices.n_cols, 0, arma::randu<arma::mat>(m + n, DefaultRank(m, n, indices.n_cols))) { CheckValues(); InitSDP(); }
void ScaleObj::Minumum(int value) { if (_min == value) return; _min = value; int old_max = _max; CheckValues(true); SetString(_minLabel, _min); if (old_max != _max) SetString(_maxLabel, _max); }
void ScaleObj::Maximum(int value) { if (_max == value) return; _max = value; int old_min = _min; CheckValues(true); SetString(_maxLabel, _max); if (old_min != _min) SetString(_minLabel, _min); }
void CreateReposDlg::OnButtonBrowseConfigDirClick(wxCommandEvent & WXUNUSED(event)) { wxASSERT(0 != m_comboConfigDir); wxDirDialog dialog(this, _("Select a directory"), m_comboConfigDir->GetValue(), wxDD_NEW_DIR_BUTTON); if (dialog.ShowModal() == wxID_OK) { m_comboConfigDir->SetValue(dialog.GetPath()); CheckValues(); } }
void ScaleObj::CreateScale(MotifUI *parent, char *title, int value, int numDecimalPoints, int max, int min, int scaleMultiple, ScaleType style, boolean showValue) { _style = style; _value = value; _numDecimalPoints = numDecimalPoints; _max = max; _min = min; _scaleMultiple = scaleMultiple; _style = style; _showValue = showValue; CheckValues(false); int orientation; short points = _numDecimalPoints; if (_style == VERTICAL_SCALE) orientation = XmVERTICAL; else orientation = XmHORIZONTAL; XmString xm_string = StringCreate(title); _w = XtVaCreateManagedWidget(title, xmFormWidgetClass, parent->InnerWidget(), NULL); _minLabel = XtVaCreateWidget(title, xmLabelWidgetClass, _w, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, NULL); _maxLabel = XtVaCreateWidget(title, xmLabelWidgetClass, _w, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); _scale = XtVaCreateManagedWidget(title, xmScaleWidgetClass, _w, XmNmaximum, _max, XmNminimum, _min, XmNvalue, _value, XmNscaleMultiple, _scaleMultiple, XmNdecimalPoints, points, XmNtitleString, xm_string, XmNshowValue, _showValue, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNorientation, orientation, NULL); StringFree(xm_string); SetString(_minLabel, _min); SetString(_maxLabel, _max); ShowValue(_showValue); }
//--------------------------------------------------------------------------- void __fastcall TForm8::BtnEnableBeaconClick(TObject *Sender) { if (BtnEnableBeacon->IsPressed) { if (CheckValues()) { BeaconDevice1->GUID = FGuid; BeaconDevice1->Major = FMajor; BeaconDevice1->Minor = FMinor; BeaconDevice1->TxPower = FTxPower; BeaconDevice1->EddystoneNamespace = FEddyNamespace; BeaconDevice1->EddystoneInstance = FEddyInstance; BeaconDevice1->EddystoneURL = FEddyURL; } else { BtnEnableBeacon->IsPressed = False; } } try { BeaconDevice1->Enabled = BtnEnableBeacon->IsPressed; } catch (EConvertError &e) { ShowMessage("Failed to start beacon: " + e.Message); BeaconDevice1->Enabled = False; BtnEnableBeacon->IsPressed = False; } if (BtnEnableBeacon->IsPressed) BtnEnableBeacon->Text = "Disable Beacon"; else BtnEnableBeacon->Text = "Enable Beacon"; ImageControl1->Visible = BeaconDevice1->Enabled; Animation->Enabled = BeaconDevice1->Enabled; PnlBeaconInfo->Enabled = !BeaconDevice1->Enabled; PnlEddyInfo->Enabled = !BeaconDevice1->Enabled; }
void DIALOG_IMAGE_EDITOR::OnOK_Button( wxCommandEvent& aEvent ) { if( CheckValues() ) EndModal( wxID_OK ); return; }
void Properties::on_acceptButton_clicked() { if (!CheckValues()) return; if (!Save()) return; ui.acceptButton->setEnabled(false); }
void Properties::on_okButton_clicked() { if (!CheckValues()) return; if (!Save()) return; done(0); }
void ScaleObj::NumDecimalPoints(int value) { _numDecimalPoints = value; CheckValues(true); }
void ScaleObj::Multiple(int value) { _scaleMultiple = value; CheckValues(true); }
void CreateReposDlg::OnChoiceCompat(wxCommandEvent & WXUNUSED(event)) { CheckValues(); }
void CreateReposDlg::OnComboConfigDirText(wxCommandEvent & WXUNUSED(event)) { CheckValues(); }