public async static Task<CoreTask> GetCoreTask(string userName, string pw, UIInterface ui) { if (!coreTasks.Keys.Contains(userName)) { CoreTask ct = new CoreTask(); await ct.Init(userName, pw, ui); if (ct.instance != null) { coreTasks[userName] = ct; return ct; } return null; } else { if (pw == coreTasks[userName].pw) { return coreTasks[userName]; } else return null; } }
private void writeLines(CoreTask ct) { for (int i = 0; i < 3; i++) { ct.instance.ui.say(""); } }