public static bool TryLoad(string line) { if (!(line.Substring(0, 4) == "play")) { return(false); } PlaySoundInstruction.Load(line); return(true); }
public static IInstruction Load(string line) { PlaySoundInstruction soundInstruction = new PlaySoundInstruction(); List <string> list = new List <string>(); Program.ToWords(line, 'ﻃ', (ICollection <string>)list); soundInstruction.player = new SoundPlayer(list[1]); return((IInstruction)soundInstruction); }