Example #1
0
static void
OnInfoBoxHelp(unsigned item)
{
  int type = (*info_box_combo_list)[item].DataFieldIndex;

  TCHAR caption[100];
  _stprintf(caption, _T("%s: %s"), _("InfoBox"), InfoBoxFactory::GetName(type));

  const TCHAR* text = InfoBoxFactory::GetDescription(type);
  if (text)
    dlgHelpShowModal(XCSoarInterface::main_window, caption, gettext(text));
  else
    dlgHelpShowModal(XCSoarInterface::main_window, caption,
                     _("No help available on this item"));
}
Example #2
0
static void OnDetailsClicked(WndButton* pWnd){

	  TCHAR Details[READLINE_LENGTH +1] = _T("");
	  TCHAR Name[NAME_SIZE +1]= _T("");

  
  {
    ScopeLock guard(CAirspaceManager::Instance().MutexRef());
    CAirspace* airspace = CAirspaceManager::Instance().GetAirspacesForDetails();
    if(airspace) {
    	if(airspace->Comment() != NULL)
  	      _sntprintf(Details,READLINE_LENGTH, _T("%s"), airspace->Comment());
    	else
    	  _sntprintf(Details, READLINE_LENGTH,_T("%s"), (TCHAR*)airspace->TypeName());
  	  _sntprintf(Name,NAME_SIZE, _T("%s %s:"), (TCHAR*)airspace->TypeName(), MsgToken(231) );

    }
//#if TESTBENCH
      StartupStore(_T(". Airspace Name <%s>%s"),Details,NEWLINE);

//#endif    
       dlgHelpShowModal(Name, Details, false);

  }


    
}
Example #3
0
void OnWeatherHelp(WindowControl * Sender){
  WndProperty *wp = (WndProperty*)Sender;
  int type = wp->GetDataField()->GetAsInteger();
  TCHAR caption[80], shelp[20];
	// LKTOKEN  _@M813_ = "Weather parameters" 
  _stprintf(caption, gettext(TEXT("_@M813_")));

  _stprintf(shelp,_T("_@H%d_"),type+650);
  dlgHelpShowModal(caption, shelp);

}
Example #4
0
bool
WindowControl::OnHelp()
{
  if (help_text) {
    dlgHelpShowModal(*(SingleWindow *)GetRootOwner(),
                     caption.c_str(), help_text);
    return true;
  }

  if (help_callback) {
    (help_callback)(this);
    return true;
  }

  return false;
}
Example #5
0
static void
OnWeatherHelp(WindowControl * Sender)
{
  WndProperty *wp = (WndProperty*)Sender;
  int type = wp->GetDataField()->GetAsInteger();
  TCHAR caption[256];
  _tcscpy(caption, _("Weather parameters"));
  const TCHAR *label = RASP.ItemLabel(type);
  if (label != NULL) {
    _tcscat(caption, _T(": "));
    _tcscat(caption, label);
  }

  const TCHAR *help = RASP.ItemHelp(type);
  if (help == NULL)
    help = _("No help available on this item");

  dlgHelpShowModal(UIGlobals::GetMainWindow(), caption, help);
}
Example #6
0
static void
OnContentHelp(WindowControl *Sender)
{
  WndProperty *wp = (WndProperty*)Sender;
  unsigned type = wp->GetDataField()->GetAsInteger();
  if (type >= InfoBoxFactory::NUM_TYPES)
    return;

  const TCHAR *name = InfoBoxFactory::GetName(type);
  if (name == NULL)
    return;

  TCHAR caption[100];
  _stprintf(caption, _T("%s: %s"), _("InfoBox"), gettext(name));

  const TCHAR *text = InfoBoxFactory::GetDescription(type);
  if (text == NULL)
    text = _("No help available on this item");
  else
    text = gettext(text);

  dlgHelpShowModal(wf->GetMainWindow(), caption, text);
}