Skip to content

Commit

Permalink
Merge pull request #14 from Mikou27/master
Browse files Browse the repository at this point in the history
v2.1.1 update
  • Loading branch information
Mikou27 authored May 24, 2022
2 parents 99c0ad7 + ab8fdbb commit a719e17
Show file tree
Hide file tree
Showing 78 changed files with 1,326 additions and 1,604 deletions.
5 changes: 5 additions & 0 deletions Master/NucleusCoopTool/Forms/DownloadPrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public DownloadPrompt(Handler handler, MainForm mf, string zipFileName)

if (zipFileName == null)
{
if (handler == null)
{
return;
}

Text = "Downloading Game Handler";
zipFile = string.Format("handler-{0}-v{1}.nc", Handler.Id, Handler.CurrentVersion);
BeginDownload();
Expand Down
560 changes: 272 additions & 288 deletions Master/NucleusCoopTool/Forms/MainForm.Designer.cs

Large diffs are not rendered by default.

335 changes: 220 additions & 115 deletions Master/NucleusCoopTool/Forms/MainForm.cs

Large diffs are not rendered by default.

178 changes: 89 additions & 89 deletions Master/NucleusCoopTool/Forms/MainForm.resx

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion Master/NucleusCoopTool/Forms/ScriptDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Windows.Forms;
using Nucleus.Gaming;
using System.Media;
using System.Runtime.InteropServices;

namespace Nucleus.Coop.Forms
{
Expand Down Expand Up @@ -45,6 +46,16 @@ public partial class ScriptDownloader : BaseForm, IDynamicSized

private SortOrder sortOrder = SortOrder.Ascending;

[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);

private void controlscollect()
{
Expand Down Expand Up @@ -89,7 +100,7 @@ public ScriptDownloader(MainForm mf)
entriesPerPage = Convert.ToInt32(cmb_NumResults.SelectedItem);

SuspendLayout();

Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
ForeColor = Color.FromArgb(Convert.ToInt32(mf.rgb_font[0]), Convert.ToInt32(mf.rgb_font[1]), Convert.ToInt32(mf.rgb_font[2]));
BackgroundImage = new Bitmap(mf.themePath + "\\other_backgrounds.jpg");
//Controls Pictures
Expand Down
13 changes: 13 additions & 0 deletions Master/NucleusCoopTool/Forms/SearchDisksForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Windows.Forms;
using System.Media;
using System.Reflection;
using System.Runtime.InteropServices;

namespace Nucleus.Coop
{
Expand All @@ -36,6 +37,17 @@ public override string ToString()
private MainForm main;
private float fontSize;

[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);

private void controlscollect()
{
foreach (Control control in Controls)
Expand Down Expand Up @@ -74,6 +86,7 @@ public SearchDisksForm(MainForm main)
InitializeComponent();

SuspendLayout();
Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
fontSize = float.Parse(main.theme.IniReadValue("Font", "AutoSearchFontSize"));
ForeColor = Color.FromArgb(Convert.ToInt32(main.rgb_font[0]), Convert.ToInt32(main.rgb_font[1]), Convert.ToInt32(main.rgb_font[2]));

Expand Down
20 changes: 4 additions & 16 deletions Master/NucleusCoopTool/Forms/Settings.Designer.cs

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

45 changes: 31 additions & 14 deletions Master/NucleusCoopTool/Forms/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@
using System.Linq;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace Nucleus.Coop
{

public partial class Settings : BaseForm, IDynamicSized
public partial class Settings : UserControl, IDynamicSized
{

private MainForm mainForm = null;
private IniFile ini;
private PositionsControl positionsControl;
private ComboBox[] controllerNicks;
private List<string> nicksList = new List<string>();
Expand All @@ -36,6 +38,17 @@ public partial class Settings : BaseForm, IDynamicSized
private string epicLang;
private string epicLangText;
private string prevTheme;

[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);
protected override CreateParams CreateParams
{
get
Expand Down Expand Up @@ -74,24 +87,28 @@ public void button_Click(object sender, EventArgs e)

public Settings(MainForm mf, PositionsControl pc)
{

ini = mf.ini;
fontSize = float.Parse(mf.theme.IniReadValue("Font", "SettingsFontSize"));

InitializeComponent();

SuspendLayout();

SuspendLayout();
Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
tabControl2.Region = Region.FromHrgn(CreateRoundRectRgn(0, 0, tabControl2.Width, tabControl2.Height, 5, 5));
Location = new Point(mf.Location.X + mf.Width / 2 - Width / 2, mf.Location.Y + mf.Height / 2 - Height / 2);
Visible = false;
//form Fore Color
controlscollect();

foreach (Control control in ctrls)
{
control.Font = new Font(mf.customFont, fontSize, FontStyle.Regular, GraphicsUnit.Pixel, 0);
control.Font = new Font(mf.customFont, fontSize, FontStyle.Regular, GraphicsUnit.Pixel, 0);
}
ForeColor = Color.FromArgb(Convert.ToInt32(mf.rgb_font[0]), Convert.ToInt32(mf.rgb_font[1]), Convert.ToInt32(mf.rgb_font[2]));

ForeColor = Color.FromArgb(Convert.ToInt32(mf.rgb_font[0]), Convert.ToInt32(mf.rgb_font[1]), Convert.ToInt32(mf.rgb_font[2]));
//
BackgroundImage = new Bitmap(mf.themePath + "\\other_backgrounds.jpg");

tabPage1.BackgroundImage = new Bitmap(mf.themePath + "\\other_backgrounds.jpg");
tabPage3.BackgroundImage = new Bitmap(mf.themePath + "\\other_backgrounds.jpg");
tabPage4.BackgroundImage = new Bitmap(mf.themePath + "\\other_backgrounds.jpg");
Expand Down Expand Up @@ -376,7 +393,7 @@ public Settings(MainForm mf, PositionsControl pc)
RefreshAudioList();

DPIManager.Register(this);
DPIManager.AddForm(this);
// DPIManager.AddForm(this);
DPIManager.Update(this);

}
Expand Down Expand Up @@ -475,11 +492,11 @@ public void UpdateSize(float scale)
ResumeLayout();
}

protected override void OnShown(EventArgs e)
{
base.OnShown(e);
DPIManager.Register(this);
}
//protected override void OnShown(EventArgs e)
//{
// base.OnShown(e);
// DPIManager.Register(this);
//}

private void GetPlayersNickName()
{
Expand Down
50 changes: 0 additions & 50 deletions Master/NucleusCoopTool/Forms/Settings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,54 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAQAAEABABoCgAAFgAAACgAAABAAAAAgAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AABHTyYAFDnQAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAMzMzMzMzMzMzMzMzMiIiIiIiIiMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiIiIiIiIiIiMz
MzMzMzMzMzMzMzMzMzMzMzMzM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AAAAAP/wAAAAAAAA//gAAAAAAAH/+AAAAAAAAf/8AAAAAAAD//4AAAAAAAf//4AAAAAAH///4
AAAAAB/////4AAAf//////wAAD///////gAAf///////AAD///////+AAf///w==
</value>
</data>
</root>
7 changes: 4 additions & 3 deletions Master/NucleusCoopTool/HubShowcase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ public partial class HubShowcase : UserControl///, IDynamicSized

public HubShowcase(MainForm mainForm)
{
InitializeComponent();
// showcaseBanner1.BackgroundImage = new Bitmap(mainForm.themePath + "\\setup_screen.png");

InitializeComponent();
titleBackground.Location = new Point(Width / 2 - titleBackground.Width / 2, (Container1.Top-titleBackground.Height)+6);
titleBackground.BackgroundImage = new Bitmap(mainForm.themePath + "\\showcase_title-back.png");
titleBackground.BackgroundImageLayout = ImageLayout.Stretch;
}

private void showcaseBanner1_Paint(object sender, PaintEventArgs e)
Expand Down
21 changes: 17 additions & 4 deletions Master/NucleusCoopTool/HubShowcase.designer.cs

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

Loading

0 comments on commit a719e17

Please sign in to comment.