当前位置: 首页>>代码示例>>C#>>正文


C# ScreenManager.RemoveScreen方法代码示例

本文整理汇总了C#中ScreenManager.RemoveScreen方法的典型用法代码示例。如果您正苦于以下问题:C# ScreenManager.RemoveScreen方法的具体用法?C# ScreenManager.RemoveScreen怎么用?C# ScreenManager.RemoveScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ScreenManager的用法示例。


在下文中一共展示了ScreenManager.RemoveScreen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestSaveLoadOnFile

 public static string TestSaveLoadOnFile(ScreenManager screenMan)
 {
     var text = "__hacknettestaccount";
     var pass = "__testingpassword";
     SaveFileManager.AddUser(text, pass);
     var saveFileNameForUsername = SaveFileManager.GetSaveFileNameForUsername(text);
     OS.TestingPassOnly = true;
     var text2 = "";
     var oS = new OS();
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     screenMan.AddScreen(oS, screenMan.controllingPlayer);
     oS.threadedSaveExecute();
     var nodes = oS.netMap.nodes;
     screenMan.RemoveScreen(oS);
     OS.WillLoadSave = true;
     oS = new OS();
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     screenMan.AddScreen(oS, screenMan.controllingPlayer);
     var text3 = "Serialization and Integrity Test Report:\r\n";
     Console.WriteLine(text3);
     text2 += text3;
     new List<string>();
     new List<string>();
     var num = 0;
     text2 += getTestingReportForLoadComparison(oS, nodes, num, out num);
     text2 = text2 + "\r\n" + TestMissions(oS);
     for (var i = 0; i < oS.netMap.nodes.Count; i++)
     {
         var root = oS.netMap.nodes[i].files.root;
         DeleteAllFilesRecursivley(root);
     }
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     oS.threadedSaveExecute();
     nodes = oS.netMap.nodes;
     screenMan.RemoveScreen(oS);
     OS.WillLoadSave = true;
     oS = new OS();
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     screenMan.AddScreen(oS, screenMan.controllingPlayer);
     var num2 = num;
     var testingReportForLoadComparison = getTestingReportForLoadComparison(oS, nodes, num, out num);
     if (num2 != num)
     {
         text2 = text2 + "\r\nAll Files Deleted pass:\r\n" + testingReportForLoadComparison;
     }
     screenMan.RemoveScreen(oS);
     OS.TestingPassOnly = false;
     SaveFileManager.DeleteUser(text);
     var text4 = string.Concat("\r\nTest complete - ", num, " errors found.\r\nTested ", nodes.Count,
         " generated nodes vs ", oS.netMap.nodes.Count, " loaded nodes");
     text2 += text4;
     Console.WriteLine(text4);
     MusicManager.stop();
     return text2;
 }
开发者ID:strangea,项目名称:OpenHacknet,代码行数:59,代码来源:TestSuite.cs


注:本文中的ScreenManager.RemoveScreen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。