private void GenericDataToUI(GenericPortraitData data) { txtGenericsID.Text = data.Name; txtGenericsTags.Text = data.tags; trkGenericsVoiceType.Value = data.VoiceType; WorkingDirectory.CreateDirectory(@"Images\GenericPortraits\" + data.Name); picGenericsBG.Image = data.Background ?? new PalettedImage(WorkingDirectory.LoadImage(@"GenericPortraits\" + data.Name + @"\B") ?? new Bitmap(1, 1)); picGenericsFG.Image = data.Foreground ?? new PalettedImage(WorkingDirectory.LoadImage(@"GenericPortraits\" + data.Name + @"\F") ?? new Bitmap(1, 1)); UpdateGenericPreview(); CurrentFile = data.Name; Dirty = false; }