public void PlayHandle(object sender, string name) { string prefix = name.Split('_')[0]; ResAPI.VideoType type; try { type = ResAPI.Prefix2Type[prefix]; } catch (Exception) { Video_errorReceived(null, "[VideoManager.PlayHandle]: Convert Prefix to Type Error"); throw; } if (ResAPI.TypeIsVideo(type)) { Play(name); } else { PlayImage(name); } }