AGS.Editor.FontEditor.ImportTTFFont C# (CSharp) Метод

ImportTTFFont() приватный Метод

private ImportTTFFont ( string fileName, string newTTFName, string newWFNName ) : void
fileName string
newTTFName string
newWFNName string
Результат void
        private void ImportTTFFont(string fileName, string newTTFName, string newWFNName)
        {
            int fontSize = NumberEntryDialog.Show("Font size", "Select the font size to import this TTF font at:", DEFAULT_IMPORTED_FONT_SIZE);
            if (fontSize > 0)
            {
                File.Copy(fileName, newTTFName, true);
                try
                {
                    if (File.Exists(newWFNName))
                    {
                        Factory.AGSEditor.DeleteFileOnDiskAndSourceControl(newWFNName);
                    }
                    Factory.NativeProxy.ReloadTTFFont(_item.ID);
                    _item.PointSize = fontSize;
                    _item.SourceFilename = Utilities.GetRelativeToProjectPath(fileName);
                }
                catch (AGSEditorException ex)
                {
                    Factory.GUIController.ShowMessage("Unable to import the font.\n\n" + ex.Message, MessageBoxIcon.Warning);
                    File.Delete(newTTFName);
                }
            }
        }