Esempio n. 1
0
void CGUISpinControl::PageUp()
{
  switch (m_iType)
  {
  case SPIN_CONTROL_TYPE_INT:
    {
      if (m_iValue - 10 >= m_iStart)
        m_iValue -= 10;
      else
        m_iValue = m_iStart;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
      return ;
    }
    break;
  case SPIN_CONTROL_TYPE_PAGE:
    ChangePage(-10);
    break;
  case SPIN_CONTROL_TYPE_TEXT:
    {
      if (m_iValue - 10 >= 0)
        m_iValue -= 10;
      else
        m_iValue = 0;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
      return ;
    }
    break;
  }

}
void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn )
{
//	if( m_fLockInputTime > 0 )
//		return;
	if( m_bChosen[pn] )
		return;

	bool AnotherPlayerSelected = false;
	FOREACH_PlayerNumber( p )
		if( p != pn && m_bChosen[p] )
			AnotherPlayerSelected = true;

	int iSwitchToIndex = -1;
	for( int i=m_iChoiceOnPage[pn]-1; i>=0; i-- )
	{
		const GameCommand &mc = m_GameCommands[m_CurrentPage][i];
		if( AnotherPlayerSelected && BothPlayersGameCommand(mc) )
			continue;
		if( mc.IsPlayable() )
		{
			iSwitchToIndex = i;
			break;
		}
	}

	if( iSwitchToIndex == -1 )
	{
		if( m_CurrentPage > 0 )
			ChangePage( (Page)(m_CurrentPage-1) );
		return;
	}
	if( ChangeWithinPage( pn, iSwitchToIndex, false ) )
		m_soundChange.Play();
}
Esempio n. 3
0
void CGUISpinControl::PageDown()
{
  switch (m_iType)
  {
  case SPIN_CONTROL_TYPE_INT:
    {
      if (m_iValue + 10 <= m_iEnd)
        m_iValue += 10;
      else
        m_iValue = m_iEnd;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
      return ;
    }
    break;
  case SPIN_CONTROL_TYPE_PAGE:
    ChangePage(10);
    break;
  case SPIN_CONTROL_TYPE_TEXT:
    {
      if (m_iValue + 10 < (int)m_vecLabels.size() )
        m_iValue += 10;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
    }
    break;
  }
}
Esempio n. 4
0
void Arpege::Interface(int Num, int Value)
{
  switch(Num)
  {
  case 0:
  case 1:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
  case 16:
  case 17:
  case 18:
  case 19:
  case 20:
  case 21:
  case 22:
  case 23:
  case 24:
  case 25:
    lastChangeValue = Num;
    ChangeValue( Num , Value , 0);
    break;

  case 10:
    lastChangeValue = CHGT_PAGE;
    if ( ChangePage(Value, 0) ) mxAD.PageChanged();
    break;

  case 11:
    lastChangeValue = CHGT_M1;
    ChangeM1(Value, 0);
    break;

  case 12:
    lastChangeValue = CHGT_M2;
    ChangeM2(Value, 0);
    break;

  case 13:
    lastChangeValue = CHGT_M3;
    ChangeM3(Value, 0);
    break;

  case 32:
    ChangeS1S5(Value);
    break;  

  case 33:
    ChangePAT(Value);
    break;  

  }
}
Esempio n. 5
0
void wxNotebook::OnSelChange(wxBookCtrlEvent& event)
{
    // is it our tab control?
    if ( event.GetEventObject() == this )
        ChangePage(event.GetOldSelection(), event.GetSelection());

    // we want to give others a chance to process this message as well
    event.Skip();
}
Esempio n. 6
0
void page_main::itemTriggered(QTreeWidgetItem *it, int col){
  if(it->childCount()>0){
    it->setExpanded( !it->isExpanded() ); 
    it->setSelected(false);
  }else if(!it->whatsThis(col).isEmpty()){
    emit ChangePage(it->whatsThis(col));
  }else{
   it->setSelected(false);
  }
}
Esempio n. 7
0
void AddPodcastDialog::OpenOPMLFile() {
  const QString filename = QFileDialog::getOpenFileName(
      this, tr("Open OPML file"), last_opml_path_, "OPML files (*.opml)");

  if (filename.isEmpty()) {
    return;
  }

  last_opml_path_ = filename;

  by_url_page_->SetUrlAndGo(QUrl::fromLocalFile(last_opml_path_));
  ChangePage(ui_->stack->indexOf(by_url_page_));
}
Esempio n. 8
0
void UpdateConfiguration()
{
  extern Boolean init_dvi_file(void);
  extern void ReopenDviFile(void);

  initcolor();
  /* FIXME : this should happen only if mode or bdpi changed 
   or shrink factor has changed. */
  reset_fonts();
  reconfig();
  SendMessage(hWndDraw, WM_ERASEBKGND, (WPARAM)GetDC(hWndDraw), 0);
  ChangePage(0);
}
Esempio n. 9
0
void CGUISpinControl::MoveDown(bool bTestReverse)
{
  if (bTestReverse && m_bReverse)
  { // actually should move up.
    MoveUp(false);
    return ;
  }
  switch (m_iType)
  {
  case SPIN_CONTROL_TYPE_INT:
    {
      if (m_iValue + 1 <= m_iEnd)
        m_iValue++;
      else if (m_iValue == m_iEnd)
        m_iValue = m_iStart;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
      return ;
    }
    break;

  case SPIN_CONTROL_TYPE_PAGE:
    ChangePage(1);
    break;

  case SPIN_CONTROL_TYPE_FLOAT:
    {
      if (m_fValue + m_fInterval <= m_fEnd)
        m_fValue += m_fInterval;
      else if (m_fValue + m_fInterval > m_fEnd)
        m_fValue = m_fStart;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
      return ;
    }
    break;

  case SPIN_CONTROL_TYPE_TEXT:
    {
      if (m_iValue + 1 < (int)m_vecLabels.size() )
        m_iValue++;
      else if (m_iValue == (int)m_vecLabels.size() - 1)
        m_iValue = 0;
      CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID());
      SendWindowMessage(msg);
      return ;
    }
    break;
  }
}
Esempio n. 10
0
BOOL
TSetupDlg::ODBCConnect (TODBCConn &conn)
{
  TCHAR szDSN[MAX_SERVER_LEN + MAX_PATH + MAX_PWD_LEN + 100];
  LPCTSTR szHost;

  /* Make sure we have resolved the ZC name,
   * or that the user type <host>:<port> in the server name window
   */
  if ((szHost = m_SERVER.GetHost ()) == NULL)
    {
      conn.m_szSQLState[0] = 0;
      LoadString (m_hInstance,
	  IDS_ZCUNRESOLVED,
	  conn.m_szSQLMessage, NUMCHARS (conn.m_szSQLMessage));
      conn.ShowError (m_hInstance, m_hWnd);
      ChangePage (0);
      return FALSE;
    }

  if (m_AUTHMETHOD.CurSel () == AUTHMETHOD_PKCS12)
    {
      _stprintf (szDSN, _T("HOST=%s;UID=;ENCRYPT=%s;PWD=%s;SERVERCERT=%s"),
	  szHost,
	  m_UID.Text (),
	  m_PWD.Text (),
	  m_USESERVERCERT.Checked () ? m_SERVERCERT.Text () : _T(""));
    }
  else
    {
      _stprintf (szDSN, _T("HOST=%s;UID=%s;PWD=%s"),
	  szHost,
	  m_UID.Text (),
	  m_PWD.Text ());
      if (m_USESSL.Checked ())
	_tcscat (szDSN, _T(";ENCRYPT=1"));
    }

  if (!conn.Connect (m_hWnd, szDSN))
    {
      conn.ShowError (m_hInstance, m_hWnd);
      return FALSE;
    }

  return TRUE;
}
Esempio n. 11
0
void Arpege::Encoder(byte Value)
{
  switch(lastChangeValue)
  {
  case CHGT_PAGE:
    ChangePage(0, Value); 
    break;
  case CHGT_M1:
    ChangeM1(0, Value); 
    break;
  case CHGT_M2:
    ChangeM2(0, Value); 
    break;
  case CHGT_M3:
    ChangeM3(0, Value); 
    break;
  default :
    ChangeValue(lastChangeValue,0, Value );
    break;
  }
}
Esempio n. 12
0
int wxNotebook::DoSetSelection(size_t nPage, int flags)
{
    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("DoSetSelection: invalid notebook page") );

    if ( m_selection == wxNOT_FOUND || nPage != (size_t)m_selection )
    {
        if ( flags & SetSelection_SendEvent )
        {
            if ( !SendPageChangingEvent(nPage) )
            {
                // vetoed by program
                return m_selection;
            }
            //else: program allows the page change

            SendPageChangedEvent(m_selection, nPage);
        }

        ChangePage(m_selection, nPage);
    }
    //else: no change

    return m_selection;
}
Esempio n. 13
0
int AppBrowser (void)
	{
	Debug ("AppBrowser");

	u32 btn;
	
	redraw = 1;
	appsSelected = -1;	// Current selected app with wimote
	spotSelected = -1;
	spotSelectedLast = -1;
	
	browserRet = -1;
	
	grlibSettings.color_window = RGBA(192,192,192,255);
	grlibSettings.color_windowBg = RGBA(32,32,32,128);
	
	grlib_SetRedrawCallback (Redraw, Overlay);
	
	apps = (s_app*) vars.bigblock; //malloc (usedBytes);
	memset (apps, 0, APPSMAX * sizeof(s_app));
	
	config.run.enabled = 0;
	
	// Immediately draw the screen...
	AppsFree ();
	
	InitializeGui ();
	
	/*
	Redraw ();
	grlib_PushScreen ();
	grlib_PopScreen ();
	grlib_Render();  // Render the frame buffer to the TV
	*/
	
	AppsBrowse (0);
	
	if (config.appPage >= 0 && config.appPage <= pageMax)
		page = config.appPage;
	else
		page = 0;

   FeedCoverCache ();
   LiveCheck (1);
   
   // Loop forever
    while (browserRet == -1)
		{
		if (LiveCheck (0)) redraw = 1;
		
		btn = grlib_GetUserInput();
		
		// If [HOME] was pressed on the first Wiimote, break out of the loop
		if (btn)
			{
			browserRet = ChooseDPadReturnMode (btn);
			if (browserRet != -1) break;
			
			if (btn & WPAD_BUTTON_1) 
				{
				spotSelected = -1;
				page = GoToPage (page, pageMax);
				FeedCoverCache ();
				redraw = 1;
				}
			if (btn & WPAD_BUTTON_2) 
				{
				ShowFilterMenu();
				redraw = 1;
				}
			if (btn & WPAD_BUTTON_A && appsSelected != -1 && sortMode == 0) 
				{
				if (apps[appsSelected].type == AT_HBA)
					{
					if (!QuerySelection (appsSelected))
						{
						redraw = 1;
						continue;
						}
					AppsSetRun (appsSelected);
					browserRet = INTERACTIVE_RET_HBSEL;
					break;
					}
				else if (apps[appsSelected].type == AT_FOLDER) // This is a folder ! Jump inside
					{	
					sprintf (config.subpath, "%s/", apps[appsSelected].path);
					sprintf (config.submount, "%s", apps[appsSelected].mount);
					
					AppsBrowse (0);
					redraw = 1;
					}
				else if (apps[appsSelected].type == AT_FOLDERUP) // This is a folder ! Jump inside
					{	
					int i = strlen(config.subpath);
					
					if (i > 0) i--;
					if (i > 0) i--;
					
					while (i >= 0 && config.subpath[i] != '/')
						config.subpath[i--] = 0;
					
					gui.spotsIdx = 0;
					AppsBrowse (0);
					redraw = 1;
					}
				}

			/////////////////////////////////////////////////////////////////////////////////////////////
			// We are in sort mode, check item
			if (btn & WPAD_BUTTON_A && appsSelected != -1 && sortMode > 0) 
				{
				if (!apps[appsSelected].checked)
					{
					apps[appsSelected].priority = sortMode--;
					apps[appsSelected].checked = TRUE;
					redraw = 1;
					//Debug ("selected %s (%d)\n", apps[appsSelected].name, apps[appsSelected].priority);
					}
				else
					{
					}
				}

			/////////////////////////////////////////////////////////////////////////////////////////////
			// Select application as default
			if (btn & WPAD_BUTTON_B && appsSelected != -1 && sortMode == 0)
				{
				ShowAppMenu (appsSelected);
				redraw = 1;
				}

			/////////////////////////////////////////////////////////////////////////////////////////////
			// If user press (B) stop sort mode
			if (btn & WPAD_BUTTON_B && sortMode > 0)
				{
				SortItems();
				
				int i;
				for (i = 0; i < appsCnt; i++)
					{
					apps[i].priority = appsCnt - i;
					apps[i].checked = FALSE;
					}
				sortMode = 0;
				needToSave = 1;
				redraw = 1;
				}

			if (btn & WPAD_BUTTON_HOME && sortMode > 0)
				{
				grlib_menu (0, "You are in sort mode.\n", "Close");
				redraw = 1;
				}

			if (btn & WPAD_BUTTON_HOME && sortMode == 0)
				{
				ShowMainMenu ();
				redraw = 1;
				}
			
			if (btn & WPAD_BUTTON_MINUS)
				{
				page = ChangePage (0);
				}
			if (btn & WPAD_BUTTON_PLUS) 
				{
				page = ChangePage (1);
				}
			}

		if (CoverCache_IsUpdated ()) 
			{
			redraw = 1;
			}
		
		FindSpot ();

		if (redraw)
			{
			Redraw ();
			grlib_PushScreen ();
			redraw = 0;
			}

		REDRAW();
		
		if (grlibSettings.wiiswitch_poweroff)
			{
			browserRet = INTERACTIVE_RET_SHUTDOWN;
			}

		if (grlibSettings.wiiswitch_reset)
			{
			browserRet = INTERACTIVE_RET_WIIMENU;
			}
			
		if (wiiload.status == WIILOAD_HBZREADY)
			{
			WiiloadZipMenu ();
			AppsBrowse (0);
			redraw = 1;
			}
			
		if (wiiload.status == WIILOAD_HBREADY)
			{
			if (WiiloadCheck())
				browserRet = INTERACTIVE_RET_WIILOAD;
			else
				redraw = 1;
			}
		
		if (vars.themeReloaded) // Restart the browser
			{
			vars.themeReloaded = 0;
			browserRet = INTERACTIVE_RET_TOHOMEBREW;
			}
		}
	
	// Lets close the topbar, if needed
	CLOSETOPBAR();
	CLOSEBOTTOMBAR();
	
	// save current page
	config.appPage = page;

	SaveSettings ();
	
	// Clean up all data
	AppsFree ();
	gui_Clean ();
	//free (apps);
	
	grlib_SetRedrawCallback (NULL, NULL);

	return browserRet;
	}
Esempio n. 14
0
BOOL ViewConfigImport(HWND hwnd)
{
  char szBuf[256];
  int i;

  SendDlgItemMessage(hwnd, IDC_EDITGAMMA, WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  resource._gamma = atof(szBuf);

  SendDlgItemMessage(hwnd, IDC_EDITDENSITY, WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  resource._density = atoi(szBuf);

  SendDlgItemMessage(hwnd, IDC_EDITMGS1, WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  if (resource.mg_arg[0])
    free(resource.mg_arg[0]);
  resource.mg_arg[0] = strdup(szBuf);
  SendDlgItemMessage(hwnd, IDC_EDITMGS2, WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  if (resource.mg_arg[1])
    free(resource.mg_arg[1]);
  resource.mg_arg[1] = strdup(szBuf);
  SendDlgItemMessage(hwnd, IDC_EDITMGS3, WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  if (resource.mg_arg[2])
    free(resource.mg_arg[2]);
  resource.mg_arg[2] = strdup(szBuf);

  for (i = 0; i < 3; ++i)
    if (resource.mg_arg[i] != NULL) {
      char    *s;

      mg_size[i].w = mg_size[i].h = atoi(resource.mg_arg[i]);
      s = strchr(resource.mg_arg[i], 'x');
      if (s != NULL) {
	mg_size[i].h = atoi(s + 1);
	if (mg_size[i].h <= 0) mg_size[i].w = 0;
      }
    }

  resource.gs_alpha = (SendDlgItemMessage(hwnd, IDC_CHECKGSALPHA, BM_GETCHECK, 
					(WPARAM) 0, (LPARAM)0) == BST_CHECKED);
  resource.in_memory = (SendDlgItemMessage(hwnd, IDC_CHECKINMEMORY, BM_GETCHECK, 
					(WPARAM) 0, (LPARAM)0) == BST_CHECKED);
  resource._use_grey = (SendDlgItemMessage(hwnd, IDC_CHECKALIASING, BM_GETCHECK, 
					(WPARAM) 0, (LPARAM)0) == BST_CHECKED);
  resource._postscript = (SendDlgItemMessage(hwnd, IDC_CHECKPOSTSCRIPT, BM_GETCHECK, 
					(WPARAM) 0, (LPARAM)0) == BST_CHECKED);
  resource.reverse = (SendDlgItemMessage(hwnd, IDC_CHECKREVIDEO, BM_GETCHECK, 
					(WPARAM) 0, (LPARAM)0) == BST_CHECKED);
#ifdef TRANSFORM
  if (IS_WIN95 || IS_WIN98) {
    resource.use_xform = False;
  }
  else {
    resource.use_xform =  (SendDlgItemMessage(hwnd, IDC_CHECKXFORM,
					      BM_GETCHECK, (WPARAM) 0, (LPARAM) 0) == BST_CHECKED);
    fprintf(stderr, "get use_xform is %s\n", (resource.use_xform ? "true" : "false"));
    if (resource.use_xform) {
      extern void init_xfrm_stack(void);
      init_xfrm_stack();
      ChangePage(0);
    }
  }
#else
  resource.use_xform = False;
#endif

  SendDlgItemMessage(hwnd, IDC_COMBO_FORE_COLOR, 
		     WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  if (resource.fore_color)
    free(resource.fore_color);
  resource.fore_color = xstrdup(szBuf);

  SendDlgItemMessage(hwnd, IDC_COMBO_BACK_COLOR, 
		     WM_GETTEXT, (WPARAM)sizeof(szBuf), (LPARAM)szBuf);
  if (resource.back_color)
    free(resource.back_color);
  resource.back_color = xstrdup(szBuf);

  return TRUE;
}
Esempio n. 15
0
InfoMessageBox::InfoMessageBox(QString message, QString title)
{
    m_dlg_width = 383;
    m_dlg_height = 212;

    //this->resize(228, 117);
    this->resize(m_dlg_width, m_dlg_height);
    this->setModal(true);
    this->setWindowFlags(Qt::Dialog| Qt::FramelessWindowHint | Qt::ToolTip);
    this->setAttribute(Qt::WA_TranslucentBackground);



    m_dlgtitle_lb_height                 = 32;
    m_dlgtitle_lb_spaceitemw        = 60;
    m_frame_lr_margin                   = 12;
    m_frame_tb_margin                   = 11;
    m_framecontainer_style = QString::fromUtf8("#frame_container{background-image: url(:/images/bg_dialog_L.png);color:rgb(0,0,0);font-size:12px;}");


//    m_framecontainer = new QFrame(this);
//    m_framecontainer->setObjectName(QString("frame_container"));
//    m_framecontainer->setAutoFillBackground(true);
//    m_framecontainer->setStyleSheet(m_framecontainer_style);

//    QVBoxLayout  *dlg_layout = new QVBoxLayout(this);
//    dlg_layout->setContentsMargins(0,0,0,0);
//    dlg_layout->addWidget(m_framecontainer);
//
//    m_dlgtitle_lb = new QLabel(m_framecontainer);
//    init_dlgtitle();
//
//
//    QSpacerItem  *title_spitem = new QSpacerItem(m_dlgtitle_lb_spaceitemw,0,QSizePolicy::Fixed);
//    QHBoxLayout *title_layout  = new QHBoxLayout();
//    title_layout->addItem(title_spitem);
//    title_layout->addWidget(m_dlgtitle_lb);
//
//
//    QVBoxLayout   *container_layout = new QVBoxLayout(m_framecontainer);
//    container_layout->setContentsMargins(m_frame_lr_margin,m_frame_tb_margin,m_frame_lr_margin,m_frame_tb_margin);
//    container_layout->setSpacing(1);
//    container_layout->addLayout(title_layout);
//    //m_inner_widget->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
//    //container_layout->addWidget(m_inner_widget);
//
//    container_layout->setStretch(0,0);
//    container_layout->setStretch(1,10);
//
////    resize(m_dlg_width,m_dlg_height);






//    gridLayout = new QGridLayout(this);
//    gridLayout->setSpacing(0);
//    gridLayout->setContentsMargins(0, 0, 0, 0);

    mFrame = new QFrame(this);
    mFrame->setObjectName(QString("Input_frame"));
    mFrame->setFrameShape(QFrame::StyledPanel);
    mFrame->setFrameShadow(QFrame::Raised);
    QPixmap pix;
    pix.load(":/images/bg_dialog_L.png",0,Qt::AvoidDither | Qt::ThresholdDither | Qt::ThresholdAlphaDither);
    QSize sizeImage(m_dlg_width, m_dlg_height);
    QPixmap pixmap(pix.scaled(sizeImage));
    QPalette mPalette = palette();
    mPalette.setBrush(QPalette::Window, QBrush(pixmap));
    mFrame->setPalette(mPalette);

    QVBoxLayout *mGridLayout = new QVBoxLayout(this);
    //mGridLayout->setSpacing(0);
    mGridLayout->setContentsMargins(0, 0, 0, 0);


    titleLabel = new QLabel(mFrame);
    titleLabel->setObjectName(QString("dlg_title_lb"));
    titleLabel->setFixedHeight(m_dlgtitle_lb_height);
    titleLabel->setAlignment(Qt::AlignVCenter);
    QString stylesheet = QString("titleLabel{color:rgb(255,255,255);%1;font-weight:bold;}");
    stylesheet = stylesheet.arg("font-size:14px");
    titleLabel->setStyleSheet(stylesheet);
    titleLabel->setText("Error");

    QSpacerItem  *title_spitem = new QSpacerItem(m_dlgtitle_lb_spaceitemw,0,QSizePolicy::Fixed);

    QHBoxLayout *title_layout  = new QHBoxLayout();
    title_layout->addItem(title_spitem);
    title_layout->addWidget(titleLabel);


    mGridLayout->addWidget(mFrame);






//    gridLayout_2 = new QGridLayout(mFrame);
//
//    horizontalLayout = new QHBoxLayout();
//
//    label = new QLabel(mFrame);
//    label->setMinimumSize(QSize(38, 0));
//    label->setMaximumSize(QSize(38, 16777215));
//    label->setText("Error");
//
//    horizontalLayout->addWidget(label);
//
//    label_2 = new QLabel(mFrame);
//    QFont font;
//    font.setBold(true);
//    font.setWeight(75);
//    label_2->setFont(font);
//    label_2->setText(title);
//    label_2->setStyleSheet(QString::fromUtf8("color: rgb(255, 255, 255);"));
//    label_2->setProperty("overstriking",1);
//
//    horizontalLayout->addWidget(label_2);
//
//    gridLayout_2->addLayout(horizontalLayout, 0, 0, 0, 0);
//
//    label_3 = new QLabel(mFrame);
//    label_3->setWordWrap(true);
//    label_3->setText(message);
//    label_3->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
//
//    gridLayout_2->addWidget(label_3, 1, 0, 1, 3);
//
//    horizontalSpacer = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
//
//    gridLayout_2->addItem(horizontalSpacer, 2, 0, 1, 1);





    pushButton = new QPushButton(mFrame);
    pushButton->setFocusPolicy(Qt::NoFocus);
    SET_STYLE_PROPERTY(NORMAL_BUTTON ,pushButton);

    //gridLayout_2->addWidget(pushButton, 2, 1, 1, 1);

    //horizontalSpacer_2 = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    //gridLayout_2->addItem(horizontalSpacer_2, 2, 2, 1, 1);

    title_layout->addWidget(pushButton);


    //gridLayout->addWidget(mFrame, 0, 0, 1, 1);

    //mGridLayout->addLayout(title_layout);

    uuid ="{f9b01961-e3b2-474c-8521-42371d2cab61}";

    connect(pushButton,SIGNAL(clicked()),this,SLOT(ChangePage()));

    retranslateUi();




}
Esempio n. 16
0
void Global::Interface(int Num, int Value)
{
  switch(Num)
  {
  case 0:
  case 1:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
  case 16:
  case 17:
  case 18:
  case 19:
  case 20:
  case 21:
  case 22:
  case 23:
  case 24:
  case 25:
/*  
#ifdef _DEBUG_MODE_
  Serial.print("Global::Interface=");
  Serial.println(Num);
#endif
*/
    lastChangeValue = Num;
    ChangeValue( Num , Value, 0 );
    break;

  case 10:
    lastChangeValue = CHGT_PAGE;
    if ( ChangePage(Value, 0) ) mxAD.PageChanged();
    break;

  case 11:
    lastChangeValue = CHGT_M1;
    ChangeM1(Value, 0);
    break;

  case 12:
    lastChangeValue = CHGT_M2;
    ChangeM2(Value, 0);
    break;

  case 13:
    lastChangeValue = CHGT_M3;
    ChangeM3(Value, 0);
    break;

  case 32:
    ChangeS1S5(Value);
    break;  

  case 33:
    ChangePAT(Value);
    break;  

  }
}
Esempio n. 17
0
void
TSetupDlg::OnCommand (DWORD dwCmd, LPARAM lParam)
{
  m_dwNotifyCode = dwCmd;

  switch (dwCmd)
    {
    /* Page 1 */
    case MAKELPARAM (IDC_DSN, EN_CHANGE):
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_SERVER, CBN_DROPDOWN):
      m_SERVER.OnCbnDropDown ();
      break;

    case MAKELPARAM (IDC_SERVER, CBN_CLOSEUP):
      m_SERVER.OnCbnCloseUp ();
      break;

    case MAKELPARAM (IDC_SERVER, CBN_EDITCHANGE):
      m_SERVER.OnCbnEditChange ();
      ValidatePage ();
      break;

    /* Page 2 */
    case MAKELPARAM (IDC_AUTHMETHOD, CBN_SELCHANGE):
      SetAuthMethod ();
      break;

    case MAKELPARAM (IDC_USEUID, BN_CLICKED):
      SetUseUID ();
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_UID, EN_CHANGE):
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_BROWSEUIDCERT, BN_CLICKED):
      if (BrowseForFile (m_hInstance, m_UID, IDS_PKCS12BROWSE))
	m_PWD.SetFocus ();
      break;

    case MAKELPARAM (IDC_USESERVERCERT, BN_CLICKED):
      SetUseServerCert (TRUE);
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_SERVERCERT, EN_CHANGE):
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_BROWSESERVERCERT, BN_CLICKED):
      BrowseForFile (m_hInstance, m_SERVERCERT, IDS_X509BROWSE);
      break;

    /* Page 3 */
    case MAKELPARAM (IDC_USEDEFAULTDB, BN_CLICKED):
      SetUseDefaultDB ();
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_USEDEFAULTIL, BN_CLICKED):
      SetUseDefaultIL ();
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_USEDEFAULTCS, BN_CLICKED):
      SetUseDefaultCS ();
      ValidatePage ();
      break;

    case MAKELPARAM (IDC_DEFAULTDB, CBN_SELCHANGE):
    case MAKELPARAM (IDC_DEFAULTDB, CBN_EDITCHANGE):
    case MAKELPARAM (IDC_DEFAULTCS, CBN_SELCHANGE):
    case MAKELPARAM (IDC_DEFAULTCS, CBN_EDITCHANGE):
    case MAKELPARAM (IDC_DEFAULTIL, CBN_SELCHANGE):
    case MAKELPARAM (IDC_DEFAULTIL, CBN_EDITCHANGE):
      ValidatePage ();
      break;

    /* Global buttons */
    case MAKELPARAM (IDC_BACKBTN, BN_CLICKED):
      ChangePage (m_iCurPage - 1);
      break;

    case MAKELPARAM (IDC_NEXTBTN, BN_CLICKED):
      if (m_iCurPage == 0)
	FillAuthMethods ();
      else if (m_iCurPage == 1)
	{
          FillIsolationLevels ();
          if (!FillDBCombos ())
            {
	      SetFocus (GetDlgItem (m_hPageWnd[1], IDC_PWD));
	      break;
            }
	}

      if (m_iCurPage == m_iNumPages - 1)
	{
	  SaveToProps ();
	  EndDialog (m_hWnd, IDOK);
	}
      else
	ChangePage (m_iCurPage + 1);
      break;

    case MAKELPARAM (IDCANCEL, BN_CLICKED):
      EndDialog (m_hWnd, dwCmd);
      break;
    }
}
Esempio n. 18
0
BOOL
TSetupDlg::OnInitDialog (void)
{
  HWND hWnd;

  TWizard::OnInitDialog ();

  /* Page 1 */
  hWnd = AddPage (IDD_CONFIGPAGE1);
  m_DSN.Attach (hWnd, IDC_DSN, MAX_DSN_LEN);
  m_COMMENT.Attach (hWnd, IDC_COMMENT, MAX_COMMENT_LEN);
  m_SERVER.Attach (m_hWnd, hWnd, IDC_SERVER, MAX_SERVER_LEN);
  m_USESSL.Attach (hWnd, IDC_USESSL);
  m_ROUNDROBIN.Attach (hWnd, IDC_RROBIN);

  /* Page 2 */
  hWnd = AddPage (IDD_CONFIGPAGE2);
  m_AUTHMETHOD.Attach (hWnd, IDC_AUTHMETHOD, 64);
  m_USEUID.Attach (hWnd, IDC_USEUID);
  m_UIDLBL.Attach (hWnd, IDC_UIDLBL, 64);
  m_UID.Attach (hWnd, IDC_UID, MAX_PATH);	/* limited in SetAuthMethod */
  m_BROWSEUIDCERT.Attach (hWnd, IDC_BROWSEUIDCERT);
  m_PWDLBL.Attach (hWnd, IDC_PWDLBL, 64);
  m_PWD.Attach (hWnd, IDC_PWD, MAX_PWD_LEN);
  m_USESERVERCERT.Attach (hWnd, IDC_USESERVERCERT);
  m_SERVERCERTLBL.Attach (hWnd, IDC_SERVERCERTLBL, 64);
  m_SERVERCERT.Attach (hWnd, IDC_SERVERCERT, MAX_PATH);
  m_BROWSESERVERCERT.Attach (hWnd, IDC_BROWSESERVERCERT);
  m_NOLOGINBOX.Attach (hWnd, IDC_NOLOGINBOX);

  /* Page 3 */
  hWnd = AddPage (IDD_CONFIGPAGE3);
  m_USEDEFAULTDB.Attach (hWnd, IDC_USEDEFAULTDB);
  m_DEFAULTDB.Attach (hWnd, IDC_DEFAULTDB, MAX_DB_LEN);
  m_USEDEFAULTIL.Attach (hWnd, IDC_USEDEFAULTIL);
  m_DEFAULTIL.Attach (hWnd, IDC_DEFAULTIL, MAX_IL_LEN);
  m_USEDEFAULTCS.Attach (hWnd, IDC_USEDEFAULTCS);
  m_DEFAULTCS.Attach (hWnd, IDC_DEFAULTCS, MAX_CS_LEN);
  m_USEDSTCORRECT.Attach (hWnd, IDC_USEDSTCORRECT);
  m_NOSYSTEMTABLES.Attach (hWnd, IDC_NOSYSTEMTABLES);
  m_TREATVIEWSASTABLES.Attach (hWnd, IDC_TREATVIEWSASTABLES);

  LoadFromProps ();

  m_SERVER.TryResolve ();

  m_USEUID.Check (TRUE);
  SetUseUID ();

  if (m_bFileDSN)
    {
      m_DSN.ReadOnly (TRUE);
      m_hFirstCtl[0] = m_COMMENT.m_hCtl;
      m_USEUID.Enable (FALSE);
    }

  ChangePage (0);

  /* WM_INITDIALOG: return FALSE because we have set the focus */
  return FALSE;
}