private void cboName_SelectedIndexChanged(object sender, EventArgs e) { AssetViewer viewer = null; if (cboType.SelectedIndex == 0) { viewer = new AssetViewer(Program.State.AssetsDirectory + cboName.Text, EngineResourceFileTypes.Bitmap); } else { viewer = new AssetViewer(GetResourceIdentifierFromListSelection().Data, EngineResourceFileTypes.Bitmap, cboName.Text); } viewer.Dock = DockStyle.Fill; panel1.Controls.Add(viewer); }
private void cboName_SelectedIndexChanged(object sender, EventArgs e) { AssetViewer viewer = null; if (cboType.SelectedIndex == 0) { // audio and video perform the same in AssetViewer viewer = new AssetViewer(Program.State.AssetsDirectory + cboName.Text, EngineResourceFileTypes.Audio); } else { var resId = GetResourceIdentifierFromListSelection(); viewer = new AssetViewer(resId.Data, resId.ResourceType, cboName.Text); } viewer.Dock = DockStyle.Fill; panel1.Controls.Add(viewer); }
private void cboName_SelectedIndexChanged(object sender, EventArgs e) { AssetViewer viewer = null; if (cboType.SelectedIndex == 0) viewer = new AssetViewer(Program.State.AssetsDirectory + cboName.Text, EngineResourceFileTypes.Bitmap); else viewer = new AssetViewer(GetResourceIdentifierFromListSelection().Data, EngineResourceFileTypes.Bitmap, cboName.Text); viewer.Dock = DockStyle.Fill; panel1.Controls.Add(viewer); }