This entire commit will be using the code lempamo wrote

This commit is contained in:
Alex-TIMEHACK 2017-08-27 17:27:52 +01:00
parent a751c8fcac
commit 15b5a609e1
4 changed files with 17 additions and 22 deletions

View file

@ -732,10 +732,11 @@ private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
// Delete it // Delete it
fsfi.SubDirs.Remove(dir); fsfi.SubDirs.Remove(dir);
break;
} }
} }
File.WriteAllText(Path.Combine(CurrentDirectory, "_data.info"), JsonConvert.SerializeObject(fsfi)); File.WriteAllText(Path.Combine(CurrentDirectory, "_data.info"), JsonConvert.SerializeObject(fsfi, Formatting.Indented));
} }
else else
{ {
@ -752,10 +753,11 @@ private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
// Delete it // Delete it
fsfi.Files.Remove(file); fsfi.Files.Remove(file);
continue;
} }
} }
File.WriteAllText(Path.Combine(CurrentDirectory, "_data.info"), JsonConvert.SerializeObject(fsfi)); File.WriteAllText(Path.Combine(CurrentDirectory, "_data.info"), JsonConvert.SerializeObject(fsfi, Formatting.Indented));
} }
@ -828,7 +830,7 @@ private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e)
foreach (THDirInfo dir in fsfi.SubDirs) foreach (THDirInfo dir in fsfi.SubDirs)
{ {
if (dir.Name == mainView.FocusedItem.Tag.ToString()) if (dir.Name == OldLabelText)
{ {
// Rename it // Rename it
THDirInfo oldDirInfo = dir; THDirInfo oldDirInfo = dir;
@ -855,7 +857,7 @@ private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e)
foreach (THFileInfo file in fsfi.Files) foreach (THFileInfo file in fsfi.Files)
{ {
if (file.Name == mainView.FocusedItem.Tag.ToString()) if (file.Name == OldLabelText)
{ {
// Rename it // Rename it
THFileInfo oldFileInfo = file; THFileInfo oldFileInfo = file;

View file

@ -29,7 +29,6 @@ protected override void Dispose(bool disposing)
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
//System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassicWindowsExplorer));
this.program = new System.Windows.Forms.Panel(); this.program = new System.Windows.Forms.Panel();
this.mainView = new System.Windows.Forms.ListView(); this.mainView = new System.Windows.Forms.ListView();
this.pnlInfo = new System.Windows.Forms.Panel(); this.pnlInfo = new System.Windows.Forms.Panel();
@ -137,6 +136,7 @@ private void InitializeComponent()
// pictureBox1 // pictureBox1
// //
this.pictureBox1.BackColor = System.Drawing.Color.Transparent; this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.Image = global::Histacom2.Properties.Resources.WinClassicFolderSmall;
this.pictureBox1.Location = new System.Drawing.Point(15, 18); this.pictureBox1.Location = new System.Drawing.Point(15, 18);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(30, 30); this.pictureBox1.Size = new System.Drawing.Size(30, 30);
@ -280,7 +280,7 @@ private void InitializeComponent()
// btnFolderClose // btnFolderClose
// //
this.btnFolderClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); this.btnFolderClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
//this.btnFolderClose.Image = ((System.Drawing.Image)(resources.GetObject("btnFolderClose.Image"))); this.btnFolderClose.Image = global::Histacom2.Properties.Resources.XCross;
this.btnFolderClose.Location = new System.Drawing.Point(172, 3); this.btnFolderClose.Location = new System.Drawing.Point(172, 3);
this.btnFolderClose.Name = "btnFolderClose"; this.btnFolderClose.Name = "btnFolderClose";
this.btnFolderClose.Size = new System.Drawing.Size(21, 16); this.btnFolderClose.Size = new System.Drawing.Size(21, 16);
@ -397,7 +397,7 @@ private void InitializeComponent()
this.TextDocumentToolStripMenuItem, this.TextDocumentToolStripMenuItem,
this.BitmapImageToolStripMenuItem}); this.BitmapImageToolStripMenuItem});
this.CreateShortcutToolStripMenuItem.Name = "CreateShortcutToolStripMenuItem"; this.CreateShortcutToolStripMenuItem.Name = "CreateShortcutToolStripMenuItem";
this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.CreateShortcutToolStripMenuItem.Text = "New"; this.CreateShortcutToolStripMenuItem.Text = "New";
// //
// FolderToolStripMenuItem // FolderToolStripMenuItem
@ -422,21 +422,21 @@ private void InitializeComponent()
// DeleteToolStripMenuItem // DeleteToolStripMenuItem
// //
this.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem"; this.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem";
this.DeleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.DeleteToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.DeleteToolStripMenuItem.Text = "Delete"; this.DeleteToolStripMenuItem.Text = "Delete";
this.DeleteToolStripMenuItem.Click += new System.EventHandler(this.DeleteToolStripMenuItem_Click); this.DeleteToolStripMenuItem.Click += new System.EventHandler(this.DeleteToolStripMenuItem_Click);
// //
// RenameToolStripMenuItem // RenameToolStripMenuItem
// //
this.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem"; this.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem";
this.RenameToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.RenameToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.RenameToolStripMenuItem.Text = "Rename"; this.RenameToolStripMenuItem.Text = "Rename";
this.RenameToolStripMenuItem.Click += new System.EventHandler(this.RenameToolStripMenuItem_Click); this.RenameToolStripMenuItem.Click += new System.EventHandler(this.RenameToolStripMenuItem_Click);
// //
// CloseToolStripMenuItem // CloseToolStripMenuItem
// //
this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem"; this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem";
this.CloseToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.CloseToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.CloseToolStripMenuItem.Text = "Close"; this.CloseToolStripMenuItem.Text = "Close";
this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click); this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click);
// //

View file

@ -787,6 +787,7 @@ private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
// Delete it // Delete it
fsfi.SubDirs.Remove(dir); fsfi.SubDirs.Remove(dir);
continue;
} }
} }
@ -807,6 +808,7 @@ private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
// Delete it // Delete it
fsfi.Files.Remove(file); fsfi.Files.Remove(file);
continue;
} }
} }

View file

@ -117,15 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnFolderClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAwAAAAJCAIAAACJ2loDAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xNkRpr/UAAABCSURBVChThYox
CgAwCAP9/8scHfqgklI0sUKDQ+6irfDv3Sc7SdtMDWKpA7MBKOIZwM8HpABFfDXauANH24wM84VvNpDG
mcWXeFkAAAAASUVORK5CYII=
</value>
</data>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>