Changeset 87 for oup/current/Tools
- Timestamp:
- Jan 14, 2007, 11:59:34 PM (18 years ago)
- Location:
- oup/current/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/BinEdit.dfm
r61 r87 4 4 OnCloseQuery = FormCloseQuery 5 5 OnKeyUp = FormKeyUp 6 ExplicitWidth = 5007 ExplicitHeight = 4508 6 PixelsPerInch = 96 9 7 TextHeight = 13 8 inherited panel_files: TPanel 9 inherited filelist: TListBox 10 ExplicitTop = 153 11 ExplicitHeight = 270 12 end 13 end 10 14 inherited content: TPanel 11 15 object Splitter2: TSplitter -
oup/current/Tools/BinEdit.pas
r75 r87 57 57 procedure value_viewer_contextPopup(Sender: TObject); 58 58 private 59 fileid: LongWord;59 fileid: Integer; 60 60 public 61 61 end; … … 291 291 if VST.RootNodeCount = 0 then 292 292 begin 293 structs := LoadStructureDefinition( fileid);293 structs := LoadStructureDefinition(Connection, fileid); 294 294 if structs.Data then 295 295 begin -
oup/current/Tools/Preview.dfm
r46 r87 3 3 PixelsPerInch = 96 4 4 TextHeight = 13 5 inherited panel_files: TPanel 6 inherited filelist: TListBox 7 ExplicitTop = 153 8 ExplicitHeight = 270 9 end 10 end 5 11 inherited content: TPanel 6 12 object lbl_notpossible: TLabel -
oup/current/Tools/Preview.pas
r86 r87 32 32 bitmaps: array of TBitmap; 33 33 actualimg: Byte; 34 _fileid: LongWord;34 _fileid: Integer; 35 35 public 36 36 end; … … 55 55 begin 56 56 _fileid := fileinfo.ID; 57 lbl_notpossible.Visible := False; 58 Self.img.Visible := True; 59 Self.timer.Enabled := False; 60 Self.panel_buttons.Visible := False; 61 ext := fileinfo.Extension; 62 if (ext = 'PSpc') or (ext = 'TXMB') or (ext = 'TXMP') then 63 PreviewImage 64 else if ext = 'TXAN' then 65 PreviewTXAN 66 else 67 begin 68 Self.lbl_notpossible.Visible := True; 57 if _fileid >= 0 then 58 begin 59 lbl_notpossible.Visible := False; 60 Self.img.Visible := True; 61 Self.timer.Enabled := False; 62 Self.panel_buttons.Visible := False; 63 ext := fileinfo.Extension; 64 if (ext = 'PSpc') or (ext = 'TXMB') or (ext = 'TXMP') then 65 PreviewImage 66 else if ext = 'TXAN' then 67 PreviewTXAN 68 else 69 begin 70 Self.lbl_notpossible.Visible := True; 71 Self.img.Visible := False; 72 end; 73 end 74 else 75 begin 69 76 Self.img.Visible := False; 77 lbl_notpossible.Visible := False; 78 Self.timer.Enabled := False; 79 Self.panel_buttons.Visible := False; 70 80 end; 71 81 end; -
oup/current/Tools/Template.pas
r86 r87 102 102 begin 103 103 oldcon := combo_connection.Items.Strings[combo_connection.ItemIndex]; 104 combo_connection.ItemIndex := -1; 104 105 combo_connection.Items.Clear; 105 for i := 0 to High(DataConnections) do 106 begin 107 level := DataConnections[i].LevelInfo.LevelNumber; 108 fn := ExtractFileName(DataConnections[i].FileName); 109 if DataConnections[i].Backend = ODB_Dat then 110 datatype := 'ONI-.dat: ' 111 else if DataConnections[i].Backend = ODB_ADB then 112 datatype := 'OUP-DB: ' 113 else 114 datatype := 'Unknown: '; 115 boxstring := datatype + fn + ' (Level: ' + IntToStr(level) + ')'; 116 combo_connection.Items.Add(boxstring); 117 if oldcon = boxstring then 118 combo_connection.ItemIndex := combo_connection.Items.Count - 1; 106 if Length(DataConnections) > 0 then 107 begin 108 for i := 0 to High(DataConnections) do 109 begin 110 level := DataConnections[i].LevelInfo.LevelNumber; 111 fn := ExtractFileName(DataConnections[i].FileName); 112 if DataConnections[i].Backend = ODB_Dat then 113 datatype := 'ONI-.dat: ' 114 else if DataConnections[i].Backend = ODB_ADB then 115 datatype := 'OUP-DB: ' 116 else 117 datatype := 'Unknown: '; 118 boxstring := datatype + fn + ' (Level: ' + IntToStr(level) + ')'; 119 combo_connection.Items.Add(boxstring); 120 if oldcon = boxstring then 121 combo_connection.ItemIndex := combo_connection.Items.Count - 1; 122 end; 123 if combo_connection.ItemIndex = -1 then 124 begin 125 combo_connection.ItemIndex := 0; 126 combo_connectionChange(Self); 127 end; 128 end 129 else 130 begin 131 FConnection := nil; 132 filelist.Items.Clear; 133 combo_extension.Items.Clear; 134 combo_connectionChange(Self); 135 FSelectedFile := GetEmptyFileInfo; 136 if Assigned(FOnNewFileSelected) then 137 FOnNewFileSelected(FSelectedFile); 119 138 end; 120 139 end; … … 127 146 begin 128 147 combo_connection.Items.Clear; 129 for i := 0 to High(DataConnections) do 130 begin 131 level := DataConnections[i].LevelInfo.LevelNumber; 132 fn := ExtractFileName(DataConnections[i].FileName); 133 if DataConnections[i].Backend = ODB_Dat then 134 datatype := 'ONI-.dat: ' 135 else if DataConnections[i].Backend = ODB_ADB then 136 datatype := 'OUP-DB: ' 137 else 138 datatype := 'Unknown: '; 139 combo_connection.Items.Add(datatype + fn + ' (Level: ' + IntToStr(level) + ')'); 140 end; 141 FConnection := DataConnections[0]; 142 combo_connection.ItemIndex := 0; 143 combo_connectionChange(Self); 148 if Length(DataConnections) > 0 then 149 begin 150 for i := 0 to High(DataConnections) do 151 begin 152 level := DataConnections[i].LevelInfo.LevelNumber; 153 fn := ExtractFileName(DataConnections[i].FileName); 154 if DataConnections[i].Backend = ODB_Dat then 155 datatype := 'ONI-.dat: ' 156 else if DataConnections[i].Backend = ODB_ADB then 157 datatype := 'OUP-DB: ' 158 else 159 datatype := 'Unknown: '; 160 combo_connection.Items.Add(datatype + fn + ' (Level: ' + IntToStr(level) + ')'); 161 end; 162 FConnection := DataConnections[0]; 163 combo_connection.ItemIndex := 0; 164 combo_connectionChange(Self); 165 end 166 else 167 begin 168 FConnection := nil; 169 filelist.Items.Clear; 170 combo_extension.Items.Clear; 171 combo_connectionChange(Self); 172 end; 144 173 end; 145 174 … … 150 179 begin 151 180 combo_extension.Items.Clear; 152 combo_extension.Items.Add('_All files_ (' +153 IntToStr(FConnection.GetFilesCount) + ')');154 exts := FConnection.GetExtensionsList;155 for i := 0 to High(exts) do156 if Length(FAllowedExts) > 0 then157 begin158 if Pos(MidStr(exts[i],1,4),FAllowedExts) > 0 then181 if FConnection <> nil then 182 begin 183 combo_extension.Items.Add('_All files_ (' + 184 IntToStr(FConnection.GetFilesCount) + ')'); 185 exts := FConnection.GetExtensionsList; 186 for i := 0 to High(exts) do 187 if Length(FAllowedExts) > 0 then 159 188 begin 189 if Pos(MidStr(exts[i],1,4), FAllowedExts) > 0 then 190 begin 191 combo_extension.Items.Add(exts[i]); 192 end; 193 end else 160 194 combo_extension.Items.Add(exts[i]); 161 end; 162 end else 163 combo_extension.Items.Add(exts[i]); 164 combo_extension.ItemIndex := 0; 165 combo_extensionClick(Self); 195 combo_extension.ItemIndex := 0; 196 combo_extensionClick(Self); 197 end; 166 198 end; 167 199 … … 177 209 i: LongWord; 178 210 begin 179 Extension := MidStr(combo_extension.Items.Strings[combo_extension.ItemIndex], 1, 4); 180 no_zero_bytes := not check_zerobyte.Checked; 181 pattern := ''; 182 if check_filtername.Checked then 183 pattern := edit_filtername.Text; 184 if Extension = '_All' then 185 if Length(FAllowedExts) > 0 then 186 Extension := FAllowedExts 187 else 188 Extension := ''; 189 190 files := FConnection.GetFilesList(extension, pattern, no_zero_bytes, FSortBy); 191 192 filelist.Visible := False; 193 filelist.Items.Clear; 194 if Length(files) > 0 then 195 for i := 0 to High(files) do 196 filelist.Items.Add(files[i]); 197 filelist.Visible := True; 211 if FConnection <> nil then 212 begin 213 Extension := MidStr(combo_extension.Items.Strings[combo_extension.ItemIndex], 1, 4); 214 no_zero_bytes := not check_zerobyte.Checked; 215 pattern := ''; 216 if check_filtername.Checked then 217 pattern := edit_filtername.Text; 218 if Extension = '_All' then 219 if Length(FAllowedExts) > 0 then 220 Extension := FAllowedExts 221 else 222 Extension := ''; 223 224 files := FConnection.GetFilesList(extension, pattern, no_zero_bytes, FSortBy); 225 226 filelist.Visible := False; 227 filelist.Items.Clear; 228 if Length(files) > 0 then 229 for i := 0 to High(files) do 230 filelist.Items.Add(files[i]); 231 filelist.Visible := True; 232 end; 198 233 end; 199 234 … … 296 331 inherited; 297 332 RecreateList; 298 FConnection := nil; 299 FSelectedFile.ID := -1; 300 FSelectedFile.FileName := ''; 301 FSelectedFile.FileNameHex := ''; 333 FSelectedFile := GetEmptyFileInfo; 302 334 if Length(ToolList) > 0 then 303 335 begin
Note:
See TracChangeset
for help on using the changeset viewer.