Exemplo n.º 1
0
void
PropPageFormats::OnEdit ()
{
  try
    {
      int idx = GetSelectedItem();
      CString formatKey = listControl.GetItemText(idx, 0);
      FormatDefinitionDialog dlg (this, TU_(formatKey));
      if (dlg.DoModal() != IDOK)
	{
	  return;
	}
      FormatInfo formatInfo = dlg.GetFormatInfo();
      if (PathName::Compare(formatInfo.key.c_str(), TU_(formatKey)) != 0)
	{
	  // rename key: delete old, create new
	  SessionWrapper(true)->DeleteFormatInfo (TU_(formatKey));
	  formatKey = formatInfo.key.c_str();
	}
      SessionWrapper(true)->SetFormatInfo (formatInfo);
      Refresh ();
      MakeAlias (formatInfo);
    }
  catch (const MiKTeXException & e)
    {
      ErrorDialog::DoModal (this, e);
    }
  catch (const exception & e)
    {
      ErrorDialog::DoModal (this, e);
    }
}
Exemplo n.º 2
0
/*e*/
void CWindow::LinkWindowToList(CLinkedListT<CWindow> *list)
{
	CListElementT<CWindow>		*ele=MakeAlias();
	
	ThrowIfMemFull_(ele);
	list->LinkElement(ele);
}
Exemplo n.º 3
0
void
PropPageFormats::OnNew ()
{
  try
    {
      FormatDefinitionDialog dlg (this, 0);
      if (dlg.DoModal() != IDOK)
	{
	  return;
	}
      FormatInfo formatInfo = dlg.GetFormatInfo();
      SessionWrapper(true)->SetFormatInfo (formatInfo);
      Refresh ();
      MakeAlias (formatInfo);
    }
  catch (const MiKTeXException & e)
    {
      ErrorDialog::DoModal (this, e);
    }
  catch (const exception & e)
    {
      ErrorDialog::DoModal (this, e);
    }
}