aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlee14 <alee14498@gmail.com>2018-09-01 23:31:03 -0400
committerAlee14 <alee14498@gmail.com>2018-09-01 23:31:03 -0400
commit52376ce623346e257c2b7845d0d2414e7653a6dd (patch)
treebace831eeea5bc4933398fddf45016ee3f6ba4ad
parent71fc0fa9c881d85eb8bb4037c6415cf893914e6f (diff)
downloadProject-Silicon-52376ce623346e257c2b7845d0d2414e7653a6dd.tar.gz
Project-Silicon-52376ce623346e257c2b7845d0d2414e7653a6dd.tar.bz2
Project-Silicon-52376ce623346e257c2b7845d0d2414e7653a6dd.zip
File manager rewrite (not done)
-rw-r--r--Project Ports/MainMenu.cs2
-rw-r--r--Project Ports/Programs/FileManager.Designer.cs118
-rw-r--r--Project Ports/Programs/FileManager.cs7
-rw-r--r--Project Ports/Programs/FileManager.resx3
4 files changed, 58 insertions, 72 deletions
diff --git a/Project Ports/MainMenu.cs b/Project Ports/MainMenu.cs
index 2162526..180b95b 100644
--- a/Project Ports/MainMenu.cs
+++ b/Project Ports/MainMenu.cs
@@ -75,8 +75,8 @@ namespace Project_Ports
MessageBox.Show("You have set the build to \"Debug\". There are some features that is disabled in debug builds.");
#endif
portsVersion.Text = Properties.Settings.Default.version;
-
FileSystem.CreateGameFolder();
+
}
}
diff --git a/Project Ports/Programs/FileManager.Designer.cs b/Project Ports/Programs/FileManager.Designer.cs
index 94c2ba8..8b88d47 100644
--- a/Project Ports/Programs/FileManager.Designer.cs
+++ b/Project Ports/Programs/FileManager.Designer.cs
@@ -28,97 +28,75 @@
/// </summary>
private void InitializeComponent()
{
- this.panel1 = new System.Windows.Forms.Panel();
- this.panel2 = new System.Windows.Forms.Panel();
- this.panel3 = new System.Windows.Forms.Panel();
- this.button1 = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.panel1.SuspendLayout();
+ this.components = new System.ComponentModel.Container();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
+ this.listView = new System.Windows.Forms.ListView();
+ this.label1 = new System.Windows.Forms.Label();
+ this.txtPath = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
- // panel1
+ // imageList
//
- this.panel1.BackColor = System.Drawing.Color.DarkGray;
- this.panel1.Controls.Add(this.textBox1);
- this.panel1.Controls.Add(this.button2);
- this.panel1.Controls.Add(this.button1);
- this.panel1.Location = new System.Drawing.Point(0, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(835, 67);
- this.panel1.TabIndex = 0;
+ this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
+ this.imageList.ImageSize = new System.Drawing.Size(32, 32);
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
//
- // panel2
+ // listView
//
- this.panel2.BackColor = System.Drawing.Color.Gray;
- this.panel2.Location = new System.Drawing.Point(0, 67);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(173, 560);
- this.panel2.TabIndex = 1;
+ this.listView.LargeImageList = this.imageList;
+ this.listView.Location = new System.Drawing.Point(23, 58);
+ this.listView.Name = "listView";
+ this.listView.Size = new System.Drawing.Size(790, 501);
+ this.listView.TabIndex = 0;
+ this.listView.UseCompatibleStateImageBehavior = false;
//
- // panel3
+ // label1
//
- this.panel3.BackColor = System.Drawing.Color.Silver;
- this.panel3.Location = new System.Drawing.Point(172, 67);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(663, 560);
- this.panel3.TabIndex = 2;
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.ForeColor = System.Drawing.Color.White;
+ this.label1.Location = new System.Drawing.Point(20, 19);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(42, 15);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "Path:";
//
- // button1
+ // txtPath
//
- this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.button1.Location = new System.Drawing.Point(23, 18);
- this.button1.Name = "button1";
- this.button1.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.button1.Size = new System.Drawing.Size(36, 31);
- this.button1.TabIndex = 0;
- this.button1.Text = "<-";
- this.button1.UseVisualStyleBackColor = true;
- //
- // button2
- //
- this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
- this.button2.Location = new System.Drawing.Point(65, 18);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(37, 31);
- this.button2.TabIndex = 1;
- this.button2.Text = "->";
- this.button2.UseVisualStyleBackColor = true;
- //
- // textBox1
- //
- this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.textBox1.Location = new System.Drawing.Point(121, 18);
- this.textBox1.Multiline = true;
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(642, 31);
- this.textBox1.TabIndex = 2;
+ this.txtPath.BackColor = System.Drawing.Color.White;
+ this.txtPath.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.txtPath.Cursor = System.Windows.Forms.Cursors.Arrow;
+ this.txtPath.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.txtPath.ForeColor = System.Drawing.Color.Black;
+ this.txtPath.Location = new System.Drawing.Point(68, 14);
+ this.txtPath.Multiline = true;
+ this.txtPath.Name = "txtPath";
+ this.txtPath.ReadOnly = true;
+ this.txtPath.Size = new System.Drawing.Size(744, 25);
+ this.txtPath.TabIndex = 2;
+ this.txtPath.Text = "/";
//
// FileManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.panel3);
- this.Controls.Add(this.panel2);
- this.Controls.Add(this.panel1);
+ this.BackColor = System.Drawing.Color.Gray;
+ this.Controls.Add(this.txtPath);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.listView);
this.Name = "FileManager";
- this.Size = new System.Drawing.Size(835, 627);
+ this.Size = new System.Drawing.Size(835, 575);
this.Load += new System.EventHandler(this.FileManager_Load);
- this.panel1.ResumeLayout(false);
- this.panel1.PerformLayout();
this.ResumeLayout(false);
+ this.PerformLayout();
}
#endregion
- private System.Windows.Forms.Panel panel1;
- private System.Windows.Forms.TextBox textBox1;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.Panel panel2;
- private System.Windows.Forms.Panel panel3;
+ private System.Windows.Forms.ImageList imageList;
+ private System.Windows.Forms.ListView listView;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox txtPath;
}
}
diff --git a/Project Ports/Programs/FileManager.cs b/Project Ports/Programs/FileManager.cs
index fd3931e..c72378d 100644
--- a/Project Ports/Programs/FileManager.cs
+++ b/Project Ports/Programs/FileManager.cs
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
@@ -7,11 +8,13 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using PortEngine;
namespace Project_Ports.Programs
{
public partial class FileManager : UserControl
{
+ List<string> listFiles = new List<string>();
public FileManager()
{
InitializeComponent();
@@ -19,7 +22,9 @@ namespace Project_Ports.Programs
private void FileManager_Load(object sender, EventArgs e)
{
-
+ listFiles.Clear();
+ listView.Items.Clear();
+
}
}
}
diff --git a/Project Ports/Programs/FileManager.resx b/Project Ports/Programs/FileManager.resx
index 1af7de1..2854718 100644
--- a/Project Ports/Programs/FileManager.resx
+++ b/Project Ports/Programs/FileManager.resx
@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
</root> \ No newline at end of file