예제 #1
0
BOOL  QueryAbandonChanges( HWND hwndWnd )
{
   if ( bFileChanged )
   {
      return ( MBID_YES == DisplayMessageBox ( IDS_ABANDONQUERY,
                                               IDS_ABANDONTITLE,
                                               MB_YESNO | MB_ICONQUESTION | MB_MOVEABLE ) );
   }
   else
   {
      return TRUE;
   }
}
예제 #2
0
/////////////////////////////////////////////////////////////
//                         MAIN                            //
/////////////////////////////////////////////////////////////
int main(int argc, char **argv)
{
	PS2_Init();

   audsrv_init();

	format.bits = 16;
	format.freq = 44100;
	format.channels = 2;
   audsrv_set_format(&format);

	guiFadeOut(4);
   DisplayIntroBox(APP_NAME);
	guiFadeIn(4);
	guiFadeOut(4);

	for ( int i = 0; i < 160*144; i++ )
      g_BitmapData[i] = 0;

   PS2_LoadButtonsConfig(ButtonsConfigPath);
   Load_CNF(ConfigPath);

   if ( SoundEnabled )
      audsrv_set_volume(MAX_VOLUME);
   else
      audsrv_set_volume(MIN_VOLUME);

   // Main Loop
   while ( true ) {
      g_SamplePos = 0;

      dwKeyPad1 = 0;
      dwKeyPad2 = 0;

      if ( !auto_ROM_flag ) {
         MenuBrowser();
      } else {
         // KarasQ: Here preselected ROM path is already
         // copied to g_FilePath (look function Load_CNF)
         auto_ROM_flag = 0;
      }

      int res = infogb_load_rom(g_FilePath);

      // KarasQ: display error and return to
      // browser if ROM is not loaded successfully
      if ( res < 1 ) {
         infogb_close();
      }

      switch ( res ) {
         case 0:
            DisplayMessageBox
            (
               "\nERROR!\n\n"
               "Could not load ROM\n"
               "Failed opening file\n"
               "File not found!",
               MSG_VOID
            );
            continue;
         case -1:
            DisplayMessageBox
            (
               "\nWARNING!\n\n"
               "Could not load ROM\n"
               "Unknown ROM type!",
               MSG_VOID
            );
            continue;
         case -2:
            DisplayMessageBox
            (
               "\nWARNING!\n\n"
               "Could not load ROM\n"
               "Unknown ROM size!",
               MSG_VOID
            );
            continue;
         case -3:
            DisplayMessageBox
            (
               "\nWARNING!\n\n"
               "Could not load ROM\n"
               "Unknown RAM size!",
               MSG_VOID
            );
            continue;
         case -4:
            DisplayMessageBox
            (
               "\nWARNING!\n\n"
               "File name of this ROM is longer\n"
               "than 32 characters! It's better\n"
               "to change it before playing!",
               MSG_VOID
            );
            continue;
         case -5:
            DisplayMessageBox
            (
               "\nERROR!\n\n"
               "Could not extract file archive\n",
               MSG_VOID
            );
            continue;
      }
      CDVD_Stop();

      infogb_init();

      gameboy_cpu_hardreset();
      gameboy_cpu_run();

      audsrv_stop_audio();

      infogb_close();
   }

	return 0;
}
예제 #3
0
void MapiMigration::Connecttoserver()
{
    DisplayMessageBox(L"Connectiong to the server \n");
}
예제 #4
0
void MapiMigration::ImportCalendar()
{
    DisplayMessageBox(L"importing Calendar \n");
}
예제 #5
0
void MapiMigration::ImportContacts()
{
    DisplayMessageBox(L"importing contacts \n");
}
예제 #6
0
void MapiMigration::ImportMail()
{
    DisplayMessageBox(L"importing mails \n");
}
NewGeneMainWindow::NewGeneMainWindow(QWidget * parent) :
	QMainWindow(parent),
	NewGeneWidget(WidgetCreationInfo(this,
									 WIDGET_NATURE_GENERAL)),   // 'this' pointer is cast by compiler to proper Widget instance, which is already created due to order in which base classes appear in class definition
	ui(new Ui::NewGeneMainWindow),
	messager(parent),
	theSplash(nullptr),
	newInputDataset(false),
	newOutputDataset(false)
{

	NewGeneWidget::theMainWindow = this;

	connect(&messager, SIGNAL(DisplayMessageBox(STD_STRING)), this, SLOT(SignalMessageBox(STD_STRING)));

	try
	{

		// Instantiate Managers in main thread
		UIStatusManager::getManager(&messager);
		UIDocumentManager::getManager(&messager);
		UILoggingManager::getManager(&messager);
		UISettingsManager::getManager(&messager);
		UIModelManager::getManager(&messager);
		UIProjectManager::getManager(&messager);
		UIThreadManager::getManager(&messager);
		UITriggerManager::getManager(&messager);
		UIUIDataManager::getManager(&messager);
		UIUIActionManager::getManager(&messager);
		UIModelActionManager::getManager(&messager);

		UIMessager::ManagersInitialized = true;

		ui->setupUi(this);

		QLabel * labelLoadingSpinner { findChild<QLabel *>("labelLoadingSpinner") };

		if (labelLoadingSpinner)
		{
			QMovie * movieLoadingSpinner = new QMovie(":/bluespinner.gif");
			labelLoadingSpinner->setMask((new QPixmap(":/bluespinner.gif"))->mask());
			labelLoadingSpinner->setAttribute(Qt::WA_TranslucentBackground);
			labelLoadingSpinner->setMovie(movieLoadingSpinner);
			movieLoadingSpinner->start();
		}

		NewGeneTabWidget * pTWmain = findChild<NewGeneTabWidget *>("tabWidgetMain");

		if (pTWmain)
		{
			pTWmain->NewGeneUIInitialize();
		}

	}
	catch (boost::exception & e)
	{

		if (std::string const * error_desc = boost::get_error_info<newgene_error_description>(e))
		{
			boost::format msg(error_desc->c_str());
			QMessageBox msgBox;
			msgBox.setText(msg.str().c_str());
			msgBox.exec();
		}
		else
		{
			std::string the_error = boost::diagnostic_information(e);
			boost::format msg("Error: %1%");
			msg % the_error.c_str();
			QMessageBox msgBox;
			msgBox.setText(msg.str().c_str());
			msgBox.exec();
		}

		QCoreApplication::exit(-1);

	}
	catch (std::exception & e)
	{

		boost::format msg("Exception thrown: %1%");
		msg % e.what();
		QCoreApplication::exit(-1);

	}

}