--- oup/current/Tools/RawEdit.pas 2007/01/09 20:44:48 68 +++ oup/current/Tools/RawEdit.pas 2007/01/11 23:36:52 75 @@ -153,9 +153,6 @@ end; procedure TForm_RawEdit.list_offsetClick(Sender: TObject); -var - i: LongWord; - raw_info: TRawInfo; begin ClearValues; dat_offset := StrToInt('$' + MidStr( @@ -184,7 +181,9 @@ function TForm_RawEdit.GetValue(datatype var Data: Tdata; i: Word; + floatformat: TFormatSettings; begin + floatformat.DecimalSeparator := '.'; case datatype of 1: Result := IntToStr(hex.Data[offset]); @@ -212,7 +211,7 @@ begin Data[1] := hex.Data[offset + 1]; Data[2] := hex.Data[offset + 2]; Data[3] := hex.Data[offset + 3]; - Result := FloatToStr(Decode_Float(Data)); + Result := FloatToStr(Decode_Float(Data), floatformat); end; 10: Result := IntToBin(hex.Data[offset]); @@ -255,7 +254,9 @@ var Data: Tdata; str: String; Value: LongWord; + floatformat: TFormatSettings; begin + floatformat.DecimalSeparator := '.'; for i := 1 to value_viewer.RowCount - 1 do begin if value_viewer.Cells[0, i] = '1 byte, unsigned' then @@ -320,7 +321,7 @@ begin SetLength(Data, 4); for j := 0 to 3 do Data[j] := hex.Data[hex.SelStart + j]; - value_viewer.Cells[1, i] := FloatToStr(Decode_Float(Data)); + value_viewer.Cells[1, i] := FloatToStr(Decode_Float(Data), floatformat); end else value_viewer.Cells[1, i] := ''; @@ -383,11 +384,12 @@ begin Self.Caption := ''; fileid := -1; + { value_viewer.ColCount := 2; value_viewer.RowCount := 8; - value_viewer.FixedRows := 1; } + value_viewer.FixedRows := 1; value_viewer.Cells[0, 0] := 'Type'; value_viewer.Cells[1, 0] := 'Value'; value_viewer.Cells[0, 1] := '1 byte, unsigned'; @@ -456,7 +458,8 @@ end; procedure TForm_RawEdit.panel_contentResize(Sender: TObject); begin -// value_viewer.ColWidths[1] := value_viewer.Width - value_viewer.ColWidths[0] - 28; + if fileid >= 0 then + value_viewer.ColWidths[1] := value_viewer.Width - value_viewer.ColWidths[0] - 50; end; @@ -476,8 +479,8 @@ end; procedure TForm_RawEdit.hexKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); -var - temps: String; +//var +// temps: String; begin if (Shift = [ssCtrl]) and (Key = Ord('C')) then begin @@ -504,9 +507,9 @@ end; procedure TForm_RawEdit.hexSelectionChanged(Sender: TObject); -var - selstart: Integer; - i, j: Word; +//var +// selstart: Integer; +// i, j: Word; begin { FOR i:=1 TO structs.RowCount-1 DO BEGIN FOR j:=0 TO structs.ColCount-1 DO BEGIN @@ -559,7 +562,7 @@ end; procedure TForm_RawEdit.btn_importClick(Sender: TObject); var - Data: Tdata; +// Data: Tdata; fs: TFileStream; begin opend.Filter := 'Files of matching extension (*.' + OniDataConnection.GetFileInfo( @@ -641,7 +644,7 @@ end; procedure TForm_RawEdit.value_viewer_context_copyClick(Sender: TObject); var - i: Byte; +// i: Byte; Name: String; Value: LongWord; begin