Switch-Toolbox/File_Format_Library/GUI/BFLYT/LayoutEditor.cs

74 lines
1.7 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
2019-08-27 20:38:06 +00:00
namespace FirstPlugin.Forms
{
public partial class LayoutEditor : UserControl
{
2019-08-27 20:38:06 +00:00
public List<BFLYT.Header> LayoutFiles = new List<BFLYT.Header>();
2019-08-28 01:14:37 +00:00
private BFLYT.Header ActiveLayout;
2019-08-27 20:38:06 +00:00
public enum DockLayout
{
Default,
Animation,
}
public LayoutEditor()
{
InitializeComponent();
}
2019-08-27 20:38:06 +00:00
2019-08-28 01:14:37 +00:00
private bool isLoaded = false;
2019-08-27 20:38:06 +00:00
public void LoadBflyt(BFLYT.Header header, string fileName)
{
2019-08-28 01:14:37 +00:00
if (isLoaded) return;
2019-08-27 20:38:06 +00:00
LayoutViewer viewer = new LayoutViewer();
viewer.Dock = DockStyle.Fill;
2019-08-28 01:14:37 +00:00
viewer.TopLevel = false;
viewer.FormBorderStyle = FormBorderStyle.SizableToolWindow;
stPanel1.Controls.Add(viewer);
isLoaded = true;
ActiveLayout = header;
2019-08-27 20:38:06 +00:00
}
2019-08-28 01:14:37 +00:00
2019-08-27 20:38:06 +00:00
public void LoadBflan()
{
}
public void InitalizeEditors()
{
}
2019-08-28 01:14:37 +00:00
private void LayoutEditor_ParentChanged(object sender, EventArgs e)
{
if (this.ParentForm == null) return;
}
private void textureListToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutTextureList textureListForm = new LayoutTextureList();
textureListForm.LoadTextures(ActiveLayout);
if (ParentForm != null && ParentForm.TopLevel)
textureListForm.Show(ParentForm);
else
textureListForm.Show();
}
}
}