public VoiceActorInformationGrid() { InitializeComponent(); // See http://stackoverflow.com/questions/937919/datagridviewimagecolumn-red-x DeleteButtonCol.DefaultCellStyle.NullValue = null; DeleteButtonCol.CellTemplate = new DataGridViewEmptyImageCell(); m_dataGrid.DataError += m_dataGrid_DataError; ActorGender.DataSource = VoiceActorInformationViewModel.GetGenderDataTable(); ActorGender.ValueMember = "ID"; ActorGender.DisplayMember = "Name"; ActorAge.DataSource = VoiceActorInformationViewModel.GetAgeDataTable(); ActorAge.ValueMember = "ID"; ActorAge.DisplayMember = "Name"; ActorQuality.DataSource = VoiceActorInformationViewModel.GetVoiceQualityDataTable(); ActorQuality.ValueMember = "ID"; ActorQuality.DisplayMember = "Name"; // Sadly, we have to do this here because setting it in the Designer doesn't work since BetterGrid overrides // the default value in its constructor. m_dataGrid.AllowUserToAddRows = true; m_dataGrid.AllowUserToDeleteRows = true; m_dataGrid.MultiSelect = true; m_dataGrid.EditMode = DataGridViewEditMode.EditOnEnter; // We can't set this in the designer because L10NSharp is squashing it when the header is localized. Cameo.ToolTipText = LocalizationManager.GetString("DialogBoxes.VoiceActorInformation.CameoTooltip", "Distinguished actor to play minor character role."); }
public VoiceActorInformationGrid() { InitializeComponent(); m_dataGrid.AddRemoveRowColumn(null, null, () => LocalizationManager.GetString("DialogBoxes.VoiceActorInformation.DeleteColumn_ToolTip_", "Delete this voice actor"), DeleteActor, true); m_dataGrid.DataError += m_dataGrid_DataError; ActorGender.DataSource = VoiceActorInformationViewModel.GetGenderDataTable(); ActorGender.ValueMember = "ID"; ActorGender.DisplayMember = "Name"; ActorAge.DataSource = VoiceActorInformationViewModel.GetAgeDataTable(); ActorAge.ValueMember = "ID"; ActorAge.DisplayMember = "Name"; ActorAge.ToolTipText = LocalizationManager.GetString("DialogBoxes.VoiceActorInformation.ActorAgeTooltip", "“Age” quality of actor’s voice"); ActorQuality.DataSource = VoiceActorInformationViewModel.GetVoiceQualityDataTable(); ActorQuality.ValueMember = "ID"; ActorQuality.DisplayMember = "Name"; ActorInactive.ToolTipText = LocalizationManager.GetString("DialogBoxes.VoiceActorInformation.ActorAgeTooltip", "No longer available"); // Sadly, we have to do this here because setting it in the Designer doesn't work since BetterGrid overrides // the default value in its constructor. m_dataGrid.AllowUserToAddRows = true; m_dataGrid.AllowUserToDeleteRows = true; m_dataGrid.MultiSelect = true; m_dataGrid.EditMode = DataGridViewEditMode.EditOnEnter; // We can't set this in the designer because L10NSharp is squashing it when the header is localized. Cameo.ToolTipText = LocalizationManager.GetString("DialogBoxes.VoiceActorInformation.CameoTooltip", "Distinguished actor to play minor character role."); LocalizeItemDlg <TMXDocument> .StringsLocalized += HandleStringsLocalized; }
private void HandleStringsLocalized() { ActorGender.DataSource = VoiceActorInformationViewModel.GetGenderDataTable(); ActorAge.DataSource = VoiceActorInformationViewModel.GetAgeDataTable(); ActorQuality.DataSource = VoiceActorInformationViewModel.GetVoiceQualityDataTable(); }