-
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.
- Loading branch information
Showing
136 changed files
with
16,539 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.24720.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Minecraft Server Starter", "Minecraft Server Starter\Minecraft Server Starter.csproj", "{22E6F114-52F5-447E-82A3-D951E5E82E5F}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{22E6F114-52F5-447E-82A3-D951E5E82E5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{22E6F114-52F5-447E-82A3-D951E5E82E5F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{22E6F114-52F5-447E-82A3-D951E5E82E5F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{22E6F114-52F5-447E-82A3-D951E5E82E5F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
|
||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup> | ||
</configuration> |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Application x:Class="Minecraft_Server_Starter.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Minecraft_Server_Starter" StartupUri="Windows/MainWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="res/Images.xaml" /> | ||
<ResourceDictionary Source="res/Strings.es-ES.xaml" /> | ||
<ResourceDictionary Source="res/Strings.xaml" /> | ||
<ResourceDictionary Source="res/Styles.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// Made by Lonami Exo (C) LonamiWebs | ||
// Creation date: february 2016 | ||
// Modifications: | ||
// - No modifications made | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Globalization; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Windows; | ||
|
||
namespace Minecraft_Server_Starter | ||
{ | ||
public partial class App : Application | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
|
||
SelectCulture(Thread.CurrentThread.CurrentUICulture.ToString()); | ||
|
||
Settings.Init("LonamiWebs\\Minecraft Server Starter", new Dictionary<string, dynamic> | ||
{ | ||
{ "eulaAccepted", false }, | ||
{ "minRam", 512 }, | ||
{ "maxRam", 1024 }, | ||
{ "javaPath", Java.FindJavaPath() }, | ||
{ "priority", (int)ProcessPriorityClass.Normal }, | ||
{ "notificationEnabled", true }, | ||
{ "notificationLoc", (int)Toast.Location.TopLeft }, | ||
{ "mssFolder", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), | ||
"LonamiWebs\\Minecraft Server Starter")}, | ||
{ "ignoreCommandsBlock", true } | ||
}); | ||
} | ||
|
||
public static void SelectCulture(string culture) | ||
{ | ||
// List all our resources | ||
List<ResourceDictionary> dictionaryList = new List<ResourceDictionary>(); | ||
foreach (ResourceDictionary dictionary in Current.Resources.MergedDictionaries) | ||
dictionaryList.Add(dictionary); | ||
|
||
// We want our specific culture | ||
string requestedCulture = string.Format("Strings.{0}.xaml", culture); | ||
ResourceDictionary resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString == requestedCulture); | ||
if (resourceDictionary == null) | ||
{ | ||
requestedCulture = "Strings.xaml"; | ||
resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString == requestedCulture); | ||
} | ||
|
||
// If we have the requested resource, remove it from the list and place at the end.\ | ||
// Then this language will be our string table to use. | ||
if (resourceDictionary != null) | ||
{ | ||
Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary); | ||
Application.Current.Resources.MergedDictionaries.Add(resourceDictionary); | ||
} | ||
// Inform the threads of the new culture | ||
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(culture); | ||
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture); | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.