Plugin stuff, open multiple files at a time, bugfix

This commit is contained in:
Gericom 2014-11-06 19:16:24 +01:00
parent 4adb414a72
commit cabb11d440
10 changed files with 130 additions and 52 deletions

View File

@ -35,6 +35,7 @@
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.treeView1 = new System.Windows.Forms.TreeView(); this.treeView1 = new System.Windows.Forms.TreeView();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.treeView2 = new System.Windows.Forms.TreeView();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.tabPage4 = new System.Windows.Forms.TabPage(); this.tabPage4 = new System.Windows.Forms.TabPage();
this.tabPage5 = new System.Windows.Forms.TabPage(); this.tabPage5 = new System.Windows.Forms.TabPage();
@ -42,7 +43,6 @@
this.simpleOpenGlControl1 = new Tao.Platform.Windows.SimpleOpenGlControl(); this.simpleOpenGlControl1 = new Tao.Platform.Windows.SimpleOpenGlControl();
this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.mainMenu1 = new LibEveryFileExplorer.UI.MainMenu(this.components); this.mainMenu1 = new LibEveryFileExplorer.UI.MainMenu(this.components);
this.treeView2 = new System.Windows.Forms.TreeView();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@ -138,6 +138,16 @@
this.tabPage2.Text = "Groups"; this.tabPage2.Text = "Groups";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// treeView2
//
this.treeView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView2.HideSelection = false;
this.treeView2.HotTracking = true;
this.treeView2.Location = new System.Drawing.Point(0, 0);
this.treeView2.Name = "treeView2";
this.treeView2.Size = new System.Drawing.Size(186, 156);
this.treeView2.TabIndex = 0;
//
// tabPage3 // tabPage3
// //
this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Location = new System.Drawing.Point(4, 22);
@ -200,16 +210,6 @@
this.toolStrip1.TabIndex = 0; this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
// treeView2
//
this.treeView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView2.HideSelection = false;
this.treeView2.HotTracking = true;
this.treeView2.Location = new System.Drawing.Point(0, 0);
this.treeView2.Name = "treeView2";
this.treeView2.Size = new System.Drawing.Size(186, 156);
this.treeView2.TabIndex = 0;
//
// CLYTViewer // CLYTViewer
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -219,6 +219,7 @@
this.Menu = this.mainMenu1; this.Menu = this.mainMenu1;
this.Name = "CLYTViewer"; this.Name = "CLYTViewer";
this.Text = "CLYTViewer"; this.Text = "CLYTViewer";
this.Activated += new System.EventHandler(this.CLYTViewer_Activated);
this.Load += new System.EventHandler(this.CLYTViewer_Load); this.Load += new System.EventHandler(this.CLYTViewer_Load);
this.Layout += new System.Windows.Forms.LayoutEventHandler(this.CLYTViewer_Layout); this.Layout += new System.Windows.Forms.LayoutEventHandler(this.CLYTViewer_Layout);
this.Resize += new System.EventHandler(this.CLYTViewer_Resize); this.Resize += new System.EventHandler(this.CLYTViewer_Resize);

View File

@ -231,5 +231,10 @@ namespace _3DS.UI
Render(); Render();
Render(); Render();
} }
private void CLYTViewer_Activated(object sender, EventArgs e)
{
for (int i = 0; i < 8; i++) Render();
}
} }
} }

View File

@ -36,6 +36,9 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Propeller_Box_Artwork_-_Super_Mario_3D_World.ico</ApplicationIcon> <ApplicationIcon>Propeller_Box_Artwork_-_Super_Mario_3D_World.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<StartupObject>EveryFileExplorer.Program</StartupObject>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

View File

@ -34,14 +34,22 @@
this.menuFile = new System.Windows.Forms.MenuItem(); this.menuFile = new System.Windows.Forms.MenuItem();
this.menuNew = new System.Windows.Forms.MenuItem(); this.menuNew = new System.Windows.Forms.MenuItem();
this.menuFileNew = new System.Windows.Forms.MenuItem(); this.menuFileNew = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();
this.menuOpen = new System.Windows.Forms.MenuItem(); this.menuOpen = new System.Windows.Forms.MenuItem();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuClose = new System.Windows.Forms.MenuItem(); this.menuClose = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuSave = new System.Windows.Forms.MenuItem(); this.menuSave = new System.Windows.Forms.MenuItem();
this.menuSaveAs = new System.Windows.Forms.MenuItem(); this.menuSaveAs = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuExit = new System.Windows.Forms.MenuItem(); this.menuExit = new System.Windows.Forms.MenuItem();
this.menuEdit = new System.Windows.Forms.MenuItem(); this.menuEdit = new System.Windows.Forms.MenuItem();
this.menuProject = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuTools = new System.Windows.Forms.MenuItem(); this.menuTools = new System.Windows.Forms.MenuItem();
this.menuCompression = new System.Windows.Forms.MenuItem(); this.menuCompression = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem();
@ -59,9 +67,6 @@
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.splitter1 = new System.Windows.Forms.Splitter(); this.splitter1 = new System.Windows.Forms.Splitter();
this.menuProject = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -82,8 +87,13 @@
this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuNew, this.menuNew,
this.menuFileNew, this.menuFileNew,
this.menuItem10,
this.menuItem11,
this.menuOpen, this.menuOpen,
this.menuItem1,
this.menuItem8,
this.menuClose, this.menuClose,
this.menuItem9,
this.menuItem5, this.menuItem5,
this.menuSave, this.menuSave,
this.menuSaveAs, this.menuSaveAs,
@ -101,46 +111,72 @@
this.menuFileNew.Index = 1; this.menuFileNew.Index = 1;
this.menuFileNew.Text = "New from File"; this.menuFileNew.Text = "New from File";
// //
// menuItem10
//
this.menuItem10.Index = 2;
this.menuItem10.Text = "New Project";
//
// menuItem11
//
this.menuItem11.Index = 3;
this.menuItem11.Text = "-";
//
// menuOpen // menuOpen
// //
this.menuOpen.Index = 2; this.menuOpen.Index = 4;
this.menuOpen.Text = "Open..."; this.menuOpen.Text = "Open...";
this.menuOpen.Click += new System.EventHandler(this.OpenFile); this.menuOpen.Click += new System.EventHandler(this.OpenFile);
// //
// menuItem1
//
this.menuItem1.Index = 5;
this.menuItem1.Text = "Open Project...";
//
// menuItem8
//
this.menuItem8.Index = 6;
this.menuItem8.Text = "-";
//
// menuClose // menuClose
// //
this.menuClose.Enabled = false; this.menuClose.Enabled = false;
this.menuClose.Index = 3; this.menuClose.Index = 7;
this.menuClose.Text = "Close"; this.menuClose.Text = "Close";
this.menuClose.Click += new System.EventHandler(this.menuClose_Click); this.menuClose.Click += new System.EventHandler(this.menuClose_Click);
// //
// menuItem9
//
this.menuItem9.Enabled = false;
this.menuItem9.Index = 8;
this.menuItem9.Text = "Close Project";
//
// menuItem5 // menuItem5
// //
this.menuItem5.Index = 4; this.menuItem5.Index = 9;
this.menuItem5.Text = "-"; this.menuItem5.Text = "-";
// //
// menuSave // menuSave
// //
this.menuSave.Enabled = false; this.menuSave.Enabled = false;
this.menuSave.Index = 5; this.menuSave.Index = 10;
this.menuSave.Text = "Save"; this.menuSave.Text = "Save";
this.menuSave.Click += new System.EventHandler(this.SaveFile); this.menuSave.Click += new System.EventHandler(this.SaveFile);
// //
// menuSaveAs // menuSaveAs
// //
this.menuSaveAs.Enabled = false; this.menuSaveAs.Enabled = false;
this.menuSaveAs.Index = 6; this.menuSaveAs.Index = 11;
this.menuSaveAs.Text = "Save As..."; this.menuSaveAs.Text = "Save As...";
this.menuSaveAs.Click += new System.EventHandler(this.menuSaveAs_Click); this.menuSaveAs.Click += new System.EventHandler(this.menuSaveAs_Click);
// //
// menuItem7 // menuItem7
// //
this.menuItem7.Index = 7; this.menuItem7.Index = 12;
this.menuItem7.Text = "-"; this.menuItem7.Text = "-";
// //
// menuExit // menuExit
// //
this.menuExit.Index = 8; this.menuExit.Index = 13;
this.menuExit.Text = "Exit"; this.menuExit.Text = "Exit";
this.menuExit.Click += new System.EventHandler(this.menuExit_Click); this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
// //
@ -151,6 +187,29 @@
this.menuEdit.MergeType = System.Windows.Forms.MenuMerge.MergeItems; this.menuEdit.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
this.menuEdit.Text = "Edit"; this.menuEdit.Text = "Edit";
// //
// menuProject
//
this.menuProject.Index = 2;
this.menuProject.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem3,
this.menuItem6});
this.menuProject.MergeOrder = 2;
this.menuProject.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
this.menuProject.Text = "Project";
this.menuProject.Visible = false;
//
// menuItem3
//
this.menuItem3.Index = 0;
this.menuItem3.Shortcut = System.Windows.Forms.Shortcut.F6;
this.menuItem3.Text = "Build";
//
// menuItem6
//
this.menuItem6.Index = 1;
this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.F5;
this.menuItem6.Text = "Build and Run";
//
// menuTools // menuTools
// //
this.menuTools.Index = 3; this.menuTools.Index = 3;
@ -215,6 +274,7 @@
// openFileDialog1 // openFileDialog1
// //
this.openFileDialog1.FileName = "openFileDialog1"; this.openFileDialog1.FileName = "openFileDialog1";
this.openFileDialog1.Multiselect = true;
// //
// panel1 // panel1
// //
@ -276,29 +336,6 @@
this.splitter1.TabStop = false; this.splitter1.TabStop = false;
this.splitter1.Visible = false; this.splitter1.Visible = false;
// //
// menuProject
//
this.menuProject.Index = 2;
this.menuProject.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem3,
this.menuItem6});
this.menuProject.MergeOrder = 2;
this.menuProject.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
this.menuProject.Text = "Project";
this.menuProject.Visible = false;
//
// menuItem3
//
this.menuItem3.Index = 0;
this.menuItem3.Shortcut = System.Windows.Forms.Shortcut.F6;
this.menuItem3.Text = "Build";
//
// menuItem6
//
this.menuItem6.Index = 1;
this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.F5;
this.menuItem6.Text = "Build and Run";
//
// Form1 // Form1
// //
this.AllowDrop = true; this.AllowDrop = true;
@ -361,6 +398,11 @@
private System.Windows.Forms.MenuItem menuProject; private System.Windows.Forms.MenuItem menuProject;
private System.Windows.Forms.MenuItem menuItem3; private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem6; private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.MenuItem menuItem9;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem menuItem11;
} }
} }

View File

@ -171,7 +171,10 @@ namespace EveryFileExplorer
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
&& openFileDialog1.FileName.Length > 0) && openFileDialog1.FileName.Length > 0)
{ {
Program.FileManager.OpenFile(new EFEDiskFile(openFileDialog1.FileName)); foreach (String s in openFileDialog1.FileNames)
{
Program.FileManager.OpenFile(new EFEDiskFile(s));
}
} }
opening = false; opening = false;
} }

View File

@ -126,9 +126,6 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>379, 17</value> <value>379, 17</value>
</metadata> </metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>379, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="buttonOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@ -15,6 +15,7 @@ namespace EveryFileExplorer.Plugins
public String Version; public String Version;
public Type[] CompressionTypes; public Type[] CompressionTypes;
public Type[] FileFormatTypes; public Type[] FileFormatTypes;
public Type[] ProjectTypes;
public Plugin(Assembly Assembly) public Plugin(Assembly Assembly)
{ {
@ -31,15 +32,18 @@ namespace EveryFileExplorer.Plugins
Type[] tt = Assembly.GetExportedTypes(); Type[] tt = Assembly.GetExportedTypes();
List<Type> fe = new List<Type>(); List<Type> fe = new List<Type>();
List<Type> ce = new List<Type>(); List<Type> ce = new List<Type>();
List<Type> pe = new List<Type>();
foreach (var t in tt) foreach (var t in tt)
{ {
if (!t.IsClass) continue; if (!t.IsClass) continue;
var v = t.GetInterfaces(); var v = t.GetInterfaces();
if (v.Length != 0 && t.GetInterfaces()[0].Name == "FileFormatBase") fe.Add(t); if (v.Length != 0 && t.GetInterfaces()[0].Name == "FileFormatBase") fe.Add(t);
else if (v.Length != 0 && t.GetInterfaces()[0].Name == "CompressionFormatBase") ce.Add(t); else if (v.Length != 0 && t.GetInterfaces()[0].Name == "CompressionFormatBase") ce.Add(t);
else if (v.Length != 0 && t.GetInterfaces()[0].Name == "ProjectBase") pe.Add(t);
} }
FileFormatTypes = fe.ToArray(); FileFormatTypes = fe.ToArray();
CompressionTypes = ce.ToArray(); CompressionTypes = ce.ToArray();
ProjectTypes = pe.ToArray();
} }
public static bool IsPlugin(Assembly Assembly) public static bool IsPlugin(Assembly Assembly)
@ -49,7 +53,7 @@ namespace EveryFileExplorer.Plugins
{ {
if (!t.IsClass) continue; if (!t.IsClass) continue;
var v = t.GetInterfaces(); var v = t.GetInterfaces();
if (v.Length != 0 && (t.GetInterfaces()[0].Name == "FileFormatBase" || t.GetInterfaces()[0].Name == "CompressionFormatBase")) return true; if (v.Length != 0 && (t.GetInterfaces()[0].Name == "FileFormatBase" || t.GetInterfaces()[0].Name == "CompressionFormatBase" || t.GetInterfaces()[0].Name == "ProjectBase")) return true;
} }
return false; return false;
} }

View File

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Every File Explorer")] [assembly: AssemblyTitle("Every File Explorer")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("Takes hacking to a higher level!")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("Devbuild")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Every File Explorer")] [assembly: AssemblyProduct("Every File Explorer")]
[assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014")] [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014")]

View File

@ -6,8 +6,23 @@ using System.Windows.Forms;
namespace LibEveryFileExplorer.Projects namespace LibEveryFileExplorer.Projects
{ {
public abstract class Project public interface ProjectBase
{ {
String ProjectDirectory { get; }
bool CanRun { get; }
Control GetProjectControl();
void Build();
void Run();
void SaveProjectFile();
}
public abstract class Project<T> : ProjectBase where T : ProjectIdentifier, new()
{
private static T _identifier = new T();
public static T Identifier { get { return _identifier; } }
public Project(String ProjectDir) public Project(String ProjectDir)
{ {
ProjectDirectory = ProjectDir; ProjectDirectory = ProjectDir;
@ -20,5 +35,12 @@ namespace LibEveryFileExplorer.Projects
public abstract void Build(); public abstract void Build();
public abstract void Run(); public abstract void Run();
public abstract void SaveProjectFile();
}
public abstract class ProjectIdentifier
{
public abstract String GetProjectDescription();
public abstract bool IsProject(byte[] Data);
} }
} }

View File

@ -10,5 +10,6 @@ Just open the project in Visual Studio, and build it. You may need to specify th
* 3DS * 3DS
* Common Compressors * Common Compressors
* Common Files * Common Files
* Lego Pirates of the Carribean
* Mario Kart * Mario Kart
* NDS * NDS