rename
This commit is contained in:
parent
0a0943b223
commit
803cd30070
11
cce/App.cs
11
cce/App.cs
|
@ -16,8 +16,17 @@ namespace cce {
|
|||
// Finish Settings screen, make it interactable
|
||||
bool saved = false;
|
||||
byte reset = 0;
|
||||
(int, int) since = (0,0);
|
||||
while (true) {
|
||||
Title = Title + " >>> Settings";
|
||||
if (since.Item1 >= 4) {
|
||||
saved = false;
|
||||
since.Item1 = 0;
|
||||
}
|
||||
if (since.Item2 >= 4) {
|
||||
reset = 0;
|
||||
since.Item2 = 0;
|
||||
}
|
||||
Clear();
|
||||
AppSettings.Screen(saved, reset);
|
||||
ConsoleKeyInfo cki;
|
||||
|
@ -43,6 +52,8 @@ namespace cce {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
since.Item1++;
|
||||
since.Item2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,11 @@ namespace cce {
|
|||
if (sentence.Length >= 120) { BufferWidth = sentence.Length * 2; WindowWidth = sentence.Length + 20; }
|
||||
Clear();
|
||||
CursorVisible = false;
|
||||
if (extended_dict == null || common_dict == null) init();
|
||||
var checker = init();
|
||||
if (!checker) {
|
||||
WriteLine("Unable to load dictionaries");
|
||||
return;
|
||||
}
|
||||
var cleaned = new char[sentence.Length];
|
||||
var symbols = new char[sentence.Length];
|
||||
var writeout = new char[sentence.Length];
|
||||
|
@ -224,13 +228,15 @@ namespace cce {
|
|||
}
|
||||
return String.Join("", encoded);
|
||||
}
|
||||
static private void init() {
|
||||
if (common_dict != null && extended_dict != null) return;
|
||||
static internal bool init() {
|
||||
if (common_dict != null && extended_dict != null) return true;
|
||||
var checker = true;
|
||||
WriteLine("[Loading Dictionary]");
|
||||
if (File.Exists(AppSettings.Extended)) extended_dict = JsonConvert.DeserializeObject<Dictionary<string, string>>(File.ReadAllText(AppSettings.Extended));
|
||||
else WriteLine("File missing");
|
||||
else { WriteLine("File missing"); checker = false; }
|
||||
if (File.Exists(AppSettings.Common)) common_dict = JsonConvert.DeserializeObject<Dictionary<string, string>>(File.ReadAllText(AppSettings.Common));
|
||||
else WriteLine("File missing");
|
||||
else { WriteLine("File missing"); checker = false; }
|
||||
return checker;
|
||||
}
|
||||
static private void uniquire() {
|
||||
init();
|
||||
|
|
Loading…
Reference in a new issue