Beispiel #1
0
        public void SetOptions(RenameOptions other)
        {
            var optionsCopy = new RenameOptions();

            optionsCopy.CharactersToRemove = other.CharactersToRemove;
            optionsCopy.CharactersAreRegex = other.CharactersAreRegex;
            optionsCopy.IsCaseSensitive    = other.IsCaseSensitive;

            this.customOptions   = optionsCopy;
            this.currentPresetID = PresetID.Custom;
        }
Beispiel #2
0
 public void SetOptionPreset(PresetID preset)
 {
     this.currentPresetID = preset;
 }
Beispiel #3
0
 /// <summary>
 /// Copies the state from one operation into this one
 /// </summary>
 /// <param name="other">Other.</param>
 private void CopyFrom(RemoveCharactersOperation other)
 {
     this.SetOptions(other.CurrentOptions);
     this.currentPresetID = other.currentPresetID;
 }
Beispiel #4
0
            public override string ToString()
            {
                StringBuilder strBuilder = new StringBuilder();

                strBuilder.AppendLine("ROM info:");
                strBuilder.AppendLine("  Title: \"" + GetTitleWithRegion(ProductCode) + "\"");
                strBuilder.AppendLine("  Release date:       " + GetReleaseDate(ProductCode));
                strBuilder.AppendLine("  Product code:       " + ProductCode);
                strBuilder.AppendLine("  Preset ID:          0x" + PresetID.ToString("X4"));
                strBuilder.AppendLine("  Size:               " + Size.ToString() + " (bytes)");
                strBuilder.AppendLine("  PCM samples size:   " + PCMSamplesSize.ToString() + " (bytes)");
                strBuilder.AppendLine("  PCM footer size:    " + PCMFooterSize.ToString() + " (bytes)");
                if (Type == 0x14)
                {
                    strBuilder.AppendLine("  Type:               0x14 (LoROM)");
                }
                else if (Type == 0x15)
                {
                    strBuilder.AppendLine("  Type:               0x15 (HiROM)");
                }
                else
                {
                    strBuilder.AppendLine("  Type:               0x" + Type.ToString("X2"));
                }
                //strBuilder.AppendLine("  Header data 0:      0x" + HeaderData[0].ToString("X8") + "(Always 0x00000100)");
                strBuilder.AppendLine("  Full size:          " + HeaderData[1].ToString() + " (bytes)");
                strBuilder.AppendLine("  ROM offset:         0x" + HeaderData[2].ToString("X8"));
                strBuilder.AppendLine("  PCM samples offset: 0x" + HeaderData[3].ToString("X8"));
                strBuilder.AppendLine("  PCM footer offset:  0x" + HeaderData[4].ToString("X8"));
                strBuilder.AppendLine("  Footer offset:      0x" + HeaderData[5].ToString("X8"));
                strBuilder.AppendLine("  X0 offset:          0x" + HeaderData[6].ToString("X8"));
                strBuilder.AppendLine("  X1 offset:          0x" + HeaderData[7].ToString("X8"));
                strBuilder.AppendLine("  X2 offset:          0x" + HeaderData[8].ToString("X8"));
                //strBuilder.AppendLine("  Header data 9:      0x" + HeaderData[9].ToString("X8") + "(Always 0x2D505557)");
                //strBuilder.AppendLine("  Product code:       0x" + HeaderData[10].ToString("X8"));
                //strBuilder.AppendLine("  Header data 11:     0x" + HeaderData[11].ToString("X8") + "(Always 0x00000000)");

                strBuilder.AppendLine("  Emulation speed:    " + FooterData[0].ToString() + " (FPS)");
                //strBuilder.AppendLine("  ROM size byte 0:         0x" + FooterData[1].ToString("X2"));
                //strBuilder.AppendLine("  ROM size byte 1:         0x" + FooterData[2].ToString("X2"));
                //strBuilder.AppendLine("  ROM size byte 2:         0x" + FooterData[3].ToString("X2"));
                //strBuilder.AppendLine("  ROM size byte 3:         0x" + FooterData[4].ToString("X2"));
                //strBuilder.AppendLine("  PCM samples size byte 0: 0x" + FooterData[5].ToString("X2"));
                //strBuilder.AppendLine("  PCM samples size byte 1: 0x" + FooterData[6].ToString("X2"));
                //strBuilder.AppendLine("  PCM samples size byte 2: 0x" + FooterData[7].ToString("X2"));
                //strBuilder.AppendLine("  PCM samples size byte 3: 0x" + FooterData[8].ToString("X2"));
                //strBuilder.AppendLine("  PCM footer size byte 0:  0x" + FooterData[9].ToString("X2"));
                //strBuilder.AppendLine("  PCM footer size byte 1:  0x" + FooterData[10].ToString("X2"));
                //strBuilder.AppendLine("  PCM footer size byte 2:  0x" + FooterData[11].ToString("X2"));
                //strBuilder.AppendLine("  PCM footer size byte 3:  0x" + FooterData[12].ToString("X2"));
                //strBuilder.AppendLine("  Game preset ID byte 0:   0x" + FooterData[13].ToString("X2"));
                //strBuilder.AppendLine("  Game preset ID byte 1:   0x" + FooterData[14].ToString("X2"));
                strBuilder.AppendLine("  Number of players:  " + FooterData[15].ToString());

                strBuilder.AppendLine("  Extra data size:    " + ExtraData.Length.ToString() + " (bytes)");
                strBuilder.Append("  Extra data:");
                int length = ExtraData.Length > 64 ? 64 : ExtraData.Length;

                for (int i = 0; i < length; i++)
                {
                    strBuilder.Append(" " + ExtraData[i].ToString("X2"));
                }
                if (ExtraData.Length != length)
                {
                    strBuilder.AppendLine("...");
                }
                else
                {
                    strBuilder.AppendLine();
                }

                return(strBuilder.ToString());
            }