public void UpdateEditor() { if (Parent != null && Parent.Parent != null && Parent.Parent is BFRES) { ((BFRES)Parent.Parent).LoadEditors(this); return; } ImageEditorBase editor = (ImageEditorBase)LibraryGUI.GetActiveContent(typeof(ImageEditorBase)); if (editor == null) { editor = new ImageEditorBase(); editor.Dock = DockStyle.Fill; LibraryGUI.LoadEditor(editor); } editor.Text = Text; editor.LoadProperties(this.texture, OnPropertyChanged); editor.LoadImage(this); if (texture.UserData != null) { UserDataEditor userEditor = (UserDataEditor)editor.GetActiveTabEditor(typeof(UserDataEditor)); if (userEditor == null) { userEditor = new UserDataEditor(); userEditor.Name = "User Data"; editor.AddCustomControl(userEditor, typeof(UserDataEditor)); } userEditor.LoadUserData(texture.UserData); } }
public void UpdateEditor() { ImageEditorBase editor = (ImageEditorBase)LibraryGUI.Instance.GetActiveContent(typeof(ImageEditorBase)); if (editor == null) { editor = new ImageEditorBase(); editor.Dock = DockStyle.Fill; LibraryGUI.Instance.LoadEditor(editor); } editor.Text = Text; editor.LoadProperties(this.texture); editor.LoadImage(this); if (texture.UserData != null) { UserDataEditor userEditor = (UserDataEditor)editor.GetActiveTabEditor(typeof(UserDataEditor)); if (userEditor == null) { userEditor = new UserDataEditor(); userEditor.Name = "User Data"; editor.AddCustomControl(userEditor, typeof(UserDataEditor)); } userEditor.LoadUserData(texture.UserData); } }
private static void init() { UserDataEditor window = (UserDataEditor)EditorWindow.GetWindow(typeof(UserDataEditor)); window.Show(); }
static void Init() { UserDataEditor window = (UserDataEditor)GetWindow(typeof(UserDataEditor)); window.Show(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.stTabControl1 = new Switch_Toolbox.Library.Forms.STTabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel(); this.splitter1 = new System.Windows.Forms.Splitter(); this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel(); this.stPropertyGrid1 = new Switch_Toolbox.Library.Forms.STPropertyGrid(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.userDataEditor1 = new UserDataEditor(); this.stTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.stPanel1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.SuspendLayout(); // // stTabControl1 // this.stTabControl1.Controls.Add(this.tabPage1); this.stTabControl1.Controls.Add(this.tabPage2); this.stTabControl1.Location = new System.Drawing.Point(6, 3); this.stTabControl1.myBackColor = System.Drawing.Color.Empty; this.stTabControl1.Name = "stTabControl1"; this.stTabControl1.SelectedIndex = 0; this.stTabControl1.Size = new System.Drawing.Size(414, 589); this.stTabControl1.TabIndex = 3; // // tabPage1 // this.tabPage1.Controls.Add(this.stPanel2); this.tabPage1.Controls.Add(this.splitter1); this.tabPage1.Controls.Add(this.stPanel1); this.tabPage1.Location = new System.Drawing.Point(4, 25); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(406, 560); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Sub Section"; this.tabPage1.UseVisualStyleBackColor = true; // // stPanel2 // this.stPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.stPanel2.Location = new System.Drawing.Point(3, 286); this.stPanel2.Name = "stPanel2"; this.stPanel2.Size = new System.Drawing.Size(400, 271); this.stPanel2.TabIndex = 3; // // splitter1 // this.splitter1.Dock = System.Windows.Forms.DockStyle.Top; this.splitter1.Location = new System.Drawing.Point(3, 283); this.splitter1.Name = "splitter1"; this.splitter1.Size = new System.Drawing.Size(400, 3); this.splitter1.TabIndex = 2; this.splitter1.TabStop = false; // // stPanel1 // this.stPanel1.Controls.Add(this.stPropertyGrid1); this.stPanel1.Dock = System.Windows.Forms.DockStyle.Top; this.stPanel1.Location = new System.Drawing.Point(3, 3); this.stPanel1.Name = "stPanel1"; this.stPanel1.Size = new System.Drawing.Size(400, 280); this.stPanel1.TabIndex = 1; // // stPropertyGrid1 // this.stPropertyGrid1.AutoScroll = true; this.stPropertyGrid1.DisableHintDisplay = false; this.stPropertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; this.stPropertyGrid1.Location = new System.Drawing.Point(0, 0); this.stPropertyGrid1.Name = "stPropertyGrid1"; this.stPropertyGrid1.Size = new System.Drawing.Size(400, 280); this.stPropertyGrid1.TabIndex = 0; // // tabPage2 // this.tabPage2.Controls.Add(this.userDataEditor1); this.tabPage2.Location = new System.Drawing.Point(4, 25); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Size = new System.Drawing.Size(406, 560); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "User Data"; this.tabPage2.UseVisualStyleBackColor = true; // // userDataEditor1 // this.userDataEditor1.Dock = System.Windows.Forms.DockStyle.Fill; this.userDataEditor1.Location = new System.Drawing.Point(3, 3); this.userDataEditor1.Name = "userDataEditor1"; this.userDataEditor1.Size = new System.Drawing.Size(400, 554); this.userDataEditor1.TabIndex = 1; // // SubFileEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.stTabControl1); this.Name = "SubFileEditor"; this.Size = new System.Drawing.Size(420, 592); this.stTabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.stPanel1.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.ResumeLayout(false); }