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


C# Regulus.WriteLine方法代码示例

本文整理汇总了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("成功");
 }
开发者ID:jiowchern,项目名称:VGame-SuperComplexWheel,代码行数:15,代码来源:Program.cs

示例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));
        }
开发者ID:jiowchern,项目名称:VGame-SuperComplexWheel,代码行数:9,代码来源:Program.cs

示例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);
     }
 }
开发者ID:jiowchern,项目名称:Regulus,代码行数:12,代码来源:Program.cs

示例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));
        }
开发者ID:jiowchern,项目名称:VGame-SuperComplexWheel,代码行数:46,代码来源:Program.cs


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