Exemplo n.º 1
0
void frmDatabaseDesigner::OnDeletedDiagramTab(wxAuiNotebookEvent &event)
{
	//don't delete view when deleting diagram because it was deleted before by EVT_AUINOTEBOOK_PAGE_CLOSE event
	//option possible will be wxAuiPaneInfo().DestroyOnClose(false) but should be tried in a future
	design->deleteDiagram(deletedTab, false);
	UpdateToolbar();
}
Exemplo n.º 2
0
void wxMainFrame::OnConectartoolClick( wxCommandEvent& event )
{
    // Insert custom code here
    if (m_TEDProtocol->IsLogged()==FALSE)
    {
      UpdateToolbar(ConectarTool);
    }
    event.Skip();
}
Exemplo n.º 3
0
void frmDatabaseDesigner::OnDeleteDiagram(wxCommandEvent &event)
{
	hdDrawingView *view = (hdDrawingView *) diagrams->GetPage(diagrams->GetSelection());
	int diagramIndex = view->getIdx();
	diagrams->RemovePage(diagrams->GetSelection());
	design->deleteDiagram(diagramIndex);
	setModelChanged(true);

	UpdateToolbar();
}
Exemplo n.º 4
0
ColumnListError::ColumnListError()
{
//	AddFrame(tb);
	Add(cl);
	Add(lv);
	lv.Show();
	cl.Hide();
	SetRect(0,0,400,600);
	UpdateToolbar();
}
Exemplo n.º 5
0
void frmDatabaseDesigner::OnAddDiagram(wxCommandEvent &event)
{
	wxString newName = wxGetTextFromUser(_("New Diagram Name"), _("Diagram Name"), _("unnamed"), this);

	if (!newName.IsEmpty())
	{
		diagrams->AddPage(design->createDiagram(diagrams, newName, false)->getView(), newName);
		setModelChanged(true);
	}

	UpdateToolbar();
}
Exemplo n.º 6
0
void wxMainFrame::OnBarajastoolClick( wxCommandEvent& event )
{
    // Insert custom code here
    if (m_TEDProtocol->IsChatting()==TRUE)
    {
      m_TEDProtocol->SetRecoverRoomID(m_TEDProtocol->GetUserChatRoomID());
      m_TEDProtocol->ChatExit();
    }
    m_DeckWnd->GoldStaticText->SetLabel(wxString::Format("%d",m_TEDProtocol->GetUserGold()));
    m_TEDProtocol->DeckEdit();
    UpdateToolbar(BarajasTool);
    event.Skip();
}
Exemplo n.º 7
0
void wxMainFrame::OnChattoolClick( wxCommandEvent& event )
{
  wxInt32 roomid;

  // Insert custom code here
  if (m_TEDProtocol->IsEditing()==TRUE)
  {
    m_TEDProtocol->DeckExit();
  }
  roomid=m_TEDProtocol->GetRecoverRoomID();
  if (roomid!=0)
  {
    m_TEDProtocol->SetRecoverRoomID(0);
    m_TEDProtocol->ChatEnter(roomid);
  }
  UpdateToolbar(ChatTool);
  event.Skip();
}
Exemplo n.º 8
0
void frmDatabaseDesigner::OnDeleteDiagramTab(wxAuiNotebookEvent &event)
{
	deletedTab = event.GetSelection();
	wxAuiNotebook *ctrl = (wxAuiNotebook *)event.GetEventObject();
	hdDrawingView *view = (hdDrawingView *) ctrl->GetPage(event.GetSelection());

	int res = wxMessageBox(wxT("Are you sure you want to delete diagram \"") + view->getDrawing()->getName() + _("\" from model?"),
	                       wxT("Delete diagram?"),
	                       wxYES_NO | wxNO_DEFAULT,
	                       this);
	if (res != wxYES)
	{
		event.Veto();
	}
	else
	{
		setModelChanged(true);
	}

	UpdateToolbar();
}
Exemplo n.º 9
0
void frmDatabaseDesigner::OnNewModel(wxCommandEvent &event)
{
	hdDrawingView *view = (hdDrawingView *) diagrams->GetPage(diagrams->GetSelection());

	if (changed)
	{
		// Ask what to do with old model
		int answer = wxMessageBox(_("Save model changes?"), _("Confirm"), wxYES_NO | wxCANCEL);

		if (answer == wxYES)
		{
			if (!lastFile.IsEmpty())
				OnModelSave(event);
			else
				OnModelSaveAs(event);
		}
		else if (answer == wxCANCEL)
			return;
	}

	// Clean treeview, notebook, and sql pane
	design->emptyModel();
	while (diagrams->GetPageCount() > 0)
	{
		diagrams->RemovePage(0);
		design->deleteDiagram(0);
	}
	sqltext->SetText(wxEmptyString);

	// Add new diagram
	diagrams->AddPage(design->createDiagram(diagrams, _("unnamed"), false)->getView(), _("unnamed"));

	// Misc
	lastFile = wxEmptyString;
	setModelChanged(false);
	setExtendedTitle();
	UpdateToolbar();
}
Exemplo n.º 10
0
/*! ツールバー更新用タイマーの処理
	@date 2002.01.03 YAZAKI m_tbMyButtonなどをCShareDataからCMenuDrawerへ移動したことによる修正。
	@date 2003.08.29 wmlhq, ryoji nTimerCountの導入
	@date 2006.01.28 aroka OnTimerから分離
	@date 2007.04.03 ryoji パラメータ無しにした
	@date 2008.10.05 nasukoji ツールバー更新部分を外に出した
	@date 2012.11.29 aroka OnTimerから分離したときのバグ修正
*/
void CMainToolBar::OnToolbarTimer( void )
{
	// 2012.11.29 aroka ここではカウントアップ不要
	//m_pOwner->IncrementTimerCount(10);
	UpdateToolbar();	// 2008.09.23 nasukoji	ツールバーの表示を更新する
}
Exemplo n.º 11
0
void wxMainFrame::OnPreftoolClick( wxCommandEvent& event )
{
    // Insert custom code here
    UpdateToolbar(PrefTool);
    event.Skip();
}
Exemplo n.º 12
0
ListViewer::ListViewer() {
//	Add(tb);
	Add(cl);
	cl.WhenEnterItem = THISBACK(DoNothing);
	UpdateToolbar();
}