Beispiel #1
0
        public VersionForm()
        {
            InitializeComponent();

            //see   ビルド時間の取得
            //http://devlights.hatenablog.com/entry/2015/04/14/230841

            string ver;

#if DEBUG
            ver = "-Debug Build-";
#else
            ver = U.getVersion();
#endif

            StringBuilder sb = new StringBuilder();
            sb.AppendLine(
                R._("{1} Version:{0}\r\nCopyright: 2017-\r\nLicense: GPLv3\r\n\r\nこのソフトウェアはオープンソースのフリーソフトウェアです。\r\nGPLv3に従ってご自由にお使いください。"
                    , ver
                    , typeof(U).Assembly.GetName().Name
                    )
                );

            sb.AppendLine();
            if (Program.ROM != null)
            {
                string FEVersion = "";
                FEVersion  = Program.ROM.RomInfo.VersionToFilename();
                FEVersion += " @ROMSize: " + Program.ROM.Data.Length;

                U.CRC32 crc32       = new U.CRC32();
                uint    targetCRC32 = crc32.Calc(Program.ROM.Data);
                FEVersion += " @CRC32: " + U.ToHexString8(targetCRC32);
                sb.AppendLine("FEVersion:" + FEVersion);

                if (targetCRC32 == Program.ROM.RomInfo.orignal_crc32())
                {
                    sb.AppendLine(R._("[このROMは正規品の無改造ROMです。]"));
                }
            }

            if (IsOldVersion())
            {
                sb.AppendLine(MakeUpdateMessage());
            }


            Version.Text = sb.ToString();
            Version.Select(0, 0); //全選択解除.
#if DEBUG
            DevTranslateButton.Show();
#endif
        }
Beispiel #2
0
 private void Version_KeyDown(object sender, KeyEventArgs e)
 {
     if (KonamiCommand[KonamiCommand_MatchCount] == e.KeyCode)
     {
         KonamiCommand_MatchCount++;
         if (KonamiCommand_MatchCount >= KonamiCommand.Length)
         {
             KonamiCommand_MatchCount = 0;
             DevTranslateButton.Show();
         }
     }
 }