public void Load(string filename) { try { EmojiStrings = File.ReadAllLines(filename); } catch (Exception ex) { Debug.WriteLine(ex); FileNotFound?.Invoke(this, filename); EmojiStrings = DefaultEmojis; } }
public void PopAndProcess() { var request = requestStack.Pop(); if (File.Exists(request.FilePathAndName)) { SendFile?.Invoke(this, request); } else { FileNotFound?.Invoke(this, request); } }
public void Push(FileTunnelServerConnection connection, string filePathAndName) { var request = new FileRequestEventArgs(connection, filePathAndName); if (File.Exists(filePathAndName)) { requestStack.Push(request); } else { FileNotFound?.Invoke(this, request); } }