mirror of
https://github.com/Gericom/EveryFileExplorer.git
synced 2025-06-19 09:25:42 -04:00
Project Tree and opening files in a project
This commit is contained in:
parent
1fed715787
commit
6da06ffc4e
@ -70,11 +70,17 @@
|
|||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
@ -92,6 +98,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Propeller_Box_Artwork_-_Super_Mario_3D_World.ico" />
|
<Content Include="Propeller_Box_Artwork_-_Super_Mario_3D_World.ico" />
|
||||||
|
<None Include="Resources\document.png" />
|
||||||
|
<None Include="Resources\folder-open.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
52
EveryFileExplorer/Form1.Designer.cs
generated
52
EveryFileExplorer/Form1.Designer.cs
generated
@ -66,9 +66,15 @@
|
|||||||
this.buttonSave = new System.Windows.Forms.ToolStripButton();
|
this.buttonSave = new System.Windows.Forms.ToolStripButton();
|
||||||
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.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
|
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||||
|
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
|
this.panel2.SuspendLayout();
|
||||||
|
this.tabControl1.SuspendLayout();
|
||||||
|
this.tabPage1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// mainMenu1
|
// mainMenu1
|
||||||
@ -212,6 +218,7 @@
|
|||||||
this.menuItem6.Index = 1;
|
this.menuItem6.Index = 1;
|
||||||
this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.F5;
|
this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.F5;
|
||||||
this.menuItem6.Text = "Build and Run";
|
this.menuItem6.Text = "Build and Run";
|
||||||
|
this.menuItem6.Visible = false;
|
||||||
//
|
//
|
||||||
// menuTools
|
// menuTools
|
||||||
//
|
//
|
||||||
@ -323,6 +330,7 @@
|
|||||||
//
|
//
|
||||||
// panel2
|
// panel2
|
||||||
//
|
//
|
||||||
|
this.panel2.Controls.Add(this.tabControl1);
|
||||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.panel2.Location = new System.Drawing.Point(0, 25);
|
this.panel2.Location = new System.Drawing.Point(0, 25);
|
||||||
this.panel2.Name = "panel2";
|
this.panel2.Name = "panel2";
|
||||||
@ -330,12 +338,46 @@
|
|||||||
this.panel2.TabIndex = 5;
|
this.panel2.TabIndex = 5;
|
||||||
this.panel2.Visible = false;
|
this.panel2.Visible = false;
|
||||||
//
|
//
|
||||||
|
// tabControl1
|
||||||
|
//
|
||||||
|
this.tabControl1.Controls.Add(this.tabPage1);
|
||||||
|
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tabControl1.Multiline = true;
|
||||||
|
this.tabControl1.Name = "tabControl1";
|
||||||
|
this.tabControl1.SelectedIndex = 0;
|
||||||
|
this.tabControl1.Size = new System.Drawing.Size(200, 376);
|
||||||
|
this.tabControl1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// tabPage1
|
||||||
|
//
|
||||||
|
this.tabPage1.Controls.Add(this.treeView1);
|
||||||
|
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||||
|
this.tabPage1.Name = "tabPage1";
|
||||||
|
this.tabPage1.Size = new System.Drawing.Size(192, 350);
|
||||||
|
this.tabPage1.TabIndex = 0;
|
||||||
|
this.tabPage1.Text = "Project Explorer";
|
||||||
|
this.tabPage1.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// treeView1
|
||||||
|
//
|
||||||
|
this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
|
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.treeView1.HotTracking = true;
|
||||||
|
this.treeView1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.treeView1.Name = "treeView1";
|
||||||
|
this.treeView1.ShowLines = false;
|
||||||
|
this.treeView1.Size = new System.Drawing.Size(192, 350);
|
||||||
|
this.treeView1.TabIndex = 0;
|
||||||
|
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
|
||||||
|
//
|
||||||
// splitter1
|
// splitter1
|
||||||
//
|
//
|
||||||
this.splitter1.Location = new System.Drawing.Point(200, 25);
|
this.splitter1.Location = new System.Drawing.Point(200, 25);
|
||||||
this.splitter1.Name = "splitter1";
|
this.splitter1.Name = "splitter1";
|
||||||
this.splitter1.Size = new System.Drawing.Size(3, 376);
|
this.splitter1.Size = new System.Drawing.Size(3, 376);
|
||||||
this.splitter1.TabIndex = 7;
|
this.splitter1.TabIndex = 9;
|
||||||
this.splitter1.TabStop = false;
|
this.splitter1.TabStop = false;
|
||||||
this.splitter1.Visible = false;
|
this.splitter1.Visible = false;
|
||||||
//
|
//
|
||||||
@ -362,6 +404,9 @@
|
|||||||
this.panel1.PerformLayout();
|
this.panel1.PerformLayout();
|
||||||
this.toolStrip1.ResumeLayout(false);
|
this.toolStrip1.ResumeLayout(false);
|
||||||
this.toolStrip1.PerformLayout();
|
this.toolStrip1.PerformLayout();
|
||||||
|
this.panel2.ResumeLayout(false);
|
||||||
|
this.tabControl1.ResumeLayout(false);
|
||||||
|
this.tabPage1.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@ -397,7 +442,6 @@
|
|||||||
private System.Windows.Forms.MenuItem menuCompression;
|
private System.Windows.Forms.MenuItem menuCompression;
|
||||||
private System.Windows.Forms.MenuItem menuItem2;
|
private System.Windows.Forms.MenuItem menuItem2;
|
||||||
private System.Windows.Forms.Panel panel2;
|
private System.Windows.Forms.Panel panel2;
|
||||||
private System.Windows.Forms.Splitter splitter1;
|
|
||||||
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;
|
||||||
@ -406,6 +450,10 @@
|
|||||||
private System.Windows.Forms.MenuItem menuCloseProject;
|
private System.Windows.Forms.MenuItem menuCloseProject;
|
||||||
private System.Windows.Forms.MenuItem menuProjectNew;
|
private System.Windows.Forms.MenuItem menuProjectNew;
|
||||||
private System.Windows.Forms.MenuItem menuItem11;
|
private System.Windows.Forms.MenuItem menuItem11;
|
||||||
|
private System.Windows.Forms.TabControl tabControl1;
|
||||||
|
private System.Windows.Forms.TabPage tabPage1;
|
||||||
|
private System.Windows.Forms.TreeView treeView1;
|
||||||
|
private System.Windows.Forms.Splitter splitter1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ using System.Reflection;
|
|||||||
using LibEveryFileExplorer.Compression;
|
using LibEveryFileExplorer.Compression;
|
||||||
using LibEveryFileExplorer.Projects;
|
using LibEveryFileExplorer.Projects;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using EveryFileExplorer.Properties;
|
||||||
|
|
||||||
namespace EveryFileExplorer
|
namespace EveryFileExplorer
|
||||||
{
|
{
|
||||||
@ -23,21 +24,29 @@ namespace EveryFileExplorer
|
|||||||
public Form1()
|
public Form1()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Win32Util.SetWindowTheme(treeView1.Handle, "explorer", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String PendingPath = null;
|
private String PendingPath = null;
|
||||||
|
|
||||||
private ProjectBase Project = null;
|
|
||||||
|
|
||||||
public Form1(String Path)
|
public Form1(String Path)
|
||||||
|
: this()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
|
||||||
if (Path.Length < 1 || !System.IO.File.Exists(Path)) return;
|
if (Path.Length < 1 || !System.IO.File.Exists(Path)) return;
|
||||||
PendingPath = Path;
|
PendingPath = Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ImageList ProjectTreeIL = null;
|
||||||
|
private ProjectBase Project = null;
|
||||||
|
|
||||||
private void Form1_Load(object sender, EventArgs e)
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
ProjectTreeIL = new ImageList();
|
||||||
|
ProjectTreeIL.ColorDepth = ColorDepth.Depth32Bit;
|
||||||
|
ProjectTreeIL.ImageSize = new Size(16, 16);
|
||||||
|
ProjectTreeIL.Images.Add(Resources.document);
|
||||||
|
ProjectTreeIL.Images.Add(Resources.folder_open);
|
||||||
|
treeView1.ImageList = ProjectTreeIL;
|
||||||
|
|
||||||
for (int i = 0; i < this.Controls.Count; i++)
|
for (int i = 0; i < this.Controls.Count; i++)
|
||||||
{
|
{
|
||||||
MdiClient mdiClient = this.Controls[i] as MdiClient;
|
MdiClient mdiClient = this.Controls[i] as MdiClient;
|
||||||
@ -340,7 +349,13 @@ namespace EveryFileExplorer
|
|||||||
{
|
{
|
||||||
//Close all files
|
//Close all files
|
||||||
Program.FileManager.CloseAllFiles();
|
Program.FileManager.CloseAllFiles();
|
||||||
menuProject.Visible = splitter1.Visible = panel2.Visible = menuCloseProject.Enabled = true;
|
|
||||||
|
treeView1.BeginUpdate();
|
||||||
|
treeView1.Nodes.Clear();
|
||||||
|
treeView1.Nodes.AddRange(Project.GetProjectTree());
|
||||||
|
treeView1.EndUpdate();
|
||||||
|
|
||||||
|
menuProject.Visible = panel2.Visible = splitter1.Visible = menuCloseProject.Enabled = true;
|
||||||
menuNew.Enabled = menuFileNew.Enabled = menuOpen.Enabled = buttonOpen.Enabled = false;
|
menuNew.Enabled = menuFileNew.Enabled = menuOpen.Enabled = buttonOpen.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +365,6 @@ namespace EveryFileExplorer
|
|||||||
Project = null;
|
Project = null;
|
||||||
menuProject.Visible = splitter1.Visible = panel2.Visible = menuCloseProject.Enabled = false;
|
menuProject.Visible = splitter1.Visible = panel2.Visible = menuCloseProject.Enabled = false;
|
||||||
menuNew.Enabled = menuFileNew.Enabled = menuOpen.Enabled = buttonOpen.Enabled = true;
|
menuNew.Enabled = menuFileNew.Enabled = menuOpen.Enabled = buttonOpen.Enabled = true;
|
||||||
panel2.Controls.Clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void WndProc(ref Message m)
|
protected override void WndProc(ref Message m)
|
||||||
@ -389,5 +403,12 @@ namespace EveryFileExplorer
|
|||||||
{
|
{
|
||||||
Project.Build();
|
Project.Build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
|
||||||
|
{
|
||||||
|
String Path = Project.ProjectDir + "\\" + e.Node.FullPath;
|
||||||
|
if ((new FileInfo(Path).Attributes & FileAttributes.Directory) != 0) return;
|
||||||
|
Program.FileManager.OpenFile(new EFEDiskFile(Path));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
83
EveryFileExplorer/Properties/Resources.Designer.cs
generated
Normal file
83
EveryFileExplorer/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.18444
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace EveryFileExplorer.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EveryFileExplorer.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap document {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("document", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap folder_open {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("folder_open", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
@ -60,6 +60,7 @@
|
|||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
@ -68,9 +69,10 @@
|
|||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="assembly">
|
<xsd:element name="assembly">
|
||||||
@ -85,9 +87,10 @@
|
|||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="resheader">
|
||||||
@ -109,9 +112,16 @@
|
|||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="document" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\document.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="folder_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\folder-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
BIN
EveryFileExplorer/Resources/document.png
Normal file
BIN
EveryFileExplorer/Resources/document.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 485 B |
BIN
EveryFileExplorer/Resources/folder-open.png
Normal file
BIN
EveryFileExplorer/Resources/folder-open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 647 B |
@ -17,6 +17,10 @@ namespace LibEveryFileExplorer.Projects
|
|||||||
void Save();
|
void Save();
|
||||||
|
|
||||||
void Build();
|
void Build();
|
||||||
|
|
||||||
|
TreeNode[] GetProjectTree();
|
||||||
|
|
||||||
|
String ProjectDir { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class Project<T, U> : ProjectBase
|
public abstract class Project<T, U> : ProjectBase
|
||||||
@ -45,6 +49,8 @@ namespace LibEveryFileExplorer.Projects
|
|||||||
|
|
||||||
public abstract void Build();
|
public abstract void Build();
|
||||||
|
|
||||||
|
public abstract TreeNode[] GetProjectTree();
|
||||||
|
|
||||||
public U ProjectFile { get; protected set; }
|
public U ProjectFile { get; protected set; }
|
||||||
public String ProjectDir { get; protected set; }
|
public String ProjectDir { get; protected set; }
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,34 @@ namespace NDS
|
|||||||
File.WriteAllBytes(ProjectDir + "\\" + ProjectFile.ProjectName + ".nds", data);
|
File.WriteAllBytes(ProjectDir + "\\" + ProjectFile.ProjectName + ".nds", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override TreeNode[] GetProjectTree()
|
||||||
|
{
|
||||||
|
List<TreeNode> Nodes = new List<TreeNode>();
|
||||||
|
var dataNode = new TreeNode("data", 1, 1);
|
||||||
|
Nodes.Add(dataNode);
|
||||||
|
PopulateTreeNodeFromDisk(new DirectoryInfo(ProjectDir + "\\data"), dataNode);
|
||||||
|
var overlayNode = new TreeNode("overlay", 1, 1);
|
||||||
|
Nodes.Add(overlayNode);
|
||||||
|
PopulateTreeNodeFromDisk(new DirectoryInfo(ProjectDir + "\\overlay"), overlayNode);
|
||||||
|
Nodes.Add(new TreeNode("arm9.bin"));
|
||||||
|
Nodes.Add(new TreeNode("arm7.bin"));
|
||||||
|
return Nodes.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PopulateTreeNodeFromDisk(DirectoryInfo Dir, TreeNode Dst)
|
||||||
|
{
|
||||||
|
foreach (var v in Dir.EnumerateDirectories())
|
||||||
|
{
|
||||||
|
var t = new TreeNode(v.Name, 1, 1);
|
||||||
|
Dst.Nodes.Add(t);
|
||||||
|
PopulateTreeNodeFromDisk(v, t);
|
||||||
|
}
|
||||||
|
foreach (var v in Dir.EnumerateFiles())
|
||||||
|
{
|
||||||
|
Dst.Nodes.Add(v.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class NDSProjectIdentifier : ProjectIdentifier
|
public class NDSProjectIdentifier : ProjectIdentifier
|
||||||
{
|
{
|
||||||
public override string GetProjectDescription()
|
public override string GetProjectDescription()
|
||||||
|
@ -99,53 +99,57 @@ namespace NDS.UI
|
|||||||
|
|
||||||
private void LoadTex()
|
private void LoadTex()
|
||||||
{
|
{
|
||||||
TEX0 tt;
|
try
|
||||||
if (mod.TexPlttSet != null) tt = mod.TexPlttSet;
|
|
||||||
else if (tex != null) tt = tex.TexPlttSet;
|
|
||||||
else return;
|
|
||||||
for (int i = 0; i < mod.ModelSet.models.Length; i++)
|
|
||||||
{
|
{
|
||||||
for (int j = 0; j < mod.ModelSet.models[i].materials.materials.Length; j++)
|
TEX0 tt;
|
||||||
|
if (mod.TexPlttSet != null) tt = mod.TexPlttSet;
|
||||||
|
else if (tex != null) tt = tex.TexPlttSet;
|
||||||
|
else return;
|
||||||
|
for (int i = 0; i < mod.ModelSet.models.Length; i++)
|
||||||
{
|
{
|
||||||
TEX0.DictTexData t = null;
|
for (int j = 0; j < mod.ModelSet.models[i].materials.materials.Length; j++)
|
||||||
for (int k = 0; k < mod.ModelSet.models[i].materials.dictTexToMatList.numEntry; k++)
|
|
||||||
{
|
{
|
||||||
if (mod.ModelSet.models[i].materials.dictTexToMatList[k].Value.Materials.Contains((byte)j))
|
TEX0.DictTexData t = null;
|
||||||
|
for (int k = 0; k < mod.ModelSet.models[i].materials.dictTexToMatList.numEntry; k++)
|
||||||
{
|
{
|
||||||
int texid = k;
|
if (mod.ModelSet.models[i].materials.dictTexToMatList[k].Value.Materials.Contains((byte)j))
|
||||||
for (int l = 0; l < tt.dictTex.numEntry; l++)
|
|
||||||
{
|
{
|
||||||
if (tt.dictTex[l].Key == mod.ModelSet.models[i].materials.dictTexToMatList[k].Key) { texid = l; break; }
|
int texid = k;
|
||||||
}
|
for (int l = 0; l < tt.dictTex.numEntry; l++)
|
||||||
t = tt.dictTex[texid].Value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (t == null)
|
|
||||||
continue;
|
|
||||||
mod.ModelSet.models[i].materials.materials[j].Fmt = t.Fmt;
|
|
||||||
mod.ModelSet.models[i].materials.materials[j].origHeight = t.T;
|
|
||||||
mod.ModelSet.models[i].materials.materials[j].origWidth = t.S;
|
|
||||||
TEX0.DictPlttData p = null;
|
|
||||||
if (t.Fmt != Textures.ImageFormat.DIRECT)
|
|
||||||
{
|
|
||||||
for (int k = 0; k < mod.ModelSet.models[i].materials.dictPlttToMatList.numEntry; k++)
|
|
||||||
{
|
|
||||||
if (mod.ModelSet.models[i].materials.dictPlttToMatList[k].Value.Materials.Contains((byte)j))
|
|
||||||
{
|
|
||||||
int palid = k;
|
|
||||||
for (int l = 0; l < tt.dictPltt.numEntry; l++)
|
|
||||||
{
|
{
|
||||||
if (tt.dictPltt[l].Key == mod.ModelSet.models[i].materials.dictPlttToMatList[k].Key) { palid = l; break; }
|
if (tt.dictTex[l].Key == mod.ModelSet.models[i].materials.dictTexToMatList[k].Key) { texid = l; break; }
|
||||||
}
|
}
|
||||||
p = tt.dictPltt[palid].Value;
|
t = tt.dictTex[texid].Value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (t == null)
|
||||||
|
continue;
|
||||||
|
mod.ModelSet.models[i].materials.materials[j].Fmt = t.Fmt;
|
||||||
|
mod.ModelSet.models[i].materials.materials[j].origHeight = t.T;
|
||||||
|
mod.ModelSet.models[i].materials.materials[j].origWidth = t.S;
|
||||||
|
TEX0.DictPlttData p = null;
|
||||||
|
if (t.Fmt != Textures.ImageFormat.DIRECT)
|
||||||
|
{
|
||||||
|
for (int k = 0; k < mod.ModelSet.models[i].materials.dictPlttToMatList.numEntry; k++)
|
||||||
|
{
|
||||||
|
if (mod.ModelSet.models[i].materials.dictPlttToMatList[k].Value.Materials.Contains((byte)j))
|
||||||
|
{
|
||||||
|
int palid = k;
|
||||||
|
for (int l = 0; l < tt.dictPltt.numEntry; l++)
|
||||||
|
{
|
||||||
|
if (tt.dictPltt[l].Key == mod.ModelSet.models[i].materials.dictPlttToMatList[k].Key) { palid = l; break; }
|
||||||
|
}
|
||||||
|
p = tt.dictPltt[palid].Value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UploadTex(t.ToBitmap(p), mod.ModelSet.models[i].materials.materials[j], j + 1);//+ offset);
|
||||||
}
|
}
|
||||||
UploadTex(t.ToBitmap(p), mod.ModelSet.models[i].materials.materials[j], j + 1);//+ offset);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UploadTex(Bitmap b, MDL0.Model.MaterialSet.Material m, int Id)
|
private void UploadTex(Bitmap b, MDL0.Model.MaterialSet.Material m, int Id)
|
||||||
|
Loading…
Reference in New Issue
Block a user