private void OnFinish(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
// Collect the data from the Font and Script page.
_collectionInfo.DefaultLanguage1FontName = _fontDetails.SelectedFont;
_collectionInfo.Language1LineHeight = new decimal(0);
if (_fontDetails.ExtraLineHeight)
{
double height;
if (double.TryParse(_fontDetails.LineHeight, out height))
_collectionInfo.Language1LineHeight = new decimal(height);
}
_collectionInfo.IsLanguage1Rtl = _fontDetails.RightToLeft;
//this both saves a step for the country with the most languages, but also helps get the order between en and tpi to what will be most useful
if (_collectionInfo.Country == "Papua New Guinea")
{
_collectionInfo.Language2Iso639Code = "en";
_collectionInfo.Language3Iso639Code = "tpi";
}
Logger.WriteEvent("Finshed New Collection Wizard");
if (_collectionInfo.IsSourceCollection)
Analytics.Track("Created New Source Collection");
else
Analytics.Track("Create New Vernacular Collection",new Dictionary<string, string>() { { "Country", _collectionInfo.Country } });
Close();
}