-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from SuiMachine/RedemptionPointsRework
Redemption points rework
- Loading branch information
Showing
43 changed files
with
5,258 additions
and
4,814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Drawing; | ||
using System.Xml.Serialization; | ||
|
||
namespace BasicTwitchSoundPlayer | ||
{ | ||
public class ColorWrapper | ||
{ | ||
[XmlIgnore] | ||
public Color color; | ||
public class ColorWrapper | ||
{ | ||
[XmlIgnore] | ||
public Color color; | ||
|
||
public ColorWrapper() | ||
{ | ||
color = Color.Black; | ||
} | ||
public ColorWrapper() | ||
{ | ||
color = Color.Black; | ||
} | ||
|
||
public static implicit operator ColorWrapper(Color c) | ||
{ | ||
return new ColorWrapper() { color = c }; | ||
} | ||
public static implicit operator ColorWrapper(Color c) | ||
{ | ||
return new ColorWrapper() { color = c }; | ||
} | ||
|
||
public static implicit operator Color(ColorWrapper cw) | ||
{ | ||
return cw.color; | ||
} | ||
public static implicit operator Color(ColorWrapper cw) | ||
{ | ||
return cw.color; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return color.ToArgb().ToString(); | ||
} | ||
public override string ToString() | ||
{ | ||
return color.ToArgb().ToString(); | ||
} | ||
|
||
[XmlElement] | ||
public int ColorXML | ||
{ | ||
get { return color.ToArgb(); } | ||
set { color = Color.FromArgb(value); } | ||
} | ||
} | ||
[XmlElement] | ||
public int ColorXML | ||
{ | ||
get { return color.ToArgb(); } | ||
set { color = Color.FromArgb(value); } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace BasicTwitchSoundPlayer.Extensions | ||
{ | ||
static class DateTimeExtensions | ||
{ | ||
public static DateTime ToDateTimeSafe(this string Text) | ||
{ | ||
if (Text == null || Text == String.Empty) | ||
{ | ||
return DateTime.UtcNow; | ||
} | ||
else | ||
{ | ||
if (DateTime.TryParse(Text, out DateTime result)) | ||
{ | ||
return result; | ||
} | ||
else | ||
{ | ||
return DateTime.MinValue; | ||
} | ||
static class DateTimeExtensions | ||
{ | ||
public static DateTime ToDateTimeSafe(this string Text) | ||
{ | ||
if (Text == null || Text == String.Empty) | ||
{ | ||
return DateTime.UtcNow; | ||
} | ||
else | ||
{ | ||
if (DateTime.TryParse(Text, out DateTime result)) | ||
{ | ||
return result; | ||
} | ||
else | ||
{ | ||
return DateTime.MinValue; | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
namespace BasicTwitchSoundPlayer.Extensions | ||
{ | ||
static class NumberTypesExtension | ||
{ | ||
public static float ToFloat(this string Text, float DEFAULT_VALUE) | ||
{ | ||
if (float.TryParse(Text, out float res)) | ||
return res; | ||
else | ||
return DEFAULT_VALUE; | ||
} | ||
static class NumberTypesExtension | ||
{ | ||
public static float ToFloat(this string Text, float DEFAULT_VALUE) | ||
{ | ||
if (float.TryParse(Text, out float res)) | ||
return res; | ||
else | ||
return DEFAULT_VALUE; | ||
} | ||
|
||
public static int ToInt(this string Text, int DEFAULT_VALUE) | ||
{ | ||
if (int.TryParse(Text, out int res)) | ||
return res; | ||
else | ||
return DEFAULT_VALUE; | ||
} | ||
public static int ToInt(this string Text, int DEFAULT_VALUE) | ||
{ | ||
if (int.TryParse(Text, out int res)) | ||
return res; | ||
else | ||
return DEFAULT_VALUE; | ||
} | ||
|
||
public static bool ToBoolean(this string Text, bool DEFAULT_VALUE) | ||
{ | ||
if (bool.TryParse(Text, out bool val)) | ||
{ | ||
return val; | ||
} | ||
else | ||
return DEFAULT_VALUE; | ||
} | ||
} | ||
public static bool ToBoolean(this string Text, bool DEFAULT_VALUE) | ||
{ | ||
if (bool.TryParse(Text, out bool val)) | ||
{ | ||
return val; | ||
} | ||
else | ||
return DEFAULT_VALUE; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace BasicTwitchSoundPlayer.Extensions | ||
{ | ||
public static class StringExtensions | ||
{ | ||
public static string RemoveWhitespaces(this string Text) | ||
{ | ||
return new string(Text.ToCharArray() | ||
.Where(c => !Char.IsWhiteSpace(c)) | ||
.ToArray()); | ||
} | ||
} | ||
public static class StringExtensions | ||
{ | ||
public static string RemoveWhitespaces(this string Text) | ||
{ | ||
return new string(Text.ToCharArray() | ||
.Where(c => !Char.IsWhiteSpace(c)) | ||
.ToArray()); | ||
} | ||
} | ||
} |
Oops, something went wrong.