/// <summary> /// Initializes a new instance of the <see cref="SCInfo"/> class. /// </summary> /// <param name="SCFile">The sc file used to load this instance.</param> internal SCInfo(SCFile SCFile) { this.SCFile = SCFile; this.Exports = new Exports(); this.Temporary = new Temporary(); }
/// <summary> /// Initializes a new instance of the <see cref="SCTexture"/> class. /// </summary> /// <param name="File">The file used to load this instance.</param> internal SCTexture(SCFile File) { this.SCFile = File; this.Images = new List <Bitmap>(); this.Sizes = new List <Size>(); }
/// <summary> /// Handles the OnClick event of the Close control. /// </summary> /// <param name="_Sender">The source of the event.</param> /// <param name="_Event">The <see cref="EventArgs"/> instance containing the event data.</param> private void Close_OnClick(object _Sender, EventArgs _Event) { this.SCFile = null; this.Picture.Image = null; this.Picture.Size = Size.Empty; this.Status_Bar_File_Name.Text = "-------"; this.Status_Bar_Progress_Bar.Value = 0; this.List_Exports.Nodes.Clear(); }
/// <summary> /// Handles the OnClick event of the Open control. /// </summary> /// <param name="_Sender">The source of the event.</param> /// <param name="_Event">The <see cref="EventArgs"/> instance containing the event data.</param> private void Open_OnClick(object _Sender, EventArgs _Event) { OpenFileDialog Browser = new OpenFileDialog(); Browser.Title = "Open SC Tex File"; Browser.Filter = "SC Texture Files | *_tex.sc"; Browser.InitialDirectory = Directory.GetCurrentDirectory(); this.Status_Bar_Progress_Bar.Value = 0; if (Browser.ShowDialog() == DialogResult.OK) { this.Status_Bar_Progress_Bar.Value = 10; this.SCFile = Resources.Files[Browser.SafeFileName]; this.Status_Bar_Progress_Bar.Value = 20; this.SCFile.SCTexture.Load(); this.Status_Bar_Progress_Bar.Value = 40; if (this.SCFile.SCTexture.Images.Count > 0) { this.Picture.Image = this.SCFile.SCTexture.Images[0]; this.Picture.Size = this.SCFile.SCTexture.Sizes[0]; this.Status_Bar_Progress_Bar.Value = 60; this.Status_Bar_File_Name.Text = this.SCFile.SCInfoI.Name; } this.SCFile.SCInfo.Load(); this.Status_Bar_Progress_Bar.Value = 80; this.Refresh(); this.Status_Bar_Progress_Bar.Value = 100; } }