mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
x
This commit is contained in:
parent
ea1c8c222c
commit
f5efa79e70
@ -55,7 +55,7 @@ namespace ClassicalSharp {
|
|||||||
|
|
||||||
public static void Load(string pluginName, bool needsInit) {
|
public static void Load(string pluginName, bool needsInit) {
|
||||||
try {
|
try {
|
||||||
string path = Path.Combine("plguins", pluginName + ".dll");
|
string path = Path.Combine("plugins", pluginName + ".dll");
|
||||||
Assembly lib = Assembly.LoadFrom(path);
|
Assembly lib = Assembly.LoadFrom(path);
|
||||||
Type[] types = lib.GetTypes();
|
Type[] types = lib.GetTypes();
|
||||||
|
|
||||||
|
@ -236,7 +236,12 @@ namespace ClassicalSharp {
|
|||||||
using (Stream fs = Platform.FileCreate(Filename))
|
using (Stream fs = Platform.FileCreate(Filename))
|
||||||
using (StreamWriter writer = new StreamWriter(fs))
|
using (StreamWriter writer = new StreamWriter(fs))
|
||||||
{
|
{
|
||||||
SaveTo(writer);
|
for (int i = 0; i < OptionsKeys.Count; i++) {
|
||||||
|
writer.Write(OptionsKeys[i]);
|
||||||
|
writer.Write('=');
|
||||||
|
writer.Write(OptionsValues[i]);
|
||||||
|
writer.WriteLine();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionsChanged.Clear();
|
OptionsChanged.Clear();
|
||||||
@ -246,14 +251,5 @@ namespace ClassicalSharp {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SaveTo(StreamWriter writer) {
|
|
||||||
for (int i = 0; i < OptionsKeys.Count; i++) {
|
|
||||||
writer.Write(OptionsKeys[i]);
|
|
||||||
writer.Write('=');
|
|
||||||
writer.Write(OptionsValues[i]);
|
|
||||||
writer.WriteLine();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user