当前位置: 首页>>代码示例>>C++>>正文


C++ TransferDataFromWindow函数代码示例

本文整理汇总了C++中TransferDataFromWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ TransferDataFromWindow函数的具体用法?C++ TransferDataFromWindow怎么用?C++ TransferDataFromWindow使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TransferDataFromWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: oldSettings

void ecSettingsDialog::OnOK(wxCommandEvent& event)
{
    ecSettings oldSettings(wxGetApp().GetSettings());

    TransferDataFromWindow();
    
    if (wxGetApp().GetSettings().m_bHex != oldSettings.m_bHex)
    {
        // Refresh the values window and currently selected properties
        ecConfigToolHint hint(NULL, ecAllSaved);
        if (wxGetApp().GetConfigToolDoc())
            wxGetApp().GetConfigToolDoc()->UpdateAllViews (NULL, & hint);        
    }

    if (wxGetApp().GetSettings().m_showMacroNames != oldSettings.m_showMacroNames)
    {
        ecConfigToolHint hint(NULL, ecNameFormatChanged);
        if (wxGetApp().GetConfigToolDoc())
            wxGetApp().GetConfigToolDoc()->UpdateAllViews (NULL, & hint);        
    }    

    event.Skip();
}
开发者ID:ryoon,项目名称:eCos,代码行数:23,代码来源:settingsdlg.cpp

示例2: wxMessageBox

void udAggregationDialog::OnOk(wxCommandEvent& event)
{
	if( m_eName->GetValue() == wxT("") )
	{
		wxMessageBox(wxT("Name cannot be empty."), wxT("CodeDesigner"), wxICON_WARNING | wxOK );
		m_eName->SetFocus();
	}
//	else if( (m_Name != m_eName->GetValue()) && !IPluginManager::Get()->GetProject()->IsUniqueName( m_eName->GetValue() ) )
//	{
//		wxMessageBox(wxT("Name must be unique."), wxT("CodeDesigner"), wxICON_WARNING | wxOK );
//		m_eName->SetFocus();		
//	}
	else
	{
		// get data via validators...
		TransferDataFromWindow();
		m_pageAdv->TransferDataFromWindow();
		
		m_AccessType = m_chAccess->GetSelection();
		
		EndModal( wxID_OK );
	}
}
开发者ID:LETARTARE,项目名称:CodeDesigner,代码行数:23,代码来源:AggregationDialog.cpp

示例3: WXUNUSED

void TagsEditor::OnOk(wxCommandEvent & WXUNUSED(event))
{
   if (mGrid->IsCellEditControlShown()) {
      mGrid->SaveEditControlValue();
      mGrid->HideCellEditControl();
      return;
   }

   if (!Validate() || !TransferDataFromWindow()) {
      return;
   }

   *mTags = mLocal;

   wxRect r = GetRect();
   gPrefs->Write(wxT("/TagsEditor/x"), r.x);
   gPrefs->Write(wxT("/TagsEditor/y"), r.y);
   gPrefs->Write(wxT("/TagsEditor/width"), r.width);
   gPrefs->Write(wxT("/TagsEditor/height"), r.height);
   gPrefs->Flush();

   EndModal(wxID_OK);
}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:23,代码来源:Tags.cpp

示例4: TransferDataFromWindow

void DialogStyleEditor::UpdateWorkStyle() {
	updating = true;
	TransferDataFromWindow();
	updating = false;

	work->font = from_wx(FontName->GetValue());

	long templ = 0;
	Encoding->GetValue().BeforeFirst('-').ToLong(&templ);
	work->encoding = templ;

	work->borderstyle = OutlineType->IsChecked() ? 3 : 1;

	work->alignment = ControlToAlign(Alignment->GetSelection());

	for (size_t i = 0; i < 3; ++i)
		work->Margin[i] = margin[i]->GetValue();

	work->bold = BoxBold->IsChecked();
	work->italic = BoxItalic->IsChecked();
	work->underline = BoxUnderline->IsChecked();
	work->strikeout = BoxStrikeout->IsChecked();
}
开发者ID:nielsmh,项目名称:Aegisub,代码行数:23,代码来源:dialog_style_editor.cpp

示例5: AcceptAndClose

void wxDialogBase::OnButton(wxCommandEvent& event)
{
    const int id = event.GetId();
    if ( id == GetAffirmativeId() )
    {
        AcceptAndClose();
    }
    else if ( id == wxID_APPLY )
    {
        if ( Validate() )
            TransferDataFromWindow();

        // TODO: disable the Apply button until things change again
    }
    else if ( id == GetEscapeId() ||
                (id == wxID_CANCEL && GetEscapeId() == wxID_ANY) )
    {
        EndDialog(wxID_CANCEL);
    }
    else // not a standard button
    {
        event.Skip();
    }
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:24,代码来源:dlgcmn.cpp

示例6: TransferDataFromWindow

void mainwin::OnOkButtonClick( wxCommandEvent& event )
{
    TransferDataFromWindow();
    m_sourcemac.Replace("-", wxEmptyString);
    m_desmac.Replace("-", wxEmptyString);
    int checkresult = m_core.fillframe(m_sourcemac.MakeUpper().ToStdString(), m_desmac.MakeUpper().ToStdString(), m_userdata.ToStdString(), m_seedstr.ToStdString());

    if (checkresult)
    {
        if (checkresult & 1)
            wxMessageBox(wxT("error:源MAC地址格式不正确"), wxT("错误提示"), wxICON_ERROR);
        if (checkresult & 2)
            wxMessageBox(wxT("error:目的MAC地址格式不正确"), wxT("错误提示"), wxICON_ERROR);
        if (checkresult & 4)
            wxMessageBox(wxT("error:数据部分格式不正确"), wxT("错误提示"), wxICON_ERROR);
        if (checkresult & 8)
            wxMessageBox(wxT("error:生成多项式语法错误"), wxT("错误提示"), wxICON_ERROR);
    }
    else
    {
        if (FindWindow(XRCID("ID_BUTTON2")))
            FindWindow(XRCID("ID_BUTTON2"))->Enable();
        if (FindWindow(XRCID("ID_BUTTON3")))
            FindWindow(XRCID("ID_BUTTON3"))->Enable();
        if (FindWindow(XRCID("ID_SCROLLEDWINDOW")))
        {
            ((wxTextCtrl*)FindWindow(XRCID("ID_SCROLLEDWINDOW")))->Clear();
            ((wxTextCtrl*)FindWindow(XRCID("ID_SCROLLEDWINDOW")))->AppendText(m_core.getcrcdata() + string(crcgenerater::checkseedstr(m_seedstr.ToStdString())-1,'0')+"\n");
        }
        if (FindWindow(XRCID("ID_TEXTCTRL3")))
            ((wxTextCtrl*)FindWindow(XRCID("ID_TEXTCTRL3")))->Clear();
        if (FindWindow(XRCID("ID_TREECTRL")))
            ((wxTreeCtrl*)FindWindow(XRCID("ID_TREECTRL")))->DeleteAllItems();
        clicknum = 1;
    }
}
开发者ID:do-you,项目名称:keshe,代码行数:36,代码来源:mainwin.cpp

示例7: TransferDataFromWindow

void ProjectionDlg::OnHorizUnits( wxCommandEvent &event )
{
	TransferDataFromWindow();

	m_iUnits = m_pHorizCtrl->GetSelection();

	LinearUnits iUnits = (LinearUnits) (long int) m_pHorizCtrl->GetClientData(m_iUnits);

	if (iUnits == LU_METERS)
	{
		m_proj.SetLinearUnits(SRS_UL_METER, 1.0);
	}
	if (iUnits == LU_FEET_INT)
	{
		m_proj.SetLinearUnits(SRS_UL_FOOT, GetMetersPerUnit(iUnits));
	}
	if (iUnits == LU_FEET_US)
	{
		m_proj.SetLinearUnits(SRS_UL_US_FOOT, GetMetersPerUnit(iUnits));
	}

	TransferDataToWindow();
	UpdateControlStatus();
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:24,代码来源:ProjectionDlg.cpp

示例8: OnProcess

void DialogExport::OnProcess(wxCommandEvent &) {
	if (!TransferDataFromWindow()) return;

	auto filename = SaveFileSelector(_("Export subtitles file"), "", "", "", to_wx(SubtitleFormat::GetWildcards(1)), this);
	if (filename.empty()) return;

	for (size_t i = 0; i < filter_list->GetCount(); ++i) {
		if (filter_list->IsChecked(i))
			exporter->AddFilter(from_wx(filter_list->GetString(i)));
	}

	try {
		wxBusyCursor busy;
		c->ass->SetScriptInfo("Export Encoding", from_wx(charset_list->GetStringSelection()));
		exporter->Export(filename, from_wx(charset_list->GetStringSelection()), this);
	}
	catch (agi::UserCancelException const&) {
	}
	catch (const char *error) {
		wxMessageBox(error, "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
	}
	catch (wxString const& error) {
		wxMessageBox(error, "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
	}
	catch (agi::Exception const& err) {
		wxMessageBox(to_wx(err.GetMessage()), "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
	}
	catch (std::exception const& err) {
		wxMessageBox(to_wx(err.what()), "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
	}
	catch (...) {
		wxMessageBox("Unknown error", "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
	}

	EndModal(0);
}
开发者ID:seawaveT,项目名称:Aegisub,代码行数:36,代码来源:dialog_export.cpp

示例9: TransferDataFromWindow

void wxDialog::OnApply(wxCommandEvent &WXUNUSED(event))
{
    if ( Validate() )
        TransferDataFromWindow();
}
开发者ID:mark711,项目名称:Cafu,代码行数:5,代码来源:dialog.cpp

示例10: EnsureOptimalFocus

void MvcController::UponUpdateUI(wxUpdateUIEvent& event)
{
    event.Skip();

    unit_test_idle_processing_completed_ = false;

    // Explicitly disregard any wxUpdateUIEvent received while this
    // application is not active: see
    //   http://lists.gnu.org/archive/html/lmi/2006-03/msg00006.html
    // for a discussion.
    if(!TheApp().IsActive())
        {
        return;
        }

    // A disabled window might have focus:
    //   http://lists.nongnu.org/archive/html/lmi/2005-11/msg00040.html
    // so make sure focus is valid now.
    EnsureOptimalFocus();

    // Exit immediately if nothing changed. The library calls this
    // function continually in idle time, and it's pointless to fret
    // over inputs that didn't change on this update because they've
    // already been handled. Complex processing of many inputs has
    // been observed to consume excessive CPU time when a malloc
    // debugger is running, so this optimization is significant.
    //
    // The early-exit condition cannot succeed until Assimilate() has
    // been called: therefore, Assimilate() is guaranteed to be called
    // here by the time the user can interact with the GUI.
    TransferDataFromWindow();
    if(cached_transfer_data_ == transfer_data_)
        {
        unit_test_idle_processing_completed_ = true;
        return;
        }
    cached_transfer_data_ = transfer_data_;

    DiagnosticsWindow().SetLabel("");
    std::vector<std::string> control_changes;
    std::string const name_to_ignore = NameOfControlToDeferEvaluating();
    typedef std::map<std::string,std::string>::const_iterator smci;
    for(smci i = transfer_data_.begin(); i != transfer_data_.end(); ++i)
        {
        std::string const& name        = i->first;
        std::string const& view_value  = i->second;
        std::string const& model_value = model_.Entity(name).str();
        if(name == name_to_ignore || ModelAndViewValuesEquivalent(name))
            {
            continue;
            }
        try
            {
            std::string change =
                  name + ":\n"
                + "    model: '" + model_value + "'\n"
                + "    view:  '" + view_value  + "'\n"
                ;
            control_changes.push_back(change);
            model_.Entity(name) = view_value;
            }
        catch(std::exception const& e)
            {
            DiagnosticsWindow().SetLabel(name + ": " + e.what());
            }
        }

    // wxEVT_UPDATE_UI events should occur frequently enough that two
    // control changes cannot be simultaneous.
    if(1 < control_changes.size())
        {
        warning() << "Contents of more than one control changed.\n";
        typedef std::vector<std::string>::const_iterator svci;
        for(svci i = control_changes.begin(); i != control_changes.end(); ++i)
            {
            warning() << *i;
            }
        warning() << LMI_FLUSH;
        }

    Assimilate(name_to_ignore);
}
开发者ID:vadz,项目名称:lmi,代码行数:82,代码来源:mvc_controller.cpp

示例11: TransferDataFromWindow

void TruncSilenceDialog::OnPreview(wxCommandEvent & event)
{
   TransferDataFromWindow();
   mEffect->Preview();
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:5,代码来源:TruncSilence.cpp

示例12: TransferDataFromWindow

void ConnectToDialog::OnOK( wxCommandEvent& event )
{
    TransferDataFromWindow();
    SaveHistoryValue();
    EndModal(wxID_OK);
}
开发者ID:zhaozhenliang,项目名称:wxSpy,代码行数:6,代码来源:ConnectToDialog.cpp

示例13: TransferDataFromWindow

void EqualizationDialog::OnPreview(wxCommandEvent &event)
{
   TransferDataFromWindow();
	m_pEffect->Preview();
	//v Restore previous values?
}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:6,代码来源:Equalization.cpp

示例14: TransferDataFromWindow

void DialogStyleEditor::OnSetColor(wxThreadEvent&) {
	TransferDataFromWindow();
	SubsPreview->SetStyle(*work);
}
开发者ID:KagamiChan,项目名称:Aegisub,代码行数:4,代码来源:dialog_style_editor.cpp

示例15: TransferDataFromWindow

ExportMP2Options::~ExportMP2Options()
{
   TransferDataFromWindow();
}
开发者ID:Avi2011class,项目名称:audacity,代码行数:4,代码来源:ExportMP2.cpp


注:本文中的TransferDataFromWindow函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。