public void wc_OnDownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { //var x = library.IsInstalledGames(Game.Name,Game.GameId,true); if (String.Equals(Extension, "exe")) { WindowManager.MsgBoxResult result = WindowManager.Interaction.MsgBox("please install into either of these:\n" + Path.Combine(settings.GamesLocation, Game.Name) + "\n" + Path.Combine(settings.GamesLocation, Game.GameId), "Notice", MsgBoxStyle.OkOnly); AsyncProcess(FileName); } else if (String.Equals(Extension, "zip") || String.Equals(Extension, "rar")) { //System.IO.File.AppendAllText("C:/TEMP/games.txt", "before asyc\n", Encoding.UTF8); AsyncUnzip(FileName, Path.Combine(settings.GamesLocation, Game.Name)); //ZipFile.ExtractToDirectory(FileName,Path.Combine(settings.GamesLocation,Game.Name)); // System.IO.File.AppendAllText("C:/TEMP/games.txt", "after asyc\n", Encoding.UTF8); } else { string[] p = this.FileName.ToString().Split('/'); string datei = p[p.Length - 1]; WindowManager.MsgBoxResult result = WindowManager.Interaction.MsgBox("Cannot determine how to install " + Game.Name + "\nInstall this file: " + datei + "\n\ninto either of these Folders:\n" + Path.Combine(settings.GamesLocation, Game.Name) + "\n" + Path.Combine(settings.GamesLocation, Game.GameId), "Notice", MsgBoxStyle.OkOnly); AsyncProcess(Path.Combine(settings.GamesLocation, ".install")); } StartInstallWatcher(); }
{//Unit test public static bool TestMul() { int res = MVCSE.Controllers.HousesController.Mul(2, 3); WindowManager.MsgBoxResult resul = WindowManager.Interaction .MsgBox(res.ToString(), "Mul(Using Ws Add) Result is :", MsgBoxStyle.OkCancel); if (res == 6) { WindowManager.MsgBoxResult result = WindowManager.Interaction .MsgBox("True ", "Mul Unit Test returned : ", MsgBoxStyle.OkCancel); return(true); } else { WindowManager.MsgBoxResult result = WindowManager.Interaction .MsgBox("False ", "Mul Unit Test returned :", MsgBoxStyle.OkCancel); return(false); } }