示例#1
0
文件: F_QU_Help.cs 项目: jcr6/NJCR
 public override void Run(FlagParse fp)
 {
     foreach (string lin in new string[] {
         "'qu' or Quick Update is a feature which can be used in features actually modifying a JCR file",
         "Normally when files get overridden by new files or if files are removed, JCR6 needs to move",
         "tons of data inside the JCR file in order to get everything right again.", "",
         "When 'qu' has been set, JCR won't do that, but only unlink the removed or overridden files",
         "This means the data itself still exists, but no more pointers are set to it", "",
         "This will cause the update to be much faster, downside is that since the data itself still exists,",
         "but is no longer accessible will eventually lead to ridiculously large JCR files", "",
         "This feature is therefore handy for quick updates only (debugging comes to mind),", "",
         "For serious archiving or for JCR files tied to games or utilites being prepared for",
         "distribution I'd strongly recommend against using the '-qu' switch"
     })
     {
         QCol.ColWrite(ConsoleColor.DarkGreen, $"\t{lin}\n");
     }
 }
示例#2
0
文件: F_HEX.cs 项目: jcr6/NJCR
        void Show(TJCRDIR jcr, string entry)
        {
            QCol.Doing("Reading", entry);
            var b     = jcr.JCR_B(entry);
            var c     = ConsoleColor.Black;
            var stuff = "";

            if (b == null)
            {
                QCol.QuickError(JCR6.JERROR); return;
            }
            QCol.Green("................ 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F");
            for (int i = 0; i < b.Length; i++)
            {
                switch (i % 16)
                {
                case 0x00:
                    QCol.ColWrite(ConsoleColor.Yellow, $"  {stuff}\n"); stuff = "";
                    QCol.ColWrite(ConsoleColor.DarkGray, $"{i.ToString("X16")} ");
                    c = ConsoleColor.Blue;
                    break;

                case 0x04:
                case 0x0C:
                    c = ConsoleColor.Cyan;
                    Console.Write(" ");
                    break;

                case 0x08:
                    c = ConsoleColor.Blue;
                    Console.Write(" ");
                    break;
                }
                if (b[i] > 31 && b[i] < 0x80)
                {
                    stuff += $"{(char)b[i]}";
                }
                else
                {
                    stuff += ".";
                }
                QCol.ColWrite(c, $"{b[i].ToString("X2")} ");
            }
            if (b.Length % 16 != 0)
            {
                for (int i = b.Length % 16; i < 16; i++)
                {
                    switch (i)
                    {
                    case 0x04:
                    case 0x0C:
                    case 0x08:
                        Console.Write(" ");
                        break;
                    }
                    Console.Write("   ");
                }
            }
            QCol.ColWrite(ConsoleColor.Yellow, $"  {stuff}\n");
            Console.WriteLine("\n");
        }