Ejemplo n.º 1
0
        public virtual MarkupString GetCurrentSaveslotChecksumStatus()
        {
            if (CurrentFileStream is null)
            {
                return(Resources.NotSet.ColorText(Color.Cyan).ToMarkup());
            }

            return(SaveslotChecksumStatusFormatter.GetSaveslotChecksumStatus(CurrentFileSaveSlot.ToInt() - 1, CurrentFileStream, GameRegion));
        }
        private void InternalGetOffsetValue()
        {
            IsError = false;

            try
            {
                CurrentFileSaveSlot.ThrowIfDefault(nameof(CurrentFileSaveSlot));
                SramFile.ThrowIfNull(nameof(SramFile));


                OffsetValue = SramFile.GetOffsetByte(CurrentFileSaveSlot.ToInt() - 1, OffsetAddress);
                var valueDisplayText = NumberFormatter.FormatDecHexBin((byte)OffsetValue);

                OutputMessage = Resources.StatusGetOffsetValueTemplate.InsertArgs(OffsetAddress, valueDisplayText)
                                .ColorText(Color.Green).ToMarkup();
            }
            catch (Exception ex)
            {
                OutputMessage = ex.GetColoredMessage();
                IsError       = true;
            }
        }