private void UpdateTagsUIFromEntry(Database.Entry _Entry) { m_ModifyingCheckboxes = true; SetMutuallyExclusiveChoice(_Entry != null ? (int)_Entry.TagType : 0, c0); // SetMutuallyExclusiveChoice( _Entry != null ? (int) _Entry.TagColor : 0, c1 ); SetFlagChoice(_Entry != null ? (int)_Entry.TagColor : 0, c1); SetMutuallyExclusiveChoice(_Entry != null ? (int)_Entry.TagShade : 0, c2); SetMutuallyExclusiveChoiceWithMaster(_Entry != null ? (int)_Entry.TagNature : 0, (int)Database.Entry.TAGS_NATURE.NATURE, c3); SetMutuallyExclusiveChoiceWithMaster(_Entry != null ? (int)_Entry.TagFurniture : 0, (int)Database.Entry.TAGS_FURNITURE.FURNITURE, c4); SetMutuallyExclusiveChoiceWithMaster(_Entry != null ? (int)_Entry.TagConstruction : 0, (int)Database.Entry.TAGS_CONSTRUCTION.CONSTRUCTION, c5); SetFlagChoice(_Entry != null ? (int)_Entry.TagModifiers : 0, c6); m_ModifyingCheckboxes = false; }
private void UpdateUIFromEntry(Database.Entry _Entry) { textBoxRelativePath.Text = _Entry != null ? _Entry.RelativePath : ""; textBoxFriendlyName.Text = _Entry != null ? _Entry.FriendlyName : ""; textBoxDescription.Text = _Entry != null ? _Entry.Description : ""; textBoxOverviewImage.Text = _Entry != null && _Entry.OverviewImageFileName != null ? _Entry.OverviewImageFileName.FullName : ""; panelOverviewImage.SourceImage = _Entry != null ? _Entry.OverviewImage : null; panelThumbnail.SourceImage = _Entry != null ? _Entry.Thumbnail : null; UpdateTagsUIFromEntry(_Entry); Database.Manifest M = _Entry != null ? _Entry.Manifest : null; if (M != null) { M.LoadTextures(); // Make sure textures are ready } panelSwatchMin.BackColor = M != null ? M.m_SwatchMin.Color : BackColor; panelSwatchMax.BackColor = M != null ? M.m_SwatchMax.Color : BackColor; panelSwatchAvg.BackColor = M != null ? M.m_SwatchAvg.Color : BackColor; Panel[] CustomSwatchPanels = new Panel[] { panelCS0, panelCS1, panelCS2, panelCS3, panelCS4, panelCS5, panelCS6, panelCS7, panelCS8, }; for (int i = 0; i < CustomSwatchPanels.Length; i++) { bool Available = M != null && i < M.m_CustomSwatches.Length; CustomSwatchPanels[i].BackColor = Available ? M.m_CustomSwatches[i].Color : BackColor; panelTexture.CustomSwatches[i] = Available ? new WMath.Vector4D(M.m_CustomSwatches[i].m_LocationTopLeft.x, M.m_CustomSwatches[i].m_LocationTopLeft.y, M.m_CustomSwatches[i].m_LocationBottomRight.x, M.m_CustomSwatches[i].m_LocationBottomRight.y) : null; } panelTexture.SourceImage = M != null ? M.m_Texture : null; }
private void listBoxDatabaseEntries_SelectedIndexChanged( object sender, EventArgs e ) { Database.Entry Selection = listBoxDatabaseEntries.SelectedItem as Database.Entry; SelectedEntry = Selection; }
private void listBoxDatabaseEntries_SelectedIndexChanged(object sender, EventArgs e) { Database.Entry Selection = listBoxDatabaseEntries.SelectedItem as Database.Entry; SelectedEntry = Selection; }