本文整理汇总了C#中Regulus.WriteLine方法的典型用法代码示例。如果您正苦于以下问题:C# Regulus.WriteLine方法的具体用法?C# Regulus.WriteLine怎么用?C# Regulus.WriteLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Regulus
的用法示例。
在下文中一共展示了Regulus.WriteLine方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _Import
private static void _Import(Regulus.Utility.Console.IViewer view, Wheel wheel, string path)
{
try
{
var buffer = System.IO.File.ReadAllText(path);
var set = Newtonsoft.Json.JsonConvert.DeserializeObject<VGame.CLR.Dump.WheelFieldSet>(buffer);
wheel.Import(ref set);
}
catch(Exception)
{
view.WriteLine("失敗");
throw;
}
view.WriteLine("成功");
}
示例2: _Export
private static void _Export(Regulus.Utility.Console.IViewer view, Wheel wheel)
{
var data = wheel.Export();
var guid = System.Guid.NewGuid();
var path = $"Export{guid}.txt";
view.WriteLine(path);
System.IO.File.WriteAllText(path, Newtonsoft.Json.JsonConvert.SerializeObject(data));
}
示例3: _BuildGameData
private static void _BuildGameData(Regulus.Utility.Console.IViewer view)
{
var dataBuilder = new Regulus.Project.SamebestKeys.GameDataBuilder(Regulus.Project.SamebestKeys.GameData.Instance);
var workPath = System.IO.Directory.GetCurrentDirectory();
var files = System.IO.Directory.GetFiles(workPath, "*.map.txt");
foreach (var file in files)
{
var stream = System.IO.File.ReadAllBytes(file);
view.WriteLine("load game data : " + file);
dataBuilder.Build(stream);
}
}
示例4: _Spin
private static void _Spin(Regulus.Utility.Console.IViewer view, VGame.CLR.Wheel wheel)
{
var ir = new VGame.CLR.Input
{
Switch = 1,
RunTime = 1,
GameRate = 1,
MaxBet = 10,
MinBet = 1,
Bet = 9,
GameUndulate = 8,
Line = 7,
RecCycle = 6,
WupCondi1 = 1,
WupCondi2 = 1,
WupRate = 1,
Free = 0,
Fever = 0,
WinSet = 1
};
view.WriteLine("嘗試讀取Input.txt...");
if(System.IO.File.Exists("Input.txt"))
{
view.WriteLine("成功.");
var readed = System.IO.File.ReadAllText("Input.txt");
ir = Newtonsoft.Json.JsonConvert.DeserializeObject<VGame.CLR.Input>(readed);
}
else
{
view.WriteLine("失敗.");
view.WriteLine("建立預設Input.txt ...");
System.IO.File.WriteAllText("Input.txt", Newtonsoft.Json.JsonConvert.SerializeObject(ir));
}
var output = wheel.Spin(ir);
var guid = System.Guid.NewGuid();
var inputPath = $"Input{guid}.txt";
view.WriteLine(inputPath);
System.IO.File.WriteAllText(inputPath , Newtonsoft.Json.JsonConvert.SerializeObject(ir));
var outputPath = $"Output{guid}.txt";
view.WriteLine(outputPath);
System.IO.File.WriteAllText(outputPath, Newtonsoft.Json.JsonConvert.SerializeObject(output));
}