Skip to content

Commit fd62ff7

Browse files
2018.01.12.0 release
Added listview for installed items "Barely working" Added Changelog constant "Currently null"
1 parent f484a34 commit fd62ff7

File tree

4 files changed

+85
-45
lines changed

4 files changed

+85
-45
lines changed

Constants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ namespace TMF_Simplifier
99
public class Constants
1010
{
1111
public const string Version = "2018.01.12.0";
12+
public const string ChangeLog = "";
1213
}
1314
}

MainForm.Designer.cs

Lines changed: 57 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MainForm.cs

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public TMFS()
7474
}
7575
Instance = this;
7676

77-
DownloadsView.Items.Clear();
77+
ItemView.Items.Clear();
7878
Ids = new List<int>[6];
7979
for(int i = 0; i < 6; i++)
8080
{
@@ -177,7 +177,7 @@ private void button1_Click(object sender, EventArgs e)
177177

178178
private void LoadContent()
179179
{
180-
DownloadsView.Items.Clear();
180+
ItemView.Items.Clear();
181181
Task.Factory.StartNew(() => Scraper.Scrape(Category,0));
182182
}
183183

@@ -188,15 +188,15 @@ public void AddRow(ListViewItem row)
188188
// InvokeRequired required compares the thread ID of the
189189
// calling thread to the thread ID of the creating thread.
190190
// If these threads are different, it returns true.
191-
if (this.DownloadsView.InvokeRequired)
191+
if (this.ItemView.InvokeRequired)
192192
{
193193
AddRowCallback d = new AddRowCallback(AddRow);
194194
this.Invoke(d, new object[] { row });
195195
}
196196
else
197197
{
198-
this.DownloadsView.Items.Add(row);
199-
foreach(ColumnHeader header in DownloadsView.Columns)
198+
this.ItemView.Items.Add(row);
199+
foreach(ColumnHeader header in ItemView.Columns)
200200
{
201201
header.Width = -2;
202202
}
@@ -211,7 +211,7 @@ private void DownloadsView_SelectedIndexChanged(object sender, EventArgs e)
211211

212212
private void DownloadsView_MouseDoubleClick(object sender, MouseEventArgs e)
213213
{
214-
string url = "http://totalminerforums.net/index.php?action=downloads;sa=downfile&id=" + Ids[Category][DownloadsView.SelectedItems[0].Index];
214+
string url = "http://totalminerforums.net/index.php?action=downloads;sa=downfile&id=" + Ids[Category][ItemView.SelectedItems[0].Index];
215215
LocationTextbox.Text = url;
216216

217217
}
@@ -392,18 +392,18 @@ private void SortSET_IndexChanged(object sender, EventArgs e)
392392
switch (SortSET.SelectedIndex)
393393
{
394394
case 0:
395-
DownloadsView.Sorting = SortOrder.None;
395+
ItemView.Sorting = SortOrder.None;
396396
LoadContent();
397397
break;
398398
case 1:
399-
DownloadsView.Sorting = SortOrder.Ascending;
399+
ItemView.Sorting = SortOrder.Ascending;
400400
break;
401401
case 2:
402-
DownloadsView.Sorting = SortOrder.Descending;
402+
ItemView.Sorting = SortOrder.Descending;
403403
break;
404404

405405
default:
406-
DownloadsView.Sorting = SortOrder.None;
406+
ItemView.Sorting = SortOrder.None;
407407

408408
break;
409409

@@ -453,7 +453,7 @@ private void SearchBar_TextChanged(object sender, EventArgs e)
453453
PrevSearch = NewSearch.Length;
454454
}
455455

456-
foreach (ListViewItem item in DownloadsView.Items)
456+
foreach (ListViewItem item in ItemView.Items)
457457
{
458458
if (!item.ToString().Contains(SearchBar.Text))
459459
{
@@ -467,5 +467,20 @@ private void SearchBar_Click(object sender, EventArgs e)
467467
SearchBar.Text = "";
468468
PrevSearch = 0;
469469
}
470+
471+
private void label2_Click(object sender, EventArgs e)
472+
{
473+
string[] Downloads = Directory.GetDirectories(ExtractLocation);
474+
ItemView.Items.Clear();
475+
foreach (string item in Downloads)
476+
{
477+
ItemView.Items.Add($"\n{item.Replace($"{ExtractLocation}\\", "")}");
478+
}
479+
}
480+
481+
private void ViewChangelog(object sender, EventArgs e)
482+
{
483+
484+
}
470485
}
471486
}

TMF Simplifier.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<HintPath>packages\HtmlAgilityPack.1.4.9.4\lib\Net45\HtmlAgilityPack.dll</HintPath>
4747
<Private>True</Private>
4848
</Reference>
49+
<Reference Include="Microsoft.VisualStudio.DebuggerVisualizers, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
4950
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
5051
<HintPath>packages\Newtonsoft.Json.11.0.1-beta3\lib\net45\Newtonsoft.Json.dll</HintPath>
5152
</Reference>

0 commit comments

Comments
 (0)