Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
nstlaurent committed Mar 21, 2020
2 parents d5fb08d + e5a7acf commit b09b37f
Show file tree
Hide file tree
Showing 66 changed files with 2,246 additions and 894 deletions.
7 changes: 5 additions & 2 deletions DoomLauncher.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DoomLauncher", "DoomLauncher\DoomLauncher.csproj", "{938B529A-9AFD-4AE0-9F0F-5CB9527AD2F1}"
ProjectSection(ProjectDependencies) = postProject
Expand Down Expand Up @@ -84,4 +84,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {847DA28F-AD38-47C7-9576-BCB3C6B863F1}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion DoomLauncher/Adapters/DataAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace DoomLauncher
{
class DataAccess
public class DataAccess
{
public DataAccess(IDatabaseAdapter dbAdapter, string connectionString)
{
Expand Down
277 changes: 162 additions & 115 deletions DoomLauncher/Adapters/DbDataSourceAdapter.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion DoomLauncher/Adapters/WadArchiveDataAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace DoomLauncher
{
class WadArchiveDataAdapter : IDataSourceAdapter
class WadArchiveDataAdapter : IGameFileDataSourceAdapter
{
private string m_urlMD5 = "http://www.wad-archive.com/api/latest/";
private string m_urlFilename = "http://www.wad-archive.com/wadseeker/";
Expand Down
15 changes: 2 additions & 13 deletions DoomLauncher/Config/AppConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using DoomLauncher.Interfaces;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DoomLauncher
Expand Down Expand Up @@ -99,8 +96,8 @@ private void Refresh(bool throwErrors)
ColumnConfig = GetValue(config, "ColumnConfig");
ScreenshotPreviewSize = Convert.ToInt32(GetValue(config, "ScreenshotPreviewSize"));

DateParseFormats = SplitString(GetValue(config, "DateParseFormats"));
ScreenshotCaptureDirectories = SplitString(GetValue(config, "ScreenshotCaptureDirectories"));
DateParseFormats = Util.SplitString(GetValue(config, "DateParseFormats"));
ScreenshotCaptureDirectories = Util.SplitString(GetValue(config, "ScreenshotCaptureDirectories"));
}
catch(Exception)
{
Expand Down Expand Up @@ -139,14 +136,6 @@ public void RefreshColumnConfig()
ColumnConfig = GetValue(config, "ColumnConfig");
}

private string[] SplitString(string item)
{
if (!string.IsNullOrEmpty(item))
return item.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
else
return new string[] { };
}

private void VerifyPaths(bool throwErrors)
{
VerifyPath(GameFileDirectory, throwErrors);
Expand Down
3 changes: 2 additions & 1 deletion DoomLauncher/Config/AppVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public enum AppVersion
Version_2_6_3_1,
Version_2_6_3_2,
Version_2_6_4_1,
Version_2_6_4_1_Update1
Version_2_6_4_1_Update1,
Version_2_7_0_0
}
}
15 changes: 4 additions & 11 deletions DoomLauncher/Controls/DownloadView.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DoomLauncher
Expand Down Expand Up @@ -40,13 +35,14 @@ public void AddDownload(object key, string text)

if (!m_downloadLookup.ContainsKey(key))
{
DpiScale dpiScale = new DpiScale(CreateGraphics());
DownloadViewItem item = CreateDownloadViewItem(text);
m_downloadLookup.Add(key, item);

tblMain.RowCount++;
tblMain.RowStyles.Add(new RowStyle(SizeType.Percent, 100));
tblMain.RowStyles[tblMain.RowStyles.Count - 2].SizeType = SizeType.Absolute;
tblMain.RowStyles[tblMain.RowStyles.Count - 2].Height = s_rowHeight;
tblMain.RowStyles[tblMain.RowStyles.Count - 2].Height = dpiScale.ScaleIntY(s_rowHeight);
tblMain.Controls.Add(item, 0, tblMain.RowStyles.Count - 2);

UpdateSize();
Expand Down Expand Up @@ -80,17 +76,15 @@ private DownloadViewItem CreateDownloadViewItem(string text)

private void UpdateSize()
{
Height = tblMain.RowStyles.Count * s_rowHeight;
DpiScale dpiScale = new DpiScale(CreateGraphics());
Height = tblMain.RowStyles.Count * dpiScale.ScaleIntY(s_rowHeight);
}

void item_Cancelled(object sender, EventArgs e)
{
DownloadViewItem item = sender as DownloadViewItem;

if (item != null)
{
HandleItemCancel(item);
}
}

private void HandleItemCancel(DownloadViewItem item)
Expand Down Expand Up @@ -194,7 +188,6 @@ private DownloadViewItem GetItem(int row)
private void removeFromHistoryToolStripMenuItem_Click(object sender, EventArgs e)
{
DownloadViewItem item = menuOptions.SourceControl as DownloadViewItem;

if (item != null)
{
RemoveDownloadRow(item);
Expand Down
7 changes: 0 additions & 7 deletions DoomLauncher/Controls/DownloadViewItem.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DoomLauncher
Expand Down
45 changes: 23 additions & 22 deletions DoomLauncher/Controls/FilesCtrl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions DoomLauncher/Controls/FilesCtrl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,29 @@
<data name="btnAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGjSURBVDhPjZFNSwJRFIYvQStp1TboB7RqUZuofR+b1i3r
TwhBP6A2FQV9ElaQBUIfEAZ9UUEWEWGGpSViKaXXrDR1Zpy3c2fuqBENvnA4l3Pu8945Z5glzgcKqtof
xBwD/Ayq2hvhvE+RbXuVgo4txUkgpoAdynfm2ahlO9fltf+lBR1XZWCJYpOZZ6pl7jvgObiF23uNlW0f
lrd9oxKrSBmjy1MU4wISWjO/ZJZizaoB8xtHaO8Z+mvC75jKA406JugyzY+neuCQcqEViDVJnN5Y8WLv
7NYwcW2dj0mcRtD6LssjiBfp9fJOMGLAQpOuXQO2QuJkkO06LgMLlMN1xtmszQjWkKqVDBPLSOKm9FTL
cCnUMA0PQc/NAHfSH5iTKKDrOnJ5Ba88Zxi0dQ/+NrC06DmRyG8VFQ3pjzyiiQ97g1n3gUQq0ko6PnNF
xJNZPETT9gbTq3sSqyhfUJF8/0bkJQN/KGlvIJrVEovLfBUQe/1EMMJxGUjUblC9uHDsHTf3bzi9fq7d
oHpxgccUfP449i+itRmIbBe2BqJZSzDG2A8PWTeL6X1IagAAAABJRU5ErkJggg==
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGkSURBVDhPjZHJSgNBEIYbwZN48ir4AJ486EX07nLx7FFf
IiD4AHpRiaBREY3gAgEXEANuqGAUEcnCxC2EaEQzWdTExJnJ/FbP9Ewi4pAfimqq+vt7qoZZkuXBkqoO
SPAwIMigqn0xWe5XRNtZZalhS3ERCDewQzlino1avmtdXPtfmtRwZQOLFJvMPFMtF+2E7yCEtb1reLcD
WN4OjAmsImWcLrspJjjEtWp+ySzFqlUD5jaO0NE7/NdEjjBVDjXpmKTLND8e64FDyqU2INEscHrDuwf/
WcgwWdo6Hxc4jaD1X9oj8BfpdXsnGDVgrqmlXQO2QuBkkO8+toF5yvd1xtmszXDWkKqVDRPLSOCmdLl1
pHzXOA0fQU8tQNpFf8AjUEDXdRSKCl7TBcOgvWfot4GlBd+JQH7rW9GQeS8i/vLubDC7diCQirSyjo/C
N5KpPG7jGWeD6RW/wCoqllSksl+IPecQvEs5G/Bmtfjicp8lJF4/IMXSuAy/1G5Qvbj7RBY30TecXj/V
blC9uPCDjEAwif2LeG0GPDuFowFv1hKMMfYD9kw3hHN/fFQAAAAASUVORK5CYII=
</value>
</data>
<data name="btnDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIGSURBVDhPYwABLy8vAzcvzz2enp5O9fX1TGBBYkFoaCiz
k5NruqOjy38nZ+dv3t7egSAxqDQKsLe3ZwkKClJyd3fNgwpBBB0dnZNs7R22mVva/tfS0vnj7u5ZhW6I
vLw9h6Wto5O3l9d3e3vHOVBhCLC1dZe0t3excHBw2WZlY//fzt7hv7+P50ZXV1dukLyFhQWnu7v7ClV1
p9+mpubdWlpaPGCN6ABoK5uTk0uBuoPzbzs7p/9A7ywzN7fRs7S0m2xrY/Nfz8BkspKSMT9UOU7AaGfn
k5NruqOjy38nZ+dv3t7egSAxqDQKsLe3ZwkKClJyd3fNgwpBBB0dnZNs7R22mVva/tfS0v7j7u5ZhW6I
vLw9h6Wto5O3l9d3e3vHOVBhCLC1dZe0t3excHBw2WZlY//fzt7hv7+P50ZXV1dukLyFhQWnu7v7ChU1
p9+mpubdWlpaPGCN6ABoK5uTk0uBmoPzbzs7p/9A7ywzN7fRs7S0m2xrY/Nfz8BkspKSMT9UOU7AaGfn
omlr63TezNz6v76+/ndDY6P3alq662RkLDihaggDfX1jBz19k5+WVsBw0Te6JyOjJQSVIgz0zc0VVFS0
LunqGf7TNzD5b2Jq8V9LW+cWVBo/MDQ0lFdT176qpq71R0NTc42wsISJrKzKNgND4/8qatqZUGXYATB0
JWTllU/JKar+19YzOCQjIyMkLi7ODcJyimrTDQyMvyhra8tClaMCeXt7DhlF1UUS0tIftbQMn2hpGWhB
pUCJgIOBQYhPW9/grISU/CSgCGZCk5aT8xaTUPivqqYNdKpGKwODODgNIAEmZWUtFWVl5fsCAgLyID5E
GALYhIVFW4WExf/LyyvvYmPjVQOKYcsTzKamlpM5+ThNgWxUeUk5ZSNWVvaJQKYdEPOCBbEDFiDmgjAH
HjAwAABvpHWmZ66MfAAAAABJRU5ErkJggg==
HjAwAABi83WiCU2tJwAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnMoveUp.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
25 changes: 13 additions & 12 deletions DoomLauncher/Controls/GameFileSummary.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions DoomLauncher/Controls/GameFileSummary.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
using System.Diagnostics;
using DoomLauncher.Interfaces;

namespace DoomLauncher
Expand All @@ -30,8 +25,9 @@ public GameFileSummary()

public void SetTitle(string text)
{
DpiScale dpiScale = new DpiScale(CreateGraphics());
lblTitle.Text = text;
GetRowStyle(lblTitle).Height = lblTitle.Height + 6;
GetRowStyle(lblTitle).Height = lblTitle.Height + dpiScale.ScaleFloatY(6);
if (GetRowStyle(lblTitle).Height < m_labelHeight)
GetRowStyle(lblTitle).Height = m_labelHeight;
}
Expand Down Expand Up @@ -86,7 +82,10 @@ private void SetImageFromFile(string source)
fs = new FileStream(source, FileMode.Open, FileAccess.Read);
pbImage.Image = Image.FromStream(fs);
}
catch { } //failed, nothin to do
catch
{
//failed, nothin to do
}
finally
{
if (fs != null) fs.Close();
Expand Down Expand Up @@ -114,9 +113,14 @@ private void ShowImageSection(bool bShow)
private void ShowCommentsSection(bool bShow)
{
if (bShow)
GetRowStyle(txtComments).Height = 20;
{
DpiScale dpiScale = new DpiScale(CreateGraphics());
GetRowStyle(txtComments).Height = dpiScale.ScaleFloatY(20);
}
else
{
GetRowStyle(txtComments).Height = 0;
}
}

public string TagText
Expand All @@ -137,8 +141,9 @@ public void SetStatistics(IGameFile gameFile, IEnumerable<IStatsData> stats)
{
if (stats.Any())
{
DpiScale dpiScale = new DpiScale(CreateGraphics());
ctrlStats.Visible = true;
GetRowStyle(ctrlStats).Height = 120;
GetRowStyle(ctrlStats).Height = dpiScale.ScaleFloatY(120);

ctrlStats.SetStatistics(gameFile, stats);

Expand Down
Loading

0 comments on commit b09b37f

Please sign in to comment.