Exemplo n.º 1
0
void LoadConfig(void)
{
  if (Item_Index[LOAD_PROFILE]) {
    Update[LOAD_PROFILE] = 0;
    if (SD_Card_ON())
    {
      if (FAT_Info() == 0)
      {
         Char_to_Str(FileNum, Item_Index[LOAD_PROFILE]);
         if (Open_File("FILE",FileNum,"CFG") == 0)
         {
            if (Read_File() == 0)
              RestoreConfig();
            else
               DisplayField(InfoF, WHITE, SD_Msgs[ReadErr]);
         } else
            DisplayField(InfoF, WHITE, SD_Msgs[NoFile]);
      } else
         DisplayField(InfoF, WHITE, SD_Msgs[SDErr]);
    } else
       DisplayField(InfoF, WHITE, SD_Msgs[NoCard]);
  } else {
    Read_Parameter();
    RestoreConfig();
  }
}
Exemplo n.º 2
0
void WINAPI EXP_NAME(SetStartupInfo)(const struct PluginStartupInfo *pInfo)
{
    ModuleNumber=pInfo->ModuleNumber;
    apiMenu=pInfo->Menu;
    apiGetMsg=pInfo->GetMsg;
#if defined(WINPORT_DIRECT)
    apiDialogInit=pInfo->DialogInit;
    apiDialogRun=pInfo->DialogRun;
    apiDialogFree=pInfo->DialogFree;
    apiSendDlgMessage=pInfo->SendDlgMessage;
    apiSnprintf = pInfo->FSF->snprintf;
#else
    apiDialog=pInfo->Dialog;
    apiCharTable=pInfo->CharTable;
#endif
    apiText=pInfo->Text;
    apiEditorControl=pInfo->EditorControl;
    _tstrcpy(PluginRootKey, pInfo->RootKey);
    _tstrcpy(PluginRootKey+_tstrlen(PluginRootKey), sDirIncSearch);
#ifdef VIEWVER_SUPPORT
    apiViewerControl=pInfo->ViewerControl;
    iViewerStatusColor=pInfo->AdvControl(ModuleNumber, ACTL_GETCOLOR,(void*)COL_VIEWERSTATUS);
#endif
    RestoreConfig();
}
Exemplo n.º 3
0
void main(int argc, char *argv[])
{
	int n;

	memset(startdir,0,sizeof(startdir));
	memset(cfgfilename,0,sizeof(cfgfilename));
	ArgInit(argc, argv);
	VideoInit();
	ShowCopyright(argc, argv);
//	CheckIfLocked();
	ShowSysInfo();
	ShowEnvInfo();
	ShowMainMenu();
	ShowMemory();
//	CheckVersion();
	ValidateConfig();

l1:	ShowMemory();
	SelectMainMenu();
l2:	switch(mainmenu_sel)
	{
		case 0:		ShowKernelMenu();
					if(keycode==F2)
					{
						ShowMemory();
						mainmenu_sel=1;
						goto l2;
					} else break;
		case 1:		ShowExtenderMenu();
					if(keycode==F1)
					{
						ShowMemory();
						mainmenu_sel=0;
						goto l2;
					} else break;
		case 2:		CreateConfig(); break;
		case 3:		RestoreConfig();break;
		case 4:		id32=id32_old; ClearConfigName(); break;
		case 5:		DiscardExit(); break;
		case 6:		ApplyExit(); break;
	}
	goto l1;
}
Exemplo n.º 4
0
void Stop()
{
  Core::Stop();
  RestoreConfig();
}