diff --git a/.gitmodules b/.gitmodules index 8b94e8dd31c997ba92fb37e8d491bbd07411c9c3..d3bb0847d7e9656bc110661d1ccbd0a6a275fdd6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "uFCoderSimple/ufr-lib"] path = uFCoderSimple/ufr-lib url = https://git.d-logic.net/nfc-rfid-reader-sdk/ufr-lib.git +[submodule "uFCoderAdvanced/ufr-lib"] + path = uFCoderAdvanced/ufr-lib + url = https://git.d-logic.net/nfc-rfid-reader-sdk/ufr-lib.git diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.dcu deleted file mode 100644 index 8eadefeca9d60a222338a0bf0013449d41c5741a..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.dfm deleted file mode 100644 index c96592e77ca98284097b192ca9fd6768b1a14adb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.dfm +++ /dev/null @@ -1,1024 +0,0 @@ -object frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite - Left = 516 - Top = 235 - Caption = 'BlockInSectorReadWrite' - ClientHeight = 388 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object stbBlockInSectorReadWrite: TStatusBar - Left = 0 - Top = 369 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockInSectorReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 312 - ActivePage = tabBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabBlockInSectorRead: TTabSheet - Caption = 'BlockInSector Read' - object pnlBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadData: TLabel - Left = 9 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBlockInSectorRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadData: TEdit - Left = 8 - Top = 108 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadClick - end - object txtBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM1: TLabel - Left = 10 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM1: TEdit - Left = 9 - Top = 109 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM1Click - end - object txtBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM2: TLabel - Left = 9 - Top = 96 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM2: TEdit - Left = 8 - Top = 114 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM2Click - end - object txtBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataPK: TLabel - Left = 10 - Top = 97 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataPK: TEdit - Left = 9 - Top = 115 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadPKClick - end - object txtBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabBlockInSectorWrite: TTabSheet - Caption = 'BlockInSector Write' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISWWriteData: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddress: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddress: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 148 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteData: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddress: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object brnBlockInSectorWrite: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = brnBlockInSectorWriteClick - end - object txtBISWBlockAddress: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISWWriteDataAKM1: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label5: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 193 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM1: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM1: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM1: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM1Click - end - object txtBISWBlockAddressAKM1: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISWWriteDataAKM2: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectoAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 193 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM2: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM2: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM2: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM2Click - end - object txtBISWBlockAddressAKM2: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddressPK: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressPK: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataPK: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressPK: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWritePK: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWritePKClick - end - object txtBISWBlockAddressPK: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.pas deleted file mode 100644 index e489ba355194c0433e4d735902bf5ed32e33d19a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockInSector.pas +++ /dev/null @@ -1,624 +0,0 @@ -unit BlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder, StdCtrls, ExtCtrls, ComCtrls; - -type - TfrmBlockInSectorReadWrite = class(TForm) - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - lblHeader: TStaticText; - stbBlockInSectorReadWrite: TStatusBar; - pgBlockInSectorReadWrite: TPageControl; - tabBlockInSectorRead: TTabSheet; - pnlBlockInSectorRead: TPanel; - lblBISRSectorAddress: TLabel; - lblBISRReadData: TLabel; - lblBlockInSectorRead: TStaticText; - txtBISRSectorAddress: TEdit; - txtBISRReadData: TEdit; - btnBlockInSectorRead: TButton; - pnlBlockInSectorReadAKM1: TPanel; - lblBISRSectorAddressAKM1: TLabel; - lblBISRReadDataAKM1: TLabel; - lblBISRAKM1: TStaticText; - txtBISRSectorAddressAKM1: TEdit; - txtBISRReadDataAKM1: TEdit; - btnBlockInSectorReadAKM1: TButton; - pnlBlockInSectorReadAKM2: TPanel; - lblBISRSectorAddressAKM2: TLabel; - lblBISRReadDataAKM2: TLabel; - lblBRAKM2: TStaticText; - txtBISRSectorAddressAKM2: TEdit; - txtBISRReadDataAKM2: TEdit; - btnBlockInSectorReadAKM2: TButton; - pnlBlockReadPK: TPanel; - lblBISRSectorAddressPK: TLabel; - lblBISRReadDataPK: TLabel; - lblBRPK: TStaticText; - txtBISRSectorAddressPK: TEdit; - txtBISRReadDataPK: TEdit; - btnBlockInSectorReadPK: TButton; - tabBlockInSectorWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblBISWBlockWrite: TStaticText; - pnlBlockWriteAKM1: TPanel; - lblBISWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBISWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBISRBlockAddress: TLabel; - txtBISRBlockAddress: TEdit; - lblBISRBlockAddressAKM1: TLabel; - txtBISRBlockAddressAKM1: TEdit; - lblBISRBlockAddressAKM2: TLabel; - txtBISRBlockAddressAKM2: TEdit; - lblBISRBlockAddressPK: TLabel; - txtBISRBlockAddressPK: TEdit; - lblBISWWriteData: TLabel; - txtBISWWriteData: TEdit; - lblBISWSectorAddress: TLabel; - txtBISWSectorAddress: TEdit; - brnBlockInSectorWrite: TButton; - lblBISWBlockAddress: TLabel; - txtBISWBlockAddress: TEdit; - lblBISWWriteDataAKM1: TLabel; - txtBISWWriteDataAKM1: TEdit; - Label5: TLabel; - txtBISWSectorAddressAKM1: TEdit; - btnBlockInSectorWriteAKM1: TButton; - lblBISWBlockAddressAKM1: TLabel; - txtBISWBlockAddressAKM1: TEdit; - lblBISWWriteDataAKM2: TLabel; - txtBISWWriteDataAKM2: TEdit; - lblBISWSectoAddressAKM2: TLabel; - txtBISWSectorAddressAKM2: TEdit; - btnBlockInSectorWriteAKM2: TButton; - lblBISWBlockAddressAKM2: TLabel; - txtBISWBlockAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - txtBISWWriteDataPK: TEdit; - lblBISWSectorAddressPK: TLabel; - txtBISWSectorAddressPK: TEdit; - btnBlockInSectorWritePK: TButton; - lblBISWBlockAddressPK: TLabel; - txtBISWBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnBlockInSectorReadClick(Sender: TObject); - procedure btnBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnBlockInSectorReadPKClick(Sender: TObject); - procedure brnBlockInSectorWriteClick(Sender: TObject); - procedure btnBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnBlockInSectorWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmBlockInSectorReadWrite } - -procedure TfrmBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadClick(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddress.Text); - - iFResult:=BlockInSectorRead(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBISRReadData.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM1Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM1.Text); - - iFResult:=BlockInSectorRead_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM1.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM2Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM2.Text); - - iFResult:=BlockInSectorRead_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM2.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadPKClick(Sender: TObject); -var - pData, - pPKKEY :PByte; - baPKKey :array[0..5] of Byte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressPK.Text); - - iFResult:=BlockInSectorRead_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtBISRReadDataPK.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.brnBlockInSectorWriteClick(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddress.Text); - pData :=PByte(txtBISWWriteData.Text); - - iFResult:=BlockInSectorWrite(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM1.Text); - pData :=PByte(txtBISWWriteDataAKM1.Text); - - iFResult:=BlockInSectorWrite_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM2.Text); - pData :=PByte(txtBISWWriteDataAKM2.Text); - - iFResult:=BlockInSectorWrite_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - baPKKey :array[0..5] of Byte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bSectorAddress :=StrToInt(txtBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressPK.Text); - pData :=PByte(txtBISWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockInSectorWrite_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.dcu deleted file mode 100644 index cb755b5d4a145efed35a70ea0bb1cbaeac095bc5..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.dfm deleted file mode 100644 index ad027585f923135cdd7de231895814e83808525c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.dfm +++ /dev/null @@ -1,896 +0,0 @@ -object frmBlockReadWrite: TfrmBlockReadWrite - Left = 310 - Top = 193 - Caption = 'BlockReadWrite' - ClientHeight = 381 - ClientWidth = 524 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 524 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Block Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 524 - Height = 30 - Align = alTop - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbBlockReadWrite: TStatusBar - Left = 0 - Top = 362 - Width = 524 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 524 - Height = 305 - ActivePage = tabBlockRead - Align = alClient - TabOrder = 3 - object tabBlockRead: TTabSheet - Caption = 'BlockRead' - object pnlBlockRead: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBRBlockAddress: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblReadData: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadData: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockRead: TButton - Left = 152 - Top = 30 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadClick - end - object chkBRHex: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexClick - end - end - object pnlBlockReadAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBRBlockAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM1: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM1: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM1: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM1Click - end - object chkBRHexAKM1: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM1Click - end - end - object pnlBlockReadAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBRBlockAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM2: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM2: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM2: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM2Click - end - object chkBRHexAKM2: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM2Click - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBRBlockAddressPK: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataPK: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataPK: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadPK: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadPKClick - end - object chkBRHexPK: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexPKClick - end - end - end - object tabBlockWrite: TTabSheet - Caption = 'BlockWrite' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBWBlockAddress: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteData: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 82 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddress: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWrite: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteClick - end - object txtBWWriteData: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHex: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBWBlockAddressAKM1: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM1: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWiteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM1: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWriteAKM1: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteAKM1Click - end - object txtBWWriteDataAKM1: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM1: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBWBlockAddressAKM2: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM2: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM2: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBWBlockWriteAKM2: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBWBlockWriteAKM2Click - end - object txtBWWriteDataAKM2: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM2: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBWBlockAddressPK: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataPK: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressPK: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWritePK: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWritePKClick - end - object txtBWWriteDataPK: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexPK: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.pas deleted file mode 100644 index cf13a1fa6dd6a3de85c55976a283b34ce43c6f6c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/BlockReadWrite.pas +++ /dev/null @@ -1,675 +0,0 @@ -unit BlockReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder, StdCtrls, ExtCtrls, ComCtrls; - - const - ARRAY_LENGTH=16; -type - TbaReadData=array[0..ARRAY_LENGTH] of byte; - PbaReadData=^TbaReadData; -type - TfrmBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbBlockReadWrite: TStatusBar; - pgBlockReadWrite: TPageControl; - tabBlockRead: TTabSheet; - tabBlockWrite: TTabSheet; - pnlBlockRead: TPanel; - pnlBlockReadAKM1: TPanel; - pnlBlockReadAKM2: TPanel; - pnlBlockReadPK: TPanel; - lblBlockRead: TStaticText; - lblBRAKM1: TStaticText; - lblBRAKM2: TStaticText; - lblBRPK: TStaticText; - lblBRBlockAddress: TLabel; - txtBRBlockAddress: TEdit; - txtBRReadData: TEdit; - lblReadData: TLabel; - btnBlockRead: TButton; - lblBRBlockAddressAKM1: TLabel; - txtBRBlockAddressAKM1: TEdit; - txtBRReadDataAKM1: TEdit; - lblBRReadDataAKM1: TLabel; - btnBlockReadAKM1: TButton; - lblBRBlockAddressAKM2: TLabel; - txtBRBlockAddressAKM2: TEdit; - txtBRReadDataAKM2: TEdit; - lblBRReadDataAKM2: TLabel; - btnBlockReadAKM2: TButton; - lblBRBlockAddressPK: TLabel; - txtBRBlockAddressPK: TEdit; - txtBRReadDataPK: TEdit; - lblBRReadDataPK: TLabel; - btnBlockReadPK: TButton; - pnlBlockWrite: TPanel; - lblBWBlockAddress: TLabel; - lblBWBlockRead: TStaticText; - txtBWBlockAddress: TEdit; - btnBlockWrite: TButton; - pnlBlockWriteAKM1: TPanel; - lblBWBlockWiteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBWWriteData: TLabel; - txtBWWriteData: TEdit; - lblBWBlockAddressAKM1: TLabel; - txtBWBlockAddressAKM1: TEdit; - btnBlockWriteAKM1: TButton; - lblBWWriteDataAKM1: TLabel; - txtBWWriteDataAKM1: TEdit; - lblBWBlockAddressAKM2: TLabel; - txtBWBlockAddressAKM2: TEdit; - btnBWBlockWriteAKM2: TButton; - lblBWWriteDataAKM2: TLabel; - txtBWWriteDataAKM2: TEdit; - lblBWBlockAddressPK: TLabel; - txtBWBlockAddressPK: TEdit; - btnBlockWritePK: TButton; - lblBWWriteDataPK: TLabel; - txtBWWriteDataPK: TEdit; - chkBRHex: TCheckBox; - chkBRHexAKM1: TCheckBox; - chkBRHexAKM2: TCheckBox; - chkBRHexPK: TCheckBox; - chkBWHex: TCheckBox; - chkBWHexAKM1: TCheckBox; - chkBWHexAKM2: TCheckBox; - chkBWHexPK: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure btnBlockReadClick(Sender: TObject); - procedure btnBlockReadAKM1Click(Sender: TObject); - procedure btnBlockReadAKM2Click(Sender: TObject); - procedure btnBlockReadPKClick(Sender: TObject); - procedure btnBlockWriteClick(Sender: TObject); - procedure btnBlockWriteAKM1Click(Sender: TObject); - procedure btnBWBlockWriteAKM2Click(Sender: TObject); - procedure btnBlockWritePKClick(Sender: TObject); - - procedure chkBRHexClick(Sender: TObject); - procedure chkBRHexAKM1Click(Sender: TObject); - procedure chkBRHexAKM2Click(Sender: TObject); - procedure chkBRHexPKClick(Sender: TObject); - private - PBufferData:PByte; - caReadData :array[0..ARRAY_LENGTH] of char; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - function HexConvert(sTextBoxValue:String):TbaReadData; - function ConvertToHex(chkBox: Boolean): string; - public - { Public declarations } - end; - -var - frmBlockReadWrite: TfrmBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmBlockReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockReadWrite.btnBlockReadClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBRBlockAddress.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtBRReadData.Text:=ConvertToHex(chkBRHex.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM1.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM1(pData,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBRReadDataAKM1.Text:=ConvertToHex(chkBRHexAKM1.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM2.SetFocus(); - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM2.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM2(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtBRReadDataAKM2.Text:=ConvertToHex(chkBRHexAKM2.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockReadPKClick(Sender: TObject); -var - pPKKey :PByte; - pData :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; -begin - try - if Trim(txtBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bBlockAddress :=StrToInt(txtBRBlockAddressPK.Text); - pData :=PByte(@caReadData); - pPKKey :=@baPKKey; - - iFResult:=BlockRead_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtBRReadDataPK.Text:=ConvertToHex(chkBRHexPK.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress, - bKeyIndex :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBWBlockAddress.Text); - - if chkBWHex.Checked then - begin - baBufferData :=HexConvert(txtBWWriteData.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM1.Text); - - if chkBWHexAKM1.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM1.Text); - pData :=PByte(@baBufferData); - end - else - pData:=PByte(txtBWWriteDataAKM1.Text); - - iFResult:=BlockWrite_AKM1(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBWBlockWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM2.Text); - - if chkBWHexAKM2.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM2.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite_AKM2(PData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - if chkBWHexPK.Checked then - begin - baBufferData:=HexConvert(txtBWWriteDataPK.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockWrite_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -function TfrmBlockReadWrite.HexConvert(sTextBoxValue: String):TbaReadData; -var - bCount:byte; - bLength:byte; - bHexCounter:byte; - sTextBuffer:String; - bArrayHex:array[0..ARRAY_LENGTH] of byte; - -begin - bCount:=1; - bHexCounter:=0; - bLength:= Length(sTextBoxValue); - try - while bCountIntToStr(255)) or ((Sender as TEdit).Text=EmptyStr) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; -end; -procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); -begin - if (Sender as TEdit).Text=EmptyStr then begin - with (Sender as TEdit) do - begin - Undo(); - SetFocus(); - end; - end; - if check_hex_box.Checked then Exit; - if ((sender as TEdit).Text>IntToStr(255)) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; - -end; -procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); -begin - if (check_hex_box.Checked) then - begin - (Sender as TEdit).MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else begin - (Sender as TEdit).MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; -end; - - - - //-----End--- -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/Global.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/Global.~pas deleted file mode 100644 index b54bf4f02273e0077c4066d5f10a98f8ef792104..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/Global.~pas +++ /dev/null @@ -1,255 +0,0 @@ -unit Global; -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus, ComCtrls, StdCtrls, ExtCtrls,uFCoder1x; - - - procedure Errors_Code; - procedure SetStatusBar(StatusBar: TStatusBar;Result: integer); - procedure ShowForm(the_form:TForm;pnlContainer:TPanel); - procedure CreateKey(key_owner:TForm;key_height, key_width, key_top,key_left: Integer; - key_parent: TPanel;key_name:string;key_read_only:Boolean;OnKey_press:TKeyPressEvent; - OnKey_Exit:TNotifyEvent); - - procedure CheckHex(owner:TForm;number_edit:Byte;Check_box:TCheckBox;edit_name:string); - procedure CheckDefault(owner:TForm;number_edit:Byte;def_check_box,hex_box:TCheckBox;edit_name:string); - procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); - procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); - procedure OnPK_KEY_Exit(Sender:TObject); - function AuthMode(RadioButton:TRadioButton):Byte; - function MaxBlocks(): Integer; - - const - FERROR_LIGHT = 2; - FERROR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT ='You must enter a number between 0 and 255 !'; - MEMORY_FILL =0; - - // sectors and blocks - MAX_SECTORS_1k=16; - MAX_SECTORS_4k=40; - -var - ERROR_CODE:array[0..200] of string; - - - -implementation -uses - uFAdvanced; - - - -function AuthMode(RadioButton:TRadioButton):Byte; -begin - if RadioButton.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - - -procedure ShowForm(the_form:TForm;pnlContainer:TPanel); -begin - with the_form do begin - the_form.BorderStyle:=bsNone; - the_form.Align :=alClient; - the_form.Parent :=pnlContainer; - the_form.Show; - end; -end; -procedure Errors_Code; -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; -end; - -procedure SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -function MaxBlocks(): Integer; -var - bTypeOfCard:Byte; -begin - bTypeOfCard:=frmuFrAdvanced.bDLCardType; - - case bTypeOfCard of - DL_MIFARE_CLASSIC_1k : Result:=(MAX_SECTORS_1k *4); - DL_MIFARE_CLASSIC_4k, - DL_MIFARE_PLUS_S_4K : Result:=((MAX_SECTORS_1k*2)*4)+((MAX_SECTORS_1k-8)*16) ; - end; -end; - - - - -procedure CreateKey(key_owner:TForm;key_height, key_width, key_top,key_left: Integer; key_parent: TPanel; - key_name:string;key_read_only:Boolean;OnKey_press:TKeyPressEvent;OnKey_Exit:TNotifyEvent); -var - br:Byte; - edit_key:array[0..5] of TEdit; - -begin - for br:=0 to 5 do - begin - edit_key[br] :=TEdit.Create(key_owner); - with edit_key[br] do begin - Height :=key_height; - Width :=key_width; - Top :=key_top; - Left :=key_left+(key_width*br+2); - Name :=key_name+IntToStr(br+1); - CharCase :=ecUpperCase; - Font.Name :='Verdana'; - Font.Style:=[fsBold]; - OnKeyPress:=OnKey_press; - OnExit :=OnKey_Exit; - Text :='255'; - MaxLength :=3; - ReadOnly :=key_read_only; - Parent :=key_parent; - end; - end; -end; -procedure CheckHex(owner:TForm;number_edit:Byte;Check_box:TCheckBox;edit_name:string); -var - br:Byte; -begin - case Check_box.Checked of - true:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:= - IntToHex(StrToInt(TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text),2); - end; - end; - false:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:=IntToStr(StrToInt(HexDisplayPrefix+TEdit - (owner.FindComponent(edit_name+IntToStr(br+1))).Text)); - end; - end; - end; -end; -procedure CheckDefault(owner:TForm;number_edit:Byte;def_check_box,hex_box:TCheckBox;edit_name:string); -var - br:Byte; -begin - case def_check_box.Checked of - true:begin for br:=0 to number_edit do begin - - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:='255'; - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).ReadOnly:=true; - end; - hex_box.Checked:=false; - end; - false:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).ReadOnly:=false; - end; - end; - end; -end; -procedure OnPK_KEY_Exit(Sender:TObject); -begin - - if ((sender as TEdit).Text>IntToStr(255)) or ((Sender as TEdit).Text=EmptyStr) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; -end; -procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); -begin - if (Sender as TEdit).Text=EmptyStr then begin - with (Sender as TEdit) do - begin - Undo(); - SetFocus(); - end; - end; - if check_hex_box.Checked then Exit; - if ((sender as TEdit).Text>IntToStr(255)) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; - -end; -procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); -begin - if (check_hex_box.Checked) then - begin - (Sender as TEdit).MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else begin - (Sender as TEdit).MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; -end; - - - - //-----End--- -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.dcu deleted file mode 100644 index 67af4c4df328e6c58721e772707b955f7e71fe78..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.dfm deleted file mode 100644 index 51c5dc6d3affb4a07a160ae3c989c927d5f00137..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.dfm +++ /dev/null @@ -1,783 +0,0 @@ -object frmLinearFormatCard: TfrmLinearFormatCard - Left = 316 - Top = 154 - Caption = 'LinearFormatCard' - ClientHeight = 421 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'LinearFormat Card(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbLinearFormatCard: TStatusBar - Left = 0 - Top = 402 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyConteiner: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 99 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 97 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 97 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object pgLinearFormatsCard: TPageControl - Left = 0 - Top = 155 - Width = 513 - Height = 247 - ActivePage = tabLinearFormat - Align = alClient - TabOrder = 4 - object tabLinearFormat: TTabSheet - Caption = 'LinearFormat ' - object lblBlockAccessBits: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBits: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormatted: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBits: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBits: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormat: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatClick - end - object txtSectorFormatted: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 26 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM1: TTabSheet - Caption = 'LinearFormat AKM1' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblBlockAccessBitsAKM1: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM1: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM1: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM1: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM1: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM1: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM1: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM1: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM1Click - end - object txtSectorFormattedAKM1: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM2: TTabSheet - Caption = 'LinearFormat AKM2' - ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblBlockAccessBitsAKM2: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM2: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM2: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM2: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM2: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM2: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM2: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM2: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM2Click - end - object txtSectorFormattedAKM2: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatPK: TTabSheet - Caption = 'LinearFormat PK' - ImageIndex = 3 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblBlockAccessBitsPK: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsPK: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9PK: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedPK: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsPK: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsPK: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9PK: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatPK: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatPKClick - end - object txtSectorFormattedPK: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.pas deleted file mode 100644 index b8db279db69640f1e59764be91ee3bbf11cbb5a0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearFormatsCard.pas +++ /dev/null @@ -1,436 +0,0 @@ -unit LinearFormatsCard; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder; - -type - TfrmLinearFormatCard = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbLinearFormatCard: TStatusBar; - pnlKeyConteiner: TPanel; - pnlKeyA: TPanel; - lblKeyA: TStaticText; - chkKeyAHex: TCheckBox; - pnlKeyB: TPanel; - lblKeyB: TStaticText; - chkKeyBHex: TCheckBox; - pgLinearFormatsCard: TPageControl; - tabLinearFormat: TTabSheet; - tabLinearFormatAKM1: TTabSheet; - tabLinearFormatAKM2: TTabSheet; - tabLinearFormatPK: TTabSheet; - lblBlockAccessBits: TLabel; - cboBlockAccessBits: TComboBox; - lblSectorTrailerAccessBits: TLabel; - cboSectorTrailerAccessBits: TComboBox; - lblSectorTrailerByte9: TLabel; - txtSectorTrailerByte9: TEdit; - btnLinearFormat: TButton; - lblSectorFormatted: TLabel; - txtSectorFormatted: TEdit; - lblBlockAccessBitsAKM1: TLabel; - cboBlockAccessBitsAKM1: TComboBox; - lblSectorTrailerAccessBitsAKM1: TLabel; - cboSectorTrailerAccessBitsAKM1: TComboBox; - lblSectorTrailerByte9AKM1: TLabel; - txtSectorTrailerByte9AKM1: TEdit; - btnLinearFormatAKM1: TButton; - lblSectorFormattedAKM1: TLabel; - txtSectorFormattedAKM1: TEdit; - lblBlockAccessBitsAKM2: TLabel; - cboBlockAccessBitsAKM2: TComboBox; - lblSectorTrailerAccessBitsAKM2: TLabel; - cboSectorTrailerAccessBitsAKM2: TComboBox; - lblSectorTrailerByte9AKM2: TLabel; - txtSectorTrailerByte9AKM2: TEdit; - btnLinearFormatAKM2: TButton; - lblSectorFormattedAKM2: TLabel; - txtSectorFormattedAKM2: TEdit; - lblBlockAccessBitsPK: TLabel; - cboBlockAccessBitsPK: TComboBox; - lblSectorTrailerAccessBitsPK: TLabel; - cboSectorTrailerAccessBitsPK: TComboBox; - lblSectorTrailerByte9PK: TLabel; - txtSectorTrailerByte9PK: TEdit; - btnLinearFormatPK: TButton; - lblSectorFormattedPK: TLabel; - txtSectorFormattedPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure btnLinearFormatClick(Sender: TObject); - procedure btnLinearFormatAKM1Click(Sender: TObject); - procedure btnLinearFormatAKM2Click(Sender: TObject); - procedure btnLinearFormatPKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - public - { Public declarations } - end; - -var - frmLinearFormatCard: TfrmLinearFormatCard; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmLinearFormatCard } - -procedure TfrmLinearFormatCard.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmLinearFormatCard.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearFormatCard.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; - -procedure TfrmLinearFormatCard.OnKeyAPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; -procedure TfrmLinearFormatCard.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmLinearFormatCard.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmLinearFormatCard.OnKeyBPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmLinearFormatCard.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyADefaultClick(Sender: TObject); -begin - //CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.chkKeyBDefaultClick(Sender: TObject); -begin - // CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; -end; - - - - -procedure TfrmLinearFormatCard.btnLinearFormatClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAccessBits :=cboBlockAccessBits.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9,pKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM1.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM1.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard_AKM1(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM2.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM2.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - iFResult:=LinearFormatCard_AKM2(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9PK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsPK.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsPK.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9PK.Text); - WriteKeyAB; - PKeyA:=@baKeyA; - PKeyB:=@baKeyB; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - iFResult:=LinearFormatCard_PK(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode,pPKkey); - if iFResult=DL_OK then - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; -finally - pKeyA :=nil; - pKeyB :=nil; - pPKKey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - - - - - - - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.dcu deleted file mode 100644 index 24908653af166830947fdbe6fd48ea62594749c8..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.dfm deleted file mode 100644 index 272c011456cf99cc6cbb774da8864a8e0cc85f7c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.dfm +++ /dev/null @@ -1,1134 +0,0 @@ -object frmLinearReadWrite: TfrmLinearReadWrite - Left = 403 - Top = 171 - Caption = 'LinearRead/Write' - ClientHeight = 389 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Linear Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbLinearReadWrite: TStatusBar - Left = 0 - Top = 370 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - TabOrder = 2 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object pgLinearReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 313 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 3 - object tabLinearRead: TTabSheet - Caption = 'LinearRead' - object lblLinearRead: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLReadLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesRead: TLabel - Left = 176 - Top = 244 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 328 - Top = 228 - Width = 160 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 261 - Top = 242 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearRead: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - end - end - object tabLinearReadAKM12: TTabSheet - Caption = 'LinearRead_AKM1/AKM2' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pgLinearReadAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 285 - ActivePage = tabLinearReadAKM1 - Align = alClient - TabOrder = 0 - ExplicitHeight = 286 - object tabLinearReadAKM1: TTabSheet - Caption = 'LinearRead_AKM1' - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblLRAKM1LinearRead: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRAKM1LinearAddress: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRAKM1DataLength: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM1: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM1Click - end - object txtReadBytesAKM1: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - end - end - object tabLinearReadAKM2: TTabSheet - Caption = 'LinearRead_AKM2' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object Label4: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM2: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM2Click - end - object txtReadBytesAKM2: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - end - end - end - end - object tabLinearReadPK: TTabSheet - Caption = 'LinearRead_PK' - ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object Label7: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesPK: TLabel - Left = 169 - Top = 250 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadPK: TButton - Left = 322 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadPKClick - end - object txtReadBytesPK: TEdit - Left = 250 - Top = 247 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadPK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - end - end - object tabLinearWrite: TTabSheet - Caption = 'LinearWrite' - ImageIndex = 3 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblLWLinearWrite: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWritten: TLabel - Left = 171 - Top = 244 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWrite: TButton - Left = 324 - Top = 228 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 256 - Top = 242 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWrite: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - Zoom = 100 - OnChange = txtLinearWriteChange - end - end - object tabLinearWriteAKM12: TTabSheet - Caption = 'LinearWrite_AKM1/AKM2' - ImageIndex = 4 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pgLinearWriteAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 285 - ActivePage = tabLinearWriteAKM1 - Align = alClient - TabOrder = 0 - ExplicitHeight = 286 - object tabLinearWriteAKM1: TTabSheet - Caption = 'LinearWrite_AKM1' - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblLinearWriteAKM1: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM1: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM1: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM1: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM1Click - end - object txtBytesWrittenAKM1: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - Zoom = 100 - OnChange = txtLinearWriteAKM1Change - end - end - object tabLinearWriteAKM2: TTabSheet - Caption = 'LinearWrite_AKM2' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblLinearWriteAKM2: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM2: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM2Click - end - object txtBytesWrittenAKM2: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - Zoom = 100 - OnChange = txtLinearWriteAKM2Change - end - end - end - end - object tabLinearWritePK: TTabSheet - Caption = 'LinearWrite_PK' - ImageIndex = 5 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblLinearWritePK: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenPK: TLabel - Left = 171 - Top = 249 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWritePK: TButton - Left = 323 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWritePKClick - end - object txtBytesWrittenPK: TEdit - Left = 256 - Top = 246 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWritePK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - Zoom = 100 - OnChange = txtLinearWritePKChange - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.pas deleted file mode 100644 index 762b3d97c28013c8df31c88f23f4a9382a8dfdae..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/LinearReadWrite.pas +++ /dev/null @@ -1,689 +0,0 @@ -unit LinearReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, - Global,uFCoder, ComCtrls, ExtCtrls; - -type - TfrmLinearReadWrite = class(TForm) - lblHeader: TStaticText; - stbLinearReadWrite: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblKeyIndex: TLabel; - cboKeyIndex: TComboBox; - lblPKKey: TLabel; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearReadAKM12: TTabSheet; - tabLinearReadPK: TTabSheet; - tabLinearWrite: TTabSheet; - tabLinearWriteAKM12: TTabSheet; - tabLinearWritePK: TTabSheet; - lblLinearRead: TLabel; - lblLReadLinearAddress: TLabel; - txtLRLinearAddress: TEdit; - lblLRDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - pgLinearReadAKM12: TPageControl; - tabLinearReadAKM1: TTabSheet; - tabLinearReadAKM2: TTabSheet; - lblLRAKM1LinearRead: TLabel; - lblLRAKM1LinearAddress: TLabel; - txtLRLinearAddressAKM1: TEdit; - lblLRAKM1DataLength: TLabel; - txtLRDataLengthAKM1: TEdit; - btnLinearReadAKM1: TButton; - Label4: TLabel; - lblLRLinearAddressAKM2: TLabel; - txtLRLinearAddressAKM2: TEdit; - txtLRDataLengthAKM2: TEdit; - btnLinearReadAKM2: TButton; - lblLRDataLengthAKM2: TLabel; - Label7: TLabel; - lblLRLinearAddressPK: TLabel; - txtLRLinearAddressPK: TEdit; - lblLRDataLengthPK: TLabel; - txtLRDataLengthPK: TEdit; - btnLinearReadPK: TButton; - lblLWLinearWrite: TLabel; - lblLWLinearAddress: TLabel; - txtLWLinearAddress: TEdit; - lblLWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - lblLinearWritePK: TLabel; - lblLWLinearAddressPK: TLabel; - txtLWLinearAddressPK: TEdit; - lblLWDataLengthPK: TLabel; - txtLWDataLengthPK: TEdit; - btnLinearWritePK: TButton; - pgLinearWriteAKM12: TPageControl; - tabLinearWriteAKM1: TTabSheet; - lblLinearWriteAKM1: TLabel; - lblLWLinearAddressAKM1: TLabel; - lblLWDataLengthAKM1: TLabel; - txtLWLinearAddressAKM1: TEdit; - txtLWDataLengthAKM1: TEdit; - btnLinearWriteAKM1: TButton; - tabLinearWriteAKM2: TTabSheet; - lblLinearWriteAKM2: TLabel; - lblLWLinearAddressAKM2: TLabel; - lblLWDataLengthAKM2: TLabel; - txtLWLinearAddressAKM2: TEdit; - txtLWDataLengthAKM2: TEdit; - btnLinearWriteAKM2: TButton; - lblBytesRead: TLabel; - txtReadBytes: TEdit; - lblReadBytesAKM1: TLabel; - txtReadBytesAKM1: TEdit; - lblReadBytesAKM2: TLabel; - txtReadBytesAKM2: TEdit; - lblReadBytesPK: TLabel; - txtReadBytesPK: TEdit; - lblBytesWritten: TLabel; - txtBytesWritten: TEdit; - lblBytesWrittenAKM1: TLabel; - txtBytesWrittenAKM1: TEdit; - lblBytesWrittenAKM2: TLabel; - txtBytesWrittenAKM2: TEdit; - lblBytesWrittenPK: TLabel; - txtBytesWrittenPK: TEdit; - txtLinearRead: TRichEdit; - txtLinearReadAKM1: TRichEdit; - txtLinearReadAKM2: TRichEdit; - txtLinearReadPK: TRichEdit; - txtLinearWrite: TRichEdit; - txtLinearWritePK: TRichEdit; - txtLinearWriteAKM1: TRichEdit; - txtLinearWriteAKM2: TRichEdit; - procedure FormCreate(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearReadAKM1Click(Sender: TObject); - procedure btnLinearReadAKM2Click(Sender: TObject); - procedure btnLinearReadPKClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnLinearWriteAKM1Click(Sender: TObject); - procedure btnLinearWriteAKM2Click(Sender: TObject); - procedure btnLinearWritePKClick(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - procedure txtLinearWriteAKM2Change(Sender: TObject); - procedure txtLinearWriteAKM1Change(Sender: TObject); - procedure txtLinearWritePKChange(Sender: TObject); - private - - procedure OnPKKeyExit(Sender:TObject); - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - public - { Public declarations } - end; - type - TByteArray=array of Byte; -var - frmLinearReadWrite: TfrmLinearReadWrite; - - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmLinearReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmLinearReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmLinearReadWrite.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLRLinearAddress.Text); - wDataLength :=StrToInt(txtLRDataLength.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - txtLinearRead.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(Trim(txtLRLinearAddressAKM1.Text)); - wDataLength :=StrToInt(Trim(txtLRDataLengthAKM1.Text)); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM1(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtLinearReadAKM1.Text:=String(baReadData); - txtReadBytesAKM1.Text :=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM1.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLRDataLengthAKM2.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM2(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtReadBytesAKM2.Text :=IntToStr(wBytesRet); - txtLinearReadAKM2.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM2.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadPKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - bBr :Byte; -begin - try - if Trim(txtLRLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - New(pData); - New(pPKKey); - - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressPK.Text); - wDataLength :=StrToInt(txtLRDataLengthPK.Text); - - SetLength(baReadData,wDataLength); - pData :=PByte(@baReadData[0]); - pPKKEY:=@PKKey; - iFResult:=LinearRead_PK(pData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtLinearReadPK.Text:=String(baReadData); - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLWLinearAddress.Text); - wDataLength :=StrToInt(txtLWDataLength.Text); - pData :=PByte(txtLinearWrite.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM1.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM1.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM1.Text); - pData :=PByte(txtLinearWriteAKM1.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM1(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM2.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM2.Text); - pData :=PByte(txtLinearWriteAKM2.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM2(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWritePKClick(Sender: TObject); -var - pPKKEY, - pData :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLinearWritePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWritePK.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressPK.Text); - wDataLength :=StrToInt(txtLWDataLengthPK.Text); - pData :=PByte(txtLinearWritePK.Text); - pPKKEY :=@PKKey; - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_PK(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,pPKKEY); - if iFResult=DL_OK then - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKEY); - frmuFrAdvanced.FunctionStart:=false; - end; - end; - - - -procedure TfrmLinearReadWrite.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(Trim(txtLinearWrite.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM2Change(Sender: TObject); -begin - txtLWDataLengthAKM2.Text:=IntToStr(Length(Trim(txtLinearWriteAKM2.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM1Change(Sender: TObject); -begin - txtLWDataLengthAKM1.Text:=IntToStr(Length(Trim(txtLinearWriteAKM1.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWritePKChange(Sender: TObject); -begin - txtLWDataLengthPK.Text:=IntToStr(Length(Trim(txtLinearWritePK.Text))); -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.dcu deleted file mode 100644 index f8be859138c5d1c14a4d7b807ec6ebd59194e551..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.dfm deleted file mode 100644 index bb49d1c2f4547c0f4dc18dc076d0e31610e29aff..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.dfm +++ /dev/null @@ -1,1117 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 379 - Top = 147 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 521 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 521 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 414 - Width = 521 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 521 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - object chkKeyADefault: TCheckBox - Left = 170 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Default' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chkKeyADefaultClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 260 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 258 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - object chkKeyBDefault: TCheckBox - Left = 170 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Default' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chkKeyBDefaultClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 521 - Height = 261 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.pas deleted file mode 100644 index 1780c3096ac9519d590d0c4d8a781159fab460fb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailerWrite.pas +++ /dev/null @@ -1,244 +0,0 @@ -unit SectorTrailerWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyADefault: TCheckBox; - chkKeyBHex: TCheckBox; - chkKeyBDefault: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - private - res:DL_STATUS; - KeyA:array[0..5] of Byte; - KeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - UFRCoder; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',true,OnKeyAPress); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',true,OnKeyBPress); -end; - -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin - CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin - CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - KeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - KeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else begin - for br:=0 to 5 do begin - KeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - KeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - key_index:Byte; - auth_mode:Byte; - addressing_mode:Byte; - block_or_sector_address:Byte; - access_bits0:Byte; - access_bits1:Byte; - access_bits2:Byte; - trailer_access_bits:Byte; - trailer_Byte_9:Byte; - PKeyA:PByte; - PKeyB:PByte; -begin - - PKeyA:=nil; - PKeyB:=nil; - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then begin - MessageDlg('You must enter BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then begin - MessageDlg('You must enter TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - key_index:=cboKeyIndex.ItemIndex; - if rbAUTH1A.Checked then auth_mode:=MIFARE_AUTHENT1A else auth_mode:=MIFARE_AUTHENT1B; - - addressing_mode:=cboAddressingMode.ItemIndex; - block_or_sector_address:=StrToInt(txtBlockSectorAddress.Text); - access_bits0:=cboAccessBits0.ItemIndex; - access_bits1:=cboAccessBits1.ItemIndex; - access_bits2:=cboAccessBits2.ItemIndex; - trailer_access_bits:=cboTrailerAccessBits.ItemIndex; - trailer_Byte_9:=StrToInt(txtTrailerByte9.text); - WriteKeyAB; - PKeyA:=@KeyA; - PKeyB:=@KeyB; - res:=SectorTrailerWrite(addressing_mode,block_or_sector_address,PKeyA,access_bits0,access_bits1, - access_bits2,trailer_access_bits,trailer_Byte_9,PKeyB,auth_mode,key_index); - - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbSectorTrailerWrite,res); - end - else - begin - ReaderUiSignal(ERROR_LIGHT,ERROR_SOUND); - Status_Bar_Error_Reporting(stbSectorTrailerWrite,res); - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.dcu deleted file mode 100644 index e2c4f80aa147ef6c4c09fea0455f9a049a05cbb7..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.dfm deleted file mode 100644 index 06995fb3668f175ca339e17e0aa7f45395559e03..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.dfm +++ /dev/null @@ -1,1091 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 389 - Top = 154 - Caption = 'SectorTrailerWrite' - ClientHeight = 421 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 402 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 513 - Height = 249 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM1Click - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM2Click - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWritePKClick - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.pas deleted file mode 100644 index 17e935f2abec2edcbc90fffe75d70f4d0e0726be..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/SectorTrailersWrite.pas +++ /dev/null @@ -1,520 +0,0 @@ -unit SectorTrailersWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyBHex: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - procedure btnSectorTrailerWriteAKM1Click(Sender: TObject); - procedure btnSectorTrailerWriteAKM2Click(Sender: TObject); - procedure btnSectorTrailerWritePKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmSectorTrailerWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; -procedure TfrmSectorTrailerWrite.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmSectorTrailerWrite.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - - bAddressingMode :=cboAddressingMode.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddress.Text); - bAccessBits0 :=cboAccessBits0.ItemIndex; - bAccessBits1 :=cboAccessBits1.ItemIndex; - bAccessBits2 :=cboAccessBits2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9.text); - - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM1.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM1.Text); - bAccessBits0 :=cboAccessBits0AKM1.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM1.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM1.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM1.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM1(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM2(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9PK.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=SectorTrailerWrite_PK(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode, - pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA :=nil; - pKeyB :=nil; - pPKkey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - - - - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.dcu deleted file mode 100644 index 2d510bc1ac78fe7324d4223591d3f40364c85b7b..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.dfm deleted file mode 100644 index 2e3c50666401594813589eb1078235ccd513b0c7..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.dfm +++ /dev/null @@ -1,1096 +0,0 @@ -object frmValueBlockReadWrite: TfrmValueBlockReadWrite - Left = 531 - Top = 222 - Caption = 'ValueBlockReadWrite' - ClientHeight = 381 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockReadWrite: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 305 - ActivePage = tavValueBlockRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockRead: TTabSheet - Caption = 'ValueBlock Read' - object pnlValueBlockRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBRValueAddress: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadData: TLabel - Left = 9 - Top = 86 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddress: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBRValueAddress: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtVBRReadValue: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockValueRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockValueReadClick - end - object txtVBRBlockAddress: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBRValueAddressAKM1: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM1: TLabel - Left = 9 - Top = 86 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM1: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM1: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM1: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM1: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM1Click - end - object txtVBRBlockAddressAKM1: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBRValueAddressAKM2: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM2: TLabel - Left = 9 - Top = 90 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM2: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM2: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM2: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM2: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM2Click - end - object txtVBRBlockAddressAKM2: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBRValueAddressPK: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValuePK: TLabel - Left = 9 - Top = 90 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressPK: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressPK: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValuePK: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadPK: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadPKClick - end - object txtVBRBlockAddressPK: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - end - object tabValueBlockWrite: TTabSheet - Caption = 'ValueBlock Write' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBWWriteData: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddress: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddress: TLabel - Left = 9 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 127 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteData: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWrite: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteClick - end - object txtVBWBlockAddress: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddress: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBWWriteDataAKM1: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM1: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM1: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM1: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM1Click - end - object txtVBWBlockAddressAKM1: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM1: TEdit - Left = 114 - Top = 94 - Width = 37 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBWWriteDataAKM2: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWAKM2: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM2: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM2: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 55 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM2Click - end - object txtVBWBlockAddressAKM2: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM2: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label9: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressPK: TLabel - Left = 9 - Top = 100 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWPK: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataPK: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWritePK: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWritePKClick - end - object txtVBWBlockAddressPK: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressPK: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.pas deleted file mode 100644 index 9dc7a23ef7645c23b5e9e78fd2a4c62f0d81fbdb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlock.pas +++ /dev/null @@ -1,599 +0,0 @@ -unit ValueBlock; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs,Global, - uFCoder, - ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockReadWrite: TStatusBar; - pgValueBlockReadWrite: TPageControl; - tavValueBlockRead: TTabSheet; - pnlValueBlockRead: TPanel; - lblVBRValueAddress: TLabel; - lblVBRReadData: TLabel; - lblVBRBlockAddress: TLabel; - lblVBRead: TStaticText; - txtVBRValueAddress: TEdit; - txtVBRReadValue: TEdit; - btnBlockValueRead: TButton; - txtVBRBlockAddress: TEdit; - pnlValueBlockReadAKM1: TPanel; - lblVBRAKM1: TStaticText; - pnlValueBlockReadAKM2: TPanel; - lblVBRAKM2: TStaticText; - pnlValueBlockReadPK: TPanel; - lblBRPK: TStaticText; - tabValueBlockWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblVBWWriteData: TLabel; - lblVBWBlockAddress: TLabel; - lblBISWBlockWrite: TStaticText; - txtVBWWriteData: TEdit; - btnValueBlockWrite: TButton; - txtVBWBlockAddress: TEdit; - pnlBlockWriteAKM1: TPanel; - lblVBWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblVBWAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblVBWPK: TStaticText; - lblVBRValueAddressAKM1: TLabel; - lblVBRReadValueAKM1: TLabel; - lblVBRBlockAddressAKM1: TLabel; - txtVBRValueAddressAKM1: TEdit; - txtVBRReadValueAKM1: TEdit; - btnValueBlockReadAKM1: TButton; - txtVBRBlockAddressAKM1: TEdit; - lblVBRValueAddressAKM2: TLabel; - lblVBRReadValueAKM2: TLabel; - lblVBRBlockAddressAKM2: TLabel; - txtVBRValueAddressAKM2: TEdit; - txtVBRReadValueAKM2: TEdit; - btnValueBlockReadAKM2: TButton; - txtVBRBlockAddressAKM2: TEdit; - lblVBRValueAddressPK: TLabel; - lblVBRReadValuePK: TLabel; - lblVBRBlockAddressPK: TLabel; - txtVBRValueAddressPK: TEdit; - txtVBRReadValuePK: TEdit; - btnValueBlockReadPK: TButton; - txtVBRBlockAddressPK: TEdit; - lblVBWValueAddress: TLabel; - txtVBWValueAddress: TEdit; - lblVBWWriteDataAKM1: TLabel; - lblVBWBlockAddressAKM1: TLabel; - txtVBWWriteDataAKM1: TEdit; - btnValueBlockWriteAKM1: TButton; - txtVBWBlockAddressAKM1: TEdit; - lblVBWValueAddressAKM1: TLabel; - txtVBWValueAddressAKM1: TEdit; - lblVBWWriteDataAKM2: TLabel; - lblVBWBlockAddressAKM2: TLabel; - txtVBWWriteDataAKM2: TEdit; - btnValueBlockWriteAKM2: TButton; - txtVBWBlockAddressAKM2: TEdit; - txtVBWValueAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - Label9: TLabel; - txtVBWWriteDataPK: TEdit; - btnValueBlockWritePK: TButton; - txtVBWBlockAddressPK: TEdit; - lblVBWValueAddressPK: TLabel; - txtVBWValueAddressPK: TEdit; - lblVBWValueAddressAKM2: TLabel; - procedure FormCreate(Sender: TObject); - procedure btnBlockValueReadClick(Sender: TObject); - procedure btnValueBlockReadAKM1Click(Sender: TObject); - procedure btnValueBlockReadAKM2Click(Sender: TObject); - procedure btnValueBlockReadPKClick(Sender: TObject); - procedure btnValueBlockWriteClick(Sender: TObject); - procedure btnValueBlockWriteAKM1Click(Sender: TObject); - procedure btnValueBlockWriteAKM2Click(Sender: TObject); - procedure btnValueBlockWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockReadWrite: TfrmValueBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockReadWrite } - -procedure TfrmValueBlockReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockReadWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockReadWrite.btnBlockValueReadClick(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead(pData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtVBRValueAddress.Text:=IntToStr(bValueAddress); - txtVBRReadValue.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM1Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressAKM1.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM1(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM1.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM1.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM2Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM2(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM2.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM2.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - pData :PLongint; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressPK.Text); - pData :=@iValueData; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - - iFResult:=ValueBlockRead_PK(pData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtVBRValueAddressPK.Text:=IntToStr(bValueAddress); - txtVBRReadValuePK.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteClick(Sender: TObject); -var - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddress.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBWWriteData.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBWValueAddress.Text); - - iFResult:=ValueBlockWrite(iValueData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM1Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM1.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM1.Text); - - iFResult:=ValueBlockWrite_AKM1(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM2Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM2.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM2.Text); - - iFResult:=ValueBlockWrite_AKM2(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressPK.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataPK.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBWValueAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockWrite_PK(iValueData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.dcu deleted file mode 100644 index e662673d55734bf476bf8fe532e4876a25c8184f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.dfm deleted file mode 100644 index eedd414a44e4a344ba546f65c0257e1c6e9097de..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.dfm +++ /dev/null @@ -1,1268 +0,0 @@ -object frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite - Left = 519 - Top = 130 - Caption = 'ValueBlockInSectorReadWrite' - ClientHeight = 379 - ClientWidth = 511 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 511 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read/Write (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 511 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSector: TStatusBar - Left = 0 - Top = 360 - Width = 511 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSector: TPageControl - Left = 0 - Top = 57 - Width = 511 - Height = 303 - ActivePage = tabValueBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorRead: TTabSheet - Caption = 'ValueBlockInSector Read' - object pnlValueBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadData: TLabel - Left = 8 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddress: TLabel - Left = 156 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadData: TEdit - Left = 6 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadClick - end - object txtVBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddress: TEdit - Left = 205 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadDataAKM1: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddressAKM1: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadDataAKM1: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM1Click - end - object txtVBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddressAKM1: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataAKM2: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressAKM2: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM2Click - end - object txtVBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataAKM2: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressAKM2: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataPK: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressPK: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadPKClick - end - object txtVBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataPK: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressPK: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - end - object tabValueBlockInSectorWrite: TTabSheet - Caption = 'ValueBlockInSector Write' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pnlVBISBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM1: TLabel - Left = 10 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM1: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM1: TLabel - Left = 156 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 234 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM1: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM1Click - end - object txtVBISWBlockAddressAKM1: TEdit - Left = 103 - Top = 55 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM1: TEdit - Left = 9 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM1: TEdit - Left = 103 - Top = 29 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM1: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 61 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM2: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM2: TLabel - Left = 9 - Top = 34 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM2: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 234 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM2: TButton - Left = 157 - Top = 28 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM2Click - end - object txtVBISWBlockAddressAKM2: TEdit - Left = 104 - Top = 56 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM2: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM2: TEdit - Left = 104 - Top = 30 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM2: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISWBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataPK: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddressPK: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddressPK: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 212 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWritePK: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWritePKClick - end - object txtVBISWBlockAddressPK: TEdit - Left = 102 - Top = 55 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataPK: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddressPK: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddressPK: TEdit - Left = 102 - Top = 29 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - object pnlVBISBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISWBlockAddress: TLabel - Left = 8 - Top = 62 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteData: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddress: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddress: TLabel - Left = 9 - Top = 36 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 189 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWrite: TButton - Left = 157 - Top = 30 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteClick - end - object txtVBISWBlockAddress: TEdit - Left = 105 - Top = 57 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteData: TEdit - Left = 8 - Top = 102 - Width = 144 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddress: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddress: TEdit - Left = 105 - Top = 31 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.pas deleted file mode 100644 index 29bfb28e3055d935764d4d832b04fb6a3fef2715..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSector.pas +++ /dev/null @@ -1,670 +0,0 @@ -unit ValueBlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockInSectorReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSector: TStatusBar; - pgValueBlockInSector: TPageControl; - tabValueBlockInSectorRead: TTabSheet; - pnlValueBlockInSectorRead: TPanel; - lblVBISRSectorAddress: TLabel; - lblVBISRReadData: TLabel; - lblVBISRBlockAddress: TLabel; - lblVBISRead: TStaticText; - txtVBISRSectorAddress: TEdit; - txtVBISRReadData: TEdit; - btnValueBlockInSectorRead: TButton; - txtVBISRBlockAddress: TEdit; - pnlValueBlockInSectorReadAKM1: TPanel; - lblVBISRSectorAddressAKM1: TLabel; - lblVBISRReadDataAKM1: TLabel; - lblVBISRBlockAddressAKM1: TLabel; - lblVBISReadAKM1: TStaticText; - txtVBISRSectorAddressAKM1: TEdit; - txtVBISRReadDataAKM1: TEdit; - btnValueBlockInSectorReadAKM1: TButton; - txtVBISRBlockAddressAKM1: TEdit; - pnlValueBlockInSectorReadAKM2: TPanel; - lblVBISRSectorAddressAKM2: TLabel; - lblVBISRBlockAddressAKM2: TLabel; - lblVBISReadAKM2: TStaticText; - txtVBISRSectorAddressAKM2: TEdit; - btnValueBlockInSectorReadAKM2: TButton; - txtVBISRBlockAddressAKM2: TEdit; - pnlValueBlockReadPK: TPanel; - lblVBISRSectorAddressPK: TLabel; - lblVBISRBlockAddressPK: TLabel; - lblVBISReadPK: TStaticText; - txtVBISRSectorAddressPK: TEdit; - btnValueBlockInSectorReadPK: TButton; - txtVBISRBlockAddressPK: TEdit; - tabValueBlockInSectorWrite: TTabSheet; - pnlVBISBlockWriteAKM1: TPanel; - lblVBISWBlockWriteAKM1: TStaticText; - pnlVBISBlockWriteAKM2: TPanel; - lblVBISWBlockWriteAKM2: TStaticText; - pnlVBISBlockWritePK: TPanel; - lblVBISWBlockWritePK: TStaticText; - lblVBISRValueAddress: TLabel; - txtVBISRValueAddress: TEdit; - lblVBISRValueAddressAKM1: TLabel; - txtVBISRValueAddressAKM1: TEdit; - lblVBISRReadDataAKM2: TLabel; - txtVBISRReadDataAKM2: TEdit; - lblVBISRValueAddressAKM2: TLabel; - txtVBISRValueAddressAKM2: TEdit; - lblVBISRReadDataPK: TLabel; - txtVBISRReadDataPK: TEdit; - lblVBISRValueAddressPK: TLabel; - txtVBISRValueAddressPK: TEdit; - lblVBISWBlockAddressAKM1: TLabel; - btnValueBlockInSectorWriteAKM1: TButton; - txtVBISWBlockAddressAKM1: TEdit; - lblVBISWBlockAddressAKM2: TLabel; - btnValueBlockInSectorWriteAKM2: TButton; - txtVBISWBlockAddressAKM2: TEdit; - lblVBISWBlockAddressPK: TLabel; - btnValueBlockInSectorWritePK: TButton; - txtVBISWBlockAddressPK: TEdit; - pnlVBISBlockWrite: TPanel; - lblVBISWBlockAddress: TLabel; - lblVBISWBlockWrite: TStaticText; - btnValueBlockInSectorWrite: TButton; - txtVBISWBlockAddress: TEdit; - lblVBISWWriteData: TLabel; - txtVBISWWriteData: TEdit; - lblBISRWValueAddress: TLabel; - txtVBISWValueAddress: TEdit; - lblVBISWWriteDataAKM1: TLabel; - txtVBISWWriteDataAKM1: TEdit; - lblVBISWSectorAddress: TLabel; - txtVBISWSectorAddress: TEdit; - lblVBISWSectorAddressAKM1: TLabel; - txtVBISWSectorAddressAKM1: TEdit; - lblBISRWValueAddressAKM1: TLabel; - txtVBISWValueAddressAKM1: TEdit; - lblVBISWWriteDataAKM2: TLabel; - txtVBISWWriteDataAKM2: TEdit; - lblVBISWSectorAddressAKM2: TLabel; - txtVBISWSectorAddressAKM2: TEdit; - lblBISRWValueAddressAKM2: TLabel; - txtVBISWValueAddressAKM2: TEdit; - lblVBISWWriteDataPK: TLabel; - txtVBISWWriteDataPK: TEdit; - lblBISRWValueAddressPK: TLabel; - txtVBISWValueAddressPK: TEdit; - lblVBISWSectorAddressPK: TLabel; - txtVBISWSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorReadClick(Sender: TObject); - procedure btnValueBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorReadPKClick(Sender: TObject); - procedure btnValueBlockInSectorWriteClick(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorWritePKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockInSectorReadWrite } - -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject; - var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadClick(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtVBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddress.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtVBISRReadData.Text :=IntToStr(iValueData); - txtVBISRValueAddress.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM1Click(Sender: TObject); -var - PData :PLongint; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM1.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM1(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM1.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM1.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM2Click(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM2.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM2(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM2.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM2.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - PData :PLongint; - pPKKey :PByte; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress, - bBr :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - pData :=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_PK(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtVBISRReadDataPK.Text :=IntToStr(iValueData); - txtVBISRValueAddressPK.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - - if Trim(txtVBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddress.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBISWWriteData.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBISWValueAddress.Text); - - iFResult:=ValueBlockInSectorWrite(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM1.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM1.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM1.Text); - - iFResult:=ValueBlockInSectorWrite_AKM1(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM2.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM2.Text); - - iFResult:=ValueBlockInSectorWrite_AKM2(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataPK.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorWrite_PK(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pPKKey :=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.dcu deleted file mode 100644 index 1e2302f5ce7efa42ce691a3305dfd05f2ebf468e..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.dfm deleted file mode 100644 index 6120e2fbd307a9d90f5b2100fd4d6af39cf6572e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.dfm +++ /dev/null @@ -1,1070 +0,0 @@ -object frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr - Left = 432 - Top = 198 - Caption = 'ValueBlockInSectorInctDecr' - ClientHeight = 381 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Increment/Decrement (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSectorIncrDecr: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSectorIncDecr: TPageControl - Left = 0 - Top = 56 - Width = 513 - Height = 306 - ActivePage = tabValueBlockInSectorIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorIncrement: TTabSheet - Caption = 'ValueBlockInSector Increment' - object pnlValueBlockInSectorIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISIncrValue: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrement: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementClick - end - object txtVBISIncrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM1: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM1Click - end - object txtVBISIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM2: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM2Click - end - object txtVBISIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementPK: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementPKClick - end - object txtVBISIncrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlockInSector Decrement' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pnlVBISDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDec: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrement: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - HelpType = htKeyword - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementClick - end - object txtVBISDecrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM1: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM1Click - end - object txtVBISDecrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM2: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM2Click - end - object txtVBISDecrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecPK: TStaticText - Left = 2 - Top = 2 - Width = 173 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementPK: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementPKClick - end - object txtVBISDecrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.pas deleted file mode 100644 index 7df55a9d37a15a82c550f1ece73d10b8acdc7c0e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockInSectorIncrDecr.pas +++ /dev/null @@ -1,623 +0,0 @@ -unit ValueBlockInSectorIncrDecr; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder; - -type - TfrmValueBlockInSectorIncDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSectorIncrDecr: TStatusBar; - pgValueBlockInSectorIncDecr: TPageControl; - tabValueBlockInSectorIncrement: TTabSheet; - pnlValueBlockInSectorIncrement: TPanel; - lblVBISIncrValue: TLabel; - lblVBISIncrBlockAddress: TLabel; - lblVBISIncr: TStaticText; - txtVBISIncrementValue: TEdit; - btnValueBlockInSectorIncrement: TButton; - txtVBISIncrBlockAddress: TEdit; - pnlValueBlockInSectorIncrementAKM1: TPanel; - lblVBISIncrAKM1: TStaticText; - pnlValueBlockInSectorIncrementAKM2: TPanel; - lblVBISIncrAKM2: TStaticText; - pnlValueBlockInSectorIncrementPK: TPanel; - lblVBISIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - pnlVBISDecrement: TPanel; - lblVBISDecrementValue: TLabel; - lblVBISDecBlockAddress: TLabel; - lblVBISDec: TStaticText; - txtVBISDecrementValue: TEdit; - btnValueBlockInSectorDecrement: TButton; - txtVBISDecrBlockAddress: TEdit; - pnlVBISDecrementAKM1: TPanel; - lblVBISDecAKM1: TStaticText; - pnlVBISDecrementAKM2: TPanel; - lblVBISDecAKM2: TStaticText; - pnlVBISDecrementPK: TPanel; - lblVBISDecPK: TStaticText; - lblVBISIncSectorAddress: TLabel; - txtVBISIncrSectorAddress: TEdit; - lblVBISIncrValueAKM1: TLabel; - lblVBISIncrBlockAddressAKM1: TLabel; - txtVBISIncrementValueAKM1: TEdit; - btnValueBlockInSectorIncrementAKM1: TButton; - txtVBISIncrBlockAddressAKM1: TEdit; - lblVBISIncSectorAddressAKM1: TLabel; - txtVBISIncrSectorAddressAKM1: TEdit; - lblVBISIncrValueAKM2: TLabel; - lblVBISIncrBlockAddressAKM2: TLabel; - txtVBISIncrementValueAKM2: TEdit; - btnValueBlockInSectorIncrementAKM2: TButton; - txtVBISIncrBlockAddressAKM2: TEdit; - lblVBISIncSectorAddressAKM2: TLabel; - txtVBISIncrSectorAddressAKM2: TEdit; - lblVBISIncrValuePK: TLabel; - lblVBISIncrBlockAddressPK: TLabel; - txtVBISIncrementValuePK: TEdit; - btnValueBlockInSectorIncrementPK: TButton; - txtVBISIncrBlockAddressPK: TEdit; - lblVBISIncSectorAddressPK: TLabel; - txtVBISIncrSectorAddressPK: TEdit; - lblVBISDecrSectorAddress: TLabel; - txtVBISDecrSectorAddress: TEdit; - lblVBISDecrementValueAKM1: TLabel; - lblVBISDecBlockAddressAKM1: TLabel; - txtVBISDecrementValueAKM1: TEdit; - btnValueBlockInSectorDecrementAKM1: TButton; - txtVBISDecrBlockAddressAKM1: TEdit; - lblVBISDecrSectorAddressAKM1: TLabel; - txtVBISDecrSectorAddressAKM1: TEdit; - lblVBISDecrementValueAKM2: TLabel; - lblVBISDecBlockAddressAKM2: TLabel; - txtVBISDecrementValueAKM2: TEdit; - btnValueBlockInSectorDecrementAKM2: TButton; - txtVBISDecrBlockAddressAKM2: TEdit; - lblVBISDecrSectorAddressAKM2: TLabel; - txtVBISDecrSectorAddressAKM2: TEdit; - lblVBISDecrementValuePK: TLabel; - lblVBISDecBlockAddressPK: TLabel; - txtVBISDecrementValuePK: TEdit; - btnValueBlockInSectorDecrementPK: TButton; - txtVBISDecrBlockAddressPK: TEdit; - lblVBISDecrSectorAddressPK: TLabel; - txtVBISDecrSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorIncrementClick(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementPKClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementPKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockInSectorIncDecr.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBISIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddress.Text); - - iFResult:=ValueBlockInSectorIncrement(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM1(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM2(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorIncrement_PK(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBISDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddress.Text); - - iFResult:=ValueBlockInSectorDecrement(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM1(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM2(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; - -begin - try - if Trim(txtVBISDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorDecrement_PK(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - - - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.dcu deleted file mode 100644 index 5968d0c22835864fba33fd0ad1c48160e619bc51..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.dfm deleted file mode 100644 index 04934c7f2f62112fde1beb2c87ecad5a8c535177..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.dfm +++ /dev/null @@ -1,884 +0,0 @@ -object frmValueBlockIncrDecr: TfrmValueBlockIncrDecr - Left = 343 - Top = 186 - Caption = 'ValueBlockIncr/Decr' - ClientHeight = 381 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment/Decrement(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockIncrDecr: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockIncDecr: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 305 - ActivePage = tavValueBlockIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockIncrement: TTabSheet - Caption = 'ValueBlock Increment' - object pnlValueBlockIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBIncrValue: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementClick - end - object txtVBIncrBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM1Click - end - object txtVBIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM2Click - end - object txtVBIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementPKClick - end - object txtVBIncrBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlock Decrement' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object pnlVBDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDec: TStaticText - Left = 2 - Top = 2 - Width = 168 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementClick - end - object txtVBDecBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM1Click - end - object txtVBDecBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM2Click - end - object txtVBDecBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecPK: TStaticText - Left = 2 - Top = 2 - Width = 191 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementPKClick - end - object txtVBDecBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.pas deleted file mode 100644 index 67a8ae0bf3643cb944af84036515ecc1b76b3ea0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ValueBlockIncDec.pas +++ /dev/null @@ -1,542 +0,0 @@ -unit ValueBlockIncDec; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockIncrDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockIncrDecr: TStatusBar; - pgValueBlockIncDecr: TPageControl; - tavValueBlockIncrement: TTabSheet; - pnlValueBlockIncrement: TPanel; - lblVBIncrValue: TLabel; - lblVBIncrBlockAddress: TLabel; - lblVBIncr: TStaticText; - txtVBIncrementValue: TEdit; - btnValueBlockIncrement: TButton; - txtVBIncrBlockAddress: TEdit; - pnlValueBlockIncrAKM1: TPanel; - lblVBIncrAKM1: TStaticText; - pnlValueBlockIncrAKM2: TPanel; - lblVBIncrAKM2: TStaticText; - pnlValueBlockIncrPK: TPanel; - lblVBIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - lblVBIncrValueAKM1: TLabel; - lblVBIncrBlockAddressAKM1: TLabel; - txtVBIncrementValueAKM1: TEdit; - btnValueBlockIncrementAKM1: TButton; - txtVBIncrBlockAddressAKM1: TEdit; - lblVBIncrValueAKM2: TLabel; - lblVBIncrBlockAddressAKM2: TLabel; - txtVBIncrementValueAKM2: TEdit; - btnValueBlockIncrementAKM2: TButton; - txtVBIncrBlockAddressAKM2: TEdit; - lblVBIncrValuePK: TLabel; - lblVBIncrBlockAddressPK: TLabel; - txtVBIncrementValuePK: TEdit; - btnValueBlockIncrementPK: TButton; - txtVBIncrBlockAddressPK: TEdit; - pnlVBDecrement: TPanel; - lblVBDecrementValue: TLabel; - lblVBDecBlockAddress: TLabel; - lblVBDec: TStaticText; - txtVBDecrementValue: TEdit; - btnValueBlockDecrement: TButton; - txtVBDecBlockAddress: TEdit; - pnlVBDecrementAKM1: TPanel; - lblVBDecrementValueAKM1: TLabel; - lblVBDecBlockAddressAKM1: TLabel; - lblVBDecAKM1: TStaticText; - txtVBDecrementValueAKM1: TEdit; - btnValueBlockDecrementAKM1: TButton; - txtVBDecBlockAddressAKM1: TEdit; - pnlVBDecrementAKM2: TPanel; - lblVBDecrementValueAKM2: TLabel; - lblVBDecBlockAddressAKM2: TLabel; - lblVBDecAKM2: TStaticText; - txtVBDecrementValueAKM2: TEdit; - btnValueBlockDecrementAKM2: TButton; - txtVBDecBlockAddressAKM2: TEdit; - pnlVBDecrementPK: TPanel; - lblVBDecrementValuePK: TLabel; - lblVBDecBlockAddressPK: TLabel; - lblVBDecPK: TStaticText; - txtVBDecrementValuePK: TEdit; - btnValueBlockDecrementPK: TButton; - txtVBDecBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockIncrementClick(Sender: TObject); - procedure btnValueBlockIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockIncrementPKClick(Sender: TObject); - procedure btnValueBlockDecrementClick(Sender: TObject); - procedure btnValueBlockDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockDecrementPKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockIncrDecr: TfrmValueBlockIncrDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockIncrDecr.FormCreate(Sender: TObject); -begin - - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddress.Text); - - iFResult:=ValueBlockIncrement(iIncrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM1.Text); - - iFResult:=ValueBlockIncrement_AKM1(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM2.Text); - - iFResult:=ValueBlockIncrement_AKM2(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - - iFResult:=ValueBlockIncrement_PK(iIncrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddress.Text); - - iFResult:=ValueBlockDecrement(iDecrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM1.Text); - - iFResult:=ValueBlockDecrement_AKM1(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM2.Text); - - iFResult:=ValueBlockDecrement_AKM2(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressPK.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - iFResult:=ValueBlockDecrement_PK(iDecrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.dcu deleted file mode 100644 index 6f47c6075fe02fc21c21aa0cfa4524773212a903..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.dfm deleted file mode 100644 index 44b5820f0b70b4d646cea196f1be1e5f46a48414..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.dfm +++ /dev/null @@ -1,197 +0,0 @@ -object frmViewAll: TfrmViewAll - Left = 329 - Top = 138 - Caption = 'ViewAll' - ClientHeight = 397 - ClientWidth = 513 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - DesignSize = ( - 513 - 397) - PixelsPerInch = 96 - TextHeight = 13 - object lblKeyIndex: TLabel - Left = 159 - Top = 318 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'View All' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbViewAll: TStatusBar - Left = 0 - Top = 378 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object sgrdViewAll: TStringGrid - Left = 0 - Top = 26 - Width = 513 - Height = 277 - Cursor = crHandPoint - Ctl3D = True - DefaultColWidth = 40 - DefaultRowHeight = 20 - RowCount = 2 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - OnDrawCell = sgrdViewAllDrawCell - end - object rbHexView: TRadioButton - Left = 271 - Top = 343 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'HEX' - TabOrder = 3 - end - object btnReadData: TButton - Left = 331 - Top = 316 - Width = 177 - Height = 41 - Cursor = crHandPoint - Anchors = [akLeft, akBottom] - Caption = 'READ DATA' - TabOrder = 4 - OnClick = btnReadDataClick - end - object cboKeyIndex: TComboBox - Left = 168 - Top = 338 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object pbBar: TProgressBar - Left = 331 - Top = 361 - Width = 177 - Height = 13 - BorderWidth = 1 - Smooth = True - TabOrder = 6 - Visible = False - end - object rbgrpRadioButtonGroup: TRadioGroup - Left = 8 - Top = 305 - Width = 97 - Height = 61 - ItemIndex = 0 - Items.Strings = ( - 'AUTH 1A' - 'AUTH 1B') - TabOrder = 7 - end - object rbAscii: TRadioButton - Left = 271 - Top = 316 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'ASCII' - Checked = True - TabOrder = 8 - TabStop = True - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.pas deleted file mode 100644 index b1e93ec8e72adf8dd7a5732ac3e7507261b7a703..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.pas +++ /dev/null @@ -1,273 +0,0 @@ -unit ViewAll; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder, - Grids, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmViewAll = class(TForm) - lblHeader: TStaticText; - stbViewAll: TStatusBar; - sgrdViewAll: TStringGrid; - rbHexView: TRadioButton; - btnReadData: TButton; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - pbBar: TProgressBar; - rbgrpRadioButtonGroup: TRadioGroup; - rbAscii: TRadioButton; - procedure sgrdViewAllDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState); - procedure btnReadDataClick(Sender: TObject); - private - procedure Draw1k4kGrid; - procedure Draw1k4kCardData; - procedure DrawNTAGCardData; - public - { Public declarations } - end; - -var - frmViewAll: TfrmViewAll; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmViewAll.Draw1k4kGrid; -var - bBr :Byte; -begin - - with sgrdViewAll do - begin - ColCount := 19; - // FixedRows := 3; - Cells[0, 0] := 'S'; - Cells[1, 0] := 'BiS'; - Cells[2, 0] := 'Blo'; - for bBr := 0 to 15 do - Cells[bBr + 3, 0] := IntToStr(bBr); - end; - -end; - -procedure TfrmViewAll.sgrdViewAllDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState); -begin - if sgrdViewAll.Cells[0,aRow]='SCT' then - begin - with sgrdViewAll.Canvas do - begin - Brush.Color := $02aaaaaa; - FillRect(Rect); - Font.Color := clBlack; - TextOut(Rect.Left+2,Rect.Top+2,sgrdViewAll.Cells[aCol,aRow]); - end; -end; -end; - - -procedure TfrmViewAll.btnReadDataClick(Sender: TObject); -var - cardType:Byte; -begin - cardType:=frmuFrAdvanced.bDLCardType; - if (cardType = uFCoder.DL_NTAG_203) or (cardType = uFCoder.DL_MIFARE_ULTRALIGHT) or - (cardType = uFCoder.DL_MIFARE_ULTRALIGHT_C) then - DrawNTAGCardData - else - if (cardType = uFCoder.DL_MIFARE_CLASSIC_1K) or (cardType = uFCoder.DL_MIFARE_CLASSIC_4K) or - (cardType = uFCoder.DL_MIFARE_PLUS_S_4K) then - Draw1k4kCardData; -end; - -procedure TfrmViewAll.Draw1k4kCardData; -var - chaBlockData :array[0..15] of Char; - pData :PByte; - bBlockCount :Integer; - bBISCounter, - bBISCount, - bBr, - bSectorsCounter :Byte; - iMaxBlocks :Integer; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - try - frmuFrAdvanced.FunctionStart := true; - Draw1k4kGrid; - bSectorsCounter :=0; - bBISCount :=0; - bBISCounter :=3; - bBlockCount :=0; - New(pData); - bKeyIndex :=cboKeyIndex.ItemIndex; - iMaxBlocks :=MaxBlocks(); - pbBar.Max :=iMaxBlocks; - pbBar.Visible :=true; - - if rbgrpRadioButtonGroup.ItemIndex=0 then bAuthMode :=MIFARE_AUTHENT1A - else - bAuthMode :=MIFARE_AUTHENT1B; - - sgrdViewAll.RowCount:=iMaxBlocks+1; - - while bBlockCount=31) and (bBlockCount mod 16 =0) then - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - bBISCounter:=15; - end - else - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - end; - end; - sgrdViewAll.Repaint; - if iFResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - pbBar.Visible := false; - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmViewAll.DrawNTAGCardData; -var - pData :PByte; - pPKKey :PByte; - pageData :array[0..10] of Byte; - authMode :Byte; - blockAddress :Byte; - bCounter,i :Byte; - maxBlock :integer; - bAuthMode, - bKeyIndex :Byte; - fnResult :DL_STATUS; -begin - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - - try - frmuFrAdvanced.FunctionStart := true; - maxBlock := MaxBlocks(); - - with sgrdViewAll do - begin - FixedCols :=1; - FixedRows :=1; - ColCount :=5; - RowCount :=maxBlock-2; - DefaultColWidth:=35; - Cells[0,0] :='PAGE'; - for i:=1 to 4 do - Cells[i,0]:=IntToStr(i); - end; - New(pData); - if rbgrpRadioButtonGroup.ItemIndex=0 then - authMode :=MIFARE_AUTHENT1A - else - authMode :=MIFARE_AUTHENT1B; - - bKeyIndex :=StrToInt(cboKeyIndex.Text); - pbBar.Visible :=true; - pbBar.Max :=maxBlock+2; - bcounter :=4; - while (bcounter<=maxBlock) do - begin - pData := PByte(@pageData); - fnResult := BlockRead(pData,bcounter,authMode,bKeyIndex); - if not fnResult = DL_OK then break; - - sgrdViewAll.Cells[0,bcounter-3] := IntToStr(bcounter); - for i:=0 to 3 do - begin - if rbHexView.Checked then - sgrdViewAll.Cells[i+1,bcounter-3]:='$'+IntToHex(Byte(pageData[i]),2) - else - sgrdViewAll.Cells[i+1,bcounter-3]:=chr(pageData[i]); - end; - - pbBar.Position:=bcounter; - Application.ProcessMessages; - Inc(bcounter); - end; - if fnResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,fnResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,fnResult); - end; - finally - pbBar.Visible:=false; - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart := false; - end; - -end; - - - -end. - diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~dfm deleted file mode 100644 index 80567daba668600a0837133b174e1466c5f9d7d0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~dfm +++ /dev/null @@ -1,198 +0,0 @@ -object frmViewAll: TfrmViewAll - Left = 329 - Top = 138 - Width = 529 - Height = 436 - Caption = 'ViewAll' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - DesignSize = ( - 513 - 398) - PixelsPerInch = 96 - TextHeight = 13 - object lblKeyIndex: TLabel - Left = 159 - Top = 318 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'View All' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbViewAll: TStatusBar - Left = 0 - Top = 379 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object sgrdViewAll: TStringGrid - Left = 0 - Top = 26 - Width = 513 - Height = 277 - Cursor = crHandPoint - Ctl3D = True - DefaultColWidth = 40 - DefaultRowHeight = 20 - RowCount = 2 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - OnDrawCell = sgrdViewAllDrawCell - end - object rbHexView: TRadioButton - Left = 271 - Top = 343 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'HEX' - TabOrder = 3 - end - object btnReadData: TButton - Left = 331 - Top = 316 - Width = 177 - Height = 41 - Cursor = crHandPoint - Anchors = [akLeft, akBottom] - Caption = 'READ DATA' - TabOrder = 4 - OnClick = btnReadDataClick - end - object cboKeyIndex: TComboBox - Left = 168 - Top = 338 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object pbBar: TProgressBar - Left = 331 - Top = 361 - Width = 177 - Height = 13 - BorderWidth = 1 - Smooth = True - TabOrder = 6 - Visible = False - end - object rbgrpRadioButtonGroup: TRadioGroup - Left = 8 - Top = 305 - Width = 97 - Height = 61 - ItemIndex = 0 - Items.Strings = ( - 'AUTH 1A' - 'AUTH 1B') - TabOrder = 7 - end - object rbAscii: TRadioButton - Left = 271 - Top = 316 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'ASCII' - Checked = True - TabOrder = 8 - TabStop = True - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~pas deleted file mode 100644 index dd851d8956cb68fe3254fe612997b248a20f3978..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/ViewAll.~pas +++ /dev/null @@ -1,266 +0,0 @@ -unit ViewAll; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder1x, - Grids, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmViewAll = class(TForm) - lblHeader: TStaticText; - stbViewAll: TStatusBar; - sgrdViewAll: TStringGrid; - rbHexView: TRadioButton; - btnReadData: TButton; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - pbBar: TProgressBar; - rbgrpRadioButtonGroup: TRadioGroup; - rbAscii: TRadioButton; - procedure sgrdViewAllDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState); - procedure btnReadDataClick(Sender: TObject); - private - procedure Draw1k4kGrid; - procedure Draw1k4kCardData; - procedure DrawNTAGCardData; - public - { Public declarations } - end; - -var - frmViewAll: TfrmViewAll; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmViewAll.Draw1k4kGrid; -var - bBr :Byte; -begin - - with sgrdViewAll do - begin - ColCount := 19; - // FixedRows := 3; - Cells[0, 0] := 'S'; - Cells[1, 0] := 'BiS'; - Cells[2, 0] := 'Blo'; - for bBr := 0 to 15 do - Cells[bBr + 3, 0] := IntToStr(bBr); - end; - -end; - -procedure TfrmViewAll.sgrdViewAllDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState); -begin - if sgrdViewAll.Cells[0,aRow]='SCT' then - begin - with sgrdViewAll.Canvas do - begin - Brush.Color := $02aaaaaa; - FillRect(Rect); - Font.Color := clBlack; - TextOut(Rect.Left+2,Rect.Top+2,sgrdViewAll.Cells[aCol,aRow]); - end; -end; -end; - - -procedure TfrmViewAll.btnReadDataClick(Sender: TObject); -var - cardType:Byte; -begin - cardType:=frmuFrAdvanced.bDLCardType; - if (cardType = uFCoder1x.DL_NTAG_203) or (cardType = uFCoder1x.DL_MIFARE_ULTRALIGHT) or - (cardType = uFCoder1x.DL_MIFARE_ULTRALIGHT_C) then - DrawNTAGCardData - else - if (cardType = uFCoder1x.DL_MIFARE_CLASSIC_1K) or (cardType = uFCoder1x.DL_MIFARE_CLASSIC_4K) or - (cardType = uFCoder1x.DL_MIFARE_PLUS_S_4K) then - Draw1k4kCardData; -end; - -procedure TfrmViewAll.Draw1k4kCardData; -var - chaBlockData :array[0..15] of Char; - pData :PByte; - bBlockCount :Integer; - bBISCounter, - bBISCount, - bBr, - bSectorsCounter :Byte; - iMaxBlocks :Integer; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - try - frmuFrAdvanced.FunctionStart := true; - Draw1k4kGrid; - bSectorsCounter :=0; - bBISCount :=0; - bBISCounter :=3; - bBlockCount :=0; - New(pData); - bKeyIndex :=cboKeyIndex.ItemIndex; - iMaxBlocks :=MaxBlocks(); - pbBar.Max :=iMaxBlocks; - pbBar.Visible :=true; - - if rbgrpRadioButtonGroup.ItemIndex=0 then bAuthMode :=MIFARE_AUTHENT1A - else - bAuthMode :=MIFARE_AUTHENT1B; - - sgrdViewAll.RowCount:=iMaxBlocks+1; - - while bBlockCount=31) and (bBlockCount mod 16 =0) then - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - bBISCounter:=15; - end - else - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - end; - end; - sgrdViewAll.Repaint; - if iFResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - pbBar.Visible := false; - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmViewAll.DrawNTAGCardData; -var - pData :PByte; - pPKKey :PByte; - pageData :array[0..6] of Char; - authMode :Byte; - blockAddress :Byte; - bCounter,i :Byte; - maxBlock :integer; - bAuthMode, - bKeyIndex :Byte; - fnResult :DL_STATUS; -begin - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - - try - frmuFrAdvanced.FunctionStart := true; - maxBlock := MaxBlocks(); - - with sgrdViewAll do - begin - FixedCols :=1; - FixedRows :=1; - ColCount :=5; - RowCount :=maxBlock-3; - DefaultColWidth:=35; - Cells[0,0] :='PAGE'; - for i:=1 to 4 do - Cells[i,0]:=IntToStr(i); - end; - New(pData); - if rbgrpRadioButtonGroup.ItemIndex=0 then - authMode :=MIFARE_AUTHENT1A - else - authMode :=MIFARE_AUTHENT1B; - - bKeyIndex :=cboKeyIndex.ItemIndex; - pbBar.Visible :=true; - pbBar.Max :=maxBlock-3; - pbBar.Step :=1; - bcounter :=4; - while (bcounter - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 37 - Top = 16 - Width = 72 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 37 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 292 - Top = 16 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 293 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 504 - Height = 5 - end - object lblLightMode: TLabel - Left = 41 - Top = 82 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 41 - Top = 105 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 421 - Top = 17 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 539 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 133 - Top = 78 - Width = 137 - Height = 21 - ItemIndex = 0 - TabOrder = 1 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 133 - Top = 102 - Width = 137 - Height = 21 - ItemIndex = 0 - TabOrder = 2 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 276 - Top = 79 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 3 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 392 - Top = 77 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 4 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 392 - Top = 101 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 5 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 39 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 6 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - object txtReaderType: TEdit - Left = 126 - Top = 15 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 7 - end - object txtReaderSerial: TEdit - Left = 126 - Top = 39 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - object txtCardType: TEdit - Left = 369 - Top = 14 - Width = 33 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 480 - Top = 14 - Width = 33 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 10 - end - object txtCardSerial: TEdit - Left = 369 - Top = 38 - Width = 144 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 541 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuReaderHardwareFirmwareversionItem: TMenuItem - Caption = 'Reader Hardware/Firmware version' - OnClick = mnuReaderHardwareFirmwareversionItemClick - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.pas deleted file mode 100644 index 35dfce57c4026f7b449d0e2232c3e194d1df38d2..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.pas +++ /dev/null @@ -1,476 +0,0 @@ - -unit uFAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - lblReaderSerial: TLabel; - lblCardType: TLabel; - lblCardSerial: TLabel; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - lblCardUIDSize: TLabel; - txtReaderType: TEdit; - txtReaderSerial: TEdit; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - txtCardSerial: TEdit; - mnuReaderHardwareFirmwareversionItem: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); - private - boCONN, - boFunctionStart, - boReaderStart :Boolean; - procedure MainLoop; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - - procedure SetMenuItems(const aValue:Boolean); //set menu items (enabled ?) - function GetFunctStart: Boolean; - function GetReaderStart: Boolean; - public - bDLCardType:Byte; - procedure SetFunctStart(const Value: Boolean); - procedure SetReaderStart(const Value: Boolean); - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - pUserData :PByte; - iFResult :DL_STATUS; -begin - if (txtNewUserData.Text=EmptyStr) then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(pUserData); - - pUserData:=PByte(txtNewUserData.Text); - iFResult :=WriteUserData(pUserData); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end - else - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end; - finally - pUserData:=nil; - Dispose(pUserData); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - bCounter :Byte; - PReaderKey :PByte; - bKeyIndex :Byte; - baReaderKey:array[0..5] of Byte; - s:string; - iFResult :DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - bKeyIndex:=cboKeyIndex.ItemIndex; - New(PReaderKey); - for bCounter:=0 to 5 do - begin - if chkReaderHex.Checked then - baReaderKey[bCounter]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text) - else - baReaderKey[bCounter]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text); - end; - PReaderKey:=@baReaderKey; - iFResult :=ReaderKeyWrite(PReaderKey,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbReader,iFResult); - end - else - begin - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbReader,iFResult); - end; - finally - SetFunctStart(false); - PReaderKey:=nil; - Dispose(PReaderKey); - end; -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderSoftRestart(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderReset(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.MainLoop; -var - iRResult, - iCResult, - iReaderType, - iReaderSerial, - iCardSerial, - iUDResult :DL_STATUS; - bCardUIDSize, - bCardType, - bBr :Byte; - caUserData :array[0..16] of Char; - baCardUID :array[0..9] of Byte; - pUserData :PByte; - sBuffer :string; -begin - SetReaderStart(true); - sBuffer:=''; - New(pUserData); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - SetStatusBar(stbReader,iRResult); - end; - end; - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult); - end - else - begin - boCONN:=false; - ReaderClose(); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - SetStatusBar(stbReader,iRResult); - end; - - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder.DL_NTAG_216 then - SetMenuItems(false) - else - SetMenuItems(true); - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize -1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial.Text :='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - SetMenuItems(true); - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - SetStatusBar(stbCard,iCResult); - end; - - pUserData:=PByte(@caUserData); - iUDResult:=ReadUserData(pUserData); - if iUDResult=DL_OK then - txtUserData.Text:=String(caUserData) - else - txtUserData.Text:=#0; - end; - SetReaderStart(false); - pUserData:=0; - FreeAndNil(pUserData); -end; - -function TfrmuFrAdvanced.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -function TfrmuFrAdvanced.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrAdvanced.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -procedure TfrmuFrAdvanced.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - - - - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - if FunctionStart then Exit; - MainLoop; -end; - -procedure TfrmuFrAdvanced.mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); -var - bRHMajor, - bRHMinor, - bRFMajor, - bRFMinor : Byte; -begin - GetReaderHardwareVersion(bRHMajor,bRHMinor); - GetReaderFirmwareVersion(bRFMajor,bRFMinor); - MessageDlg('Hardware version : ' + IntToStr(bRHMajor) + '.' + IntToStr(bRHMinor) +#13+ - 'Firmware version : ' + IntToStr(bRFMajor) + '.' + IntToStr(bRFMinor),mtInformation,[mbOK],0); - -end; - -procedure TfrmuFrAdvanced.SetMenuItems(const aValue: Boolean); -begin - mnuValueBlockReadWriteItem.Enabled :=aValue; - mnuValueBlockIncrementDecrementItem.Enabled :=aValue; - mnuBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorIncrDecrItems.Enabled :=aValue; - mnuLinearFormatCardItem.Enabled :=aValue; - mnuSectorTrailerWriteItem.Enabled :=aValue; -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~dfm deleted file mode 100644 index b656c716992f02d91f05bdb883155c6ccc92ba56..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~dfm +++ /dev/null @@ -1,523 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 331 - Top = 3 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advance' - ClientHeight = 668 - ClientWidth = 541 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 541 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 37 - Top = 16 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 37 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 292 - Top = 16 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 293 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 504 - Height = 5 - end - object lblLightMode: TLabel - Left = 41 - Top = 82 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 41 - Top = 105 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 421 - Top = 17 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 539 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 133 - Top = 78 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 1 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 133 - Top = 102 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 2 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 276 - Top = 79 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 3 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 392 - Top = 77 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 4 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 392 - Top = 101 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 5 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 39 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 6 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - object txtReaderType: TEdit - Left = 126 - Top = 15 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 7 - end - object txtReaderSerial: TEdit - Left = 126 - Top = 39 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - object txtCardType: TEdit - Left = 369 - Top = 14 - Width = 33 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 480 - Top = 14 - Width = 33 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 10 - end - object txtCardSerial: TEdit - Left = 369 - Top = 38 - Width = 144 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 541 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuReaderHardwareFirmwareversionItem: TMenuItem - Caption = 'Reader Hardware/Firmware version' - OnClick = mnuReaderHardwareFirmwareversionItemClick - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~pas deleted file mode 100644 index 93adf920bb78f48e1748729c0cd0e087b8cda40d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFAdvanced.~pas +++ /dev/null @@ -1,476 +0,0 @@ - -unit uFAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder1x, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - lblReaderSerial: TLabel; - lblCardType: TLabel; - lblCardSerial: TLabel; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - lblCardUIDSize: TLabel; - txtReaderType: TEdit; - txtReaderSerial: TEdit; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - txtCardSerial: TEdit; - mnuReaderHardwareFirmwareversionItem: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); - private - boCONN, - boFunctionStart, - boReaderStart :Boolean; - procedure MainLoop; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - - procedure SetMenuItems(const aValue:Boolean); //set menu items (enabled ?) - function GetFunctStart: Boolean; - function GetReaderStart: Boolean; - public - bDLCardType:Byte; - procedure SetFunctStart(const Value: Boolean); - procedure SetReaderStart(const Value: Boolean); - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - pUserData :PByte; - iFResult :DL_STATUS; -begin - if (txtNewUserData.Text=EmptyStr) then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(pUserData); - - pUserData:=PByte(txtNewUserData.Text); - iFResult :=WriteUserData(pUserData); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end - else - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end; - finally - pUserData:=nil; - Dispose(pUserData); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - bCounter :Byte; - PReaderKey :PByte; - bKeyIndex :Byte; - baReaderKey:array[0..5] of Byte; - s:string; - iFResult :DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - bKeyIndex:=cboKeyIndex.ItemIndex; - New(PReaderKey); - for bCounter:=0 to 5 do - begin - if chkReaderHex.Checked then - baReaderKey[bCounter]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text) - else - baReaderKey[bCounter]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text); - end; - PReaderKey:=@baReaderKey; - iFResult :=ReaderKeyWrite(PReaderKey,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbReader,iFResult); - end - else - begin - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbReader,iFResult); - end; - finally - SetFunctStart(false); - PReaderKey:=nil; - Dispose(PReaderKey); - end; -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderSoftRestart(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderReset(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.MainLoop; -var - iRResult, - iCResult, - iReaderType, - iReaderSerial, - iCardSerial, - iUDResult :DL_STATUS; - bCardUIDSize, - bCardType, - bBr :Byte; - caUserData :array[0..16] of Char; - baCardUID :array[0..9] of Byte; - pUserData :PByte; - sBuffer :string; -begin - SetReaderStart(true); - sBuffer:=''; - New(pUserData); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - SetStatusBar(stbReader,iRResult); - end; - end; - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult); - end - else - begin - boCONN:=false; - ReaderClose(); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - SetStatusBar(stbReader,iRResult); - end; - - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder1x.DL_NTAG_216 then - SetMenuItems(false) - else - SetMenuItems(true); - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize -1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial.Text :='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - SetMenuItems(true); - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - SetStatusBar(stbCard,iCResult); - end; - - pUserData:=PByte(@caUserData); - iUDResult:=ReadUserData(pUserData); - if iUDResult=DL_OK then - txtUserData.Text:=String(caUserData) - else - txtUserData.Text:=#0; - end; - SetReaderStart(false); - pUserData:=0; - FreeAndNil(pUserData); -end; - -function TfrmuFrAdvanced.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -function TfrmuFrAdvanced.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrAdvanced.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -procedure TfrmuFrAdvanced.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - - - - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - if FunctionStart then Exit; - MainLoop; -end; - -procedure TfrmuFrAdvanced.mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); -var - bRHMajor, - bRHMinor, - bRFMajor, - bRFMinor : Byte; -begin - GetReaderHardwareVersion(bRHMajor,bRHMinor); - GetReaderFirmwareVersion(bRFMajor,bRFMinor); - MessageDlg('Hardware version : ' + IntToStr(bRHMajor) + '.' + IntToStr(bRHMinor) +#13+ - 'Firmware version : ' + IntToStr(bRFMajor) + '.' + IntToStr(bRFMinor),mtInformation,[mbOK],0); - -end; - -procedure TfrmuFrAdvanced.SetMenuItems(const aValue: Boolean); -begin - mnuValueBlockReadWriteItem.Enabled :=aValue; - mnuValueBlockIncrementDecrementItem.Enabled :=aValue; - mnuBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorIncrDecrItems.Enabled :=aValue; - mnuLinearFormatCardItem.Enabled :=aValue; - mnuSectorTrailerWriteItem.Enabled :=aValue; -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder-x86.dll b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder-x86_64.dll b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder-x86_64.dll deleted file mode 100644 index dac4290609d32257ca8a0caf4418d0ab8dcddd26..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder-x86_64.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.dcu deleted file mode 100644 index a2e2e803e13c284baa529cabef357df3a637bff0..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.h b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.h deleted file mode 100644 index 003aface933f079af722b7144fa1a122a733b770..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.h +++ /dev/null @@ -1,1696 +0,0 @@ -/* - * uFCoder.h - * - * Created on: 2009-01-14 - * Last edited: 2014-08-19 - * - * Author: D-Logic - */ - -#ifndef uFCoder_H_ -#define uFCoder_H_ - -#include -#include - -typedef const char * chr_ptr; - -#if __linux__ -# define DL_API -#else -// WINDOWS -# ifdef DL_uFC_STATIC_LIB -# define DL_API -# else -# ifndef DL_uFC_EXPORTS -# define DL_API __declspec(dllimport) __stdcall -# else -# define DL_API __declspec(dllexport) __stdcall -# endif -# endif -#endif // __linux__ - -#if defined(DL_uFC_EXPORTS) || defined(DL_uFC_STATIC_LIB) - typedef struct S_UFR_HANDLE * UFR_HANDLE; -#else - typedef void * UFR_HANDLE; -#endif - -// MIFARE CLASSIC type id's: -#define MIFARE_CLASSIC_1k 0x08 -#define MF1ICS50 0x08 -#define SLE66R35 0x88 // Infineon = Mifare Classic 1k -#define MIFARE_CLASSIC_4k 0x18 -#define MF1ICS70 0x18 -#define MIFARE_CLASSIC_MINI 0x09 -#define MF1ICS20 0x09 - -//DLOGIC CARD TYPE -#define DL_MIFARE_ULTRALIGHT 0x01 -#define DL_MIFARE_ULTRALIGHT_EV1_11 0x02 -#define DL_MIFARE_ULTRALIGHT_EV1_21 0x03 -#define DL_MIFARE_ULTRALIGHT_C 0x04 -#define DL_NTAG_203 0x05 -#define DL_NTAG_210 0x06 -#define DL_NTAG_212 0x07 -#define DL_NTAG_213 0x08 -#define DL_NTAG_215 0x09 -#define DL_NTAG_216 0x0A -#define DL_MIKRON_MIK640D 0x0B - -#define DL_MIFARE_MINI 0x20 -#define DL_MIFARE_CLASSIC_1K 0x21 -#define DL_MIFARE_CLASSIC_4K 0x22 -#define DL_MIFARE_PLUS_S_2K 0x23 -#define DL_MIFARE_PLUS_S_4K 0x24 -#define DL_MIFARE_PLUS_X_2K 0x25 -#define DL_MIFARE_PLUS_X_4K 0x26 -#define DL_MIFARE_DESFIRE 0x27 -#define DL_MIFARE_DESFIRE_EV1_2K 0x28 -#define DL_MIFARE_DESFIRE_EV1_4K 0x29 -#define DL_MIFARE_DESFIRE_EV1_8K 0x2A - -// MIFARE CLASSIC Authentication Modes: -enum MIFARE_AUTHENTICATION -{ - MIFARE_AUTHENT1A = 0x60, - MIFARE_AUTHENT1B = 0x61, -}; - -enum ADDRESS_MODE -{ - ADDRESS_MODE_BLOCK = 0, - ADDRESS_MODE_SECTOR, -}; - -// API Status Codes Type: -typedef enum UFCODER_ERROR_CODES -{ - UFR_OK = 0x00, - UFR_COMMUNICATION_ERROR = 0x01, - UFR_CHKSUM_ERROR = 0x02, - UFR_READING_ERROR = 0x03, - UFR_WRITING_ERROR = 0x04, - UFR_BUFFER_OVERFLOW = 0x05, - UFR_MAX_ADDRESS_EXCEEDED = 0x06, - UFR_MAX_KEY_INDEX_EXCEEDED = 0x07, - UFR_NO_CARD = 0x08, - UFR_COMMAND_NOT_SUPPORTED = 0x09, - UFR_FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER = 0x0A, - UFR_ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER = 0x0B, - UFR_WRONG_ADDRESS_MODE = 0x0C, - UFR_WRONG_ACCESS_BITS_VALUES = 0x0D, - UFR_AUTH_ERROR = 0x0E, - UFR_PARAMETERS_ERROR = 0x0F, // ToDo, point 5. - UFR_MAX_SIZE_EXCEEDED = 0x10, - - UFR_WRITE_VERIFICATION_ERROR = 0x70, - UFR_BUFFER_SIZE_EXCEEDED = 0x71, - UFR_VALUE_BLOCK_INVALID = 0x72, - UFR_VALUE_BLOCK_ADDR_INVALID = 0x73, - UFR_VALUE_BLOCK_MANIPULATION_ERROR = 0x74, - UFR_WRONG_UI_MODE = 0x75, - UFR_KEYS_LOCKED = 0x76, - UFR_KEYS_UNLOCKED = 0x77, - UFR_WRONG_PASSWORD = 0x78, - UFR_CAN_NOT_LOCK_DEVICE = 0x79, - UFR_CAN_NOT_UNLOCK_DEVICE = 0x7A, - UFR_DEVICE_EEPROM_BUSY = 0x7B, - UFR_RTC_SET_ERROR = 0x7C, - - UFR_COMMUNICATION_BREAK = 0x50, - UFR_NO_MEMORY_ERROR = 0x51, - UFR_CAN_NOT_OPEN_READER = 0x52, - UFR_READER_NOT_SUPPORTED = 0x53, - UFR_READER_OPENING_ERROR = 0x54, - UFR_READER_PORT_NOT_OPENED = 0x55, - UFR_CANT_CLOSE_READER_PORT = 0x56, - - UFR_FT_STATUS_ERROR_1 = 0xA0, - UFR_FT_STATUS_ERROR_2 = 0xA1, - UFR_FT_STATUS_ERROR_3 = 0xA2, - UFR_FT_STATUS_ERROR_4 = 0xA3, - UFR_FT_STATUS_ERROR_5 = 0xA4, - UFR_FT_STATUS_ERROR_6 = 0xA5, - UFR_FT_STATUS_ERROR_7 = 0xA6, - UFR_FT_STATUS_ERROR_8 = 0xA7, - UFR_FT_STATUS_ERROR_9 = 0xA8, - - //NDEF error codes - UFR_WRONG_NDEF_CARD_FORMAT = 0x80, - UFR_NDEF_MESSAGE_NOT_FOUND = 0x81, - UFR_NDEF_UNSUPPORTED_CARD_TYPE = 0x82, - UFR_NDEF_CARD_FORMAT_ERROR = 0x83, - UFR_MAD_NOT_ENABLED = 0x84, - UFR_MAD_VERSION_NOT_SUPPORTED = 0x85, - - // multi units - UFR_DEVICE_WRONG_HANDLE = 0x100, - UFR_DEVICE_INDEX_OUT_OF_BOUND, - UFR_DEVICE_ALREADY_OPENED, - UFR_DEVICE_ALREADY_CLOSED, - - MAX_UFR_STATUS = 0xFFFFFFFF -} UFR_STATUS; - -//DESFIRE Card Status Error Codes -#define READER_ERROR 2999 -#define NO_CARD_DETECTED 3000 -#define CARD_OPERATION_OK 3001 -#define WRONG_KEY_TYPE 3002 -#define KEY_AUTH_ERROR 3003 -#define CARD_CRYPTO_ERROR 3004 -#define READER_CARD_COMM_ERROR 3005 -#define PC_READER_COMM_ERROR 3006 - -#define DESFIRE_CARD_NO_CHANGES 0x0C0C -#define DESFIRE_CARD_OUT_OF_EEPROM_ERROR 0x0C0E -#define DESFIRE_CARD_ILLEGAL_COMMAND_CODE 0x0C1C -#define DESFIRE_CARD_INTEGRITY_ERROR 0x0C1E -#define DESFIRE_CARD_NO_SUCH_KEY 0x0C40 -#define DESFIRE_CARD_LENGTH_ERROR 0x0C7E -#define DESFIRE_CARD_PERMISSION_DENIED 0x0C9D -#define DESFIRE_CARD_PARAMETER_ERROR 0x0C9E -#define DESFIRE_CARD_APPLICATION_NOT_FOUND 0x0CA0 -#define DESFIRE_CARD_APPL_INTEGRITY_ERROR 0x0CA1 -#define DESFIRE_CARD_AUTHENTICATION_ERROR 0x0CAE -#define DESFIRE_CARD_ADDITIONAL_FRAME 0x0CAF -#define DESFIRE_CARD_BOUNDARY_ERROR 0x0CBE -#define DESFIRE_CARD_PICC_INTEGRITY_ERROR 0x0CC1 -#define DESFIRE_CARD_COMMAND_ABORTED 0x0CCA -#define DESFIRE_CARD_PICC_DISABLED_ERROR 0x0CCD -#define DESFIRE_CARD_COUNT_ERROR 0x0CCE -#define DESFIRE_CARD_DUPLICATE_ERROR 0x0CDE -#define DESFIRE_CARD_EEPROM_ERROR_DES 0x0CEE -#define DESFIRE_CARD_FILE_NOT_FOUND 0x0CF0 -#define DESFIRE_CARD_FILE_INTEGRITY_ERROR 0x0CF1 - -//DESFIRE key settings values -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_CHANGE_KEY_CHANGE 0x09 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_CHANGE_KEY_CHANGE 0x0F -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_NOT_CHANGE_KEY_CHANGE 0x01 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_NOT_CHANGE_KEY_CHANGE 0x07 -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_CHANGE_KEY_NOT_CHANGE 0x08 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_CHANGE_KEY_NOT_CHANGE 0x0E -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_NOT_CHANGE_KEY_NOT_CHANGE 0x00 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_NOT_CHANGE_KEY_NOT_CHANGE 0x06 - - -#ifdef __cplusplus -extern "C" -{ -#endif - -//-------------------------------------------------------------------------------------------------- - -DL_API UFR_STATUS ReaderOpen(void); -DL_API UFR_STATUS ReaderReset(void); -DL_API UFR_STATUS ReaderClose(void); -DL_API UFR_STATUS ReaderSoftRestart(void); -DL_API UFR_STATUS GetReaderType(uint32_t *lpulReaderType); -DL_API UFR_STATUS GetReaderSerialNumber(uint32_t *lpulSerialNumber); - -DL_API UFR_STATUS ReaderKeyWrite(const uint8_t *aucKey, uint8_t ucKeyIndex); -DL_API UFR_STATUS ReaderKeysLock(const uint8_t *password); -DL_API UFR_STATUS ReaderKeysUnlock(const uint8_t *password); -DL_API UFR_STATUS ReaderUISignal(uint8_t light_signal_mode, - uint8_t beep_signal_mode); -DL_API UFR_STATUS ReadUserData(uint8_t *aucData); -DL_API UFR_STATUS WriteUserData(const uint8_t *aucData); -DL_API UFR_STATUS GetCardId(uint8_t *lpucCardType, uint32_t *lpulCardSerial); -DL_API UFR_STATUS BlockRead(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockWrite(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorRead(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorWrite(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS LinearRead(uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesReturned, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearWrite(const uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesWritten, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearFormatCard(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWrite(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWriteUnsafe(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockRead(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorRead(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockWrite(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorWrite(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockIncrement(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorIncrement(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockDecrement(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorDecrement(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); - -DL_API UFR_STATUS BlockRead_AKM1(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM1(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM1(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM1(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM1(uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM1(const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM1(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM1(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM1(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM1(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM1(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM1(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM1(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM1(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM1(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM1(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM1(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_AKM2(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM2(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM2(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM2(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM2(uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM2(const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM2(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM2(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM2(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM2(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM2(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM2(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM2(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM2(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM2(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM2(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM2(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_PK(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockWrite_PK(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorRead_PK(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorWrite_PK(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearRead_PK(uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearWrite_PK(const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearFormatCard_PK(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWrite_PK(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_PK(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockRead_PK(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorRead_PK(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockWrite_PK(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorWrite_PK(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockIncrement_PK(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorIncrement_PK(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockDecrement_PK(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorDecrement_PK(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS GetReaderHardwareVersion(uint8_t *version_major, - uint8_t *version_minor); -DL_API UFR_STATUS GetReaderFirmwareVersion(uint8_t *version_major, - uint8_t *version_minor); - -// New commands (for RTC & I2C EEPROM): -DL_API UFR_STATUS GetReaderTime(uint8_t *time); -DL_API UFR_STATUS SetReaderTime(uint8_t *password, uint8_t *time); -DL_API UFR_STATUS ChangeReaderPassword(uint8_t *old_password, uint8_t *new_password); -DL_API UFR_STATUS ReaderEepromWrite(uint8_t *data, uint32_t address, uint32_t size, uint8_t *password); -DL_API UFR_STATUS ReaderEepromRead(uint8_t *data, uint32_t address, uint32_t size); -DL_API UFR_STATUS ChangeReaderJobId(uint8_t *job_id, uint8_t *new_password); - -DL_API UFR_STATUS GetReaderSerialDescription(uint8_t pSerialDescription[8]); -DL_API UFR_STATUS SetReaderSerialDescription(const uint8_t pSerialDescription[8]); - -// New since version 2.0: -DL_API UFR_STATUS GetBuildNumber(uint8_t *build); -DL_API UFR_STATUS GetCardIdEx(uint8_t *lpucSak, uint8_t *aucUid, - uint8_t *lpucUidSize); -DL_API UFR_STATUS EnableAntiColl(void); -DL_API UFR_STATUS DisableAntiColl(void); -DL_API UFR_STATUS EnumCards(uint8_t *lpucCardsNumber, - uint8_t *lpucUidListSize); -DL_API UFR_STATUS ListCards(uint8_t *aucUidList, uint8_t ucUidListSize); // Before calling this function you must call EnumCards() first. -DL_API UFR_STATUS SelectCard(const uint8_t *aucUid, uint8_t ucUidSize, - uint8_t *lpucSak); -DL_API UFR_STATUS DeslectCard(void); -DL_API UFR_STATUS GetAntiCollStatus(int8_t *lpcIsAntiCollEnabled, - int8_t *lpcIsAnyCardSelected); - - -DL_API UFR_STATUS GetDlogicCardType(uint8_t *lpucCardType); - -// uFCoder PRO MODE -DL_API UFR_STATUS GetReaderProMode(uint32_t *pReaderProMode, uint32_t *pReaderProConfig); -DL_API UFR_STATUS SetReaderProMode(const uint32_t ReaderProMode); - - -// QR barcode crypt algorithm -// initialization. with TB serial like 'TB123456' -DL_API UFR_STATUS CardEncryption_Initialize(const uint8_t *TBSerialString, uint16_t job_number); - -// You must define 25 bytes array in memory for CardSerialString[] -DL_API -UFR_STATUS CardEncryption_GetNextEncryptedCard(const uint32_t from_timestamp, const uint32_t to_timestamp, - uint8_t CardSerialString[25]); - -DL_API -UFR_STATUS CardEncryption_GetActualCardSN(uint32_t *ActualCard_SN, uint32_t *ActualCard_SN_LOG); -DL_API -UFR_STATUS CardEncryption_GetJobSN(uint32_t *JobSN); -DL_API -UFR_STATUS CardEncryption_GetSalterSN(uint8_t SalterSN[8], uint8_t * magicByte); - -DL_API UFR_STATUS read_ndef_record(uint8_t message_nr, uint8_t record_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length); -DL_API UFR_STATUS write_ndef_record(uint8_t message_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length, uint8_t *card_formated); -DL_API UFR_STATUS get_ndef_record_count(uint8_t *ndef_message_cnt, uint8_t *ndef_record_cnt, uint8_t *ndef_record_array, uint8_t *empty_ndef_message_cnt); -DL_API UFR_STATUS erase_last_ndef_record(uint8_t message_nr); -DL_API UFR_STATUS erase_all_ndef_records(uint8_t message_nr); -DL_API UFR_STATUS ndef_card_initialization(void); - -DL_API UFR_STATUS SetAsyncCardIdSendConfig(uint8_t send_enable, - uint8_t prefix_enable, uint8_t prefix, uint8_t suffix, - uint8_t send_removed_enable, uint32_t async_baud_rate); - -DL_API UFR_STATUS GetAsyncCardIdSendConfig(uint8_t *send_enable, - uint8_t *prefix_enable, uint8_t *prefix, uint8_t *suffix, - uint8_t *send_removed_enable, uint32_t *async_baud_rate); - -/***************************************************************************** - * AIS FUNCTIONS - ***************************************************************************** - */ - -/** - * ais_get_card_number() read assigned serial number from AIS cards - * - * @param card_number ( pointer to reserved 32 bit integer ) AIS card serial number - * @return UFR_STATUS execution status - */ -DL_API UFR_STATUS ais_get_card_number(uint32_t *card_number); - -DL_API UFR_STATUS ais_set_right_record(uint8_t record_number, uint16_t first_reader_nr, uint16_t last_reader_nr, - uint8_t start_hour, uint8_t start_minute, uint8_t end_hour, uint8_t end_minute, uint8_t *days); -DL_API UFR_STATUS ais_get_right_record(uint8_t record_number, uint16_t *first_reader_nr, uint16_t *last_reader_nr, - uint8_t *start_hour, uint8_t *start_minute, uint8_t *end_hour, uint8_t *end_minute, uint8_t *days); -DL_API UFR_STATUS ais_erase_right_record(uint8_t record_number); -DL_API UFR_STATUS ais_set_validate_record(uint8_t begin_year, uint8_t begin_month, uint8_t begin_day, uint8_t begin_hour, uint8_t begin_minute, - uint8_t end_year, uint8_t end_month, uint8_t end_day, uint8_t end_hour, uint8_t end_minute); -DL_API UFR_STATUS ais_get_validate_record(uint8_t *begin_year, uint8_t *begin_month, uint8_t *begin_day, uint8_t *begin_hour, uint8_t *begin_minute, - uint8_t *end_year, uint8_t *end_month, uint8_t *end_day, uint8_t *end_hour, uint8_t *end_minute); -DL_API UFR_STATUS ais_set_card_type(uint8_t card_type); -DL_API UFR_STATUS ais_get_card_type(uint8_t *card_type); -DL_API UFR_STATUS ais_set_card_daily_duration(uint16_t duration); -DL_API UFR_STATUS ais_get_card_daily_duration(uint16_t *duration); -DL_API UFR_STATUS ais_set_card_total_duration(uint32_t duration); -DL_API UFR_STATUS ais_get_card_total_duration(uint32_t *duration); - -// swimming pool ************************************************************** -/** - * ais_get_credit_and_period_validity() > get information about credit and period of validity - * - * @param credit ( pointer to integer ) : - * @param begin_year ( pointer to integer ) : - * @param begin_month ( pointer to integer ) : - * @param begin_day ( pointer to integer ) : - * @param begin_hour ( pointer to integer ) : - * @param begin_minute ( pointer to integer ) : - * @param end_year ( pointer to integer ) : - * @param end_month ( pointer to integer ) : - * @param end_day ( pointer to integer ) : - * @param end_hour ( pointer to integer ) : - * @param end_minute ( pointer to integer ) : - * @return - */ -DL_API UFR_STATUS ais_get_credit_and_period_validity(int32_t *credit, - uint32_t *begin_year, uint32_t *begin_month, uint32_t *begin_day, - uint32_t *begin_hour, - uint32_t *begin_minute, // - uint32_t *end_year, uint32_t *end_month, uint32_t *end_day, - uint32_t *end_hour, uint32_t *end_minute); - -/** - * ais_set_credit_and_period_validity() > set credit and period of validity - * - * @param credit ( integer ) : - * @param begin_year ( integer ) : - * @param begin_month ( integer ) : - * @param begin_day ( integer ) : - * @param begin_hour ( integer ) : - * @param begin_minute ( integer ) : - * @param end_year ( integer ) : - * @param end_month ( integer ) : - * @param end_day ( integer ) : - * @param end_hour ( integer ) : - * @param end_minute ( integer ) : - * @return - */ -DL_API UFR_STATUS ais_set_credit_and_period_validity(int32_t credit, - uint32_t begin_year, uint32_t begin_month, uint32_t begin_day, - uint32_t begin_hour, - uint32_t begin_minute, // - uint32_t end_year, uint32_t end_month, uint32_t end_day, - uint32_t end_hour, uint32_t end_minute); -//============================================================================= - -DL_API UFR_STATUS UfrXrcLockOn(uint16_t pulse_duration); -DL_API UFR_STATUS UfrXrcRelayState(uint8_t state); -DL_API UFR_STATUS UfrXrcGetIoState(uint8_t *intercom, uint8_t *door, uint8_t *relay_state); -DL_API UFR_STATUS UfrRedLightControl(uint8_t light_status); - -// DESFIRE functions ************************************************************** - -/** - * - * @param chaining - * @param timeout - * @param block_length - * @param snd_data_array - * @param rcv_length - * @param rcv_data_array - * @param ufr_status - * @return - */ -DL_API -UFR_STATUS uFR_i_block_transceive(uint8_t chaining, uint8_t timeout, - uint8_t block_length, uint8_t *snd_data_array, size_t *rcv_length, - uint8_t *rcv_data_array, uint32_t *ufr_status); - -DL_API -UFR_STATUS DES_to_AES_key_type(void); - -DL_API -UFR_STATUS AES_to_DES_key_type(void); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -DL_API -UFR_STATUS uFR_int_GetDesfireUid(uint8_t aes_key_nr, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); -DL_API -UFR_STATUS uFR_int_GetDesfireUid_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFreeMem(uint32_t *free_mem_byte, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCard(uint8_t aes_key_nr, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCard_PK(uint8_t *aes_key_ext, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile(uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_no_auth(uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile(uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_no_auth(uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication(uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_no_auth(uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplication(uint8_t aes_key_nr, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplication_PK(uint8_t *aes_key_ext, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireSetConfiguration(uint8_t aes_key_nr, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireSetConfiguration_PK(uint8_t *aes_key_ext, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettings(uint8_t aes_key_nr, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettings_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettings(uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettings_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -// all keys are in reader -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey_A(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key_nr, uint8_t aid_key_no, uint8_t old_aes_key_nr, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_SetParam(uint8_t aes_key[16], uint8_t key_no, - uint32_t aid_nr, uint8_t file_id); - -DL_API -UFR_STATUS uFR_int_DesfireWriteAesKey(uint8_t aes_key_no, uint8_t *aes_key); - -//--------------------------------------------------------------------------- - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_no_auth(uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_no_auth(uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# - -//-------------------------------------------------------------------------------------------------- - -DL_API UFR_STATUS ReaderList_UpdateAndGetCount(int32_t * NumberOfDevices); - -DL_API UFR_STATUS ReaderList_GetSerialByIndex(int32_t DeviceIndex, uint32_t *lpulSerialNumber); -DL_API UFR_STATUS ReaderList_GetSerialDescriptionByIndex(int32_t DeviceIndex, uint8_t pSerialDescription[8]); - -DL_API UFR_STATUS ReaderList_GetTypeByIndex(int32_t DeviceIndex, uint32_t *lpulReaderType); - -DL_API UFR_STATUS ReaderList_GetFTDISerialByIndex(int32_t DeviceIndex, char ** Device_Serial); -DL_API UFR_STATUS ReaderList_GetFTDIDescriptionByIndex(int32_t DeviceIndex, char ** Device_Description); - -DL_API UFR_STATUS ReaderList_OpenByIndex(const int32_t DeviceIndex, UFR_HANDLE *hndUFR); - -// not implemented -//DL_API UFR_STATUS ReaderList_OpenBySerial(const char Device_SN[16], UFR_HANDLE *hndUFR); -//-------------------------------------------------------------------------------------------------- - -// open first/next Reader and return handle - better to use ReaderList_OpenByIndex() -DL_API UFR_STATUS ReaderOpenM(UFR_HANDLE *hndUFR); -DL_API UFR_STATUS ReaderResetM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS ReaderCloseM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS ReaderSoftRestartM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS GetReaderTypeM(UFR_HANDLE hndUFR, uint32_t *lpulReaderType); -DL_API UFR_STATUS GetReaderSerialNumberM(UFR_HANDLE hndUFR, uint32_t *lpulSerialNumber); -DL_API UFR_STATUS ReaderKeyWriteM(UFR_HANDLE hndUFR, const uint8_t *aucKey, uint8_t ucKeyIndex); -DL_API UFR_STATUS ReaderKeysLockM(UFR_HANDLE hndUFR, const uint8_t *password); -DL_API UFR_STATUS ReaderKeysUnlockM(UFR_HANDLE hndUFR, const uint8_t *password); -DL_API UFR_STATUS ReaderUISignalM(UFR_HANDLE hndUFR, uint8_t light_signal_mode, - uint8_t beep_signal_mode); -DL_API UFR_STATUS ReadUserDataM(UFR_HANDLE hndUFR, uint8_t *aucData); -DL_API UFR_STATUS WriteUserDataM(UFR_HANDLE hndUFR, const uint8_t *aucData); -DL_API UFR_STATUS GetCardIdM(UFR_HANDLE hndUFR, uint8_t *lpucCardType, uint32_t *lpulCardSerial); -DL_API UFR_STATUS BlockReadM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockWriteM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorReadM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorWriteM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS LinearReadM(UFR_HANDLE hndUFR, uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesReturned, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearWriteM(UFR_HANDLE hndUFR, const uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesWritten, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearFormatCardM(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWriteM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWriteUnsafeM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockReadM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorReadM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockWriteM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorWriteM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockIncrementM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorIncrementM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockDecrementM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorDecrementM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); - -DL_API UFR_STATUS BlockRead_AKM1M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM1M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM1M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM1M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM1M(UFR_HANDLE hndUFR, uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM1M(UFR_HANDLE hndUFR, const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM1M(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM1M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM1M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM1M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM1M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM1M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM1M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM1M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM1M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM1M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM1M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_AKM2M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM2M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM2M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM2M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM2M(UFR_HANDLE hndUFR, uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM2M(UFR_HANDLE hndUFR, const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM2M(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM2M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM2M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM2M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM2M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM2M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM2M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM2M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM2M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM2M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM2M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_PKM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockWrite_PKM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorRead_PKM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorWrite_PKM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearRead_PKM(UFR_HANDLE hndUFR, uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearWrite_PKM(UFR_HANDLE hndUFR, const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearFormatCard_PKM(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWrite_PKM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_PKM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockRead_PKM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorRead_PKM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockWrite_PKM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorWrite_PKM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockIncrement_PKM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorIncrement_PKM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockDecrement_PKM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorDecrement_PKM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS GetReaderHardwareVersionM(UFR_HANDLE hndUFR, uint8_t *version_major, - uint8_t *version_minor); -DL_API UFR_STATUS GetReaderFirmwareVersionM(UFR_HANDLE hndUFR, uint8_t *version_major, - uint8_t *version_minor); - -// New commands (for RTC & I2C EEPROM): -DL_API UFR_STATUS GetReaderTimeM(UFR_HANDLE hndUFR, uint8_t *time); -DL_API UFR_STATUS SetReaderTimeM(UFR_HANDLE hndUFR, uint8_t *password, uint8_t *time); -DL_API UFR_STATUS ChangeReaderPasswordM(UFR_HANDLE hndUFR, uint8_t *old_password, uint8_t *new_password); -DL_API UFR_STATUS ReaderEepromWriteM(UFR_HANDLE hndUFR, uint8_t *data, uint32_t address, uint32_t size, uint8_t *password); -DL_API UFR_STATUS ReaderEepromReadM(UFR_HANDLE hndUFR, uint8_t *data, uint32_t address, uint32_t size); -DL_API UFR_STATUS ChangeReaderJobIdM(UFR_HANDLE hndUFR, uint8_t *job_id, uint8_t *new_password); - -DL_API UFR_STATUS GetReaderSerialDescriptionM(UFR_HANDLE hndUFR, uint8_t pSerialDescription[8]); -DL_API UFR_STATUS SetReaderSerialDescriptionM(UFR_HANDLE hndUFR, const uint8_t pSerialDescription[8]); - -// New since version 2.0: -DL_API UFR_STATUS GetBuildNumberM(UFR_HANDLE hndUFR, uint8_t *build); -DL_API UFR_STATUS GetCardIdExM(UFR_HANDLE hndUFR, uint8_t *lpucSak, - uint8_t *aucUid, uint8_t *lpucUidSize); -DL_API UFR_STATUS EnableAntiCollM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS DisableAntiCollM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS EnumCardsM(UFR_HANDLE hndUFR, uint8_t *lpucCardsNumber, - uint8_t *lpucUidListSize); -DL_API UFR_STATUS ListCardsM(UFR_HANDLE hndUFR, uint8_t *aucUidList, - uint8_t ucUidListSize); // Before calling this function you must call EnumCardsM() first. -DL_API UFR_STATUS SelectCardM(UFR_HANDLE hndUFR, const uint8_t *aucUid, - uint8_t ucUidSize, uint8_t *lpucSak); -DL_API UFR_STATUS DeslectCardM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS GetAntiCollStatusM(UFR_HANDLE hndUFR, int8_t *lpcIsAntiCollEnabled, - int8_t *lpcIsAnyCardSelected); - - -DL_API UFR_STATUS GetDlogicCardTypeM(UFR_HANDLE hndUFR, uint8_t *lpucCardType); - -// uFCoder PRO MODE -DL_API UFR_STATUS GetReaderProModeM(UFR_HANDLE hndUFR, uint32_t *pReaderProMode, uint32_t *pReaderProConfig); -DL_API UFR_STATUS SetReaderProModeM(UFR_HANDLE hndUFR, const uint32_t ReaderProMode); - -// QR barcode crypt algorithm -// initialization. with TB serial like 'TB123456' -DL_API UFR_STATUS CardEncryption_InitializeM(UFR_HANDLE hndUFR, const uint8_t *TBSerialString, uint16_t job_number); - -// You must define 25 bytes array in memory for CardSerialString[] -DL_API -UFR_STATUS CardEncryption_GetNextEncryptedCardM(UFR_HANDLE hndUFR, const uint32_t from_timestamp, const uint32_t to_timestamp, - uint8_t CardSerialString[25]); - -DL_API -UFR_STATUS CardEncryption_GetActualCardSNM(UFR_HANDLE hndUFR, uint32_t *ActualCard_SN, uint32_t *ActualCard_SN_LOG); -DL_API -UFR_STATUS CardEncryption_GetJobSNM(UFR_HANDLE hndUFR, uint32_t *JobSN); -DL_API -UFR_STATUS CardEncryption_GetSalterSNM(UFR_HANDLE hndUFR, uint8_t SalterSN[8], uint8_t * magicByte); - -DL_API UFR_STATUS read_ndef_recordM(UFR_HANDLE hndUFR, uint8_t message_nr, uint8_t record_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length); -DL_API UFR_STATUS write_ndef_recordM(UFR_HANDLE hndUFR, uint8_t message_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length, uint8_t *card_formated); -DL_API UFR_STATUS get_ndef_record_countM(UFR_HANDLE hndUFR, uint8_t *ndef_message_cnt, uint8_t *ndef_record_cnt, uint8_t *ndef_record_array, uint8_t *empty_ndef_message_cnt); -DL_API UFR_STATUS erase_last_ndef_recordM(UFR_HANDLE hndUFR, uint8_t message_nr); -DL_API UFR_STATUS erase_all_ndef_recordsM(UFR_HANDLE hndUFR, uint8_t message_nr); -DL_API UFR_STATUS ndef_card_initializationM(UFR_HANDLE hndUFR); - -DL_API UFR_STATUS SetAsyncCardIdSendConfigM(UFR_HANDLE hndUFR, - uint8_t send_enable, uint8_t prefix_enable, uint8_t prefix, - uint8_t suffix, uint8_t send_removed_enable, uint32_t async_baud_rate); - -DL_API UFR_STATUS GetAsyncCardIdSendConfigM(UFR_HANDLE hndUFR, - uint8_t *send_enable, uint8_t *prefix_enable, uint8_t *prefix, - uint8_t *suffix, uint8_t *send_removed_enable, uint32_t *async_baud_rate); - -/***************************************************************************** - * AIS FUNCTIONS - ***************************************************************************** - */ - -DL_API UFR_STATUS ais_get_card_numberM(UFR_HANDLE hndUFR, uint32_t *card_number); - -DL_API UFR_STATUS ais_set_right_recordM(UFR_HANDLE hndUFR, - uint8_t record_number, uint16_t first_reader_nr, - uint16_t last_reader_nr, uint8_t start_hour, uint8_t start_minute, - uint8_t end_hour, uint8_t end_minute, uint8_t *days); -DL_API UFR_STATUS ais_get_right_recordM(UFR_HANDLE hndUFR, - uint8_t record_number, uint16_t *first_reader_nr, - uint16_t *last_reader_nr, uint8_t *start_hour, - uint8_t *start_minute, uint8_t *end_hour, uint8_t *end_minute, - uint8_t *days); -DL_API UFR_STATUS ais_erase_right_recordM(UFR_HANDLE hndUFR, - uint8_t record_number); -DL_API UFR_STATUS ais_set_validate_recordM(UFR_HANDLE hndUFR, - uint8_t begin_year, uint8_t begin_month, uint8_t begin_day, - uint8_t begin_hour, uint8_t begin_minute, uint8_t end_year, - uint8_t end_month, uint8_t end_day, uint8_t end_hour, - uint8_t end_minute); -DL_API UFR_STATUS ais_get_validate_recordM(UFR_HANDLE hndUFR, - uint8_t *begin_year, uint8_t *begin_month, uint8_t *begin_day, - uint8_t *begin_hour, uint8_t *begin_minute, uint8_t *end_year, - uint8_t *end_month, uint8_t *end_day, uint8_t *end_hour, - uint8_t *end_minute); -DL_API UFR_STATUS ais_set_card_typeM(UFR_HANDLE hndUFR, uint8_t card_type); -DL_API UFR_STATUS ais_get_card_typeM(UFR_HANDLE hndUFR, uint8_t *card_type); -DL_API UFR_STATUS ais_set_card_daily_durationM(UFR_HANDLE hndUFR, uint16_t duration); -DL_API UFR_STATUS ais_get_card_daily_durationM(UFR_HANDLE hndUFR, uint16_t *duration); -DL_API UFR_STATUS ais_set_card_total_durationM(UFR_HANDLE hndUFR, uint32_t duration); -DL_API UFR_STATUS ais_get_card_total_durationM(UFR_HANDLE hndUFR, uint32_t *duration); - -// swimming pool ************************************************************** - -DL_API UFR_STATUS ais_get_credit_and_period_validityM(UFR_HANDLE hndUFR, - int32_t *credit, uint32_t *begin_year, uint32_t *begin_month, - uint32_t *begin_day, uint32_t *begin_hour, uint32_t *begin_minute, // - uint32_t *end_year, uint32_t *end_month, uint32_t *end_day, - uint32_t *end_hour, uint32_t *end_minute); - -DL_API UFR_STATUS ais_set_credit_and_period_validityM(UFR_HANDLE hndUFR, - int32_t credit, uint32_t begin_year, uint32_t begin_month, - uint32_t begin_day, uint32_t begin_hour, uint32_t begin_minute, // - uint32_t end_year, uint32_t end_month, uint32_t end_day, - uint32_t end_hour, uint32_t end_minute); -//============================================================================= - -DL_API UFR_STATUS UfrXrcLockOnM(UFR_HANDLE hndUFR, uint16_t pulse_duration); -DL_API UFR_STATUS UfrXrcRelayStateM(UFR_HANDLE hndUFR, uint8_t state); -DL_API UFR_STATUS UfrXrcGetIoStateM(UFR_HANDLE hndUFR, uint8_t *intercom, uint8_t *door, uint8_t *relay_state); -DL_API UFR_STATUS UfrRedLightControlM(UFR_HANDLE hndUFR, uint8_t light_status); - -//############################################################################# -//############################################################################# - - -DL_API -UFR_STATUS uFR_i_block_transceiveM(UFR_HANDLE hndUFR, uint8_t chaining, - uint8_t timeout, uint8_t block_length, uint8_t *snd_data_array, - size_t *rcv_length, uint8_t *rcv_data_array, uint32_t *ufr_status); - -//############################################################################# - -//DL_API -//void print_desfire_version(struct mifare_desfire_version_info *desfire_version); - -typedef void * HND; - -DL_API -UFR_STATUS uFR_DESFIRE_Start(void); - -DL_API -UFR_STATUS uFR_DESFIRE_Stop(void); - -DL_API -HND -uFR_mifare_desfire_tag_new (void); - -DL_API -void -uFR_mifare_desfire_tag_free (HND tag); - -DL_API -HND -uFR_mifare_desfire_des_key_new (uint8_t value[8]); - -DL_API -int uFR_mifare_desfire_get_key_settings (HND tag, uint8_t *settings, uint8_t *max_keys); - -DL_API -void -uFR_mifare_desfire_key_free (HND key); - -DL_API -HND -uFR_mifare_desfire_aes_key_new_with_version (uint8_t value[16], uint8_t version); - -DL_API -int -uFR_mifare_desfire_change_key (HND tag, uint8_t key_no, HND new_key, HND old_key); - -DL_API -int -uFR_mifare_desfire_authenticate (HND tag, uint8_t key_no, HND key); - -DL_API -int -uFR_mifare_desfire_authenticate_aes (HND tag, uint8_t key_no, HND key); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -DL_API -UFR_STATUS uFR_int_GetDesfireUidM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_GetDesfireUid_PK_M(UFR_HANDLE hndUFR,uint8_t *aes_key_ext, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFreeMemM(UFR_HANDLE hndUFR, uint32_t *free_mem_byte, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCardM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCard_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFileM(UFR_HANDLE hndUFR,uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFileM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplicationM(UFR_HANDLE hndUFR,uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplicationM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplication_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - - -DL_API -UFR_STATUS uFR_int_DesfireSetConfigurationM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireSetConfiguration_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettingsM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettings_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettingsM(UFR_HANDLE hndUFR,uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettings_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKeyM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_SetParamM(UFR_HANDLE hndUFR, uint8_t aes_key[16], uint8_t key_no, - uint32_t aid_nr, uint8_t file_id); - - -//--------------------------------------------------------------------------- - -DL_API -UFR_STATUS uFR_int_DesfireReaStddDataFileM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFileM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -// DLL version ---------------------------------------------------------------- -DL_API uint32_t GetDllVersion(void); - -/* - * Get "exploded" dll version example: - * - * #include - * #include - * - * void main(int argc, char *argv[]) - * { - * uint32_t dwDllVersion = 0; - * uint32_t dwDllMajorVersion = 0; - * uint32_t dwDllMinorVersion = 0; - * uint32_t dwDllBuild = 0; - * - * dwDllVersion = GetDllVersion(); - * - * // "explode" the dll version: - * dwDllMajorVersion = (DWORD)(LOBYTE(LOWORD(dwDllVersion))); - * dwDllMinorVersion = (DWORD)(HIBYTE(LOWORD(dwDllVersion))); - * - * // Get the dll build number. - * dwDllBuild = (DWORD)(HIWORD(dwDllVersion)); - * - * printf("Dll version is %ld.%ld (%ld)\n", dwDllMajorVersion, - * dwDllMinorVersion, - * dwDllBuild); - * } - * - */ - - -//// debug function - -DL_API chr_ptr GetDllVersionStr(void); - -DL_API chr_ptr UFR_Status2String(const UFR_STATUS status); - -DL_API void error_get(void *out, int32_t *size); - -DL_API chr_ptr GetReaderDescription(void); -DL_API chr_ptr GetReaderDescriptionM(UFR_HANDLE hndUFR); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -DL_API UFR_STATUS test_i_block(void); -DL_API UFR_STATUS test_desfire_ver(void); - -#ifdef __cplusplus -} -#endif - -#endif /* uFCoder_H_ */ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.pas deleted file mode 100644 index 671d6a39ef6a4e0473a8e27168ea96e7b572ad47..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder.pas +++ /dev/null @@ -1,640 +0,0 @@ -unit uFCoder; - -interface - -const DLL_NAME ='uFCoder-x86.dll'; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderReset: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function ReaderSoftRestart: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType : Byte; - var bCardUID : Byte; - var bCardUIDSize : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeysLock(const bPassword:PByte):DL_STATUS stdcall; -function ReaderKeysUnlock(const bPassword:PByte):DL_STATUS stdcall; - - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -function ReadUserData(aucData:PByte): DL_STATUS stdcall; - -function WriteUserData(const aucData: PByte): DL_STATUS stdcall; - - - -function BlockRead(data:PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockWrite(const data: PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte; - key_index:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockRead(value:PLongint; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead(value:PLongint; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall ; - - -function ValueBlockInSectorDecrement(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM1(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM1(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM1(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite_AKM1(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM1(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM1(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM1(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM1(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_AKM1(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM1(value: PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM1(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM1(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM1(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM1(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM1(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM1(decrement_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM1(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM2(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM2(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM2(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall ; - - -function BlockInSectorWrite_AKM2(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM2(data: PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM2(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM2(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM2(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall ; - -function SectorTrailerWriteUnsafe_AKM2(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM2(value: pLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM2(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM2(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM2(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM2(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM2(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM2(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM2(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_PK(data:PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockWrite_PK(const data: PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorRead_PK(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorWrite_PK(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearRead_PK(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - - -function LinearWrite_PK(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearFormatCard_PK(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - -function SectorTrailerWrite_PK(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B:PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_PK(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockRead_PK(value:PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_PK(value: PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockWrite_PK(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_PK(value:LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockIncrement_PK(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_PK(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockDecrement_PK(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_PK(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function GetReaderHardwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - -function GetReaderFirmwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - - - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderReset; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderSoftRestart; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function ReadUserData; external DLL_NAME; -function WriteUserData; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderKeysLock; external DLL_NAME; -function ReaderKeysUnlock; external DLL_NAME; -function BlockRead; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function BlockInSectorRead; external DLL_NAME; -function BlockInSectorWrite; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function SectorTrailerWrite; external DLL_NAME; -function SectorTrailerWriteUnsafe; external DLL_NAME; -function ValueBlockRead; external DLL_NAME; -function ValueBlockInSectorRead; external DLL_NAME; -function ValueBlockWrite; external DLL_NAME; -function ValueBlockInSectorWrite; external DLL_NAME; -function ValueBlockIncrement; external DLL_NAME; -function ValueBlockInSectorIncrement; external DLL_NAME; -function ValueBlockDecrement; external DLL_NAME; -function ValueBlockInSectorDecrement; external DLL_NAME; -function BlockRead_AKM1; external DLL_NAME; -function BlockWrite_AKM1; external DLL_NAME; -function BlockInSectorRead_AKM1; external DLL_NAME; -function BlockInSectorWrite_AKM1; external DLL_NAME; -function LinearRead_AKM1; external DLL_NAME; -function LinearWrite_AKM1; external DLL_NAME; -function LinearFormatCard_AKM1; external DLL_NAME; -function SectorTrailerWrite_AKM1; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM1; external DLL_NAME; -function ValueBlockRead_AKM1; external DLL_NAME; -function ValueBlockInSectorRead_AKM1; external DLL_NAME; -function ValueBlockWrite_AKM1; external DLL_NAME; -function ValueBlockInSectorWrite_AKM1; external DLL_NAME; -function ValueBlockIncrement_AKM1; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM1; external DLL_NAME; -function ValueBlockDecrement_AKM1; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM1; external DLL_NAME; -function BlockRead_AKM2; external DLL_NAME; -function BlockWrite_AKM2; external DLL_NAME; -function BlockInSectorRead_AKM2; external DLL_NAME; -function BlockInSectorWrite_AKM2; external DLL_NAME; -function LinearRead_AKM2; external DLL_NAME; -function LinearWrite_AKM2; external DLL_NAME; -function LinearFormatCard_AKM2; external DLL_NAME; -function SectorTrailerWrite_AKM2; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM2; external DLL_NAME; -function ValueBlockRead_AKM2; external DLL_NAME; -function ValueBlockInSectorRead_AKM2; external DLL_NAME; -function ValueBlockWrite_AKM2; external DLL_NAME; -function ValueBlockInSectorWrite_AKM2; external DLL_NAME; -function ValueBlockIncrement_AKM2; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM2; external DLL_NAME; -function ValueBlockDecrement_AKM2; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM2; external DLL_NAME; -function BlockRead_PK; external DLL_NAME; -function BlockWrite_PK; external DLL_NAME; -function BlockInSectorRead_PK; external DLL_NAME; -function BlockInSectorWrite_PK; external DLL_NAME; -function LinearRead_PK; external DLL_NAME; -function LinearWrite_PK; external DLL_NAME; -function LinearFormatCard_PK; external DLL_NAME; -function SectorTrailerWrite_PK; external DLL_NAME; -function SectorTrailerWriteUnsafe_PK; external DLL_NAME; -function ValueBlockRead_PK; external DLL_NAME; -function ValueBlockInSectorRead_PK; external DLL_NAME; -function ValueBlockWrite_PK; external DLL_NAME; -function ValueBlockInSectorWrite_PK; external DLL_NAME; -function ValueBlockIncrement_PK; external DLL_NAME; -function ValueBlockInSectorIncrement_PK; external DLL_NAME; -function ValueBlockDecrement_PK; external DLL_NAME; -function ValueBlockInSectorDecrement_PK; external DLL_NAME; -function GetReaderHardwareVersion; external DLL_NAME; -function GetReaderFirmwareVersion; external DLL_NAME; - - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder1x.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder1x.dcu deleted file mode 100644 index 27b26eb5b9cdf61ac3ea0396ba2f61285631d633..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder1x.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder1x.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder1x.~pas deleted file mode 100644 index de10e1530ac2c651bc37a194db6fa750f8054a50..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder1x.~pas +++ /dev/null @@ -1,640 +0,0 @@ -unit uFCoder1x; - -interface - -const DLL_NAME ='uFCoder1x-x86.dll'; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderReset: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function ReaderSoftRestart: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType : Byte; - var bCardUID : Byte; - var bCardUIDSize : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeysLock(const bPassword:PByte):DL_STATUS stdcall; -function ReaderKeysUnlock(const bPassword:PByte):DL_STATUS stdcall; - - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -function ReadUserData(aucData:PByte): DL_STATUS stdcall; - -function WriteUserData(const aucData: PByte): DL_STATUS stdcall; - - - -function BlockRead(data:PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockWrite(const data: PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte; - key_index:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockRead(value:PLongint; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead(value:PLongint; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall ; - - -function ValueBlockInSectorDecrement(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM1(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM1(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM1(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite_AKM1(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM1(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM1(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM1(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM1(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_AKM1(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM1(value: PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM1(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM1(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM1(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM1(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM1(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM1(decrement_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM1(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM2(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM2(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM2(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall ; - - -function BlockInSectorWrite_AKM2(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM2(data: PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM2(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM2(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM2(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall ; - -function SectorTrailerWriteUnsafe_AKM2(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM2(value: pLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM2(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM2(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM2(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM2(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM2(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM2(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM2(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_PK(data:PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockWrite_PK(const data: PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorRead_PK(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorWrite_PK(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearRead_PK(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - - -function LinearWrite_PK(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearFormatCard_PK(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - -function SectorTrailerWrite_PK(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B:PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_PK(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockRead_PK(value:PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_PK(value: PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockWrite_PK(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_PK(value:LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockIncrement_PK(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_PK(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockDecrement_PK(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_PK(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function GetReaderHardwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - -function GetReaderFirmwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - - - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderReset; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderSoftRestart; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function ReadUserData; external DLL_NAME; -function WriteUserData; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderKeysLock; external DLL_NAME; -function ReaderKeysUnlock; external DLL_NAME; -function BlockRead; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function BlockInSectorRead; external DLL_NAME; -function BlockInSectorWrite; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function SectorTrailerWrite; external DLL_NAME; -function SectorTrailerWriteUnsafe; external DLL_NAME; -function ValueBlockRead; external DLL_NAME; -function ValueBlockInSectorRead; external DLL_NAME; -function ValueBlockWrite; external DLL_NAME; -function ValueBlockInSectorWrite; external DLL_NAME; -function ValueBlockIncrement; external DLL_NAME; -function ValueBlockInSectorIncrement; external DLL_NAME; -function ValueBlockDecrement; external DLL_NAME; -function ValueBlockInSectorDecrement; external DLL_NAME; -function BlockRead_AKM1; external DLL_NAME; -function BlockWrite_AKM1; external DLL_NAME; -function BlockInSectorRead_AKM1; external DLL_NAME; -function BlockInSectorWrite_AKM1; external DLL_NAME; -function LinearRead_AKM1; external DLL_NAME; -function LinearWrite_AKM1; external DLL_NAME; -function LinearFormatCard_AKM1; external DLL_NAME; -function SectorTrailerWrite_AKM1; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM1; external DLL_NAME; -function ValueBlockRead_AKM1; external DLL_NAME; -function ValueBlockInSectorRead_AKM1; external DLL_NAME; -function ValueBlockWrite_AKM1; external DLL_NAME; -function ValueBlockInSectorWrite_AKM1; external DLL_NAME; -function ValueBlockIncrement_AKM1; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM1; external DLL_NAME; -function ValueBlockDecrement_AKM1; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM1; external DLL_NAME; -function BlockRead_AKM2; external DLL_NAME; -function BlockWrite_AKM2; external DLL_NAME; -function BlockInSectorRead_AKM2; external DLL_NAME; -function BlockInSectorWrite_AKM2; external DLL_NAME; -function LinearRead_AKM2; external DLL_NAME; -function LinearWrite_AKM2; external DLL_NAME; -function LinearFormatCard_AKM2; external DLL_NAME; -function SectorTrailerWrite_AKM2; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM2; external DLL_NAME; -function ValueBlockRead_AKM2; external DLL_NAME; -function ValueBlockInSectorRead_AKM2; external DLL_NAME; -function ValueBlockWrite_AKM2; external DLL_NAME; -function ValueBlockInSectorWrite_AKM2; external DLL_NAME; -function ValueBlockIncrement_AKM2; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM2; external DLL_NAME; -function ValueBlockDecrement_AKM2; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM2; external DLL_NAME; -function BlockRead_PK; external DLL_NAME; -function BlockWrite_PK; external DLL_NAME; -function BlockInSectorRead_PK; external DLL_NAME; -function BlockInSectorWrite_PK; external DLL_NAME; -function LinearRead_PK; external DLL_NAME; -function LinearWrite_PK; external DLL_NAME; -function LinearFormatCard_PK; external DLL_NAME; -function SectorTrailerWrite_PK; external DLL_NAME; -function SectorTrailerWriteUnsafe_PK; external DLL_NAME; -function ValueBlockRead_PK; external DLL_NAME; -function ValueBlockInSectorRead_PK; external DLL_NAME; -function ValueBlockWrite_PK; external DLL_NAME; -function ValueBlockInSectorWrite_PK; external DLL_NAME; -function ValueBlockIncrement_PK; external DLL_NAME; -function ValueBlockInSectorIncrement_PK; external DLL_NAME; -function ValueBlockDecrement_PK; external DLL_NAME; -function ValueBlockInSectorDecrement_PK; external DLL_NAME; -function GetReaderHardwareVersion; external DLL_NAME; -function GetReaderFirmwareVersion; external DLL_NAME; - - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder2x.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder2x.dcu deleted file mode 100644 index b1be19a79961ef344679103dc5bce950124069c8..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder2x.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder2x.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder2x.pas deleted file mode 100644 index ccc5f81757dd854030dec85b266f9b7ed28899b3..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder2x.pas +++ /dev/null @@ -1,619 +0,0 @@ -unit uFCoder1x; - -interface - -const - MIFARE_CLASSIC_1k = $08; -const - MF1ICS50 = $08; -const - SLE66R35 = $88; -const - MIFARE_CLASSIC_4k = $18; -const - MF1ICS70 = $18; -const - MIFARE_CLASSIC_MINI = $09; -const - MF1ICS20 = $09; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - - - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderReset: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function ReaderSoftRestart: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType : Byte; - var iCardSerial: LongInt; - var bCardUID : Byte): DL_STATUS stdcall; - -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeysLock(const bPassword:PByte):DL_STATUS stdcall; -function ReaderKeysUnlock(const bPassword:PByte):DL_STATUS stdcall; - - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -function ReadUserData(aucData:PByte): DL_STATUS stdcall; - -function WriteUserData(const aucData: PByte): DL_STATUS stdcall; - - - -function BlockRead(data:PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockWrite(const data: PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte; - key_index:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockRead(value:PLongint; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead(value:PLongint; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall ; - - -function ValueBlockInSectorDecrement(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM1(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM1(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM1(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite_AKM1(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM1(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM1(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM1(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM1(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_AKM1(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM1(value: PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM1(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM1(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM1(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM1(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM1(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM1(decrement_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM1(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM2(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM2(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM2(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall ; - - -function BlockInSectorWrite_AKM2(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM2(data: PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM2(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM2(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM2(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall ; - -function SectorTrailerWriteUnsafe_AKM2(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM2(value: pLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM2(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM2(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM2(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM2(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM2(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM2(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM2(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_PK(data:PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockWrite_PK(const data: PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorRead_PK(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorWrite_PK(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearRead_PK(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - - -function LinearWrite_PK(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearFormatCard_PK(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - -function SectorTrailerWrite_PK(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B:PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_PK(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockRead_PK(value:PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_PK(value: PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockWrite_PK(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_PK(value:LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockIncrement_PK(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_PK(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockDecrement_PK(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_PK(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - - - - -implementation - -function ReaderOpen; external 'uFCoder1x.dll'; -function ReaderReset; external 'uFCoder1x.dll'; -function ReaderClose; external 'uFCoder1x.dll'; -function ReaderSoftRestart; external 'uFCoder1x.dll'; -function GetReaderType; external 'uFCoder1x.dll'; -function GetReaderSerialNumber; external 'uFCoder1x.dll'; -function ReaderKeyWrite; external 'uFCoder1x.dll'; -function ReaderUISignal; external 'uFCoder1x.dll'; -function ReadUserData; external 'uFCoder1x.dll'; -function WriteUserData; external 'uFCoder1x.dll'; -function GetCardId; external 'uFCoder1x.dll'; -function GetCardIdEx; external 'uFCoder1x.dll'; -function ReaderKeysLock; external 'uFCoder1x.dll'; -function ReaderKeysUnlock; external 'uFCoder1x.dll'; -function BlockRead; external 'uFCoder1x.dll'; -function BlockWrite; external 'uFCoder1x.dll'; -function BlockInSectorRead; external 'uFCoder1x.dll'; -function BlockInSectorWrite; external 'uFCoder1x.dll'; -function LinearRead; external 'uFCoder1x.dll'; -function LinearWrite; external 'uFCoder1x.dll'; -function LinearFormatCard; external 'uFCoder1x.dll'; -function SectorTrailerWrite; external 'uFCoder1x.dll'; -function SectorTrailerWriteUnsafe; external 'uFCoder1x.dll'; -function ValueBlockRead; external 'uFCoder1x.dll'; -function ValueBlockInSectorRead; external 'uFCoder1x.dll'; -function ValueBlockWrite; external 'uFCoder1x.dll'; -function ValueBlockInSectorWrite; external 'uFCoder1x.dll'; -function ValueBlockIncrement; external 'uFCoder1x.dll'; -function ValueBlockInSectorIncrement; external 'uFCoder1x.dll'; -function ValueBlockDecrement; external 'uFCoder1x.dll'; -function ValueBlockInSectorDecrement; external 'uFCoder1x.dll'; -function BlockRead_AKM1; external 'uFCoder1x.dll'; -function BlockWrite_AKM1; external 'uFCoder1x.dll'; -function BlockInSectorRead_AKM1; external 'uFCoder1x.dll'; -function BlockInSectorWrite_AKM1; external 'uFCoder1x.dll'; -function LinearRead_AKM1; external 'uFCoder1x.dll'; -function LinearWrite_AKM1; external 'uFCoder1x.dll'; -function LinearFormatCard_AKM1; external 'uFCoder1x.dll'; -function SectorTrailerWrite_AKM1; external 'uFCoder1x.dll'; -function SectorTrailerWriteUnsafe_AKM1; external 'uFCoder1x.dll'; -function ValueBlockRead_AKM1; external 'uFCoder1x.dll'; -function ValueBlockInSectorRead_AKM1; external 'uFCoder1x.dll'; -function ValueBlockWrite_AKM1; external 'uFCoder1x.dll'; -function ValueBlockInSectorWrite_AKM1; external 'uFCoder1x.dll'; -function ValueBlockIncrement_AKM1; external 'uFCoder1x.dll'; -function ValueBlockInSectorIncrement_AKM1; external 'uFCoder1x.dll'; -function ValueBlockDecrement_AKM1; external 'uFCoder1x.dll'; -function ValueBlockInSectorDecrement_AKM1; external 'uFCoder1x.dll'; -function BlockRead_AKM2; external 'uFCoder1x.dll'; -function BlockWrite_AKM2; external 'uFCoder1x.dll'; -function BlockInSectorRead_AKM2; external 'uFCoder1x.dll'; -function BlockInSectorWrite_AKM2; external 'uFCoder1x.dll'; -function LinearRead_AKM2; external 'uFCoder1x.dll'; -function LinearWrite_AKM2; external 'uFCoder1x.dll'; -function LinearFormatCard_AKM2; external 'uFCoder1x.dll'; -function SectorTrailerWrite_AKM2; external 'uFCoder1x.dll'; -function SectorTrailerWriteUnsafe_AKM2; external 'uFCoder1x.dll'; -function ValueBlockRead_AKM2; external 'uFCoder1x.dll'; -function ValueBlockInSectorRead_AKM2; external 'uFCoder1x.dll'; -function ValueBlockWrite_AKM2; external 'uFCoder1x.dll'; -function ValueBlockInSectorWrite_AKM2; external 'uFCoder1x.dll'; -function ValueBlockIncrement_AKM2; external 'uFCoder1x.dll'; -function ValueBlockInSectorIncrement_AKM2; external 'uFCoder1x.dll'; -function ValueBlockDecrement_AKM2; external 'uFCoder1x.dll'; -function ValueBlockInSectorDecrement_AKM2; external 'uFCoder1x.dll'; -function BlockRead_PK; external 'uFCoder1x.dll'; -function BlockWrite_PK; external 'uFCoder1x.dll'; -function BlockInSectorRead_PK; external 'uFCoder1x.dll'; -function BlockInSectorWrite_PK; external 'uFCoder1x.dll'; -function LinearRead_PK; external 'uFCoder1x.dll'; -function LinearWrite_PK; external 'uFCoder1x.dll'; -function LinearFormatCard_PK; external 'uFCoder1x.dll'; -function SectorTrailerWrite_PK; external 'uFCoder1x.dll'; -function SectorTrailerWriteUnsafe_PK; external 'uFCoder1x.dll'; -function ValueBlockRead_PK; external 'uFCoder1x.dll'; -function ValueBlockInSectorRead_PK; external 'uFCoder1x.dll'; -function ValueBlockWrite_PK; external 'uFCoder1x.dll'; -function ValueBlockInSectorWrite_PK; external 'uFCoder1x.dll'; -function ValueBlockIncrement_PK; external 'uFCoder1x.dll'; -function ValueBlockInSectorIncrement_PK; external 'uFCoder1x.dll'; -function ValueBlockDecrement_PK; external 'uFCoder1x.dll'; -function ValueBlockInSectorDecrement_PK; external 'uFCoder1x.dll'; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_coff-x86_64.lib b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_coff-x86_64.lib deleted file mode 100644 index cb2f101bab717bf1fe4a597c5aa2c8c66b5aea13..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_coff-x86_64.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_coff.lib b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_omf.lib b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.cfg b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dfm deleted file mode 100644 index fe9b0646f1a9de0ab5f4f72d664382103adceea4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dfm +++ /dev/null @@ -1,501 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 423 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advanced' - ClientHeight = 668 - ClientWidth = 529 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 529 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 529 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 24 - Top = 16 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 24 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 277 - Top = 16 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 277 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 478 - Height = 5 - end - object lblLightMode: TLabel - Left = 25 - Top = 83 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 25 - Top = 106 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object txtReaderType: TStaticText - Left = 116 - Top = 15 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtReaderSerial: TStaticText - Left = 116 - Top = 39 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object txtCardType: TStaticText - Left = 365 - Top = 15 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 2 - end - object txtCardSerial: TStaticText - Left = 365 - Top = 39 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 527 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 117 - Top = 79 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 117 - Top = 103 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 6 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 260 - Top = 80 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 7 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 376 - Top = 78 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 8 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 376 - Top = 102 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 9 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 24 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 10 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 529 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dof b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dof deleted file mode 100644 index 305eb3d50db6f58a815c16d61040958e2d7ad1c0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Advanced version.Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dpr b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dpr deleted file mode 100644 index a3742ca46a15a8294dddce70e6e888f586c00f2e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dpr +++ /dev/null @@ -1,36 +0,0 @@ -program uFrAdvanced; - -uses - Forms, - uFAdvanced in 'uFAdvanced.pas' {frmuFrAdvanced}, - Global in 'Global.pas', - uFCoder in 'uFCoder.pas', - LinearReadWrite in 'LinearReadWrite.pas' {frmLinearReadWrite}, - BlockInSector in 'BlockInSector.pas' {frmBlockInSectorReadWrite}, - ValueBlock in 'ValueBlock.pas' {frmValueBlockReadWrite}, - ValueBlockIncDec in 'ValueBlockIncDec.pas' {frmValueBlockIncrDecr}, - ValueBlockInSector in 'ValueBlockInSector.pas' {frmValueBlockInSectorReadWrite}, - ValueBlockInSectorIncrDecr in 'ValueBlockInSectorIncrDecr.pas' {frmValueBlockInSectorIncDecr}, - SectorTrailersWrite in 'SectorTrailersWrite.pas' {frmSectorTrailerWrite}, - ViewAll in 'ViewAll.pas' {frmViewAll}, - LinearFormatsCard in 'LinearFormatsCard.pas' {frmLinearFormatCard}, - BlockReadWrite in 'BlockReadWrite.pas' {frmBlockReadWrite}; - -{$R *.res} - -begin - Application.Initialize; - Application.Title := 'uFr Advanced'; - Application.CreateForm(TfrmuFrAdvanced, frmuFrAdvanced); - Application.CreateForm(TfrmLinearReadWrite, frmLinearReadWrite); - Application.CreateForm(TfrmBlockInSectorReadWrite, frmBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockReadWrite, frmValueBlockReadWrite); - Application.CreateForm(TfrmValueBlockIncrDecr, frmValueBlockIncrDecr); - Application.CreateForm(TfrmValueBlockInSectorReadWrite, frmValueBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockInSectorIncDecr, frmValueBlockInSectorIncDecr); - Application.CreateForm(TfrmSectorTrailerWrite, frmSectorTrailerWrite); - Application.CreateForm(TfrmViewAll, frmViewAll); - Application.CreateForm(TfrmLinearFormatCard, frmLinearFormatCard); - Application.CreateForm(TfrmBlockReadWrite, frmBlockReadWrite); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dproj b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dproj deleted file mode 100644 index 551289bd66681713d7e14327cc5c85f9d019c07f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dproj +++ /dev/null @@ -1,144 +0,0 @@ - - - {F1791120-E410-4505-B93D-14DF11DFA2E0} - uFrAdvanced.dpr - True - Debug - 1 - Application - VCL - 16.1 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - 00400000 - Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) - false - 2 - 1 - false - 1 - 2074 - true - false - vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel;$(DCC_UsePackage) - CompanyName=D-Logic;FileDescription=Advanced version.Support for 4k;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0.0.0;Comments= - false - true - uFrAdvanced - - - uFrAdvanced_Icon.ico - $(BDS)\bin\default_app.manifest - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - true - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - 1033 - - - uFrAdvanced_Icon.ico - - - 0 - 0 - RELEASE;$(DCC_Define) - false - - - DEBUG;$(DCC_Define) - false - true - - - - MainSource - - -
frmuFrAdvanced
-
- - - -
frmLinearReadWrite
-
- -
frmBlockInSectorReadWrite
-
- -
frmValueBlockReadWrite
-
- -
frmValueBlockIncrDecr
-
- -
frmValueBlockInSectorReadWrite
-
- -
frmValueBlockInSectorIncDecr
-
- -
frmSectorTrailerWrite
-
- -
frmViewAll
-
- -
frmLinearFormatCard
-
- -
frmBlockReadWrite
-
- - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - - - - - uFrAdvanced.dpr - - - - True - False - - - 12 - - - -
diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dproj.local b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dproj.local deleted file mode 100644 index 8d8fe3d6111bb59cc5f9e934c043a964160a051f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.dproj.local +++ /dev/null @@ -1,6 +0,0 @@ - - - - 2015.04.03 13:18:23.628,D:\d-logic\svn_repo\sw_open\ufr\delphi\examples\trunk\uFCoder\2.0.0\uFCoderAdvanced\uFCoder.pas=D:\d-logic\svn_repo\sw_open\ufr\delphi\examples\trunk\uFCoder\2.0.0\uFCoderAdvanced\uFCoder1x.pas - - diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.exe b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.exe deleted file mode 100644 index b84208f5cdfa091a9198ac5aa0626af9e9e9d701..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.identcache b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.identcache deleted file mode 100644 index b08f141880198c758146639d8537341b410dd832..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.identcache and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.pas deleted file mode 100644 index 16f6afd6210e0cf1e23c8e541525cf8ed12c54bc..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.pas +++ /dev/null @@ -1,330 +0,0 @@ -unit uFrAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder2x, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - txtReaderType: TStaticText; - lblReaderSerial: TLabel; - txtReaderSerial: TStaticText; - lblCardType: TLabel; - txtCardType: TStaticText; - lblCardSerial: TLabel; - txtCardSerial: TStaticText; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - procedure TimerTimer(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - private - CONNECTION:Boolean; - res:DL_STATUS; - reader_type:Longint; - reader_serial:LongInt; - card_type:Byte; - card_serial:LongInt; - Pread_user_data:PByte; - user_data:array[0..15] of Char; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - - Pread_user_data:=nil; - if not CONNECTION then - begin - res:=ReaderOpen(); - if res=DL_OK then - begin - CONNECTION:=true; - stbReader.Panels[0].Text:='CONNECTED'; - Status_Bar_Error_Reporting(stbReader,res); - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - Status_Bar_Error_Reporting(stbReader,res); - txtReaderType.Caption:=''; - txtReaderSerial.Caption:=''; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - txtUserData.Text:=''; - txtNewUserData.Text:=''; - end; - end; - if CONNECTION then - begin - res:=GetReaderType(reader_type); - if res=DL_OK then begin - txtReaderType.Caption:='$'+IntToHex(reader_type,8); - Status_Bar_Error_Reporting(stbReader,res); - end - else - begin - CONNECTION:=false; - ReaderClose(); - end; - res:=GetReaderSerialNumber(reader_serial); - if res=DL_OK then txtReaderSerial.Caption:='$'+IntToHex(reader_serial,8); - res:=GetCardId(card_type,card_serial); - if res=DL_OK then - begin - txtCardType.Caption:='$'+IntToHex(card_type,2); - txtCardSerial.Caption:='$'+IntToHex(card_serial,8); - Status_Bar_Error_Reporting(stbCard,res); - end - else - begin - txtCardType.Caption:=''; - txtCardSerial.Caption:=''; - Status_Bar_Error_Reporting(stbCard,res); - end; - PRead_user_data:=PByte(@user_data); - res:=ReadUserData(Pread_user_data); - if res=DL_OK then - txtUserData.Text:=user_data - else - txtUserData.Text:=#0; - end; -end; - - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - PWrite_user_data:PByte; -begin - if (txtNewUserData.Text=EmptyStr) then begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - PWrite_user_data:=PByte(txtNewUserData.Text); - res:=WriteUserData(PWrite_user_data); - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end - else begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end; - - end; - - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - br:byte; - PReader_key:PByte; - key_index:Byte; - reader_key:array[0..5] of Byte; - s:string; -begin - key_index:=cboKeyIndex.ItemIndex; - PReader_key:=nil; - for br:=0 to 5 do begin - if chkReaderHex.Checked then - reader_key[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(br+1))).Text) - else - reader_key[br]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(br+1))).Text); - end; - PReader_key:=@reader_key; - res:=ReaderKeyWrite(PReader_key,key_index); - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end - else begin - ReaderUISignal(ERROR_LIGHT,ERROR_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end; - -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - ReaderSoftRestart(); -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - ReaderReset(); -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.res b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.res deleted file mode 100644 index fbaca376ee9a178564ffeb78afeae98e456e7f34..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced.res and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced_Icon.ico b/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced_Icon.ico deleted file mode 100644 index cfd8992a5b8ff4b89478d89e93ae9205bb8125ef..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderAdvanced/uFrAdvanced_Icon.ico and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder-x86.dll b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder-x86_64.dll b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder-x86_64.dll deleted file mode 100644 index dac4290609d32257ca8a0caf4418d0ab8dcddd26..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder-x86_64.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.dcu deleted file mode 100644 index 9fa94a68dd1e6dc9cd248da146f8ae1fc419e4d1..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.h b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.h deleted file mode 100644 index 003aface933f079af722b7144fa1a122a733b770..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.h +++ /dev/null @@ -1,1696 +0,0 @@ -/* - * uFCoder.h - * - * Created on: 2009-01-14 - * Last edited: 2014-08-19 - * - * Author: D-Logic - */ - -#ifndef uFCoder_H_ -#define uFCoder_H_ - -#include -#include - -typedef const char * chr_ptr; - -#if __linux__ -# define DL_API -#else -// WINDOWS -# ifdef DL_uFC_STATIC_LIB -# define DL_API -# else -# ifndef DL_uFC_EXPORTS -# define DL_API __declspec(dllimport) __stdcall -# else -# define DL_API __declspec(dllexport) __stdcall -# endif -# endif -#endif // __linux__ - -#if defined(DL_uFC_EXPORTS) || defined(DL_uFC_STATIC_LIB) - typedef struct S_UFR_HANDLE * UFR_HANDLE; -#else - typedef void * UFR_HANDLE; -#endif - -// MIFARE CLASSIC type id's: -#define MIFARE_CLASSIC_1k 0x08 -#define MF1ICS50 0x08 -#define SLE66R35 0x88 // Infineon = Mifare Classic 1k -#define MIFARE_CLASSIC_4k 0x18 -#define MF1ICS70 0x18 -#define MIFARE_CLASSIC_MINI 0x09 -#define MF1ICS20 0x09 - -//DLOGIC CARD TYPE -#define DL_MIFARE_ULTRALIGHT 0x01 -#define DL_MIFARE_ULTRALIGHT_EV1_11 0x02 -#define DL_MIFARE_ULTRALIGHT_EV1_21 0x03 -#define DL_MIFARE_ULTRALIGHT_C 0x04 -#define DL_NTAG_203 0x05 -#define DL_NTAG_210 0x06 -#define DL_NTAG_212 0x07 -#define DL_NTAG_213 0x08 -#define DL_NTAG_215 0x09 -#define DL_NTAG_216 0x0A -#define DL_MIKRON_MIK640D 0x0B - -#define DL_MIFARE_MINI 0x20 -#define DL_MIFARE_CLASSIC_1K 0x21 -#define DL_MIFARE_CLASSIC_4K 0x22 -#define DL_MIFARE_PLUS_S_2K 0x23 -#define DL_MIFARE_PLUS_S_4K 0x24 -#define DL_MIFARE_PLUS_X_2K 0x25 -#define DL_MIFARE_PLUS_X_4K 0x26 -#define DL_MIFARE_DESFIRE 0x27 -#define DL_MIFARE_DESFIRE_EV1_2K 0x28 -#define DL_MIFARE_DESFIRE_EV1_4K 0x29 -#define DL_MIFARE_DESFIRE_EV1_8K 0x2A - -// MIFARE CLASSIC Authentication Modes: -enum MIFARE_AUTHENTICATION -{ - MIFARE_AUTHENT1A = 0x60, - MIFARE_AUTHENT1B = 0x61, -}; - -enum ADDRESS_MODE -{ - ADDRESS_MODE_BLOCK = 0, - ADDRESS_MODE_SECTOR, -}; - -// API Status Codes Type: -typedef enum UFCODER_ERROR_CODES -{ - UFR_OK = 0x00, - UFR_COMMUNICATION_ERROR = 0x01, - UFR_CHKSUM_ERROR = 0x02, - UFR_READING_ERROR = 0x03, - UFR_WRITING_ERROR = 0x04, - UFR_BUFFER_OVERFLOW = 0x05, - UFR_MAX_ADDRESS_EXCEEDED = 0x06, - UFR_MAX_KEY_INDEX_EXCEEDED = 0x07, - UFR_NO_CARD = 0x08, - UFR_COMMAND_NOT_SUPPORTED = 0x09, - UFR_FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER = 0x0A, - UFR_ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER = 0x0B, - UFR_WRONG_ADDRESS_MODE = 0x0C, - UFR_WRONG_ACCESS_BITS_VALUES = 0x0D, - UFR_AUTH_ERROR = 0x0E, - UFR_PARAMETERS_ERROR = 0x0F, // ToDo, point 5. - UFR_MAX_SIZE_EXCEEDED = 0x10, - - UFR_WRITE_VERIFICATION_ERROR = 0x70, - UFR_BUFFER_SIZE_EXCEEDED = 0x71, - UFR_VALUE_BLOCK_INVALID = 0x72, - UFR_VALUE_BLOCK_ADDR_INVALID = 0x73, - UFR_VALUE_BLOCK_MANIPULATION_ERROR = 0x74, - UFR_WRONG_UI_MODE = 0x75, - UFR_KEYS_LOCKED = 0x76, - UFR_KEYS_UNLOCKED = 0x77, - UFR_WRONG_PASSWORD = 0x78, - UFR_CAN_NOT_LOCK_DEVICE = 0x79, - UFR_CAN_NOT_UNLOCK_DEVICE = 0x7A, - UFR_DEVICE_EEPROM_BUSY = 0x7B, - UFR_RTC_SET_ERROR = 0x7C, - - UFR_COMMUNICATION_BREAK = 0x50, - UFR_NO_MEMORY_ERROR = 0x51, - UFR_CAN_NOT_OPEN_READER = 0x52, - UFR_READER_NOT_SUPPORTED = 0x53, - UFR_READER_OPENING_ERROR = 0x54, - UFR_READER_PORT_NOT_OPENED = 0x55, - UFR_CANT_CLOSE_READER_PORT = 0x56, - - UFR_FT_STATUS_ERROR_1 = 0xA0, - UFR_FT_STATUS_ERROR_2 = 0xA1, - UFR_FT_STATUS_ERROR_3 = 0xA2, - UFR_FT_STATUS_ERROR_4 = 0xA3, - UFR_FT_STATUS_ERROR_5 = 0xA4, - UFR_FT_STATUS_ERROR_6 = 0xA5, - UFR_FT_STATUS_ERROR_7 = 0xA6, - UFR_FT_STATUS_ERROR_8 = 0xA7, - UFR_FT_STATUS_ERROR_9 = 0xA8, - - //NDEF error codes - UFR_WRONG_NDEF_CARD_FORMAT = 0x80, - UFR_NDEF_MESSAGE_NOT_FOUND = 0x81, - UFR_NDEF_UNSUPPORTED_CARD_TYPE = 0x82, - UFR_NDEF_CARD_FORMAT_ERROR = 0x83, - UFR_MAD_NOT_ENABLED = 0x84, - UFR_MAD_VERSION_NOT_SUPPORTED = 0x85, - - // multi units - UFR_DEVICE_WRONG_HANDLE = 0x100, - UFR_DEVICE_INDEX_OUT_OF_BOUND, - UFR_DEVICE_ALREADY_OPENED, - UFR_DEVICE_ALREADY_CLOSED, - - MAX_UFR_STATUS = 0xFFFFFFFF -} UFR_STATUS; - -//DESFIRE Card Status Error Codes -#define READER_ERROR 2999 -#define NO_CARD_DETECTED 3000 -#define CARD_OPERATION_OK 3001 -#define WRONG_KEY_TYPE 3002 -#define KEY_AUTH_ERROR 3003 -#define CARD_CRYPTO_ERROR 3004 -#define READER_CARD_COMM_ERROR 3005 -#define PC_READER_COMM_ERROR 3006 - -#define DESFIRE_CARD_NO_CHANGES 0x0C0C -#define DESFIRE_CARD_OUT_OF_EEPROM_ERROR 0x0C0E -#define DESFIRE_CARD_ILLEGAL_COMMAND_CODE 0x0C1C -#define DESFIRE_CARD_INTEGRITY_ERROR 0x0C1E -#define DESFIRE_CARD_NO_SUCH_KEY 0x0C40 -#define DESFIRE_CARD_LENGTH_ERROR 0x0C7E -#define DESFIRE_CARD_PERMISSION_DENIED 0x0C9D -#define DESFIRE_CARD_PARAMETER_ERROR 0x0C9E -#define DESFIRE_CARD_APPLICATION_NOT_FOUND 0x0CA0 -#define DESFIRE_CARD_APPL_INTEGRITY_ERROR 0x0CA1 -#define DESFIRE_CARD_AUTHENTICATION_ERROR 0x0CAE -#define DESFIRE_CARD_ADDITIONAL_FRAME 0x0CAF -#define DESFIRE_CARD_BOUNDARY_ERROR 0x0CBE -#define DESFIRE_CARD_PICC_INTEGRITY_ERROR 0x0CC1 -#define DESFIRE_CARD_COMMAND_ABORTED 0x0CCA -#define DESFIRE_CARD_PICC_DISABLED_ERROR 0x0CCD -#define DESFIRE_CARD_COUNT_ERROR 0x0CCE -#define DESFIRE_CARD_DUPLICATE_ERROR 0x0CDE -#define DESFIRE_CARD_EEPROM_ERROR_DES 0x0CEE -#define DESFIRE_CARD_FILE_NOT_FOUND 0x0CF0 -#define DESFIRE_CARD_FILE_INTEGRITY_ERROR 0x0CF1 - -//DESFIRE key settings values -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_CHANGE_KEY_CHANGE 0x09 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_CHANGE_KEY_CHANGE 0x0F -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_NOT_CHANGE_KEY_CHANGE 0x01 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_NOT_CHANGE_KEY_CHANGE 0x07 -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_CHANGE_KEY_NOT_CHANGE 0x08 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_CHANGE_KEY_NOT_CHANGE 0x0E -#define DESFIRE_KEY_SET_CREATE_WITH_AUTH_SET_NOT_CHANGE_KEY_NOT_CHANGE 0x00 -#define DESFIRE_KEY_SET_CREATE_WITHOUT_AUTH_SET_NOT_CHANGE_KEY_NOT_CHANGE 0x06 - - -#ifdef __cplusplus -extern "C" -{ -#endif - -//-------------------------------------------------------------------------------------------------- - -DL_API UFR_STATUS ReaderOpen(void); -DL_API UFR_STATUS ReaderReset(void); -DL_API UFR_STATUS ReaderClose(void); -DL_API UFR_STATUS ReaderSoftRestart(void); -DL_API UFR_STATUS GetReaderType(uint32_t *lpulReaderType); -DL_API UFR_STATUS GetReaderSerialNumber(uint32_t *lpulSerialNumber); - -DL_API UFR_STATUS ReaderKeyWrite(const uint8_t *aucKey, uint8_t ucKeyIndex); -DL_API UFR_STATUS ReaderKeysLock(const uint8_t *password); -DL_API UFR_STATUS ReaderKeysUnlock(const uint8_t *password); -DL_API UFR_STATUS ReaderUISignal(uint8_t light_signal_mode, - uint8_t beep_signal_mode); -DL_API UFR_STATUS ReadUserData(uint8_t *aucData); -DL_API UFR_STATUS WriteUserData(const uint8_t *aucData); -DL_API UFR_STATUS GetCardId(uint8_t *lpucCardType, uint32_t *lpulCardSerial); -DL_API UFR_STATUS BlockRead(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockWrite(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorRead(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorWrite(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS LinearRead(uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesReturned, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearWrite(const uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesWritten, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearFormatCard(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWrite(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWriteUnsafe(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockRead(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorRead(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockWrite(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorWrite(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockIncrement(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorIncrement(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockDecrement(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorDecrement(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); - -DL_API UFR_STATUS BlockRead_AKM1(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM1(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM1(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM1(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM1(uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM1(const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM1(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM1(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM1(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM1(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM1(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM1(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM1(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM1(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM1(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM1(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM1(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_AKM2(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM2(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM2(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM2(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM2(uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM2(const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM2(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM2(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM2(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM2(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM2(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM2(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM2(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM2(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM2(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM2(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM2(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_PK(uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockWrite_PK(const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorRead_PK(uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorWrite_PK(const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearRead_PK(uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearWrite_PK(const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearFormatCard_PK(const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWrite_PK(uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_PK(uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockRead_PK(int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorRead_PK(int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockWrite_PK(int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorWrite_PK(int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockIncrement_PK(int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorIncrement_PK(int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockDecrement_PK(int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorDecrement_PK(int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS GetReaderHardwareVersion(uint8_t *version_major, - uint8_t *version_minor); -DL_API UFR_STATUS GetReaderFirmwareVersion(uint8_t *version_major, - uint8_t *version_minor); - -// New commands (for RTC & I2C EEPROM): -DL_API UFR_STATUS GetReaderTime(uint8_t *time); -DL_API UFR_STATUS SetReaderTime(uint8_t *password, uint8_t *time); -DL_API UFR_STATUS ChangeReaderPassword(uint8_t *old_password, uint8_t *new_password); -DL_API UFR_STATUS ReaderEepromWrite(uint8_t *data, uint32_t address, uint32_t size, uint8_t *password); -DL_API UFR_STATUS ReaderEepromRead(uint8_t *data, uint32_t address, uint32_t size); -DL_API UFR_STATUS ChangeReaderJobId(uint8_t *job_id, uint8_t *new_password); - -DL_API UFR_STATUS GetReaderSerialDescription(uint8_t pSerialDescription[8]); -DL_API UFR_STATUS SetReaderSerialDescription(const uint8_t pSerialDescription[8]); - -// New since version 2.0: -DL_API UFR_STATUS GetBuildNumber(uint8_t *build); -DL_API UFR_STATUS GetCardIdEx(uint8_t *lpucSak, uint8_t *aucUid, - uint8_t *lpucUidSize); -DL_API UFR_STATUS EnableAntiColl(void); -DL_API UFR_STATUS DisableAntiColl(void); -DL_API UFR_STATUS EnumCards(uint8_t *lpucCardsNumber, - uint8_t *lpucUidListSize); -DL_API UFR_STATUS ListCards(uint8_t *aucUidList, uint8_t ucUidListSize); // Before calling this function you must call EnumCards() first. -DL_API UFR_STATUS SelectCard(const uint8_t *aucUid, uint8_t ucUidSize, - uint8_t *lpucSak); -DL_API UFR_STATUS DeslectCard(void); -DL_API UFR_STATUS GetAntiCollStatus(int8_t *lpcIsAntiCollEnabled, - int8_t *lpcIsAnyCardSelected); - - -DL_API UFR_STATUS GetDlogicCardType(uint8_t *lpucCardType); - -// uFCoder PRO MODE -DL_API UFR_STATUS GetReaderProMode(uint32_t *pReaderProMode, uint32_t *pReaderProConfig); -DL_API UFR_STATUS SetReaderProMode(const uint32_t ReaderProMode); - - -// QR barcode crypt algorithm -// initialization. with TB serial like 'TB123456' -DL_API UFR_STATUS CardEncryption_Initialize(const uint8_t *TBSerialString, uint16_t job_number); - -// You must define 25 bytes array in memory for CardSerialString[] -DL_API -UFR_STATUS CardEncryption_GetNextEncryptedCard(const uint32_t from_timestamp, const uint32_t to_timestamp, - uint8_t CardSerialString[25]); - -DL_API -UFR_STATUS CardEncryption_GetActualCardSN(uint32_t *ActualCard_SN, uint32_t *ActualCard_SN_LOG); -DL_API -UFR_STATUS CardEncryption_GetJobSN(uint32_t *JobSN); -DL_API -UFR_STATUS CardEncryption_GetSalterSN(uint8_t SalterSN[8], uint8_t * magicByte); - -DL_API UFR_STATUS read_ndef_record(uint8_t message_nr, uint8_t record_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length); -DL_API UFR_STATUS write_ndef_record(uint8_t message_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length, uint8_t *card_formated); -DL_API UFR_STATUS get_ndef_record_count(uint8_t *ndef_message_cnt, uint8_t *ndef_record_cnt, uint8_t *ndef_record_array, uint8_t *empty_ndef_message_cnt); -DL_API UFR_STATUS erase_last_ndef_record(uint8_t message_nr); -DL_API UFR_STATUS erase_all_ndef_records(uint8_t message_nr); -DL_API UFR_STATUS ndef_card_initialization(void); - -DL_API UFR_STATUS SetAsyncCardIdSendConfig(uint8_t send_enable, - uint8_t prefix_enable, uint8_t prefix, uint8_t suffix, - uint8_t send_removed_enable, uint32_t async_baud_rate); - -DL_API UFR_STATUS GetAsyncCardIdSendConfig(uint8_t *send_enable, - uint8_t *prefix_enable, uint8_t *prefix, uint8_t *suffix, - uint8_t *send_removed_enable, uint32_t *async_baud_rate); - -/***************************************************************************** - * AIS FUNCTIONS - ***************************************************************************** - */ - -/** - * ais_get_card_number() read assigned serial number from AIS cards - * - * @param card_number ( pointer to reserved 32 bit integer ) AIS card serial number - * @return UFR_STATUS execution status - */ -DL_API UFR_STATUS ais_get_card_number(uint32_t *card_number); - -DL_API UFR_STATUS ais_set_right_record(uint8_t record_number, uint16_t first_reader_nr, uint16_t last_reader_nr, - uint8_t start_hour, uint8_t start_minute, uint8_t end_hour, uint8_t end_minute, uint8_t *days); -DL_API UFR_STATUS ais_get_right_record(uint8_t record_number, uint16_t *first_reader_nr, uint16_t *last_reader_nr, - uint8_t *start_hour, uint8_t *start_minute, uint8_t *end_hour, uint8_t *end_minute, uint8_t *days); -DL_API UFR_STATUS ais_erase_right_record(uint8_t record_number); -DL_API UFR_STATUS ais_set_validate_record(uint8_t begin_year, uint8_t begin_month, uint8_t begin_day, uint8_t begin_hour, uint8_t begin_minute, - uint8_t end_year, uint8_t end_month, uint8_t end_day, uint8_t end_hour, uint8_t end_minute); -DL_API UFR_STATUS ais_get_validate_record(uint8_t *begin_year, uint8_t *begin_month, uint8_t *begin_day, uint8_t *begin_hour, uint8_t *begin_minute, - uint8_t *end_year, uint8_t *end_month, uint8_t *end_day, uint8_t *end_hour, uint8_t *end_minute); -DL_API UFR_STATUS ais_set_card_type(uint8_t card_type); -DL_API UFR_STATUS ais_get_card_type(uint8_t *card_type); -DL_API UFR_STATUS ais_set_card_daily_duration(uint16_t duration); -DL_API UFR_STATUS ais_get_card_daily_duration(uint16_t *duration); -DL_API UFR_STATUS ais_set_card_total_duration(uint32_t duration); -DL_API UFR_STATUS ais_get_card_total_duration(uint32_t *duration); - -// swimming pool ************************************************************** -/** - * ais_get_credit_and_period_validity() > get information about credit and period of validity - * - * @param credit ( pointer to integer ) : - * @param begin_year ( pointer to integer ) : - * @param begin_month ( pointer to integer ) : - * @param begin_day ( pointer to integer ) : - * @param begin_hour ( pointer to integer ) : - * @param begin_minute ( pointer to integer ) : - * @param end_year ( pointer to integer ) : - * @param end_month ( pointer to integer ) : - * @param end_day ( pointer to integer ) : - * @param end_hour ( pointer to integer ) : - * @param end_minute ( pointer to integer ) : - * @return - */ -DL_API UFR_STATUS ais_get_credit_and_period_validity(int32_t *credit, - uint32_t *begin_year, uint32_t *begin_month, uint32_t *begin_day, - uint32_t *begin_hour, - uint32_t *begin_minute, // - uint32_t *end_year, uint32_t *end_month, uint32_t *end_day, - uint32_t *end_hour, uint32_t *end_minute); - -/** - * ais_set_credit_and_period_validity() > set credit and period of validity - * - * @param credit ( integer ) : - * @param begin_year ( integer ) : - * @param begin_month ( integer ) : - * @param begin_day ( integer ) : - * @param begin_hour ( integer ) : - * @param begin_minute ( integer ) : - * @param end_year ( integer ) : - * @param end_month ( integer ) : - * @param end_day ( integer ) : - * @param end_hour ( integer ) : - * @param end_minute ( integer ) : - * @return - */ -DL_API UFR_STATUS ais_set_credit_and_period_validity(int32_t credit, - uint32_t begin_year, uint32_t begin_month, uint32_t begin_day, - uint32_t begin_hour, - uint32_t begin_minute, // - uint32_t end_year, uint32_t end_month, uint32_t end_day, - uint32_t end_hour, uint32_t end_minute); -//============================================================================= - -DL_API UFR_STATUS UfrXrcLockOn(uint16_t pulse_duration); -DL_API UFR_STATUS UfrXrcRelayState(uint8_t state); -DL_API UFR_STATUS UfrXrcGetIoState(uint8_t *intercom, uint8_t *door, uint8_t *relay_state); -DL_API UFR_STATUS UfrRedLightControl(uint8_t light_status); - -// DESFIRE functions ************************************************************** - -/** - * - * @param chaining - * @param timeout - * @param block_length - * @param snd_data_array - * @param rcv_length - * @param rcv_data_array - * @param ufr_status - * @return - */ -DL_API -UFR_STATUS uFR_i_block_transceive(uint8_t chaining, uint8_t timeout, - uint8_t block_length, uint8_t *snd_data_array, size_t *rcv_length, - uint8_t *rcv_data_array, uint32_t *ufr_status); - -DL_API -UFR_STATUS DES_to_AES_key_type(void); - -DL_API -UFR_STATUS AES_to_DES_key_type(void); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -DL_API -UFR_STATUS uFR_int_GetDesfireUid(uint8_t aes_key_nr, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); -DL_API -UFR_STATUS uFR_int_GetDesfireUid_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFreeMem(uint32_t *free_mem_byte, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCard(uint8_t aes_key_nr, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCard_PK(uint8_t *aes_key_ext, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile(uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_no_auth(uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile(uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_no_auth(uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication(uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_no_auth(uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplication(uint8_t aes_key_nr, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplication_PK(uint8_t *aes_key_ext, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireSetConfiguration(uint8_t aes_key_nr, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireSetConfiguration_PK(uint8_t *aes_key_ext, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettings(uint8_t aes_key_nr, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettings_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettings(uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettings_PK(uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -// all keys are in reader -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey_A(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key_nr, uint8_t aid_key_no, uint8_t old_aes_key_nr, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_SetParam(uint8_t aes_key[16], uint8_t key_no, - uint32_t aid_nr, uint8_t file_id); - -DL_API -UFR_STATUS uFR_int_DesfireWriteAesKey(uint8_t aes_key_no, uint8_t *aes_key); - -//--------------------------------------------------------------------------- - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_no_auth(uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile(uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_PK(uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_no_auth(uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//################# M U L T I R E A D E R S U P P O R T ################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# -//############################################################################# - -//-------------------------------------------------------------------------------------------------- - -DL_API UFR_STATUS ReaderList_UpdateAndGetCount(int32_t * NumberOfDevices); - -DL_API UFR_STATUS ReaderList_GetSerialByIndex(int32_t DeviceIndex, uint32_t *lpulSerialNumber); -DL_API UFR_STATUS ReaderList_GetSerialDescriptionByIndex(int32_t DeviceIndex, uint8_t pSerialDescription[8]); - -DL_API UFR_STATUS ReaderList_GetTypeByIndex(int32_t DeviceIndex, uint32_t *lpulReaderType); - -DL_API UFR_STATUS ReaderList_GetFTDISerialByIndex(int32_t DeviceIndex, char ** Device_Serial); -DL_API UFR_STATUS ReaderList_GetFTDIDescriptionByIndex(int32_t DeviceIndex, char ** Device_Description); - -DL_API UFR_STATUS ReaderList_OpenByIndex(const int32_t DeviceIndex, UFR_HANDLE *hndUFR); - -// not implemented -//DL_API UFR_STATUS ReaderList_OpenBySerial(const char Device_SN[16], UFR_HANDLE *hndUFR); -//-------------------------------------------------------------------------------------------------- - -// open first/next Reader and return handle - better to use ReaderList_OpenByIndex() -DL_API UFR_STATUS ReaderOpenM(UFR_HANDLE *hndUFR); -DL_API UFR_STATUS ReaderResetM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS ReaderCloseM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS ReaderSoftRestartM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS GetReaderTypeM(UFR_HANDLE hndUFR, uint32_t *lpulReaderType); -DL_API UFR_STATUS GetReaderSerialNumberM(UFR_HANDLE hndUFR, uint32_t *lpulSerialNumber); -DL_API UFR_STATUS ReaderKeyWriteM(UFR_HANDLE hndUFR, const uint8_t *aucKey, uint8_t ucKeyIndex); -DL_API UFR_STATUS ReaderKeysLockM(UFR_HANDLE hndUFR, const uint8_t *password); -DL_API UFR_STATUS ReaderKeysUnlockM(UFR_HANDLE hndUFR, const uint8_t *password); -DL_API UFR_STATUS ReaderUISignalM(UFR_HANDLE hndUFR, uint8_t light_signal_mode, - uint8_t beep_signal_mode); -DL_API UFR_STATUS ReadUserDataM(UFR_HANDLE hndUFR, uint8_t *aucData); -DL_API UFR_STATUS WriteUserDataM(UFR_HANDLE hndUFR, const uint8_t *aucData); -DL_API UFR_STATUS GetCardIdM(UFR_HANDLE hndUFR, uint8_t *lpucCardType, uint32_t *lpulCardSerial); -DL_API UFR_STATUS BlockReadM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockWriteM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorReadM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS BlockInSectorWriteM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS LinearReadM(UFR_HANDLE hndUFR, uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesReturned, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearWriteM(UFR_HANDLE hndUFR, const uint8_t *aucData, - uint16_t usLinearAddress, - uint16_t usDataLength, - uint16_t *lpusBytesWritten, - uint8_t ucKeyMode, - uint8_t ucReaderKeyIndex); -DL_API UFR_STATUS LinearFormatCardM(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWriteM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS SectorTrailerWriteUnsafeM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockReadM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorReadM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockWriteM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorWriteM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockIncrementM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorIncrementM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockDecrementM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - uint8_t key_index); -DL_API UFR_STATUS ValueBlockInSectorDecrementM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - uint8_t key_index); - -DL_API UFR_STATUS BlockRead_AKM1M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM1M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM1M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM1M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM1M(UFR_HANDLE hndUFR, uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM1M(UFR_HANDLE hndUFR, const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM1M(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM1M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM1M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM1M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM1M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM1M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM1M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM1M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM1M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM1M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM1M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_AKM2M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockWrite_AKM2M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorRead_AKM2M(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS BlockInSectorWrite_AKM2M(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS LinearRead_AKM2M(UFR_HANDLE hndUFR, uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode); -DL_API UFR_STATUS LinearWrite_AKM2M(UFR_HANDLE hndUFR, const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode); -DL_API UFR_STATUS LinearFormatCard_AKM2M(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWrite_AKM2M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_AKM2M(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockRead_AKM2M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorRead_AKM2M(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockWrite_AKM2M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorWrite_AKM2M(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockIncrement_AKM2M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorIncrement_AKM2M(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockDecrement_AKM2M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode); -DL_API UFR_STATUS ValueBlockInSectorDecrement_AKM2M(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode); - -DL_API UFR_STATUS BlockRead_PKM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockWrite_PKM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorRead_PKM(UFR_HANDLE hndUFR, uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS BlockInSectorWrite_PKM(UFR_HANDLE hndUFR, const uint8_t *data, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearRead_PKM(UFR_HANDLE hndUFR, uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_returned, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearWrite_PKM(UFR_HANDLE hndUFR, const uint8_t *data, - uint16_t linear_address, - uint16_t length, - uint16_t *bytes_written, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS LinearFormatCard_PKM(UFR_HANDLE hndUFR, const uint8_t *new_key_A, - uint8_t blocks_access_bits, - uint8_t sector_trailers_access_bits, - uint8_t sector_trailers_byte9, - const uint8_t *new_key_B, - uint8_t *lpucSectorsFormatted, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWrite_PKM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *new_key_A, - uint8_t block0_access_bits, - uint8_t block1_access_bits, - uint8_t block2_access_bits, - uint8_t sector_trailer_access_bits, - uint8_t sector_trailer_byte9, - const uint8_t *new_key_B, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS SectorTrailerWriteUnsafe_PKM(UFR_HANDLE hndUFR, uint8_t addressing_mode, - uint8_t address, - const uint8_t *sector_trailer, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockRead_PKM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorRead_PKM(UFR_HANDLE hndUFR, int32_t *value, - uint8_t *value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockWrite_PKM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorWrite_PKM(UFR_HANDLE hndUFR, int32_t value, - uint8_t value_addr, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockIncrement_PKM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorIncrement_PKM(UFR_HANDLE hndUFR, int32_t increment_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockDecrement_PKM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t block_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS ValueBlockInSectorDecrement_PKM(UFR_HANDLE hndUFR, int32_t decrement_value, - uint8_t sector_address, - uint8_t block_in_sector_address, - uint8_t auth_mode, - const uint8_t *key); -DL_API UFR_STATUS GetReaderHardwareVersionM(UFR_HANDLE hndUFR, uint8_t *version_major, - uint8_t *version_minor); -DL_API UFR_STATUS GetReaderFirmwareVersionM(UFR_HANDLE hndUFR, uint8_t *version_major, - uint8_t *version_minor); - -// New commands (for RTC & I2C EEPROM): -DL_API UFR_STATUS GetReaderTimeM(UFR_HANDLE hndUFR, uint8_t *time); -DL_API UFR_STATUS SetReaderTimeM(UFR_HANDLE hndUFR, uint8_t *password, uint8_t *time); -DL_API UFR_STATUS ChangeReaderPasswordM(UFR_HANDLE hndUFR, uint8_t *old_password, uint8_t *new_password); -DL_API UFR_STATUS ReaderEepromWriteM(UFR_HANDLE hndUFR, uint8_t *data, uint32_t address, uint32_t size, uint8_t *password); -DL_API UFR_STATUS ReaderEepromReadM(UFR_HANDLE hndUFR, uint8_t *data, uint32_t address, uint32_t size); -DL_API UFR_STATUS ChangeReaderJobIdM(UFR_HANDLE hndUFR, uint8_t *job_id, uint8_t *new_password); - -DL_API UFR_STATUS GetReaderSerialDescriptionM(UFR_HANDLE hndUFR, uint8_t pSerialDescription[8]); -DL_API UFR_STATUS SetReaderSerialDescriptionM(UFR_HANDLE hndUFR, const uint8_t pSerialDescription[8]); - -// New since version 2.0: -DL_API UFR_STATUS GetBuildNumberM(UFR_HANDLE hndUFR, uint8_t *build); -DL_API UFR_STATUS GetCardIdExM(UFR_HANDLE hndUFR, uint8_t *lpucSak, - uint8_t *aucUid, uint8_t *lpucUidSize); -DL_API UFR_STATUS EnableAntiCollM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS DisableAntiCollM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS EnumCardsM(UFR_HANDLE hndUFR, uint8_t *lpucCardsNumber, - uint8_t *lpucUidListSize); -DL_API UFR_STATUS ListCardsM(UFR_HANDLE hndUFR, uint8_t *aucUidList, - uint8_t ucUidListSize); // Before calling this function you must call EnumCardsM() first. -DL_API UFR_STATUS SelectCardM(UFR_HANDLE hndUFR, const uint8_t *aucUid, - uint8_t ucUidSize, uint8_t *lpucSak); -DL_API UFR_STATUS DeslectCardM(UFR_HANDLE hndUFR); -DL_API UFR_STATUS GetAntiCollStatusM(UFR_HANDLE hndUFR, int8_t *lpcIsAntiCollEnabled, - int8_t *lpcIsAnyCardSelected); - - -DL_API UFR_STATUS GetDlogicCardTypeM(UFR_HANDLE hndUFR, uint8_t *lpucCardType); - -// uFCoder PRO MODE -DL_API UFR_STATUS GetReaderProModeM(UFR_HANDLE hndUFR, uint32_t *pReaderProMode, uint32_t *pReaderProConfig); -DL_API UFR_STATUS SetReaderProModeM(UFR_HANDLE hndUFR, const uint32_t ReaderProMode); - -// QR barcode crypt algorithm -// initialization. with TB serial like 'TB123456' -DL_API UFR_STATUS CardEncryption_InitializeM(UFR_HANDLE hndUFR, const uint8_t *TBSerialString, uint16_t job_number); - -// You must define 25 bytes array in memory for CardSerialString[] -DL_API -UFR_STATUS CardEncryption_GetNextEncryptedCardM(UFR_HANDLE hndUFR, const uint32_t from_timestamp, const uint32_t to_timestamp, - uint8_t CardSerialString[25]); - -DL_API -UFR_STATUS CardEncryption_GetActualCardSNM(UFR_HANDLE hndUFR, uint32_t *ActualCard_SN, uint32_t *ActualCard_SN_LOG); -DL_API -UFR_STATUS CardEncryption_GetJobSNM(UFR_HANDLE hndUFR, uint32_t *JobSN); -DL_API -UFR_STATUS CardEncryption_GetSalterSNM(UFR_HANDLE hndUFR, uint8_t SalterSN[8], uint8_t * magicByte); - -DL_API UFR_STATUS read_ndef_recordM(UFR_HANDLE hndUFR, uint8_t message_nr, uint8_t record_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length); -DL_API UFR_STATUS write_ndef_recordM(UFR_HANDLE hndUFR, uint8_t message_nr, uint8_t *tnf, uint8_t *type_record, uint8_t *type_length, uint8_t *id, uint8_t *id_length, - uint8_t *payload, uint32_t *payload_length, uint8_t *card_formated); -DL_API UFR_STATUS get_ndef_record_countM(UFR_HANDLE hndUFR, uint8_t *ndef_message_cnt, uint8_t *ndef_record_cnt, uint8_t *ndef_record_array, uint8_t *empty_ndef_message_cnt); -DL_API UFR_STATUS erase_last_ndef_recordM(UFR_HANDLE hndUFR, uint8_t message_nr); -DL_API UFR_STATUS erase_all_ndef_recordsM(UFR_HANDLE hndUFR, uint8_t message_nr); -DL_API UFR_STATUS ndef_card_initializationM(UFR_HANDLE hndUFR); - -DL_API UFR_STATUS SetAsyncCardIdSendConfigM(UFR_HANDLE hndUFR, - uint8_t send_enable, uint8_t prefix_enable, uint8_t prefix, - uint8_t suffix, uint8_t send_removed_enable, uint32_t async_baud_rate); - -DL_API UFR_STATUS GetAsyncCardIdSendConfigM(UFR_HANDLE hndUFR, - uint8_t *send_enable, uint8_t *prefix_enable, uint8_t *prefix, - uint8_t *suffix, uint8_t *send_removed_enable, uint32_t *async_baud_rate); - -/***************************************************************************** - * AIS FUNCTIONS - ***************************************************************************** - */ - -DL_API UFR_STATUS ais_get_card_numberM(UFR_HANDLE hndUFR, uint32_t *card_number); - -DL_API UFR_STATUS ais_set_right_recordM(UFR_HANDLE hndUFR, - uint8_t record_number, uint16_t first_reader_nr, - uint16_t last_reader_nr, uint8_t start_hour, uint8_t start_minute, - uint8_t end_hour, uint8_t end_minute, uint8_t *days); -DL_API UFR_STATUS ais_get_right_recordM(UFR_HANDLE hndUFR, - uint8_t record_number, uint16_t *first_reader_nr, - uint16_t *last_reader_nr, uint8_t *start_hour, - uint8_t *start_minute, uint8_t *end_hour, uint8_t *end_minute, - uint8_t *days); -DL_API UFR_STATUS ais_erase_right_recordM(UFR_HANDLE hndUFR, - uint8_t record_number); -DL_API UFR_STATUS ais_set_validate_recordM(UFR_HANDLE hndUFR, - uint8_t begin_year, uint8_t begin_month, uint8_t begin_day, - uint8_t begin_hour, uint8_t begin_minute, uint8_t end_year, - uint8_t end_month, uint8_t end_day, uint8_t end_hour, - uint8_t end_minute); -DL_API UFR_STATUS ais_get_validate_recordM(UFR_HANDLE hndUFR, - uint8_t *begin_year, uint8_t *begin_month, uint8_t *begin_day, - uint8_t *begin_hour, uint8_t *begin_minute, uint8_t *end_year, - uint8_t *end_month, uint8_t *end_day, uint8_t *end_hour, - uint8_t *end_minute); -DL_API UFR_STATUS ais_set_card_typeM(UFR_HANDLE hndUFR, uint8_t card_type); -DL_API UFR_STATUS ais_get_card_typeM(UFR_HANDLE hndUFR, uint8_t *card_type); -DL_API UFR_STATUS ais_set_card_daily_durationM(UFR_HANDLE hndUFR, uint16_t duration); -DL_API UFR_STATUS ais_get_card_daily_durationM(UFR_HANDLE hndUFR, uint16_t *duration); -DL_API UFR_STATUS ais_set_card_total_durationM(UFR_HANDLE hndUFR, uint32_t duration); -DL_API UFR_STATUS ais_get_card_total_durationM(UFR_HANDLE hndUFR, uint32_t *duration); - -// swimming pool ************************************************************** - -DL_API UFR_STATUS ais_get_credit_and_period_validityM(UFR_HANDLE hndUFR, - int32_t *credit, uint32_t *begin_year, uint32_t *begin_month, - uint32_t *begin_day, uint32_t *begin_hour, uint32_t *begin_minute, // - uint32_t *end_year, uint32_t *end_month, uint32_t *end_day, - uint32_t *end_hour, uint32_t *end_minute); - -DL_API UFR_STATUS ais_set_credit_and_period_validityM(UFR_HANDLE hndUFR, - int32_t credit, uint32_t begin_year, uint32_t begin_month, - uint32_t begin_day, uint32_t begin_hour, uint32_t begin_minute, // - uint32_t end_year, uint32_t end_month, uint32_t end_day, - uint32_t end_hour, uint32_t end_minute); -//============================================================================= - -DL_API UFR_STATUS UfrXrcLockOnM(UFR_HANDLE hndUFR, uint16_t pulse_duration); -DL_API UFR_STATUS UfrXrcRelayStateM(UFR_HANDLE hndUFR, uint8_t state); -DL_API UFR_STATUS UfrXrcGetIoStateM(UFR_HANDLE hndUFR, uint8_t *intercom, uint8_t *door, uint8_t *relay_state); -DL_API UFR_STATUS UfrRedLightControlM(UFR_HANDLE hndUFR, uint8_t light_status); - -//############################################################################# -//############################################################################# - - -DL_API -UFR_STATUS uFR_i_block_transceiveM(UFR_HANDLE hndUFR, uint8_t chaining, - uint8_t timeout, uint8_t block_length, uint8_t *snd_data_array, - size_t *rcv_length, uint8_t *rcv_data_array, uint32_t *ufr_status); - -//############################################################################# - -//DL_API -//void print_desfire_version(struct mifare_desfire_version_info *desfire_version); - -typedef void * HND; - -DL_API -UFR_STATUS uFR_DESFIRE_Start(void); - -DL_API -UFR_STATUS uFR_DESFIRE_Stop(void); - -DL_API -HND -uFR_mifare_desfire_tag_new (void); - -DL_API -void -uFR_mifare_desfire_tag_free (HND tag); - -DL_API -HND -uFR_mifare_desfire_des_key_new (uint8_t value[8]); - -DL_API -int uFR_mifare_desfire_get_key_settings (HND tag, uint8_t *settings, uint8_t *max_keys); - -DL_API -void -uFR_mifare_desfire_key_free (HND key); - -DL_API -HND -uFR_mifare_desfire_aes_key_new_with_version (uint8_t value[16], uint8_t version); - -DL_API -int -uFR_mifare_desfire_change_key (HND tag, uint8_t key_no, HND new_key, HND old_key); - -DL_API -int -uFR_mifare_desfire_authenticate (HND tag, uint8_t key_no, HND key); - -DL_API -int -uFR_mifare_desfire_authenticate_aes (HND tag, uint8_t key_no, HND key); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -DL_API -UFR_STATUS uFR_int_GetDesfireUidM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_GetDesfireUid_PK_M(UFR_HANDLE hndUFR,uint8_t *aes_key_ext, uint32_t aid, - uint8_t aid_key_nr, uint8_t *card_uid, uint8_t *card_uid_len, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFreeMemM(UFR_HANDLE hndUFR, uint32_t *free_mem_byte, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCardM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireFormatCard_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFileM(UFR_HANDLE hndUFR,uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateStdDataFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t file_id, uint32_t file_size, - uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no, - uint8_t communication_settings, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFileM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t file_id, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplicationM(UFR_HANDLE hndUFR,uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireCreateAesApplication_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, - uint8_t setting, uint8_t max_key_no, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplicationM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireDeleteApplication_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint16_t *card_status, uint16_t *exec_time); - - -DL_API -UFR_STATUS uFR_int_DesfireSetConfigurationM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireSetConfiguration_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint8_t random_uid, uint8_t format_disable, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettingsM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireGetKeySettings_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint8_t *setting, uint8_t *max_key_no, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettingsM(UFR_HANDLE hndUFR,uint8_t aes_key_nr, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeKeySettings_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, - uint8_t setting, uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKeyM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireChangeAesKey_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_no_auth, - uint8_t new_aes_key[16], uint8_t aid_key_no, uint8_t old_aes_key[16], - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_SetParamM(UFR_HANDLE hndUFR, uint8_t aes_key[16], uint8_t key_no, - uint32_t aid_nr, uint8_t file_id); - - -//--------------------------------------------------------------------------- - -DL_API -UFR_STATUS uFR_int_DesfireReaStddDataFileM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireReadStdDataFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFileM(UFR_HANDLE hndUFR, uint8_t aes_key_nr, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_PK_M(UFR_HANDLE hndUFR, uint8_t *aes_key_ext, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -DL_API -UFR_STATUS uFR_int_DesfireWriteStdDataFile_no_auth_M(UFR_HANDLE hndUFR, uint32_t aid, uint8_t aid_key_nr, uint8_t file_id, - uint16_t offset, uint16_t data_length, - uint8_t communication_settings, uint8_t *data, - uint16_t *card_status, uint16_t *exec_time); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -// DLL version ---------------------------------------------------------------- -DL_API uint32_t GetDllVersion(void); - -/* - * Get "exploded" dll version example: - * - * #include - * #include - * - * void main(int argc, char *argv[]) - * { - * uint32_t dwDllVersion = 0; - * uint32_t dwDllMajorVersion = 0; - * uint32_t dwDllMinorVersion = 0; - * uint32_t dwDllBuild = 0; - * - * dwDllVersion = GetDllVersion(); - * - * // "explode" the dll version: - * dwDllMajorVersion = (DWORD)(LOBYTE(LOWORD(dwDllVersion))); - * dwDllMinorVersion = (DWORD)(HIBYTE(LOWORD(dwDllVersion))); - * - * // Get the dll build number. - * dwDllBuild = (DWORD)(HIWORD(dwDllVersion)); - * - * printf("Dll version is %ld.%ld (%ld)\n", dwDllMajorVersion, - * dwDllMinorVersion, - * dwDllBuild); - * } - * - */ - - -//// debug function - -DL_API chr_ptr GetDllVersionStr(void); - -DL_API chr_ptr UFR_Status2String(const UFR_STATUS status); - -DL_API void error_get(void *out, int32_t *size); - -DL_API chr_ptr GetReaderDescription(void); -DL_API chr_ptr GetReaderDescriptionM(UFR_HANDLE hndUFR); - -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -DL_API UFR_STATUS test_i_block(void); -DL_API UFR_STATUS test_desfire_ver(void); - -#ifdef __cplusplus -} -#endif - -#endif /* uFCoder_H_ */ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.pas deleted file mode 100644 index 98d96f316f10a97956319e8c9b75f47e030790ee..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder.pas +++ /dev/null @@ -1,129 +0,0 @@ - -unit uFCoder; - -interface -const - MIFARE_CLASSIC_1k = $08; -const - MF1ICS50 = $08; -const - SLE66R35 = $88; -const - MIFARE_CLASSIC_4k = $18; -const - MF1ICS70 = $18; -const - MIFARE_CLASSIC_MINI = $09; -const - MF1ICS20 = $09; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - - -const DLL_NAME = 'uFCoder-x86.dll'; -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - MAX_BLOCK = 15; - FORMAT_SIGN = $FF; - KEY_INDEX = 0; - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_mode: Byte;sound_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; - - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData :PByte; - usLinearAddress : Word; - usDataLength : Word; - var iBytesReturned: Word; - ucKeyMode : Byte; - ucReaderKeyIndex : Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder1x.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder1x.dcu deleted file mode 100644 index 12c5a5a61ea8268237f1f5424dfe0a0ca9185c4a..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder1x.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder1x.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder1x.~pas deleted file mode 100644 index 7c62de4bee67e293bb976170c34a260462605f8b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder1x.~pas +++ /dev/null @@ -1,129 +0,0 @@ - -unit uFCoder1x; - -interface -const - MIFARE_CLASSIC_1k = $08; -const - MF1ICS50 = $08; -const - SLE66R35 = $88; -const - MIFARE_CLASSIC_4k = $18; -const - MF1ICS70 = $18; -const - MIFARE_CLASSIC_MINI = $09; -const - MF1ICS20 = $09; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - - -const DLL_NAME = 'uFCoder1x-x86.dll' -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - MAX_BLOCK = 15; - FORMAT_SIGN = $FF; - KEY_INDEX = 0; - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_mode: Byte;sound_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; - - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData :PByte; - usLinearAddress : Word; - usDataLength : Word; - var iBytesReturned: Word; - ucKeyMode : Byte; - ucReaderKeyIndex : Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_coff-x86_64.lib b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_coff-x86_64.lib deleted file mode 100644 index cb2f101bab717bf1fe4a597c5aa2c8c66b5aea13..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_coff-x86_64.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_coff.lib b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_omf.lib b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.cfg b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dof b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dof deleted file mode 100644 index ed723d98874941c369f061f16193212d10f5d07e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Formating keys card and key of reader card .Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dpr b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dpr deleted file mode 100644 index 23245c02e12397156a833926aee8cc30f26e102b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dpr +++ /dev/null @@ -1,16 +0,0 @@ -program uFrSimple; - -uses - Forms, - uFSimple in 'uFSimple.pas' {frmuFrSimple}, - uFCoder in 'uFCoder.pas'; - -{$R *.res} - - -begin - Application.Initialize; - Application.Title := 'uFr Simple'; - Application.CreateForm(TfrmuFrSimple, frmuFrSimple); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dproj b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dproj deleted file mode 100644 index 18712a590fc365ee25789742a9720f415a47c913..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dproj +++ /dev/null @@ -1,113 +0,0 @@ - - - {0C74540E-1898-4398-8158-E242B3117DFD} - uFRSimple.dpr - True - Debug - 1 - Application - VCL - 16.1 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - 00400000 - 1 - Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) - uFRSimple - vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel;$(DCC_UsePackage) - true - 2074 - false - false - 2 - false - 1 - true - CompanyName=D-Logic;FileDescription=Formating keys card and key of reader card .Support for 4k;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0.0.0;Comments= - false - - - uFRSimple_Icon.ico - 1033 - true - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - $(BDS)\bin\default_app.manifest - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - - - uFRSimple_Icon.ico - - - 0 - false - 0 - RELEASE;$(DCC_Define) - - - true - DEBUG;$(DCC_Define) - false - - - - MainSource - - -
frmuFrSimple
-
- - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - - - - - uFRSimple.dpr - - - - True - False - - - 12 - - - -
diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dproj.local b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dproj.local deleted file mode 100644 index c2729136440cae2ee5a7a3ec0f4bf7062d20e963..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.dproj.local +++ /dev/null @@ -1,6 +0,0 @@ - - - - 2015.04.03 13:15:29.956,D:\d-logic\svn_repo\sw_open\ufr\delphi\examples\trunk\uFCoder\2.0.0\uFCoderSimple\uFCoder.pas=D:\d-logic\svn_repo\sw_open\ufr\delphi\examples\trunk\uFCoder\2.0.0\uFCoderSimple\uFCoder1x.pas - - diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.exe b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.exe deleted file mode 100644 index 78684a74ec13b63d4b10783382cc39e77e14264a..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.identcache b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.identcache deleted file mode 100644 index 4c9716950f1f2987545654153bee05f17285895f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.identcache and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.res b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.res deleted file mode 100644 index fbaca376ee9a178564ffeb78afeae98e456e7f34..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple.res and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple_Icon.ico b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple_Icon.ico deleted file mode 100644 index cfd8992a5b8ff4b89478d89e93ae9205bb8125ef..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFRSimple_Icon.ico and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.dcu deleted file mode 100644 index 1872c3379a9b770e92c86d967c5bccc2354efca9..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.dfm deleted file mode 100644 index 531f01819a194887bd492c657fa72e942f690818..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.dfm +++ /dev/null @@ -1,763 +0,0 @@ -object frmuFrSimple: TfrmuFrSimple - Left = 424 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simple ' - ClientHeight = 636 - ClientWidth = 516 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMain - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 516 - Height = 182 - Align = alTop - Caption = ' ' - TabOrder = 0 - object lblReaderType: TLabel - Left = 27 - Top = 24 - Width = 72 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 27 - Top = 48 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 273 - Top = 24 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 273 - Top = 48 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 27 - Top = 80 - Width = 477 - Height = 6 - end - object lblLightMode: TLabel - Left = 47 - Top = 104 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 47 - Top = 128 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 405 - Top = 24 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 160 - Width = 514 - Height = 21 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtReaderType: TEdit - Left = 118 - Top = 22 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtReaderSerial: TEdit - Left = 118 - Top = 46 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object txtCardType: TEdit - Left = 343 - Top = 22 - Width = 34 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object cboLightMode: TComboBox - Left = 138 - Top = 99 - Width = 115 - Height = 21 - Ctl3D = False - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 4 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 138 - Top = 123 - Width = 115 - Height = 21 - Ctl3D = False - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUISignal: TButton - Left = 304 - Top = 99 - Width = 173 - Height = 45 - Cursor = crHandPoint - Caption = 'READER UI SIGNAL' - TabOrder = 6 - OnClick = btnReaderUISignalClick - end - object txtCardUIDSize: TEdit - Left = 465 - Top = 22 - Width = 34 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 7 - end - object txtCardSerial: TEdit - Left = 344 - Top = 46 - Width = 156 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - end - object pnlFormattCard: TPanel - Left = 0 - Top = 213 - Width = 516 - Height = 132 - Align = alTop - BorderStyle = bsSingle - Caption = ' ' - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object pgNewCardReaderKeys: TPageControl - Left = 24 - Top = 8 - Width = 449 - Height = 113 - ActivePage = tabNewCardKeys - TabOrder = 0 - object tabNewCardKeys: TTabSheet - Caption = 'New Card Keys' - object lblKeyB: TLabel - Left = 24 - Top = 33 - Width = 34 - Height = 13 - Caption = 'Key B' - end - object lblKeyA: TLabel - Left = 24 - Top = 10 - Width = 34 - Height = 13 - Caption = 'Key A' - end - object lblSectorFormatted: TLabel - Left = 273 - Top = 61 - Width = 99 - Height = 13 - Alignment = taCenter - Caption = 'Sector Formatted' - end - object chkNewCardKeysHex: TCheckBox - Left = 72 - Top = 59 - Width = 65 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - OnClick = chkNewCardKeysHexClick - end - object btnFormatCardKeys: TButton - Left = 271 - Top = 4 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnFormatCardKeysClick - end - object txtSectorForrmatted: TEdit - Left = 400 - Top = 53 - Width = 33 - Height = 24 - Color = clSilver - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object pnlNewCardKeys: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 53 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - object tabNewRaedarKey: TTabSheet - Caption = 'New Reader Key' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblKeyIndex: TLabel - Left = 163 - Top = 56 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object btnFormatReaderKey: TButton - Left = 271 - Top = 18 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnClick = btnFormatReaderKeyClick - end - object chkNewReaderKeyHex: TCheckBox - Left = 74 - Top = 51 - Width = 52 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - OnClick = chkNewReaderKeyHexClick - end - object txtKeyIndex: TEdit - Left = 235 - Top = 51 - Width = 21 - Height = 29 - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentFont = False - ReadOnly = True - TabOrder = 2 - Text = '0' - end - object pnlNewReaderKey: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 41 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - end - end - object stbCard: TStatusBar - Left = 0 - Top = 617 - Width = 516 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlLinearRW: TPanel - Left = 0 - Top = 345 - Width = 516 - Height = 272 - Align = alClient - TabOrder = 3 - object pgLinearReadWrite: TPageControl - Left = 1 - Top = 1 - Width = 514 - Height = 251 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 0 - object tabLinearRead: TTabSheet - Caption = 'Linear Read' - object Label1: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLRLinearAddress - end - object lblReadData: TLabel - Left = 7 - Top = 3 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLRDataLength - end - object lblReadBytes: TLabel - Left = 182 - Top = 186 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - FocusControl = txtReadBytes - end - object txtLRLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLRDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearRead: TRichEdit - Left = 8 - Top = 20 - Width = 467 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - end - end - object tabLinearWrite: TTabSheet - Caption = 'Linear Write' - ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - object lblLWLinearAddress: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLWLinearAddress - end - object lblWriteData: TLabel - Left = 6 - Top = 3 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblRWDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLWDataLength - end - object Label2: TLabel - Left = 182 - Top = 186 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - FocusControl = txtBytesWritten - end - object txtLWLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLWDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearWrite: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearWrite: TRichEdit - Left = 8 - Top = 20 - Width = 466 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - OnChange = txtLinearWriteChange - end - end - end - object stbFunction: TStatusBar - Left = 1 - Top = 252 - Width = 514 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 107 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - end - object pnlAuth: TPanel - Left = 0 - Top = 182 - Width = 516 - Height = 31 - Align = alTop - BevelOuter = bvLowered - Caption = ' ' - Ctl3D = True - ParentCtl3D = False - TabOrder = 4 - object rbAUTH1A: TRadioButton - Left = 103 - Top = 8 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 316 - Top = 8 - Width = 81 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 384 - Top = 488 - end - object mnuMain: TMainMenu - Left = 384 - Top = 528 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.pas deleted file mode 100644 index b16e8eee5d1abcee421124f1ef269e64ccee603e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.pas +++ /dev/null @@ -1,718 +0,0 @@ - - -unit uFSimple; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls,uFCoder1x, StdCtrls,Menus; -type - TKeyArray=array[0..5] of byte; -type - TfrmuFrSimple = class(TForm) - pnlReader: TPanel; - pnlFormattCard: TPanel; - stbCard: TStatusBar; - stbReader: TStatusBar; - pnlLinearRW: TPanel; - lblReaderType: TLabel; - txtReaderType: TEdit; - lblReaderSerial: TLabel; - txtReaderSerial: TEdit; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardSerial: TLabel; - Bevel1: TBevel; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUISignal: TButton; - Timer: TTimer; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearWrite: TTabSheet; - Label1: TLabel; - lblReadData: TLabel; - txtLRLinearAddress: TEdit; - lblDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - lblLWLinearAddress: TLabel; - lblWriteData: TLabel; - txtLWLinearAddress: TEdit; - lblRWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - mnuMain: TMainMenu; - mnuExitItem: TMenuItem; - stbFunction: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblReadBytes: TLabel; - txtReadBytes: TEdit; - Label2: TLabel; - txtBytesWritten: TEdit; - pgNewCardReaderKeys: TPageControl; - tabNewCardKeys: TTabSheet; - tabNewRaedarKey: TTabSheet; - lblKeyB: TLabel; - lblKeyA: TLabel; - chkNewCardKeysHex: TCheckBox; - btnFormatCardKeys: TButton; - lblSectorFormatted: TLabel; - txtSectorForrmatted: TEdit; - btnFormatReaderKey: TButton; - chkNewReaderKeyHex: TCheckBox; - lblKeyIndex: TLabel; - txtKeyIndex: TEdit; - pnlNewCardKeys: TPanel; - pnlNewReaderKey: TPanel; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - txtLinearWrite: TRichEdit; - txtLinearRead: TRichEdit; - txtCardSerial: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnReaderUISignalClick(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnFormatCardKeysClick(Sender: TObject); - - procedure chkNewCardKeysHexClick(Sender: TObject); - procedure chkNewReaderKeyHexClick(Sender: TObject); - procedure btnFormatReaderKeyClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - private - boFunctionStart, - boReaderStart : Boolean; - function GetFunctStart: Boolean; - procedure SetFunctStart(const Value: Boolean); - function GetReaderStart: Boolean; - procedure SetReaderStart(const Value: Boolean); - - private - boCONN :Boolean; - ERROR_CODE:array[0..200] of string; - - procedure CreateKey(key_height,key_width,key_left,key_top:Byte;key_name:string;bKeyTag:byte;pnlContainer:TPanel); - procedure OnMyKeyPress(Sender:TObject;var Key:Char); - procedure OnMyKeyExit(Sender:TObject); - procedure ConvertDecHex(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel); - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - function DecHexConversion(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel):TKeyArray; - function AuthMode:byte; - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - public - - end; -const - - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_LOCKED = 118; - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT='You must enter a number between 0 and 255 !'; - - NEW_CARD_KEY_A = 'txtNewCardKeyA'; - NEW_CARD_KEY_B = 'txtNewCardKeyB'; - NEW_READER_KEY = 'txtNewReaderKey'; - - - - -var - frmuFrSimple: TfrmuFrSimple; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimple.CreateKey(key_height, key_width, key_left,key_top: Byte; key_name: string;bKeyTag:byte; pnlContainer:TPanel); -var - br :byte; - edit_key:array[0..6] of TEdit; -begin - for br:=0 to MAX_KEY_INDEX do - begin - edit_key[br] :=TEdit.Create(self); - with edit_key[br] do - begin - Height :=key_height; - Width :=key_width; - Left :=key_left+(key_width*br+2); - Top :=key_top; - Font.Name :='Verdana'; - Font.Style :=[fsBold]; - Font.Size :=8; - MaxLength :=3; - Text :='255'; - Tag :=bKeyTag; - ReadOnly :=false; - name :=key_name+IntToStr(br); - OnKeyPress :=OnMyKeyPress; - OnExit :=OnMyKeyExit; - CharCase :=ecUpperCase; - Parent :=pnlContainer; - end; - end; - -end; - -procedure TfrmuFrSimple.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimple.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - - - CreateKey(24,30,3,3,NEW_CARD_KEY_A,1, pnlNewCardKeys); - CreateKey(24,30,3,23,NEW_CARD_KEY_B,2,pnlNewCardKeys); - CreateKey(24,30,3,8,NEW_READER_KEY,3,pnlNewReaderKey); - boCONN:=false; -end; - -procedure TfrmuFrSimple.btnReaderUISignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wReadBytes :Word; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr Then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - On Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - txtLinearRead.Clear; - New(PData); - wReadBytes := 0; - wLinearAddress := StrToInt(Trim(txtLRLinearAddress.Text)); - wDataLength := StrToInt(Trim(txtLRDataLength.Text)); - bAuthMode := AuthMode(); - bKeyIndex := StrToInt(txtKeyIndex.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - iFResult := LinearRead(PData,wLinearAddress,wDataLength,wReadBytes,bAuthMode,bKeyIndex); - - if iFResult = DL_OK then - begin - txtLinearRead.Text :=String(baReadData); - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult) - end - else - begin - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; - - -end; - -procedure TfrmuFrSimple.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - PData :PByte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOk],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOk],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PData); - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - wLinearAddress:=StrToInt(Trim(txtLWLinearAddress.Text)); - wDataLength :=StrToInt(Trim(txtLWDataLength.Text)); - PData :=PByte(txtLinearWrite.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; -end; - - - -procedure TfrmuFrSimple.btnFormatCardKeysClick(Sender: TObject); -var - PKeyA:PByte; - PKeyB:PByte; - KeyA:TKeyArray; - KeyB:TKeyArray; - bSectorsFormatted:Byte; - bBlockAccessBits, - bTrailerAccessBits, - bTrailerBits9 :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - bytes_ret:word; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - try - New(PKeyA); - New(PKeyB); - - KeyA:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - KeyB:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); - - PKeyA:=PByte(@KeyA); - PKeyB:=PByte(@KeyB); - bBlockAccessBits :=0; - bTrailerAccessBits :=1; - bTrailerBits9 :=45; - bSectorsFormatted :=0; - - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - - - iFResult:=LinearFormatCard(PKeyA,bBlockAccessBits,bTrailerAccessBits,bTrailerBits9,PKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are not formatted successfully !',mtError,[mbOK],0); - end; - except - on EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - finally - PKeyA:=nil; - PKeyB:=nil; - Dispose(PKeyA); - Dispose(PKeyB); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.chkNewCardKeysHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); -end; - -procedure TfrmuFrSimple.OnMyKeyPress(Sender: TObject; var Key: Char); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - try - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) then - begin - TB.MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else - begin - TB.MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; - except - on EConvertError do - end; -end; - - - -function TfrmuFrSimple.AuthMode: byte; -begin - if rbAUTH1A.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - -function TfrmuFrSimple.DecHexConversion(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel): TKeyArray; -var - baKeyArray:TKeyArray; - bCounter:byte; -begin - for bCounter:=0 to MAX_KEY_INDEX do - begin - if chkCheckBox.Checked then - begin - baKeyArray[bCounter]:=StrToInt(HexDisplayPrefix+(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text))); - end - else - begin - baKeyArray[bCounter]:=StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text)); - end; - end; - Result:=baKeyArray; - end; - - - - -procedure TfrmuFrSimple.ConvertDecHex(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel); -var - bBr:byte; -begin - try - for bBr:=0 to MAX_KEY_INDEX do - begin - if Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)=EmptyStr then - Continue - else - begin - if chkCheckBox.Checked then - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToHex(StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)),2); - end - else - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToStr(StrToInt(HexDisplayPrefix+Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text))); - end; - end; - end; - except - on EConvertError do - Exit; - end; -end; - -procedure TfrmuFrSimple.chkNewReaderKeyHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); -end; - -procedure TfrmuFrSimple.btnFormatReaderKeyClick(Sender: TObject); -var - PReaderKey:PByte; - baReaderKey:TKeyArray; - iFResult:DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PReaderKey); - PReaderKey:=@baReaderKey; - baReaderKey:=DecHexConversion(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); - iFResult:=ReaderKeyWrite(PReaderKey,key_index); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is not formatted successfully !',mtError,[mbOK],0); - end; - - finally - PReaderKey:=nil; - Dispose(PReaderKey); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.OnMyKeyExit(Sender: TObject); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) or (Trim(TB.Text)=EmptyStr) Then Exit; - if StrToInt(Trim(TB.Text))>255 then - begin - MessageDlg(APPROPRIATE_FORMAT,mtError,[mbOK],0); - TB.Undo(); - TB.SetFocus(); - Exit; - end; -end; - - - - -procedure TfrmuFrSimple.MainLoop; -var - iRResult, - iCResult :LongInt; - iReaderType, - iReaderSerial, - iCardSerial:LongInt; - bCardType, - bDLCardType, - bCardUIDSize, - bBr :Byte; - baCardUID:array[0..9] of Byte; - sBuffer :String; - -begin - sBuffer:=''; - SetReaderStart(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - SetStatusBar(stbReader,iRResult); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult) - end - else - begin - boCONN:=false; - ReaderClose(); - SetStatusBar(stbReader,iRResult); - end; - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder1x.DL_NTAG_216 then - btnFormatCardKeys.Enabled:=false - else - btnFormatCardKeys.Enabled:=true; - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType .Text:='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial .Text:='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - txtCardSerial .Clear; - txtCardType .Clear; - txtCardUIDSize.Clear; - btnFormatCardKeys.Enabled:=true; - SetStatusBar(stbCard,iCResult); - end; - end; - SetReaderStart(false); - -end; - -function TfrmuFrSimple.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -procedure TfrmuFrSimple.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimple.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrSimple.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - -procedure TfrmuFrSimple.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -procedure TfrmuFrSimple.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop(); -end; - -procedure TfrmuFrSimple.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(txtLinearWrite.Text)); -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~dfm deleted file mode 100644 index 1114e157e903e92412124159ef7f1e5bd1b0a2c0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~dfm +++ /dev/null @@ -1,755 +0,0 @@ -object frmuFrSimple: TfrmuFrSimple - Left = 424 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simple ' - ClientHeight = 636 - ClientWidth = 516 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMain - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 516 - Height = 182 - Align = alTop - Caption = ' ' - TabOrder = 0 - object lblReaderType: TLabel - Left = 27 - Top = 24 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 27 - Top = 48 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 273 - Top = 24 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 273 - Top = 48 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 27 - Top = 80 - Width = 477 - Height = 6 - end - object lblLightMode: TLabel - Left = 47 - Top = 104 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 47 - Top = 128 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 405 - Top = 24 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 160 - Width = 514 - Height = 21 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtReaderType: TEdit - Left = 118 - Top = 22 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtReaderSerial: TEdit - Left = 118 - Top = 46 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object txtCardType: TEdit - Left = 343 - Top = 22 - Width = 34 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object cboLightMode: TComboBox - Left = 138 - Top = 99 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 4 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 138 - Top = 123 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUISignal: TButton - Left = 304 - Top = 99 - Width = 173 - Height = 45 - Cursor = crHandPoint - Caption = 'READER UI SIGNAL' - TabOrder = 6 - OnClick = btnReaderUISignalClick - end - object txtCardUIDSize: TEdit - Left = 465 - Top = 22 - Width = 34 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 7 - end - object txtCardSerial: TEdit - Left = 344 - Top = 46 - Width = 156 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - end - object pnlFormattCard: TPanel - Left = 0 - Top = 213 - Width = 516 - Height = 132 - Align = alTop - BorderStyle = bsSingle - Caption = ' ' - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object pgNewCardReaderKeys: TPageControl - Left = 24 - Top = 8 - Width = 449 - Height = 113 - ActivePage = tabNewCardKeys - TabOrder = 0 - object tabNewCardKeys: TTabSheet - Caption = 'New Card Keys' - object lblKeyB: TLabel - Left = 24 - Top = 33 - Width = 34 - Height = 13 - Caption = 'Key B' - end - object lblKeyA: TLabel - Left = 24 - Top = 10 - Width = 34 - Height = 13 - Caption = 'Key A' - end - object lblSectorFormatted: TLabel - Left = 273 - Top = 61 - Width = 99 - Height = 13 - Alignment = taCenter - Caption = 'Sector Formatted' - end - object chkNewCardKeysHex: TCheckBox - Left = 72 - Top = 59 - Width = 65 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - OnClick = chkNewCardKeysHexClick - end - object btnFormatCardKeys: TButton - Left = 271 - Top = 4 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnFormatCardKeysClick - end - object txtSectorForrmatted: TEdit - Left = 400 - Top = 53 - Width = 33 - Height = 24 - Color = clSilver - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object pnlNewCardKeys: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 53 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - object tabNewRaedarKey: TTabSheet - Caption = 'New Reader Key' - ImageIndex = 1 - object lblKeyIndex: TLabel - Left = 163 - Top = 56 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object btnFormatReaderKey: TButton - Left = 271 - Top = 18 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnClick = btnFormatReaderKeyClick - end - object chkNewReaderKeyHex: TCheckBox - Left = 74 - Top = 51 - Width = 52 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - OnClick = chkNewReaderKeyHexClick - end - object txtKeyIndex: TEdit - Left = 235 - Top = 51 - Width = 21 - Height = 29 - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentFont = False - ReadOnly = True - TabOrder = 2 - Text = '0' - end - object pnlNewReaderKey: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 41 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - end - end - object stbCard: TStatusBar - Left = 0 - Top = 617 - Width = 516 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlLinearRW: TPanel - Left = 0 - Top = 345 - Width = 516 - Height = 272 - Align = alClient - TabOrder = 3 - object pgLinearReadWrite: TPageControl - Left = 1 - Top = 1 - Width = 514 - Height = 251 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 0 - object tabLinearRead: TTabSheet - Caption = 'Linear Read' - object Label1: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLRLinearAddress - end - object lblReadData: TLabel - Left = 7 - Top = 3 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLRDataLength - end - object lblReadBytes: TLabel - Left = 182 - Top = 186 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - FocusControl = txtReadBytes - end - object txtLRLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLRDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearRead: TRichEdit - Left = 8 - Top = 20 - Width = 467 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'Linear Write' - ImageIndex = 1 - object lblLWLinearAddress: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLWLinearAddress - end - object lblWriteData: TLabel - Left = 6 - Top = 3 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblRWDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLWDataLength - end - object Label2: TLabel - Left = 182 - Top = 186 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - FocusControl = txtBytesWritten - end - object txtLWLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLWDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearWrite: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearWrite: TRichEdit - Left = 8 - Top = 20 - Width = 466 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - OnChange = txtLinearWriteChange - end - end - end - object stbFunction: TStatusBar - Left = 1 - Top = 252 - Width = 514 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 107 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - end - object pnlAuth: TPanel - Left = 0 - Top = 182 - Width = 516 - Height = 31 - Align = alTop - BevelOuter = bvLowered - Caption = ' ' - Ctl3D = True - ParentCtl3D = False - TabOrder = 4 - object rbAUTH1A: TRadioButton - Left = 103 - Top = 8 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 316 - Top = 8 - Width = 81 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 384 - Top = 488 - end - object mnuMain: TMainMenu - Left = 384 - Top = 528 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~pas deleted file mode 100644 index 3a1e50546ed247ae6f213b5534dcff6110d12712..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimple/uFSimple.~pas +++ /dev/null @@ -1,726 +0,0 @@ -(*********************************************************************************************** - - Program : uFr Simple - File : uFSimple.pas - Description : Functions to work with the keys card and reader key.Support for 4k - Manufacturer : D-Logic - Development enviroment : Borland Delphi 7.0 - Revisions : - Version : 2.0.0.0 - -*************************************************************************************************) - -unit uFSimple; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls,uFCoder1x, StdCtrls,Menus; -type - TKeyArray=array[0..5] of byte; -type - TfrmuFrSimple = class(TForm) - pnlReader: TPanel; - pnlFormattCard: TPanel; - stbCard: TStatusBar; - stbReader: TStatusBar; - pnlLinearRW: TPanel; - lblReaderType: TLabel; - txtReaderType: TEdit; - lblReaderSerial: TLabel; - txtReaderSerial: TEdit; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardSerial: TLabel; - Bevel1: TBevel; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUISignal: TButton; - Timer: TTimer; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearWrite: TTabSheet; - Label1: TLabel; - lblReadData: TLabel; - txtLRLinearAddress: TEdit; - lblDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - lblLWLinearAddress: TLabel; - lblWriteData: TLabel; - txtLWLinearAddress: TEdit; - lblRWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - mnuMain: TMainMenu; - mnuExitItem: TMenuItem; - stbFunction: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblReadBytes: TLabel; - txtReadBytes: TEdit; - Label2: TLabel; - txtBytesWritten: TEdit; - pgNewCardReaderKeys: TPageControl; - tabNewCardKeys: TTabSheet; - tabNewRaedarKey: TTabSheet; - lblKeyB: TLabel; - lblKeyA: TLabel; - chkNewCardKeysHex: TCheckBox; - btnFormatCardKeys: TButton; - lblSectorFormatted: TLabel; - txtSectorForrmatted: TEdit; - btnFormatReaderKey: TButton; - chkNewReaderKeyHex: TCheckBox; - lblKeyIndex: TLabel; - txtKeyIndex: TEdit; - pnlNewCardKeys: TPanel; - pnlNewReaderKey: TPanel; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - txtLinearWrite: TRichEdit; - txtLinearRead: TRichEdit; - txtCardSerial: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnReaderUISignalClick(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnFormatCardKeysClick(Sender: TObject); - - procedure chkNewCardKeysHexClick(Sender: TObject); - procedure chkNewReaderKeyHexClick(Sender: TObject); - procedure btnFormatReaderKeyClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - private - boFunctionStart, - boReaderStart : Boolean; - function GetFunctStart: Boolean; - procedure SetFunctStart(const Value: Boolean); - function GetReaderStart: Boolean; - procedure SetReaderStart(const Value: Boolean); - - private - boCONN :Boolean; - ERROR_CODE:array[0..200] of string; - - procedure CreateKey(key_height,key_width,key_left,key_top:Byte;key_name:string;bKeyTag:byte;pnlContainer:TPanel); - procedure OnMyKeyPress(Sender:TObject;var Key:Char); - procedure OnMyKeyExit(Sender:TObject); - procedure ConvertDecHex(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel); - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - function DecHexConversion(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel):TKeyArray; - function AuthMode:byte; - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - public - - end; -const - - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_LOCKED = 118; - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT='You must enter a number between 0 and 255 !'; - - NEW_CARD_KEY_A = 'txtNewCardKeyA'; - NEW_CARD_KEY_B = 'txtNewCardKeyB'; - NEW_READER_KEY = 'txtNewReaderKey'; - - - - -var - frmuFrSimple: TfrmuFrSimple; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimple.CreateKey(key_height, key_width, key_left,key_top: Byte; key_name: string;bKeyTag:byte; pnlContainer:TPanel); -var - br :byte; - edit_key:array[0..6] of TEdit; -begin - for br:=0 to MAX_KEY_INDEX do - begin - edit_key[br] :=TEdit.Create(self); - with edit_key[br] do - begin - Height :=key_height; - Width :=key_width; - Left :=key_left+(key_width*br+2); - Top :=key_top; - Font.Name :='Verdana'; - Font.Style :=[fsBold]; - Font.Size :=8; - MaxLength :=3; - Text :='255'; - Tag :=bKeyTag; - ReadOnly :=false; - name :=key_name+IntToStr(br); - OnKeyPress :=OnMyKeyPress; - OnExit :=OnMyKeyExit; - CharCase :=ecUpperCase; - Parent :=pnlContainer; - end; - end; - -end; - -procedure TfrmuFrSimple.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimple.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - - - CreateKey(24,30,3,3,NEW_CARD_KEY_A,1, pnlNewCardKeys); - CreateKey(24,30,3,23,NEW_CARD_KEY_B,2,pnlNewCardKeys); - CreateKey(24,30,3,8,NEW_READER_KEY,3,pnlNewReaderKey); - boCONN:=false; -end; - -procedure TfrmuFrSimple.btnReaderUISignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wReadBytes :Word; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr Then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - On Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - txtLinearRead.Clear; - New(PData); - wReadBytes := 0; - wLinearAddress := StrToInt(Trim(txtLRLinearAddress.Text)); - wDataLength := StrToInt(Trim(txtLRDataLength.Text)); - bAuthMode := AuthMode(); - bKeyIndex := StrToInt(txtKeyIndex.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - iFResult := LinearRead(PData,wLinearAddress,wDataLength,wReadBytes,bAuthMode,bKeyIndex); - - if iFResult = DL_OK then - begin - txtLinearRead.Text :=String(baReadData); - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult) - end - else - begin - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; - - -end; - -procedure TfrmuFrSimple.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - PData :PByte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOk],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOk],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PData); - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - wLinearAddress:=StrToInt(Trim(txtLWLinearAddress.Text)); - wDataLength :=StrToInt(Trim(txtLWDataLength.Text)); - PData :=PByte(txtLinearWrite.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; -end; - - - -procedure TfrmuFrSimple.btnFormatCardKeysClick(Sender: TObject); -var - PKeyA:PByte; - PKeyB:PByte; - KeyA:TKeyArray; - KeyB:TKeyArray; - bSectorsFormatted:Byte; - bBlockAccessBits, - bTrailerAccessBits, - bTrailerBits9 :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - bytes_ret:word; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - try - New(PKeyA); - New(PKeyB); - - KeyA:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - KeyB:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); - - PKeyA:=PByte(@KeyA); - PKeyB:=PByte(@KeyB); - bBlockAccessBits :=0; - bTrailerAccessBits :=1; - bTrailerBits9 :=45; - bSectorsFormatted :=0; - - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - - - iFResult:=LinearFormatCard(PKeyA,bBlockAccessBits,bTrailerAccessBits,bTrailerBits9,PKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are not formatted successfully !',mtError,[mbOK],0); - end; - except - on EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - finally - PKeyA:=nil; - PKeyB:=nil; - Dispose(PKeyA); - Dispose(PKeyB); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.chkNewCardKeysHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); -end; - -procedure TfrmuFrSimple.OnMyKeyPress(Sender: TObject; var Key: Char); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - try - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) then - begin - TB.MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else - begin - TB.MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; - except - on EConvertError do - end; -end; - - - -function TfrmuFrSimple.AuthMode: byte; -begin - if rbAUTH1A.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - -function TfrmuFrSimple.DecHexConversion(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel): TKeyArray; -var - baKeyArray:TKeyArray; - bCounter:byte; -begin - for bCounter:=0 to MAX_KEY_INDEX do - begin - if chkCheckBox.Checked then - begin - baKeyArray[bCounter]:=StrToInt(HexDisplayPrefix+(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text))); - end - else - begin - baKeyArray[bCounter]:=StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text)); - end; - end; - Result:=baKeyArray; - end; - - - - -procedure TfrmuFrSimple.ConvertDecHex(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel); -var - bBr:byte; -begin - try - for bBr:=0 to MAX_KEY_INDEX do - begin - if Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)=EmptyStr then - Continue - else - begin - if chkCheckBox.Checked then - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToHex(StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)),2); - end - else - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToStr(StrToInt(HexDisplayPrefix+Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text))); - end; - end; - end; - except - on EConvertError do - Exit; - end; -end; - -procedure TfrmuFrSimple.chkNewReaderKeyHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); -end; - -procedure TfrmuFrSimple.btnFormatReaderKeyClick(Sender: TObject); -var - PReaderKey:PByte; - baReaderKey:TKeyArray; - iFResult:DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PReaderKey); - PReaderKey:=@baReaderKey; - baReaderKey:=DecHexConversion(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); - iFResult:=ReaderKeyWrite(PReaderKey,key_index); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is not formatted successfully !',mtError,[mbOK],0); - end; - - finally - PReaderKey:=nil; - Dispose(PReaderKey); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.OnMyKeyExit(Sender: TObject); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) or (Trim(TB.Text)=EmptyStr) Then Exit; - if StrToInt(Trim(TB.Text))>255 then - begin - MessageDlg(APPROPRIATE_FORMAT,mtError,[mbOK],0); - TB.Undo(); - TB.SetFocus(); - Exit; - end; -end; - - - - -procedure TfrmuFrSimple.MainLoop; -var - iRResult, - iCResult :LongInt; - iReaderType, - iReaderSerial, - iCardSerial:LongInt; - bCardType, - bDLCardType, - bCardUIDSize, - bBr :Byte; - baCardUID:array[0..9] of Byte; - sBuffer :String; - -begin - sBuffer:=''; - SetReaderStart(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - SetStatusBar(stbReader,iRResult); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult) - end - else - begin - boCONN:=false; - ReaderClose(); - SetStatusBar(stbReader,iRResult); - end; - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<= - - - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType .Text:='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial .Text:='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - txtCardSerial .Clear; - txtCardType .Clear; - txtCardUIDSize.Clear; - SetStatusBar(stbCard,iCResult); - end; - end; - SetReaderStart(false); - -end; - -function TfrmuFrSimple.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -procedure TfrmuFrSimple.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimple.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrSimple.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - -procedure TfrmuFrSimple.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -procedure TfrmuFrSimple.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop(); -end; - -procedure TfrmuFrSimple.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(txtLinearWrite.Text)); -end; - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x-x86.dll b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x-x86.dll deleted file mode 100644 index dae3b829b21b5e409b1ed936e76aa24d99e96ddf..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.dcu deleted file mode 100644 index e929bddfe7b7438c1ca7f46b6d066f4de3379c97..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.pas deleted file mode 100644 index c3b3ab546282080a15466fc359ebf1bd5317d63d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.pas +++ /dev/null @@ -1,101 +0,0 @@ -unit ufCoder1x; - -interface - - Type - TDLCardType = ( - DL_MIFARE_ULTRALIGHT = $01, - DL_MIFARE_ULTRALIGHT_EV1_11 = $02, - DL_MIFARE_ULTRALIGHT_EV1_21 = $03, - DL_MIFARE_ULTRALIGHT_C = $04, - DL_NTAG_203 = $05, - DL_NTAG_210 = $06, - DL_NTAG_212 = $07, - DL_NTAG_213 = $08, - DL_NTAG_215 = $09, - DL_NTAG_216 = $0A, - DL_MIFARE_MINI = $20, - DL_MIFARE_CLASSIC_1K = $21, - DL_MIFARE_CLASSIC_4K = $22, - DL_MIFARE_PLUS_S_2K = $23, - DL_MIFARE_PLUS_S_4K = $24, - DL_MIFARE_PLUS_X_2K = $25, - DL_MIFARE_PLUS_X_4K = $26, - DL_MIFARE_DESFIRE = $27, - DL_MIFARE_DESFIRE_EV1_2K = $28, - DL_MIFARE_DESFIRE_EV1_4K = $29, - DL_MIFARE_DESFIRE_EV1_8K = $2A - ); - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -const - DLL_NAME='uFCoder1x-x86.dll'; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - TOTAL_BYTES_NTAG203 = 168; - TOTAL_BYTES_ULTRALIGHT_C = 168; - TOTAL_BYTES_ULTRALIGHT = 64; -const - MAX_BLOCK = 15; - FORMAT_SIGN = $00;//$FF - KEY_INDEX = 0; - - - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.~pas deleted file mode 100644 index 72ed9471e98f47a8b48b2ad6bc66687b1c695ec7..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFCoder1x.~pas +++ /dev/null @@ -1,98 +0,0 @@ -unit ufCoder1x; - -interface - - Type - TDLCardType = ( - DL_MIFARE_ULTRALIGHT = $01, - DL_MIFARE_ULTRALIGHT_EV1_11 = $02, - DL_MIFARE_ULTRALIGHT_EV1_21 = $03, - DL_MIFARE_ULTRALIGHT_C = $04, - DL_NTAG_203 = $05, - DL_NTAG_210 = $06, - DL_NTAG_212 = $07, - DL_NTAG_213 = $08, - DL_NTAG_215 = $09, - DL_NTAG_216 = $0A, - DL_MIFARE_MINI = $20, - DL_MIFARE_CLASSIC_1K = $21, - DL_MIFARE_CLASSIC_4K = $22, - DL_MIFARE_PLUS_S_2K = $23, - DL_MIFARE_PLUS_S_4K = $24, - DL_MIFARE_PLUS_X_2K = $25, - DL_MIFARE_PLUS_X_4K = $26, - DL_MIFARE_DESFIRE = $27, - DL_MIFARE_DESFIRE_EV1_2K = $28, - DL_MIFARE_DESFIRE_EV1_4K = $29, - DL_MIFARE_DESFIRE_EV1_8K = $2A - ); - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -const - DLL_NAME='uFCoder1x-x86.dll'; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - - -const - MAX_BLOCK = 15; - FORMAT_SIGN = $00;//$FF - KEY_INDEX = 0; - - - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.dcu b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.dcu deleted file mode 100644 index 35cd3425c49dfd73b140b7279de016ac5b75b7e3..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.dfm deleted file mode 100644 index 06cd03c29251ed4640198e1853b88eccfd500d10..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.dfm +++ /dev/null @@ -1,291 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 489 - Top = 116 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest ' - ClientHeight = 478 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblWriteData: TLabel - Left = 18 - Top = 109 - Width = 61 - Height = 13 - Caption = 'Write Data' - FocusControl = txtWriteData - end - object lblReadData: TLabel - Left = 283 - Top = 109 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblCardType: TLabel - Left = 16 - Top = 28 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 158 - Top = 28 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 16 - Top = 51 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object stbConnected: TStatusBar - Left = 0 - Top = 455 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object btnFormattingCard: TButton - Left = 288 - Top = 24 - Width = 233 - Height = 44 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - object txtWriteData: TMemo - Left = 17 - Top = 130 - Width = 257 - Height = 185 - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 2 - end - object btnWriteData: TButton - Left = 19 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnWriteDataClick - end - object txtReadData: TMemo - Left = 281 - Top = 130 - Width = 257 - Height = 185 - Color = clSilver - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - object btnReadData: TButton - Left = 282 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = btnReadDataClick - end - object pbBar: TProgressBar - Left = 0 - Top = 392 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 6 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 432 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 409 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtCardType: TEdit - Left = 96 - Top = 24 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 216 - Top = 24 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 10 - end - object txtCardUID: TEdit - Left = 96 - Top = 48 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - object mnuMeni: TMainMenu - Left = 408 - Top = 80 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 440 - Top = 80 - end - object XPManifest1: TXPManifest - Left = 376 - Top = 80 - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.pas deleted file mode 100644 index b821db32fa150ae3418e48bd47e32ea42d2eb71f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.pas +++ /dev/null @@ -1,463 +0,0 @@ - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder1x, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - btnFormattingCard: TButton; - txtWriteData: TMemo; - lblWriteData: TLabel; - btnWriteData: TButton; - XPManifest1: TXPManifest; - lblReadData: TLabel; - txtReadData: TMemo; - btnReadData: TButton; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - lblCardType: TLabel; - lblCardUIDSize: TLabel; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FOK_LIGHT = 4; - FOK_SOUND = 0; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - New(PData); - PData :=@baFormat; - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max :=iMaxBlocks; - end; - - if (bDLCardType = byte(DL_MIFARE_ULTRALIGHT)) or (bDLCardType =byte(DL_MIFARE_ULTRALIGHT_C)) - or (bDLCardType = byte(DL_NTAG_203)) then - begin - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - end; - end; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - pbBar.Visible:=false; - end; - end; -end; - - - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PByte(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(baReadData); - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PByte; - iFResult :DL_STATUS; -begin - if (Trim(txtWriteData.Text))=EmptyStr then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength :=Length(txtWriteData.Text)-2; - PData :=PByte(txtWriteData.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array[0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - (*btnFormattingCard.Enabled:=bDLCardType>$0A;*) - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - byte(DL_MIFARE_ULTRALIGHT) : Result:=Round(TOTAL_BYTES_ULTRALIGHT/4); - byte(DL_MIFARE_ULTRALIGHT_C) : Result:=Round(TOTAL_BYTES_ULTRALIGHT_C/4); - byte(DL_NTAG_203) : Result:=Round(TOTAL_BYTES_NTAG203/4); - byte(DL_MIFARE_CLASSIC_1K) : Result:=(MAX_SECTORS_1K *4); - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : Result:=((MAX_SECTORS_1K*2)*4)+((MAX_SECTORS_1K-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - byte(DL_NTAG_203) : iMaxBytes:=MAX_BYTES_NTAG203; - - byte(DL_MIFARE_ULTRALIGHT) : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - byte(DL_MIFARE_ULTRALIGHT_C): iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - byte(DL_MIFARE_CLASSIC_1K) : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; -end; - - - - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~ddp b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~dfm b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~dfm deleted file mode 100644 index 65a0b3c72831bd7a51ce79b366d27a04bb4bb40d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~dfm +++ /dev/null @@ -1,291 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 489 - Top = 116 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest ' - ClientHeight = 478 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblWriteData: TLabel - Left = 18 - Top = 109 - Width = 61 - Height = 13 - Caption = 'Write Data' - FocusControl = txtWriteData - end - object lblReadData: TLabel - Left = 283 - Top = 109 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblCardType: TLabel - Left = 16 - Top = 28 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 158 - Top = 28 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 16 - Top = 51 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object stbConnected: TStatusBar - Left = 0 - Top = 455 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object btnFormattingCard: TButton - Left = 288 - Top = 24 - Width = 233 - Height = 44 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - object txtWriteData: TMemo - Left = 17 - Top = 130 - Width = 257 - Height = 185 - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 2 - end - object btnWriteData: TButton - Left = 19 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnWriteDataClick - end - object txtReadData: TMemo - Left = 281 - Top = 130 - Width = 257 - Height = 185 - Color = clSilver - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - object btnReadData: TButton - Left = 282 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = btnReadDataClick - end - object pbBar: TProgressBar - Left = 0 - Top = 392 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 6 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 432 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 409 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtCardType: TEdit - Left = 96 - Top = 24 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 216 - Top = 24 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 10 - end - object txtCardUID: TEdit - Left = 96 - Top = 48 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - object mnuMeni: TMainMenu - Left = 408 - Top = 80 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 440 - Top = 80 - end - object XPManifest1: TXPManifest - Left = 376 - Top = 80 - end -end diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~pas b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~pas deleted file mode 100644 index 55fc32ff306520e5cd8e2f55016ba5a86a230ee0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFSimplest.~pas +++ /dev/null @@ -1,461 +0,0 @@ - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder1x, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - btnFormattingCard: TButton; - txtWriteData: TMemo; - lblWriteData: TLabel; - btnWriteData: TButton; - XPManifest1: TXPManifest; - lblReadData: TLabel; - txtReadData: TMemo; - btnReadData: TButton; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - lblCardType: TLabel; - lblCardUIDSize: TLabel; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FOK_LIGHT = 4; - FOK_SOUND = 0; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - New(PData); - PData :=@baFormat; - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max :=iMaxBlocks; - end; - - if (bDLCardType = byte(DL_MIFARE_ULTRALIGHT)) or (bDLCardType =byte(DL_MIFARE_ULTRALIGHT_C)) - or (bDLCardType = byte(DL_NTAG_216)) then - begin - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - end; - end; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - pbBar.Visible:=false; - end; - end; -end; - - - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PByte(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(baReadData); - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PByte; - iFResult :DL_STATUS; -begin - if (Trim(txtWriteData.Text))=EmptyStr then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength :=Length(txtWriteData.Text)-2; - PData :=PByte(txtWriteData.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array[0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - (*btnFormattingCard.Enabled:=bDLCardType>$0A;*) - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - byte(DL_MIFARE_ULTRALIGHT) : Result:=Round(TOTAL_BYTES_ULTRALIGHT/4); - byte(DL_MIFARE_ULTRALIGHT_C) : Result:=Round(TOTAL_BYTES_ULTRALIGHT_C/4); - byte(DL_NTAG_203) : Result:=Round(TOTAL_BYTES_NTAG203/4); - byte(DL_MIFARE_CLASSIC_1K) : Result:=(MAX_SECTORS_1K *4); - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : Result:=((MAX_SECTORS_1K*2)*4)+((MAX_SECTORS_1K-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - byte(DL_NTAG_203) : iMaxBytes:=MAX_BYTES_NTAG203; - - byte(DL_MIFARE_ULTRALIGHT) : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - byte(DL_MIFARE_ULTRALIGHT_C): iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - byte(DL_MIFARE_CLASSIC_1K) : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; -end; - - - - -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.cfg b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.dof b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.dof deleted file mode 100644 index 191f948bdf1f291e132bef3101c066e1fda5ec2b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Simplest version.Support for 4k and NTAG cards -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName=uFCoder Simplest -ProductVersion=2.1.0.0 -Comments= diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.dpr b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.dpr deleted file mode 100644 index 5f241be2f1baad68739c74df71f9237ea43a5d2f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.dpr +++ /dev/null @@ -1,14 +0,0 @@ -program uFrSimplest; - -uses - Forms, - uFSimplest in 'uFSimplest.pas' {frmuFrSimplest}, - uFCoder1x in 'uFCoder1x.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TfrmuFrSimplest, frmuFrSimplest); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.exe b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.exe deleted file mode 100644 index 3a5c967bd8988f7fb0d986ad858905c7641bcfce..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.res b/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.res deleted file mode 100644 index 382a244c9cf3598c14f47b5c17f6dea3859a96b9..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoder/2.0.0/uFCoderSimplest/uFrSimplest.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.dcu b/old_move_to_branch/uFCoderAdvance/BlockInSector.dcu deleted file mode 100644 index 03959705ecc62aad890463b347c4ffa637b72c42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/BlockInSector.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.ddp b/old_move_to_branch/uFCoderAdvance/BlockInSector.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/BlockInSector.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.dfm b/old_move_to_branch/uFCoderAdvance/BlockInSector.dfm deleted file mode 100644 index 2f80812c221da10136bf4d30ac6549bb1ef85b42..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockInSector.dfm +++ /dev/null @@ -1,1021 +0,0 @@ -object frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite - Left = 516 - Top = 235 - Width = 529 - Height = 427 - Caption = 'BlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object stbBlockInSectorReadWrite: TStatusBar - Left = 0 - Top = 369 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockInSectorReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 312 - ActivePage = tabBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabBlockInSectorRead: TTabSheet - Caption = 'BlockInSector Read' - object pnlBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadData: TLabel - Left = 9 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBlockInSectorRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadData: TEdit - Left = 8 - Top = 108 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadClick - end - object txtBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM1: TLabel - Left = 10 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM1: TEdit - Left = 9 - Top = 109 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM1Click - end - object txtBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM2: TLabel - Left = 9 - Top = 96 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM2: TEdit - Left = 8 - Top = 114 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM2Click - end - object txtBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataPK: TLabel - Left = 10 - Top = 97 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataPK: TEdit - Left = 9 - Top = 115 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadPKClick - end - object txtBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabBlockInSectorWrite: TTabSheet - Caption = 'BlockInSector Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISWWriteData: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddress: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddress: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 148 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteData: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddress: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object brnBlockInSectorWrite: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = brnBlockInSectorWriteClick - end - object txtBISWBlockAddress: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISWWriteDataAKM1: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label5: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 193 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM1: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM1: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM1: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM1Click - end - object txtBISWBlockAddressAKM1: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISWWriteDataAKM2: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectoAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 193 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM2: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM2: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM2: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM2Click - end - object txtBISWBlockAddressAKM2: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddressPK: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressPK: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataPK: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressPK: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWritePK: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWritePKClick - end - object txtBISWBlockAddressPK: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.pas b/old_move_to_branch/uFCoderAdvance/BlockInSector.pas deleted file mode 100644 index e489ba355194c0433e4d735902bf5ed32e33d19a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockInSector.pas +++ /dev/null @@ -1,624 +0,0 @@ -unit BlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder, StdCtrls, ExtCtrls, ComCtrls; - -type - TfrmBlockInSectorReadWrite = class(TForm) - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - lblHeader: TStaticText; - stbBlockInSectorReadWrite: TStatusBar; - pgBlockInSectorReadWrite: TPageControl; - tabBlockInSectorRead: TTabSheet; - pnlBlockInSectorRead: TPanel; - lblBISRSectorAddress: TLabel; - lblBISRReadData: TLabel; - lblBlockInSectorRead: TStaticText; - txtBISRSectorAddress: TEdit; - txtBISRReadData: TEdit; - btnBlockInSectorRead: TButton; - pnlBlockInSectorReadAKM1: TPanel; - lblBISRSectorAddressAKM1: TLabel; - lblBISRReadDataAKM1: TLabel; - lblBISRAKM1: TStaticText; - txtBISRSectorAddressAKM1: TEdit; - txtBISRReadDataAKM1: TEdit; - btnBlockInSectorReadAKM1: TButton; - pnlBlockInSectorReadAKM2: TPanel; - lblBISRSectorAddressAKM2: TLabel; - lblBISRReadDataAKM2: TLabel; - lblBRAKM2: TStaticText; - txtBISRSectorAddressAKM2: TEdit; - txtBISRReadDataAKM2: TEdit; - btnBlockInSectorReadAKM2: TButton; - pnlBlockReadPK: TPanel; - lblBISRSectorAddressPK: TLabel; - lblBISRReadDataPK: TLabel; - lblBRPK: TStaticText; - txtBISRSectorAddressPK: TEdit; - txtBISRReadDataPK: TEdit; - btnBlockInSectorReadPK: TButton; - tabBlockInSectorWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblBISWBlockWrite: TStaticText; - pnlBlockWriteAKM1: TPanel; - lblBISWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBISWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBISRBlockAddress: TLabel; - txtBISRBlockAddress: TEdit; - lblBISRBlockAddressAKM1: TLabel; - txtBISRBlockAddressAKM1: TEdit; - lblBISRBlockAddressAKM2: TLabel; - txtBISRBlockAddressAKM2: TEdit; - lblBISRBlockAddressPK: TLabel; - txtBISRBlockAddressPK: TEdit; - lblBISWWriteData: TLabel; - txtBISWWriteData: TEdit; - lblBISWSectorAddress: TLabel; - txtBISWSectorAddress: TEdit; - brnBlockInSectorWrite: TButton; - lblBISWBlockAddress: TLabel; - txtBISWBlockAddress: TEdit; - lblBISWWriteDataAKM1: TLabel; - txtBISWWriteDataAKM1: TEdit; - Label5: TLabel; - txtBISWSectorAddressAKM1: TEdit; - btnBlockInSectorWriteAKM1: TButton; - lblBISWBlockAddressAKM1: TLabel; - txtBISWBlockAddressAKM1: TEdit; - lblBISWWriteDataAKM2: TLabel; - txtBISWWriteDataAKM2: TEdit; - lblBISWSectoAddressAKM2: TLabel; - txtBISWSectorAddressAKM2: TEdit; - btnBlockInSectorWriteAKM2: TButton; - lblBISWBlockAddressAKM2: TLabel; - txtBISWBlockAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - txtBISWWriteDataPK: TEdit; - lblBISWSectorAddressPK: TLabel; - txtBISWSectorAddressPK: TEdit; - btnBlockInSectorWritePK: TButton; - lblBISWBlockAddressPK: TLabel; - txtBISWBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnBlockInSectorReadClick(Sender: TObject); - procedure btnBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnBlockInSectorReadPKClick(Sender: TObject); - procedure brnBlockInSectorWriteClick(Sender: TObject); - procedure btnBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnBlockInSectorWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmBlockInSectorReadWrite } - -procedure TfrmBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadClick(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddress.Text); - - iFResult:=BlockInSectorRead(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBISRReadData.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM1Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM1.Text); - - iFResult:=BlockInSectorRead_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM1.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM2Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM2.Text); - - iFResult:=BlockInSectorRead_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM2.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadPKClick(Sender: TObject); -var - pData, - pPKKEY :PByte; - baPKKey :array[0..5] of Byte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressPK.Text); - - iFResult:=BlockInSectorRead_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtBISRReadDataPK.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.brnBlockInSectorWriteClick(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddress.Text); - pData :=PByte(txtBISWWriteData.Text); - - iFResult:=BlockInSectorWrite(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM1.Text); - pData :=PByte(txtBISWWriteDataAKM1.Text); - - iFResult:=BlockInSectorWrite_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM2.Text); - pData :=PByte(txtBISWWriteDataAKM2.Text); - - iFResult:=BlockInSectorWrite_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - baPKKey :array[0..5] of Byte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bSectorAddress :=StrToInt(txtBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressPK.Text); - pData :=PByte(txtBISWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockInSectorWrite_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.~ddp b/old_move_to_branch/uFCoderAdvance/BlockInSector.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/BlockInSector.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.~dfm b/old_move_to_branch/uFCoderAdvance/BlockInSector.~dfm deleted file mode 100644 index 4e44f9b63fb6d48ad7c80fcb1c4bd900872201e4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockInSector.~dfm +++ /dev/null @@ -1,1021 +0,0 @@ -object frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite - Left = 516 - Top = 235 - Width = 529 - Height = 427 - Caption = 'BlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object stbBlockInSectorReadWrite: TStatusBar - Left = 0 - Top = 370 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockInSectorReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 313 - ActivePage = tabBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabBlockInSectorRead: TTabSheet - Caption = 'BlockInSector Read' - object pnlBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadData: TLabel - Left = 9 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBlockInSectorRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadData: TEdit - Left = 8 - Top = 108 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadClick - end - object txtBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM1: TLabel - Left = 10 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM1: TEdit - Left = 9 - Top = 109 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM1Click - end - object txtBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM2: TLabel - Left = 9 - Top = 96 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM2: TEdit - Left = 8 - Top = 114 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM2Click - end - object txtBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataPK: TLabel - Left = 10 - Top = 97 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataPK: TEdit - Left = 9 - Top = 115 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadPKClick - end - object txtBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabBlockInSectorWrite: TTabSheet - Caption = 'BlockInSector Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISWWriteData: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddress: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddress: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteData: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddress: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object brnBlockInSectorWrite: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = brnBlockInSectorWriteClick - end - object txtBISWBlockAddress: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISWWriteDataAKM1: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label5: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM1: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM1: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM1: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM1Click - end - object txtBISWBlockAddressAKM1: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISWWriteDataAKM2: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectoAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM2: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM2: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM2: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM2Click - end - object txtBISWBlockAddressAKM2: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddressPK: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressPK: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataPK: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressPK: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWritePK: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWritePKClick - end - object txtBISWBlockAddressPK: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/BlockInSector.~pas b/old_move_to_branch/uFCoderAdvance/BlockInSector.~pas deleted file mode 100644 index 4c1b046ba80b95803cc6dffafd4e6f92a7050551..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockInSector.~pas +++ /dev/null @@ -1,624 +0,0 @@ -unit BlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder1x, StdCtrls, ExtCtrls, ComCtrls; - -type - TfrmBlockInSectorReadWrite = class(TForm) - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - lblHeader: TStaticText; - stbBlockInSectorReadWrite: TStatusBar; - pgBlockInSectorReadWrite: TPageControl; - tabBlockInSectorRead: TTabSheet; - pnlBlockInSectorRead: TPanel; - lblBISRSectorAddress: TLabel; - lblBISRReadData: TLabel; - lblBlockInSectorRead: TStaticText; - txtBISRSectorAddress: TEdit; - txtBISRReadData: TEdit; - btnBlockInSectorRead: TButton; - pnlBlockInSectorReadAKM1: TPanel; - lblBISRSectorAddressAKM1: TLabel; - lblBISRReadDataAKM1: TLabel; - lblBISRAKM1: TStaticText; - txtBISRSectorAddressAKM1: TEdit; - txtBISRReadDataAKM1: TEdit; - btnBlockInSectorReadAKM1: TButton; - pnlBlockInSectorReadAKM2: TPanel; - lblBISRSectorAddressAKM2: TLabel; - lblBISRReadDataAKM2: TLabel; - lblBRAKM2: TStaticText; - txtBISRSectorAddressAKM2: TEdit; - txtBISRReadDataAKM2: TEdit; - btnBlockInSectorReadAKM2: TButton; - pnlBlockReadPK: TPanel; - lblBISRSectorAddressPK: TLabel; - lblBISRReadDataPK: TLabel; - lblBRPK: TStaticText; - txtBISRSectorAddressPK: TEdit; - txtBISRReadDataPK: TEdit; - btnBlockInSectorReadPK: TButton; - tabBlockInSectorWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblBISWBlockWrite: TStaticText; - pnlBlockWriteAKM1: TPanel; - lblBISWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBISWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBISRBlockAddress: TLabel; - txtBISRBlockAddress: TEdit; - lblBISRBlockAddressAKM1: TLabel; - txtBISRBlockAddressAKM1: TEdit; - lblBISRBlockAddressAKM2: TLabel; - txtBISRBlockAddressAKM2: TEdit; - lblBISRBlockAddressPK: TLabel; - txtBISRBlockAddressPK: TEdit; - lblBISWWriteData: TLabel; - txtBISWWriteData: TEdit; - lblBISWSectorAddress: TLabel; - txtBISWSectorAddress: TEdit; - brnBlockInSectorWrite: TButton; - lblBISWBlockAddress: TLabel; - txtBISWBlockAddress: TEdit; - lblBISWWriteDataAKM1: TLabel; - txtBISWWriteDataAKM1: TEdit; - Label5: TLabel; - txtBISWSectorAddressAKM1: TEdit; - btnBlockInSectorWriteAKM1: TButton; - lblBISWBlockAddressAKM1: TLabel; - txtBISWBlockAddressAKM1: TEdit; - lblBISWWriteDataAKM2: TLabel; - txtBISWWriteDataAKM2: TEdit; - lblBISWSectoAddressAKM2: TLabel; - txtBISWSectorAddressAKM2: TEdit; - btnBlockInSectorWriteAKM2: TButton; - lblBISWBlockAddressAKM2: TLabel; - txtBISWBlockAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - txtBISWWriteDataPK: TEdit; - lblBISWSectorAddressPK: TLabel; - txtBISWSectorAddressPK: TEdit; - btnBlockInSectorWritePK: TButton; - lblBISWBlockAddressPK: TLabel; - txtBISWBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnBlockInSectorReadClick(Sender: TObject); - procedure btnBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnBlockInSectorReadPKClick(Sender: TObject); - procedure brnBlockInSectorWriteClick(Sender: TObject); - procedure btnBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnBlockInSectorWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmBlockInSectorReadWrite } - -procedure TfrmBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadClick(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddress.Text); - - iFResult:=BlockInSectorRead(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBISRReadData.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM1Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM1.Text); - - iFResult:=BlockInSectorRead_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM1.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM2Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM2.Text); - - iFResult:=BlockInSectorRead_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM2.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadPKClick(Sender: TObject); -var - pData, - pPKKEY :PByte; - baPKKey :array[0..5] of Byte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressPK.Text); - - iFResult:=BlockInSectorRead_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtBISRReadDataPK.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.brnBlockInSectorWriteClick(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddress.Text); - pData :=PByte(txtBISWWriteData.Text); - - iFResult:=BlockInSectorWrite(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM1.Text); - pData :=PByte(txtBISWWriteDataAKM1.Text); - - iFResult:=BlockInSectorWrite_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM2.Text); - pData :=PByte(txtBISWWriteDataAKM2.Text); - - iFResult:=BlockInSectorWrite_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - baPKKey :array[0..5] of Byte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bSectorAddress :=StrToInt(txtBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressPK.Text); - pData :=PByte(txtBISWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockInSectorWrite_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.dcu b/old_move_to_branch/uFCoderAdvance/BlockReadWrite.dcu deleted file mode 100644 index b5dc7286ddd0877401d61d8ebc2dec11f6858fd8..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.ddp b/old_move_to_branch/uFCoderAdvance/BlockReadWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.dfm b/old_move_to_branch/uFCoderAdvance/BlockReadWrite.dfm deleted file mode 100644 index 949b5d688ff70ac802b2a7c90ae6e42708f4fb5d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.dfm +++ /dev/null @@ -1,893 +0,0 @@ -object frmBlockReadWrite: TfrmBlockReadWrite - Left = 310 - Top = 193 - Width = 540 - Height = 420 - Caption = 'BlockReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 524 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Block Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 524 - Height = 30 - Align = alTop - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbBlockReadWrite: TStatusBar - Left = 0 - Top = 362 - Width = 524 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 524 - Height = 305 - ActivePage = tabBlockRead - Align = alClient - TabOrder = 3 - object tabBlockRead: TTabSheet - Caption = 'BlockRead' - object pnlBlockRead: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBRBlockAddress: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblReadData: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadData: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockRead: TButton - Left = 152 - Top = 30 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadClick - end - object chkBRHex: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexClick - end - end - object pnlBlockReadAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBRBlockAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM1: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM1: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM1: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM1Click - end - object chkBRHexAKM1: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM1Click - end - end - object pnlBlockReadAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBRBlockAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM2: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM2: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM2: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM2Click - end - object chkBRHexAKM2: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM2Click - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBRBlockAddressPK: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataPK: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataPK: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadPK: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadPKClick - end - object chkBRHexPK: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexPKClick - end - end - end - object tabBlockWrite: TTabSheet - Caption = 'BlockWrite' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBWBlockAddress: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteData: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 82 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddress: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWrite: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteClick - end - object txtBWWriteData: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHex: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBWBlockAddressAKM1: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM1: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWiteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM1: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWriteAKM1: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteAKM1Click - end - object txtBWWriteDataAKM1: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM1: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBWBlockAddressAKM2: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM2: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM2: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBWBlockWriteAKM2: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBWBlockWriteAKM2Click - end - object txtBWWriteDataAKM2: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM2: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBWBlockAddressPK: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataPK: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressPK: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWritePK: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWritePKClick - end - object txtBWWriteDataPK: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexPK: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.pas b/old_move_to_branch/uFCoderAdvance/BlockReadWrite.pas deleted file mode 100644 index cf13a1fa6dd6a3de85c55976a283b34ce43c6f6c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.pas +++ /dev/null @@ -1,675 +0,0 @@ -unit BlockReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder, StdCtrls, ExtCtrls, ComCtrls; - - const - ARRAY_LENGTH=16; -type - TbaReadData=array[0..ARRAY_LENGTH] of byte; - PbaReadData=^TbaReadData; -type - TfrmBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbBlockReadWrite: TStatusBar; - pgBlockReadWrite: TPageControl; - tabBlockRead: TTabSheet; - tabBlockWrite: TTabSheet; - pnlBlockRead: TPanel; - pnlBlockReadAKM1: TPanel; - pnlBlockReadAKM2: TPanel; - pnlBlockReadPK: TPanel; - lblBlockRead: TStaticText; - lblBRAKM1: TStaticText; - lblBRAKM2: TStaticText; - lblBRPK: TStaticText; - lblBRBlockAddress: TLabel; - txtBRBlockAddress: TEdit; - txtBRReadData: TEdit; - lblReadData: TLabel; - btnBlockRead: TButton; - lblBRBlockAddressAKM1: TLabel; - txtBRBlockAddressAKM1: TEdit; - txtBRReadDataAKM1: TEdit; - lblBRReadDataAKM1: TLabel; - btnBlockReadAKM1: TButton; - lblBRBlockAddressAKM2: TLabel; - txtBRBlockAddressAKM2: TEdit; - txtBRReadDataAKM2: TEdit; - lblBRReadDataAKM2: TLabel; - btnBlockReadAKM2: TButton; - lblBRBlockAddressPK: TLabel; - txtBRBlockAddressPK: TEdit; - txtBRReadDataPK: TEdit; - lblBRReadDataPK: TLabel; - btnBlockReadPK: TButton; - pnlBlockWrite: TPanel; - lblBWBlockAddress: TLabel; - lblBWBlockRead: TStaticText; - txtBWBlockAddress: TEdit; - btnBlockWrite: TButton; - pnlBlockWriteAKM1: TPanel; - lblBWBlockWiteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBWWriteData: TLabel; - txtBWWriteData: TEdit; - lblBWBlockAddressAKM1: TLabel; - txtBWBlockAddressAKM1: TEdit; - btnBlockWriteAKM1: TButton; - lblBWWriteDataAKM1: TLabel; - txtBWWriteDataAKM1: TEdit; - lblBWBlockAddressAKM2: TLabel; - txtBWBlockAddressAKM2: TEdit; - btnBWBlockWriteAKM2: TButton; - lblBWWriteDataAKM2: TLabel; - txtBWWriteDataAKM2: TEdit; - lblBWBlockAddressPK: TLabel; - txtBWBlockAddressPK: TEdit; - btnBlockWritePK: TButton; - lblBWWriteDataPK: TLabel; - txtBWWriteDataPK: TEdit; - chkBRHex: TCheckBox; - chkBRHexAKM1: TCheckBox; - chkBRHexAKM2: TCheckBox; - chkBRHexPK: TCheckBox; - chkBWHex: TCheckBox; - chkBWHexAKM1: TCheckBox; - chkBWHexAKM2: TCheckBox; - chkBWHexPK: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure btnBlockReadClick(Sender: TObject); - procedure btnBlockReadAKM1Click(Sender: TObject); - procedure btnBlockReadAKM2Click(Sender: TObject); - procedure btnBlockReadPKClick(Sender: TObject); - procedure btnBlockWriteClick(Sender: TObject); - procedure btnBlockWriteAKM1Click(Sender: TObject); - procedure btnBWBlockWriteAKM2Click(Sender: TObject); - procedure btnBlockWritePKClick(Sender: TObject); - - procedure chkBRHexClick(Sender: TObject); - procedure chkBRHexAKM1Click(Sender: TObject); - procedure chkBRHexAKM2Click(Sender: TObject); - procedure chkBRHexPKClick(Sender: TObject); - private - PBufferData:PByte; - caReadData :array[0..ARRAY_LENGTH] of char; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - function HexConvert(sTextBoxValue:String):TbaReadData; - function ConvertToHex(chkBox: Boolean): string; - public - { Public declarations } - end; - -var - frmBlockReadWrite: TfrmBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmBlockReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockReadWrite.btnBlockReadClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBRBlockAddress.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtBRReadData.Text:=ConvertToHex(chkBRHex.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM1.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM1(pData,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBRReadDataAKM1.Text:=ConvertToHex(chkBRHexAKM1.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM2.SetFocus(); - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM2.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM2(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtBRReadDataAKM2.Text:=ConvertToHex(chkBRHexAKM2.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockReadPKClick(Sender: TObject); -var - pPKKey :PByte; - pData :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; -begin - try - if Trim(txtBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bBlockAddress :=StrToInt(txtBRBlockAddressPK.Text); - pData :=PByte(@caReadData); - pPKKey :=@baPKKey; - - iFResult:=BlockRead_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtBRReadDataPK.Text:=ConvertToHex(chkBRHexPK.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress, - bKeyIndex :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBWBlockAddress.Text); - - if chkBWHex.Checked then - begin - baBufferData :=HexConvert(txtBWWriteData.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM1.Text); - - if chkBWHexAKM1.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM1.Text); - pData :=PByte(@baBufferData); - end - else - pData:=PByte(txtBWWriteDataAKM1.Text); - - iFResult:=BlockWrite_AKM1(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBWBlockWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM2.Text); - - if chkBWHexAKM2.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM2.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite_AKM2(PData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - if chkBWHexPK.Checked then - begin - baBufferData:=HexConvert(txtBWWriteDataPK.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockWrite_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -function TfrmBlockReadWrite.HexConvert(sTextBoxValue: String):TbaReadData; -var - bCount:byte; - bLength:byte; - bHexCounter:byte; - sTextBuffer:String; - bArrayHex:array[0..ARRAY_LENGTH] of byte; - -begin - bCount:=1; - bHexCounter:=0; - bLength:= Length(sTextBoxValue); - try - while bCount - UseSystemFont = False - end - object pgBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 524 - Height = 306 - ActivePage = tabBlockRead - Align = alClient - TabOrder = 3 - object tabBlockRead: TTabSheet - Caption = 'BlockRead' - object pnlBlockRead: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBRBlockAddress: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblReadData: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadData: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockRead: TButton - Left = 152 - Top = 30 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadClick - end - object chkBRHex: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexClick - end - end - object pnlBlockReadAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBRBlockAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM1: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM1: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM1: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM1Click - end - object chkBRHexAKM1: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM1Click - end - end - object pnlBlockReadAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBRBlockAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM2: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM2: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM2: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM2Click - end - object chkBRHexAKM2: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM2Click - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBRBlockAddressPK: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataPK: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataPK: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadPK: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadPKClick - end - object chkBRHexPK: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexPKClick - end - end - end - object tabBlockWrite: TTabSheet - Caption = 'BlockWrite' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBWBlockAddress: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteData: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 82 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddress: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWrite: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteClick - end - object txtBWWriteData: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHex: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBWBlockAddressAKM1: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM1: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWiteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM1: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWriteAKM1: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteAKM1Click - end - object txtBWWriteDataAKM1: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM1: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBWBlockAddressAKM2: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM2: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM2: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBWBlockWriteAKM2: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBWBlockWriteAKM2Click - end - object txtBWWriteDataAKM2: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM2: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBWBlockAddressPK: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataPK: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressPK: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWritePK: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWritePKClick - end - object txtBWWriteDataPK: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexPK: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.~pas b/old_move_to_branch/uFCoderAdvance/BlockReadWrite.~pas deleted file mode 100644 index 3efeba8657b05da8c37b587f67182ab28e41c9bb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/BlockReadWrite.~pas +++ /dev/null @@ -1,675 +0,0 @@ -unit BlockReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, StdCtrls, ExtCtrls, ComCtrls; - - const - ARRAY_LENGTH=16; -type - TbaReadData=array[0..ARRAY_LENGTH] of byte; - PbaReadData=^TbaReadData; -type - TfrmBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbBlockReadWrite: TStatusBar; - pgBlockReadWrite: TPageControl; - tabBlockRead: TTabSheet; - tabBlockWrite: TTabSheet; - pnlBlockRead: TPanel; - pnlBlockReadAKM1: TPanel; - pnlBlockReadAKM2: TPanel; - pnlBlockReadPK: TPanel; - lblBlockRead: TStaticText; - lblBRAKM1: TStaticText; - lblBRAKM2: TStaticText; - lblBRPK: TStaticText; - lblBRBlockAddress: TLabel; - txtBRBlockAddress: TEdit; - txtBRReadData: TEdit; - lblReadData: TLabel; - btnBlockRead: TButton; - lblBRBlockAddressAKM1: TLabel; - txtBRBlockAddressAKM1: TEdit; - txtBRReadDataAKM1: TEdit; - lblBRReadDataAKM1: TLabel; - btnBlockReadAKM1: TButton; - lblBRBlockAddressAKM2: TLabel; - txtBRBlockAddressAKM2: TEdit; - txtBRReadDataAKM2: TEdit; - lblBRReadDataAKM2: TLabel; - btnBlockReadAKM2: TButton; - lblBRBlockAddressPK: TLabel; - txtBRBlockAddressPK: TEdit; - txtBRReadDataPK: TEdit; - lblBRReadDataPK: TLabel; - btnBlockReadPK: TButton; - pnlBlockWrite: TPanel; - lblBWBlockAddress: TLabel; - lblBWBlockRead: TStaticText; - txtBWBlockAddress: TEdit; - btnBlockWrite: TButton; - pnlBlockWriteAKM1: TPanel; - lblBWBlockWiteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBWWriteData: TLabel; - txtBWWriteData: TEdit; - lblBWBlockAddressAKM1: TLabel; - txtBWBlockAddressAKM1: TEdit; - btnBlockWriteAKM1: TButton; - lblBWWriteDataAKM1: TLabel; - txtBWWriteDataAKM1: TEdit; - lblBWBlockAddressAKM2: TLabel; - txtBWBlockAddressAKM2: TEdit; - btnBWBlockWriteAKM2: TButton; - lblBWWriteDataAKM2: TLabel; - txtBWWriteDataAKM2: TEdit; - lblBWBlockAddressPK: TLabel; - txtBWBlockAddressPK: TEdit; - btnBlockWritePK: TButton; - lblBWWriteDataPK: TLabel; - txtBWWriteDataPK: TEdit; - chkBRHex: TCheckBox; - chkBRHexAKM1: TCheckBox; - chkBRHexAKM2: TCheckBox; - chkBRHexPK: TCheckBox; - chkBWHex: TCheckBox; - chkBWHexAKM1: TCheckBox; - chkBWHexAKM2: TCheckBox; - chkBWHexPK: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure btnBlockReadClick(Sender: TObject); - procedure btnBlockReadAKM1Click(Sender: TObject); - procedure btnBlockReadAKM2Click(Sender: TObject); - procedure btnBlockReadPKClick(Sender: TObject); - procedure btnBlockWriteClick(Sender: TObject); - procedure btnBlockWriteAKM1Click(Sender: TObject); - procedure btnBWBlockWriteAKM2Click(Sender: TObject); - procedure btnBlockWritePKClick(Sender: TObject); - - procedure chkBRHexClick(Sender: TObject); - procedure chkBRHexAKM1Click(Sender: TObject); - procedure chkBRHexAKM2Click(Sender: TObject); - procedure chkBRHexPKClick(Sender: TObject); - private - PBufferData:PByte; - caReadData :array[0..ARRAY_LENGTH] of char; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - function HexConvert(sTextBoxValue:String):TbaReadData; - function ConvertToHex(chkBox: Boolean): string; - public - { Public declarations } - end; - -var - frmBlockReadWrite: TfrmBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmBlockReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockReadWrite.btnBlockReadClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBRBlockAddress.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtBRReadData.Text:=ConvertToHex(chkBRHex.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM1.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM1(pData,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBRReadDataAKM1.Text:=ConvertToHex(chkBRHexAKM1.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM2.SetFocus(); - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM2.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM2(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtBRReadDataAKM2.Text:=ConvertToHex(chkBRHexAKM2.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockReadPKClick(Sender: TObject); -var - pPKKey :PByte; - pData :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; -begin - try - if Trim(txtBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bBlockAddress :=StrToInt(txtBRBlockAddressPK.Text); - pData :=PByte(@caReadData); - pPKKey :=@baPKKey; - - iFResult:=BlockRead_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtBRReadDataPK.Text:=ConvertToHex(chkBRHexPK.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress, - bKeyIndex :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBWBlockAddress.Text); - - if chkBWHex.Checked then - begin - baBufferData :=HexConvert(txtBWWriteData.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM1.Text); - - if chkBWHexAKM1.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM1.Text); - pData :=PByte(@baBufferData); - end - else - pData:=PByte(txtBWWriteDataAKM1.Text); - - iFResult:=BlockWrite_AKM1(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBWBlockWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM2.Text); - - if chkBWHexAKM2.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM2.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite_AKM2(PData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - if chkBWHexPK.Checked then - begin - baBufferData:=HexConvert(txtBWWriteDataPK.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockWrite_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -function TfrmBlockReadWrite.HexConvert(sTextBoxValue: String):TbaReadData; -var - bCount:byte; - bLength:byte; - bHexCounter:byte; - sTextBuffer:String; - bArrayHex:array[0..ARRAY_LENGTH] of byte; - -begin - bCount:=1; - bHexCounter:=0; - bLength:= Length(sTextBoxValue); - try - while bCountIntToStr(255)) or ((Sender as TEdit).Text=EmptyStr) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; -end; -procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); -begin - if (Sender as TEdit).Text=EmptyStr then begin - with (Sender as TEdit) do - begin - Undo(); - SetFocus(); - end; - end; - if check_hex_box.Checked then Exit; - if ((sender as TEdit).Text>IntToStr(255)) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; - -end; -procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); -begin - if (check_hex_box.Checked) then - begin - (Sender as TEdit).MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else begin - (Sender as TEdit).MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; -end; - - - - //-----End--- -end. diff --git a/old_move_to_branch/uFCoderAdvance/Global.~pas b/old_move_to_branch/uFCoderAdvance/Global.~pas deleted file mode 100644 index 86cd4bab89b26cdb0d51b106684fb1fb708e7a56..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/Global.~pas +++ /dev/null @@ -1,263 +0,0 @@ -unit Global; -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus, ComCtrls, StdCtrls, ExtCtrls,uFCoder1x; - - - procedure Errors_Code; - procedure SetStatusBar(StatusBar: TStatusBar;Result: integer); - procedure ShowForm(the_form:TForm;pnlContainer:TPanel); - procedure CreateKey(key_owner:TForm;key_height, key_width, key_top,key_left: Integer; - key_parent: TPanel;key_name:string;key_read_only:Boolean;OnKey_press:TKeyPressEvent; - OnKey_Exit:TNotifyEvent); - - procedure CheckHex(owner:TForm;number_edit:Byte;Check_box:TCheckBox;edit_name:string); - procedure CheckDefault(owner:TForm;number_edit:Byte;def_check_box,hex_box:TCheckBox;edit_name:string); - procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); - procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); - procedure OnPK_KEY_Exit(Sender:TObject); - function AuthMode(RadioButton:TRadioButton):Byte; - function MaxBlocks(): Integer; - - const - FERROR_LIGHT = 2; - FERROR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT ='You must enter a number between 0 and 255 !'; - MEMORY_FILL =0; - - // sectors and blocks - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - - // max page for NTAG and MIFARE ULTRALIGHT - MAX_PAGE_NTAG203 = 39; - MAX_PAGE_ULTRALIGHT = 15; - MAX_PAGE_ULTRALIGHT_C = 39; - -var - ERROR_CODE:array[0..200] of string; - - - -implementation -uses - uFAdvanced; - - - -function AuthMode(RadioButton:TRadioButton):Byte; -begin - if RadioButton.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - - -procedure ShowForm(the_form:TForm;pnlContainer:TPanel); -begin - with the_form do begin - the_form.BorderStyle:=bsNone; - the_form.Align :=alClient; - the_form.Parent :=pnlContainer; - the_form.Show; - end; -end; -procedure Errors_Code; -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; -end; - -procedure SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -function MaxBlocks(): Integer; -var - bTypeOfCard:Byte; -begin - bTypeOfCard:=frmuFrAdvanced.bDLCardType; - - case bTypeOfCard of - DL_NTAG_203 : Result:= MAX_PAGE_NTAG203; - DL_MIFARE_ULTRALIGHT : Result:= MAX_PAGE_ULTRALIGHT; - DL_MIFARE_ULTRALIGHT_C : Result:= MAX_PAGE_ULTRALIGHT_C; - DL_MIFARE_CLASSIC_1k : Result:=(MAX_SECTORS_1k *4); - DL_MIFARE_CLASSIC_4k, - DL_MIFARE_PLUS_S_4K : Result:=((MAX_SECTORS_1k*2)*4)+((MAX_SECTORS_1k-8)*16) ; - end; -end; - - - - -procedure CreateKey(key_owner:TForm;key_height, key_width, key_top,key_left: Integer; key_parent: TPanel; - key_name:string;key_read_only:Boolean;OnKey_press:TKeyPressEvent;OnKey_Exit:TNotifyEvent); -var - br:Byte; - edit_key:array[0..5] of TEdit; - -begin - for br:=0 to 5 do - begin - edit_key[br] :=TEdit.Create(key_owner); - with edit_key[br] do begin - Height :=key_height; - Width :=key_width; - Top :=key_top; - Left :=key_left+(key_width*br+2); - Name :=key_name+IntToStr(br+1); - CharCase :=ecUpperCase; - Font.Name :='Verdana'; - Font.Style:=[fsBold]; - OnKeyPress:=OnKey_press; - OnExit :=OnKey_Exit; - Text :='255'; - MaxLength :=3; - ReadOnly :=key_read_only; - Parent :=key_parent; - end; - end; -end; -procedure CheckHex(owner:TForm;number_edit:Byte;Check_box:TCheckBox;edit_name:string); -var - br:Byte; -begin - case Check_box.Checked of - true:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:= - IntToHex(StrToInt(TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text),2); - end; - end; - false:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:=IntToStr(StrToInt(HexDisplayPrefix+TEdit - (owner.FindComponent(edit_name+IntToStr(br+1))).Text)); - end; - end; - end; -end; -procedure CheckDefault(owner:TForm;number_edit:Byte;def_check_box,hex_box:TCheckBox;edit_name:string); -var - br:Byte; -begin - case def_check_box.Checked of - true:begin for br:=0 to number_edit do begin - - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:='255'; - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).ReadOnly:=true; - end; - hex_box.Checked:=false; - end; - false:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).ReadOnly:=false; - end; - end; - end; -end; -procedure OnPK_KEY_Exit(Sender:TObject); -begin - - if ((sender as TEdit).Text>IntToStr(255)) or ((Sender as TEdit).Text=EmptyStr) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; -end; -procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); -begin - if (Sender as TEdit).Text=EmptyStr then begin - with (Sender as TEdit) do - begin - Undo(); - SetFocus(); - end; - end; - if check_hex_box.Checked then Exit; - if ((sender as TEdit).Text>IntToStr(255)) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; - -end; -procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); -begin - if (check_hex_box.Checked) then - begin - (Sender as TEdit).MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else begin - (Sender as TEdit).MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; -end; - - - - //-----End--- -end. diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.dcu b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.dcu deleted file mode 100644 index 12eb1babd6c905b3f1ab4ceac93e23b1d4b16bc5..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.ddp b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.dfm b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.dfm deleted file mode 100644 index 3c91461b8f7d075501331bdd9cec538db78ad26f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.dfm +++ /dev/null @@ -1,780 +0,0 @@ -object frmLinearFormatCard: TfrmLinearFormatCard - Left = 316 - Top = 154 - Width = 529 - Height = 460 - Caption = 'LinearFormatCard' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'LinearFormat Card(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbLinearFormatCard: TStatusBar - Left = 0 - Top = 402 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyConteiner: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 99 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 97 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 97 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object pgLinearFormatsCard: TPageControl - Left = 0 - Top = 155 - Width = 513 - Height = 247 - ActivePage = tabLinearFormat - Align = alClient - TabOrder = 4 - object tabLinearFormat: TTabSheet - Caption = 'LinearFormat ' - object lblBlockAccessBits: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBits: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormatted: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBits: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBits: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormat: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatClick - end - object txtSectorFormatted: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 26 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM1: TTabSheet - Caption = 'LinearFormat AKM1' - ImageIndex = 1 - object lblBlockAccessBitsAKM1: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM1: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM1: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM1: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM1: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM1: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM1: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM1: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM1Click - end - object txtSectorFormattedAKM1: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM2: TTabSheet - Caption = 'LinearFormat AKM2' - ImageIndex = 2 - object lblBlockAccessBitsAKM2: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM2: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM2: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM2: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM2: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM2: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM2: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM2: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM2Click - end - object txtSectorFormattedAKM2: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatPK: TTabSheet - Caption = 'LinearFormat PK' - ImageIndex = 3 - object lblBlockAccessBitsPK: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsPK: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9PK: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedPK: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsPK: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsPK: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9PK: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatPK: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatPKClick - end - object txtSectorFormattedPK: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.pas b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.pas deleted file mode 100644 index b8db279db69640f1e59764be91ee3bbf11cbb5a0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.pas +++ /dev/null @@ -1,436 +0,0 @@ -unit LinearFormatsCard; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder; - -type - TfrmLinearFormatCard = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbLinearFormatCard: TStatusBar; - pnlKeyConteiner: TPanel; - pnlKeyA: TPanel; - lblKeyA: TStaticText; - chkKeyAHex: TCheckBox; - pnlKeyB: TPanel; - lblKeyB: TStaticText; - chkKeyBHex: TCheckBox; - pgLinearFormatsCard: TPageControl; - tabLinearFormat: TTabSheet; - tabLinearFormatAKM1: TTabSheet; - tabLinearFormatAKM2: TTabSheet; - tabLinearFormatPK: TTabSheet; - lblBlockAccessBits: TLabel; - cboBlockAccessBits: TComboBox; - lblSectorTrailerAccessBits: TLabel; - cboSectorTrailerAccessBits: TComboBox; - lblSectorTrailerByte9: TLabel; - txtSectorTrailerByte9: TEdit; - btnLinearFormat: TButton; - lblSectorFormatted: TLabel; - txtSectorFormatted: TEdit; - lblBlockAccessBitsAKM1: TLabel; - cboBlockAccessBitsAKM1: TComboBox; - lblSectorTrailerAccessBitsAKM1: TLabel; - cboSectorTrailerAccessBitsAKM1: TComboBox; - lblSectorTrailerByte9AKM1: TLabel; - txtSectorTrailerByte9AKM1: TEdit; - btnLinearFormatAKM1: TButton; - lblSectorFormattedAKM1: TLabel; - txtSectorFormattedAKM1: TEdit; - lblBlockAccessBitsAKM2: TLabel; - cboBlockAccessBitsAKM2: TComboBox; - lblSectorTrailerAccessBitsAKM2: TLabel; - cboSectorTrailerAccessBitsAKM2: TComboBox; - lblSectorTrailerByte9AKM2: TLabel; - txtSectorTrailerByte9AKM2: TEdit; - btnLinearFormatAKM2: TButton; - lblSectorFormattedAKM2: TLabel; - txtSectorFormattedAKM2: TEdit; - lblBlockAccessBitsPK: TLabel; - cboBlockAccessBitsPK: TComboBox; - lblSectorTrailerAccessBitsPK: TLabel; - cboSectorTrailerAccessBitsPK: TComboBox; - lblSectorTrailerByte9PK: TLabel; - txtSectorTrailerByte9PK: TEdit; - btnLinearFormatPK: TButton; - lblSectorFormattedPK: TLabel; - txtSectorFormattedPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure btnLinearFormatClick(Sender: TObject); - procedure btnLinearFormatAKM1Click(Sender: TObject); - procedure btnLinearFormatAKM2Click(Sender: TObject); - procedure btnLinearFormatPKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - public - { Public declarations } - end; - -var - frmLinearFormatCard: TfrmLinearFormatCard; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmLinearFormatCard } - -procedure TfrmLinearFormatCard.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmLinearFormatCard.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearFormatCard.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; - -procedure TfrmLinearFormatCard.OnKeyAPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; -procedure TfrmLinearFormatCard.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmLinearFormatCard.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmLinearFormatCard.OnKeyBPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmLinearFormatCard.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyADefaultClick(Sender: TObject); -begin - //CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.chkKeyBDefaultClick(Sender: TObject); -begin - // CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; -end; - - - - -procedure TfrmLinearFormatCard.btnLinearFormatClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAccessBits :=cboBlockAccessBits.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9,pKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM1.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM1.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard_AKM1(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM2.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM2.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - iFResult:=LinearFormatCard_AKM2(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9PK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsPK.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsPK.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9PK.Text); - WriteKeyAB; - PKeyA:=@baKeyA; - PKeyB:=@baKeyB; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - iFResult:=LinearFormatCard_PK(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode,pPKkey); - if iFResult=DL_OK then - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; -finally - pKeyA :=nil; - pKeyB :=nil; - pPKKey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - - - - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~ddp b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~dfm b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~dfm deleted file mode 100644 index 1f05ce7f10f865e878965015c136b20446d53407..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~dfm +++ /dev/null @@ -1,780 +0,0 @@ -object frmLinearFormatCard: TfrmLinearFormatCard - Left = 316 - Top = 154 - Width = 529 - Height = 460 - Caption = 'LinearFormatCard' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'LinearFormat Card(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbLinearFormatCard: TStatusBar - Left = 0 - Top = 403 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyConteiner: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 99 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 97 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 97 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object pgLinearFormatsCard: TPageControl - Left = 0 - Top = 155 - Width = 513 - Height = 248 - ActivePage = tabLinearFormat - Align = alClient - TabOrder = 4 - object tabLinearFormat: TTabSheet - Caption = 'LinearFormat ' - object lblBlockAccessBits: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBits: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormatted: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBits: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBits: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormat: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatClick - end - object txtSectorFormatted: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 26 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM1: TTabSheet - Caption = 'LinearFormat AKM1' - ImageIndex = 1 - object lblBlockAccessBitsAKM1: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM1: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM1: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM1: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM1: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM1: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM1: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM1: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM1Click - end - object txtSectorFormattedAKM1: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM2: TTabSheet - Caption = 'LinearFormat AKM2' - ImageIndex = 2 - object lblBlockAccessBitsAKM2: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM2: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM2: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM2: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM2: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM2: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM2: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM2: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM2Click - end - object txtSectorFormattedAKM2: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatPK: TTabSheet - Caption = 'LinearFormat PK' - ImageIndex = 3 - object lblBlockAccessBitsPK: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsPK: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9PK: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedPK: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsPK: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsPK: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9PK: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatPK: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatPKClick - end - object txtSectorFormattedPK: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~pas b/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~pas deleted file mode 100644 index 9fa64083e5ba4e2249f8e16abb3be2bb7e62d99f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearFormatsCard.~pas +++ /dev/null @@ -1,436 +0,0 @@ -unit LinearFormatsCard; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder1x; - -type - TfrmLinearFormatCard = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbLinearFormatCard: TStatusBar; - pnlKeyConteiner: TPanel; - pnlKeyA: TPanel; - lblKeyA: TStaticText; - chkKeyAHex: TCheckBox; - pnlKeyB: TPanel; - lblKeyB: TStaticText; - chkKeyBHex: TCheckBox; - pgLinearFormatsCard: TPageControl; - tabLinearFormat: TTabSheet; - tabLinearFormatAKM1: TTabSheet; - tabLinearFormatAKM2: TTabSheet; - tabLinearFormatPK: TTabSheet; - lblBlockAccessBits: TLabel; - cboBlockAccessBits: TComboBox; - lblSectorTrailerAccessBits: TLabel; - cboSectorTrailerAccessBits: TComboBox; - lblSectorTrailerByte9: TLabel; - txtSectorTrailerByte9: TEdit; - btnLinearFormat: TButton; - lblSectorFormatted: TLabel; - txtSectorFormatted: TEdit; - lblBlockAccessBitsAKM1: TLabel; - cboBlockAccessBitsAKM1: TComboBox; - lblSectorTrailerAccessBitsAKM1: TLabel; - cboSectorTrailerAccessBitsAKM1: TComboBox; - lblSectorTrailerByte9AKM1: TLabel; - txtSectorTrailerByte9AKM1: TEdit; - btnLinearFormatAKM1: TButton; - lblSectorFormattedAKM1: TLabel; - txtSectorFormattedAKM1: TEdit; - lblBlockAccessBitsAKM2: TLabel; - cboBlockAccessBitsAKM2: TComboBox; - lblSectorTrailerAccessBitsAKM2: TLabel; - cboSectorTrailerAccessBitsAKM2: TComboBox; - lblSectorTrailerByte9AKM2: TLabel; - txtSectorTrailerByte9AKM2: TEdit; - btnLinearFormatAKM2: TButton; - lblSectorFormattedAKM2: TLabel; - txtSectorFormattedAKM2: TEdit; - lblBlockAccessBitsPK: TLabel; - cboBlockAccessBitsPK: TComboBox; - lblSectorTrailerAccessBitsPK: TLabel; - cboSectorTrailerAccessBitsPK: TComboBox; - lblSectorTrailerByte9PK: TLabel; - txtSectorTrailerByte9PK: TEdit; - btnLinearFormatPK: TButton; - lblSectorFormattedPK: TLabel; - txtSectorFormattedPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure btnLinearFormatClick(Sender: TObject); - procedure btnLinearFormatAKM1Click(Sender: TObject); - procedure btnLinearFormatAKM2Click(Sender: TObject); - procedure btnLinearFormatPKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - public - { Public declarations } - end; - -var - frmLinearFormatCard: TfrmLinearFormatCard; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmLinearFormatCard } - -procedure TfrmLinearFormatCard.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmLinearFormatCard.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearFormatCard.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; - -procedure TfrmLinearFormatCard.OnKeyAPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; -procedure TfrmLinearFormatCard.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmLinearFormatCard.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmLinearFormatCard.OnKeyBPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmLinearFormatCard.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyADefaultClick(Sender: TObject); -begin - //CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.chkKeyBDefaultClick(Sender: TObject); -begin - // CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; -end; - - - - -procedure TfrmLinearFormatCard.btnLinearFormatClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAccessBits :=cboBlockAccessBits.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9,pKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM1.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM1.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard_AKM1(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM2.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM2.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - iFResult:=LinearFormatCard_AKM2(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9PK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsPK.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsPK.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9PK.Text); - WriteKeyAB; - PKeyA:=@baKeyA; - PKeyB:=@baKeyB; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - iFResult:=LinearFormatCard_PK(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode,pPKkey); - if iFResult=DL_OK then - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; -finally - pKeyA :=nil; - pKeyB :=nil; - pPKKey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - - - - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.dcu b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.dcu deleted file mode 100644 index 002c2bf5e0f2bbaaec666e31fb63bd17ad491e7f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.ddp b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.dfm b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.dfm deleted file mode 100644 index 45dde048d5343ff6786563bf936e4e8139d59414..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.dfm +++ /dev/null @@ -1,1089 +0,0 @@ -object frmLinearReadWrite: TfrmLinearReadWrite - Left = 756 - Top = 224 - Width = 529 - Height = 428 - Caption = 'LinearRead/Write' - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Linear Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbLinearReadWrite: TStatusBar - Left = 0 - Top = 370 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - TabOrder = 2 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object pgLinearReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 313 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 3 - object tabLinearRead: TTabSheet - Caption = 'LinearRead' - object lblLinearRead: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLReadLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesRead: TLabel - Left = 176 - Top = 244 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 328 - Top = 228 - Width = 160 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 261 - Top = 242 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearRead: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM12: TTabSheet - Caption = 'LinearRead_AKM1/AKM2' - ImageIndex = 1 - object pgLinearReadAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 285 - ActivePage = tabLinearReadAKM1 - Align = alClient - TabOrder = 0 - object tabLinearReadAKM1: TTabSheet - Caption = 'LinearRead_AKM1' - object lblLRAKM1LinearRead: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRAKM1LinearAddress: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRAKM1DataLength: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM1: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM1Click - end - object txtReadBytesAKM1: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM2: TTabSheet - Caption = 'LinearRead_AKM2' - ImageIndex = 1 - object Label4: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM2: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM2Click - end - object txtReadBytesAKM2: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - end - end - object tabLinearReadPK: TTabSheet - Caption = 'LinearRead_PK' - ImageIndex = 2 - object Label7: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesPK: TLabel - Left = 169 - Top = 250 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadPK: TButton - Left = 322 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadPKClick - end - object txtReadBytesPK: TEdit - Left = 250 - Top = 247 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadPK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'LinearWrite' - ImageIndex = 3 - object lblLWLinearWrite: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWritten: TLabel - Left = 171 - Top = 244 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWrite: TButton - Left = 324 - Top = 228 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 256 - Top = 242 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWrite: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteChange - end - end - object tabLinearWriteAKM12: TTabSheet - Caption = 'LinearWrite_AKM1/AKM2' - ImageIndex = 4 - object pgLinearWriteAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 285 - ActivePage = tabLinearWriteAKM1 - Align = alClient - TabOrder = 0 - object tabLinearWriteAKM1: TTabSheet - Caption = 'LinearWrite_AKM1' - object lblLinearWriteAKM1: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM1: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM1: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM1: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM1Click - end - object txtBytesWrittenAKM1: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM1Change - end - end - object tabLinearWriteAKM2: TTabSheet - Caption = 'LinearWrite_AKM2' - ImageIndex = 1 - object lblLinearWriteAKM2: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM2: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM2Click - end - object txtBytesWrittenAKM2: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM2Change - end - end - end - end - object tabLinearWritePK: TTabSheet - Caption = 'LinearWrite_PK' - ImageIndex = 5 - object lblLinearWritePK: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenPK: TLabel - Left = 171 - Top = 249 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWritePK: TButton - Left = 323 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWritePKClick - end - object txtBytesWrittenPK: TEdit - Left = 256 - Top = 246 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWritePK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWritePKChange - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.pas b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.pas deleted file mode 100644 index 762b3d97c28013c8df31c88f23f4a9382a8dfdae..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.pas +++ /dev/null @@ -1,689 +0,0 @@ -unit LinearReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, - Global,uFCoder, ComCtrls, ExtCtrls; - -type - TfrmLinearReadWrite = class(TForm) - lblHeader: TStaticText; - stbLinearReadWrite: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblKeyIndex: TLabel; - cboKeyIndex: TComboBox; - lblPKKey: TLabel; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearReadAKM12: TTabSheet; - tabLinearReadPK: TTabSheet; - tabLinearWrite: TTabSheet; - tabLinearWriteAKM12: TTabSheet; - tabLinearWritePK: TTabSheet; - lblLinearRead: TLabel; - lblLReadLinearAddress: TLabel; - txtLRLinearAddress: TEdit; - lblLRDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - pgLinearReadAKM12: TPageControl; - tabLinearReadAKM1: TTabSheet; - tabLinearReadAKM2: TTabSheet; - lblLRAKM1LinearRead: TLabel; - lblLRAKM1LinearAddress: TLabel; - txtLRLinearAddressAKM1: TEdit; - lblLRAKM1DataLength: TLabel; - txtLRDataLengthAKM1: TEdit; - btnLinearReadAKM1: TButton; - Label4: TLabel; - lblLRLinearAddressAKM2: TLabel; - txtLRLinearAddressAKM2: TEdit; - txtLRDataLengthAKM2: TEdit; - btnLinearReadAKM2: TButton; - lblLRDataLengthAKM2: TLabel; - Label7: TLabel; - lblLRLinearAddressPK: TLabel; - txtLRLinearAddressPK: TEdit; - lblLRDataLengthPK: TLabel; - txtLRDataLengthPK: TEdit; - btnLinearReadPK: TButton; - lblLWLinearWrite: TLabel; - lblLWLinearAddress: TLabel; - txtLWLinearAddress: TEdit; - lblLWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - lblLinearWritePK: TLabel; - lblLWLinearAddressPK: TLabel; - txtLWLinearAddressPK: TEdit; - lblLWDataLengthPK: TLabel; - txtLWDataLengthPK: TEdit; - btnLinearWritePK: TButton; - pgLinearWriteAKM12: TPageControl; - tabLinearWriteAKM1: TTabSheet; - lblLinearWriteAKM1: TLabel; - lblLWLinearAddressAKM1: TLabel; - lblLWDataLengthAKM1: TLabel; - txtLWLinearAddressAKM1: TEdit; - txtLWDataLengthAKM1: TEdit; - btnLinearWriteAKM1: TButton; - tabLinearWriteAKM2: TTabSheet; - lblLinearWriteAKM2: TLabel; - lblLWLinearAddressAKM2: TLabel; - lblLWDataLengthAKM2: TLabel; - txtLWLinearAddressAKM2: TEdit; - txtLWDataLengthAKM2: TEdit; - btnLinearWriteAKM2: TButton; - lblBytesRead: TLabel; - txtReadBytes: TEdit; - lblReadBytesAKM1: TLabel; - txtReadBytesAKM1: TEdit; - lblReadBytesAKM2: TLabel; - txtReadBytesAKM2: TEdit; - lblReadBytesPK: TLabel; - txtReadBytesPK: TEdit; - lblBytesWritten: TLabel; - txtBytesWritten: TEdit; - lblBytesWrittenAKM1: TLabel; - txtBytesWrittenAKM1: TEdit; - lblBytesWrittenAKM2: TLabel; - txtBytesWrittenAKM2: TEdit; - lblBytesWrittenPK: TLabel; - txtBytesWrittenPK: TEdit; - txtLinearRead: TRichEdit; - txtLinearReadAKM1: TRichEdit; - txtLinearReadAKM2: TRichEdit; - txtLinearReadPK: TRichEdit; - txtLinearWrite: TRichEdit; - txtLinearWritePK: TRichEdit; - txtLinearWriteAKM1: TRichEdit; - txtLinearWriteAKM2: TRichEdit; - procedure FormCreate(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearReadAKM1Click(Sender: TObject); - procedure btnLinearReadAKM2Click(Sender: TObject); - procedure btnLinearReadPKClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnLinearWriteAKM1Click(Sender: TObject); - procedure btnLinearWriteAKM2Click(Sender: TObject); - procedure btnLinearWritePKClick(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - procedure txtLinearWriteAKM2Change(Sender: TObject); - procedure txtLinearWriteAKM1Change(Sender: TObject); - procedure txtLinearWritePKChange(Sender: TObject); - private - - procedure OnPKKeyExit(Sender:TObject); - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - public - { Public declarations } - end; - type - TByteArray=array of Byte; -var - frmLinearReadWrite: TfrmLinearReadWrite; - - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmLinearReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmLinearReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmLinearReadWrite.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLRLinearAddress.Text); - wDataLength :=StrToInt(txtLRDataLength.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - txtLinearRead.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(Trim(txtLRLinearAddressAKM1.Text)); - wDataLength :=StrToInt(Trim(txtLRDataLengthAKM1.Text)); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM1(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtLinearReadAKM1.Text:=String(baReadData); - txtReadBytesAKM1.Text :=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM1.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLRDataLengthAKM2.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM2(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtReadBytesAKM2.Text :=IntToStr(wBytesRet); - txtLinearReadAKM2.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM2.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadPKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - bBr :Byte; -begin - try - if Trim(txtLRLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - New(pData); - New(pPKKey); - - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressPK.Text); - wDataLength :=StrToInt(txtLRDataLengthPK.Text); - - SetLength(baReadData,wDataLength); - pData :=PByte(@baReadData[0]); - pPKKEY:=@PKKey; - iFResult:=LinearRead_PK(pData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtLinearReadPK.Text:=String(baReadData); - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLWLinearAddress.Text); - wDataLength :=StrToInt(txtLWDataLength.Text); - pData :=PByte(txtLinearWrite.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM1.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM1.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM1.Text); - pData :=PByte(txtLinearWriteAKM1.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM1(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM2.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM2.Text); - pData :=PByte(txtLinearWriteAKM2.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM2(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWritePKClick(Sender: TObject); -var - pPKKEY, - pData :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLinearWritePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWritePK.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressPK.Text); - wDataLength :=StrToInt(txtLWDataLengthPK.Text); - pData :=PByte(txtLinearWritePK.Text); - pPKKEY :=@PKKey; - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_PK(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,pPKKEY); - if iFResult=DL_OK then - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKEY); - frmuFrAdvanced.FunctionStart:=false; - end; - end; - - - -procedure TfrmLinearReadWrite.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(Trim(txtLinearWrite.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM2Change(Sender: TObject); -begin - txtLWDataLengthAKM2.Text:=IntToStr(Length(Trim(txtLinearWriteAKM2.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM1Change(Sender: TObject); -begin - txtLWDataLengthAKM1.Text:=IntToStr(Length(Trim(txtLinearWriteAKM1.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWritePKChange(Sender: TObject); -begin - txtLWDataLengthPK.Text:=IntToStr(Length(Trim(txtLinearWritePK.Text))); -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~ddp b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~dfm b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~dfm deleted file mode 100644 index 8b9619cda97f3b1f6aeba9cd7111c4e8b706945e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~dfm +++ /dev/null @@ -1,1089 +0,0 @@ -object frmLinearReadWrite: TfrmLinearReadWrite - Left = 403 - Top = 171 - Width = 529 - Height = 428 - Caption = 'LinearRead/Write' - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Linear Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbLinearReadWrite: TStatusBar - Left = 0 - Top = 371 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - TabOrder = 2 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object pgLinearReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 314 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 3 - object tabLinearRead: TTabSheet - Caption = 'LinearRead' - object lblLinearRead: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLReadLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesRead: TLabel - Left = 176 - Top = 244 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 328 - Top = 228 - Width = 160 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 261 - Top = 242 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearRead: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM12: TTabSheet - Caption = 'LinearRead_AKM1/AKM2' - ImageIndex = 1 - object pgLinearReadAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 286 - ActivePage = tabLinearReadAKM1 - Align = alClient - TabOrder = 0 - object tabLinearReadAKM1: TTabSheet - Caption = 'LinearRead_AKM1' - object lblLRAKM1LinearRead: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRAKM1LinearAddress: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRAKM1DataLength: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM1: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM1Click - end - object txtReadBytesAKM1: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM2: TTabSheet - Caption = 'LinearRead_AKM2' - ImageIndex = 1 - object Label4: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM2: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM2Click - end - object txtReadBytesAKM2: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - end - end - object tabLinearReadPK: TTabSheet - Caption = 'LinearRead_PK' - ImageIndex = 2 - object Label7: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesPK: TLabel - Left = 169 - Top = 250 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadPK: TButton - Left = 322 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadPKClick - end - object txtReadBytesPK: TEdit - Left = 250 - Top = 247 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadPK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'LinearWrite' - ImageIndex = 3 - object lblLWLinearWrite: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWritten: TLabel - Left = 171 - Top = 244 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWrite: TButton - Left = 324 - Top = 228 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 256 - Top = 242 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWrite: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteChange - end - end - object tabLinearWriteAKM12: TTabSheet - Caption = 'LinearWrite_AKM1/AKM2' - ImageIndex = 4 - object pgLinearWriteAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 286 - ActivePage = tabLinearWriteAKM1 - Align = alClient - TabOrder = 0 - object tabLinearWriteAKM1: TTabSheet - Caption = 'LinearWrite_AKM1' - object lblLinearWriteAKM1: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM1: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM1: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM1: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM1Click - end - object txtBytesWrittenAKM1: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM1Change - end - end - object tabLinearWriteAKM2: TTabSheet - Caption = 'LinearWrite_AKM2' - ImageIndex = 1 - object lblLinearWriteAKM2: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM2: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM2Click - end - object txtBytesWrittenAKM2: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM2Change - end - end - end - end - object tabLinearWritePK: TTabSheet - Caption = 'LinearWrite_PK' - ImageIndex = 5 - object lblLinearWritePK: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenPK: TLabel - Left = 171 - Top = 249 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWritePK: TButton - Left = 323 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWritePKClick - end - object txtBytesWrittenPK: TEdit - Left = 256 - Top = 246 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWritePK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWritePKChange - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~pas b/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~pas deleted file mode 100644 index 1e5f30a7997c9078639f2cd98cd3832b3a6b679c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/LinearReadWrite.~pas +++ /dev/null @@ -1,689 +0,0 @@ -unit LinearReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, - Global,uFCoder1x, ComCtrls, ExtCtrls; - -type - TfrmLinearReadWrite = class(TForm) - lblHeader: TStaticText; - stbLinearReadWrite: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblKeyIndex: TLabel; - cboKeyIndex: TComboBox; - lblPKKey: TLabel; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearReadAKM12: TTabSheet; - tabLinearReadPK: TTabSheet; - tabLinearWrite: TTabSheet; - tabLinearWriteAKM12: TTabSheet; - tabLinearWritePK: TTabSheet; - lblLinearRead: TLabel; - lblLReadLinearAddress: TLabel; - txtLRLinearAddress: TEdit; - lblLRDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - pgLinearReadAKM12: TPageControl; - tabLinearReadAKM1: TTabSheet; - tabLinearReadAKM2: TTabSheet; - lblLRAKM1LinearRead: TLabel; - lblLRAKM1LinearAddress: TLabel; - txtLRLinearAddressAKM1: TEdit; - lblLRAKM1DataLength: TLabel; - txtLRDataLengthAKM1: TEdit; - btnLinearReadAKM1: TButton; - Label4: TLabel; - lblLRLinearAddressAKM2: TLabel; - txtLRLinearAddressAKM2: TEdit; - txtLRDataLengthAKM2: TEdit; - btnLinearReadAKM2: TButton; - lblLRDataLengthAKM2: TLabel; - Label7: TLabel; - lblLRLinearAddressPK: TLabel; - txtLRLinearAddressPK: TEdit; - lblLRDataLengthPK: TLabel; - txtLRDataLengthPK: TEdit; - btnLinearReadPK: TButton; - lblLWLinearWrite: TLabel; - lblLWLinearAddress: TLabel; - txtLWLinearAddress: TEdit; - lblLWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - lblLinearWritePK: TLabel; - lblLWLinearAddressPK: TLabel; - txtLWLinearAddressPK: TEdit; - lblLWDataLengthPK: TLabel; - txtLWDataLengthPK: TEdit; - btnLinearWritePK: TButton; - pgLinearWriteAKM12: TPageControl; - tabLinearWriteAKM1: TTabSheet; - lblLinearWriteAKM1: TLabel; - lblLWLinearAddressAKM1: TLabel; - lblLWDataLengthAKM1: TLabel; - txtLWLinearAddressAKM1: TEdit; - txtLWDataLengthAKM1: TEdit; - btnLinearWriteAKM1: TButton; - tabLinearWriteAKM2: TTabSheet; - lblLinearWriteAKM2: TLabel; - lblLWLinearAddressAKM2: TLabel; - lblLWDataLengthAKM2: TLabel; - txtLWLinearAddressAKM2: TEdit; - txtLWDataLengthAKM2: TEdit; - btnLinearWriteAKM2: TButton; - lblBytesRead: TLabel; - txtReadBytes: TEdit; - lblReadBytesAKM1: TLabel; - txtReadBytesAKM1: TEdit; - lblReadBytesAKM2: TLabel; - txtReadBytesAKM2: TEdit; - lblReadBytesPK: TLabel; - txtReadBytesPK: TEdit; - lblBytesWritten: TLabel; - txtBytesWritten: TEdit; - lblBytesWrittenAKM1: TLabel; - txtBytesWrittenAKM1: TEdit; - lblBytesWrittenAKM2: TLabel; - txtBytesWrittenAKM2: TEdit; - lblBytesWrittenPK: TLabel; - txtBytesWrittenPK: TEdit; - txtLinearRead: TRichEdit; - txtLinearReadAKM1: TRichEdit; - txtLinearReadAKM2: TRichEdit; - txtLinearReadPK: TRichEdit; - txtLinearWrite: TRichEdit; - txtLinearWritePK: TRichEdit; - txtLinearWriteAKM1: TRichEdit; - txtLinearWriteAKM2: TRichEdit; - procedure FormCreate(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearReadAKM1Click(Sender: TObject); - procedure btnLinearReadAKM2Click(Sender: TObject); - procedure btnLinearReadPKClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnLinearWriteAKM1Click(Sender: TObject); - procedure btnLinearWriteAKM2Click(Sender: TObject); - procedure btnLinearWritePKClick(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - procedure txtLinearWriteAKM2Change(Sender: TObject); - procedure txtLinearWriteAKM1Change(Sender: TObject); - procedure txtLinearWritePKChange(Sender: TObject); - private - - procedure OnPKKeyExit(Sender:TObject); - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - public - { Public declarations } - end; - type - TByteArray=array of Byte; -var - frmLinearReadWrite: TfrmLinearReadWrite; - - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmLinearReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmLinearReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmLinearReadWrite.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLRLinearAddress.Text); - wDataLength :=StrToInt(txtLRDataLength.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - txtLinearRead.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(Trim(txtLRLinearAddressAKM1.Text)); - wDataLength :=StrToInt(Trim(txtLRDataLengthAKM1.Text)); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM1(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtLinearReadAKM1.Text:=String(baReadData); - txtReadBytesAKM1.Text :=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM1.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLRDataLengthAKM2.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM2(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtReadBytesAKM2.Text :=IntToStr(wBytesRet); - txtLinearReadAKM2.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM2.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadPKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - bBr :Byte; -begin - try - if Trim(txtLRLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - New(pData); - New(pPKKey); - - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressPK.Text); - wDataLength :=StrToInt(txtLRDataLengthPK.Text); - - SetLength(baReadData,wDataLength); - pData :=PByte(@baReadData[0]); - pPKKEY:=@PKKey; - iFResult:=LinearRead_PK(pData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtLinearReadPK.Text:=String(baReadData); - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLWLinearAddress.Text); - wDataLength :=StrToInt(txtLWDataLength.Text); - pData :=PByte(txtLinearWrite.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM1.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM1.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM1.Text); - pData :=PByte(txtLinearWriteAKM1.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM1(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM2.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM2.Text); - pData :=PByte(txtLinearWriteAKM2.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM2(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWritePKClick(Sender: TObject); -var - pPKKEY, - pData :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLinearWritePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWritePK.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressPK.Text); - wDataLength :=StrToInt(txtLWDataLengthPK.Text); - pData :=PByte(txtLinearWritePK.Text); - pPKKEY :=@PKKey; - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_PK(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,pPKKEY); - if iFResult=DL_OK then - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKEY); - frmuFrAdvanced.FunctionStart:=false; - end; - end; - - - -procedure TfrmLinearReadWrite.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(Trim(txtLinearWrite.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM2Change(Sender: TObject); -begin - txtLWDataLengthAKM2.Text:=IntToStr(Length(Trim(txtLinearWriteAKM2.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM1Change(Sender: TObject); -begin - txtLWDataLengthAKM1.Text:=IntToStr(Length(Trim(txtLinearWriteAKM1.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWritePKChange(Sender: TObject); -begin - txtLWDataLengthPK.Text:=IntToStr(Length(Trim(txtLinearWritePK.Text))); -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.dcu b/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.dcu deleted file mode 100644 index f8be859138c5d1c14a4d7b807ec6ebd59194e551..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.ddp b/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.dfm b/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.dfm deleted file mode 100644 index bb49d1c2f4547c0f4dc18dc076d0e31610e29aff..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.dfm +++ /dev/null @@ -1,1117 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 379 - Top = 147 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 521 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 521 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 414 - Width = 521 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 521 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - object chkKeyADefault: TCheckBox - Left = 170 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Default' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chkKeyADefaultClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 260 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 258 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - object chkKeyBDefault: TCheckBox - Left = 170 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Default' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chkKeyBDefaultClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 521 - Height = 261 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.pas b/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.pas deleted file mode 100644 index 1780c3096ac9519d590d0c4d8a781159fab460fb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/SectorTrailerWrite.pas +++ /dev/null @@ -1,244 +0,0 @@ -unit SectorTrailerWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyADefault: TCheckBox; - chkKeyBHex: TCheckBox; - chkKeyBDefault: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - private - res:DL_STATUS; - KeyA:array[0..5] of Byte; - KeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - UFRCoder; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',true,OnKeyAPress); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',true,OnKeyBPress); -end; - -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin - CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin - CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - KeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - KeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else begin - for br:=0 to 5 do begin - KeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - KeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - key_index:Byte; - auth_mode:Byte; - addressing_mode:Byte; - block_or_sector_address:Byte; - access_bits0:Byte; - access_bits1:Byte; - access_bits2:Byte; - trailer_access_bits:Byte; - trailer_Byte_9:Byte; - PKeyA:PByte; - PKeyB:PByte; -begin - - PKeyA:=nil; - PKeyB:=nil; - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then begin - MessageDlg('You must enter BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then begin - MessageDlg('You must enter TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - key_index:=cboKeyIndex.ItemIndex; - if rbAUTH1A.Checked then auth_mode:=MIFARE_AUTHENT1A else auth_mode:=MIFARE_AUTHENT1B; - - addressing_mode:=cboAddressingMode.ItemIndex; - block_or_sector_address:=StrToInt(txtBlockSectorAddress.Text); - access_bits0:=cboAccessBits0.ItemIndex; - access_bits1:=cboAccessBits1.ItemIndex; - access_bits2:=cboAccessBits2.ItemIndex; - trailer_access_bits:=cboTrailerAccessBits.ItemIndex; - trailer_Byte_9:=StrToInt(txtTrailerByte9.text); - WriteKeyAB; - PKeyA:=@KeyA; - PKeyB:=@KeyB; - res:=SectorTrailerWrite(addressing_mode,block_or_sector_address,PKeyA,access_bits0,access_bits1, - access_bits2,trailer_access_bits,trailer_Byte_9,PKeyB,auth_mode,key_index); - - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbSectorTrailerWrite,res); - end - else - begin - ReaderUiSignal(ERROR_LIGHT,ERROR_SOUND); - Status_Bar_Error_Reporting(stbSectorTrailerWrite,res); - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.dcu b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.dcu deleted file mode 100644 index 6879d87f9a84097a5fda818c4ba3d850f4886297..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.ddp b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.dfm b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.dfm deleted file mode 100644 index 26b053bef01e3f512e79895635ab6cd969b1bd72..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.dfm +++ /dev/null @@ -1,1100 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 389 - Top = 154 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 402 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 513 - Height = 249 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM1Click - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM2Click - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWritePKClick - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.pas b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.pas deleted file mode 100644 index 17e935f2abec2edcbc90fffe75d70f4d0e0726be..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.pas +++ /dev/null @@ -1,520 +0,0 @@ -unit SectorTrailersWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyBHex: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - procedure btnSectorTrailerWriteAKM1Click(Sender: TObject); - procedure btnSectorTrailerWriteAKM2Click(Sender: TObject); - procedure btnSectorTrailerWritePKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmSectorTrailerWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; -procedure TfrmSectorTrailerWrite.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmSectorTrailerWrite.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - - bAddressingMode :=cboAddressingMode.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddress.Text); - bAccessBits0 :=cboAccessBits0.ItemIndex; - bAccessBits1 :=cboAccessBits1.ItemIndex; - bAccessBits2 :=cboAccessBits2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9.text); - - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM1.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM1.Text); - bAccessBits0 :=cboAccessBits0AKM1.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM1.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM1.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM1.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM1(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM2(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9PK.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=SectorTrailerWrite_PK(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode, - pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA :=nil; - pKeyB :=nil; - pPKkey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~ddp b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~dfm b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~dfm deleted file mode 100644 index 1503392c97d5e21a5c95222ec895e52d5e67cd2e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~dfm +++ /dev/null @@ -1,1100 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 389 - Top = 154 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 403 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 513 - Height = 250 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM1Click - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM2Click - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWritePKClick - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~pas b/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~pas deleted file mode 100644 index d5021db3944e85ccaa930b126c251e030756bd4d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/SectorTrailersWrite.~pas +++ /dev/null @@ -1,520 +0,0 @@ -unit SectorTrailersWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyBHex: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - procedure btnSectorTrailerWriteAKM1Click(Sender: TObject); - procedure btnSectorTrailerWriteAKM2Click(Sender: TObject); - procedure btnSectorTrailerWritePKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmSectorTrailerWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; -procedure TfrmSectorTrailerWrite.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmSectorTrailerWrite.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - - bAddressingMode :=cboAddressingMode.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddress.Text); - bAccessBits0 :=cboAccessBits0.ItemIndex; - bAccessBits1 :=cboAccessBits1.ItemIndex; - bAccessBits2 :=cboAccessBits2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9.text); - - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM1.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM1.Text); - bAccessBits0 :=cboAccessBits0AKM1.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM1.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM1.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM1.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM1(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM2(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9PK.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=SectorTrailerWrite_PK(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode, - pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA :=nil; - pKeyB :=nil; - pPKkey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.dcu b/old_move_to_branch/uFCoderAdvance/ValueBlock.dcu deleted file mode 100644 index 3b197f6f921458d9bd4ff72a41f1ecd7149b064b..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlock.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.ddp b/old_move_to_branch/uFCoderAdvance/ValueBlock.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlock.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.dfm b/old_move_to_branch/uFCoderAdvance/ValueBlock.dfm deleted file mode 100644 index 827585cf4ad3dcc94ceeb276007e6ef3f52165d4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlock.dfm +++ /dev/null @@ -1,1093 +0,0 @@ -object frmValueBlockReadWrite: TfrmValueBlockReadWrite - Left = 531 - Top = 222 - Width = 529 - Height = 420 - Caption = 'ValueBlockReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockReadWrite: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 305 - ActivePage = tavValueBlockRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockRead: TTabSheet - Caption = 'ValueBlock Read' - object pnlValueBlockRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBRValueAddress: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadData: TLabel - Left = 9 - Top = 86 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddress: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBRValueAddress: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtVBRReadValue: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockValueRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockValueReadClick - end - object txtVBRBlockAddress: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBRValueAddressAKM1: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM1: TLabel - Left = 9 - Top = 86 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM1: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM1: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM1: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM1: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM1Click - end - object txtVBRBlockAddressAKM1: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBRValueAddressAKM2: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM2: TLabel - Left = 9 - Top = 90 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM2: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM2: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM2: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM2: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM2Click - end - object txtVBRBlockAddressAKM2: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBRValueAddressPK: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValuePK: TLabel - Left = 9 - Top = 90 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressPK: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressPK: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValuePK: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadPK: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadPKClick - end - object txtVBRBlockAddressPK: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - end - object tabValueBlockWrite: TTabSheet - Caption = 'ValueBlock Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBWWriteData: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddress: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddress: TLabel - Left = 9 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 127 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteData: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWrite: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteClick - end - object txtVBWBlockAddress: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddress: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBWWriteDataAKM1: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM1: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM1: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM1: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM1Click - end - object txtVBWBlockAddressAKM1: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM1: TEdit - Left = 114 - Top = 94 - Width = 37 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBWWriteDataAKM2: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWAKM2: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM2: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM2: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 55 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM2Click - end - object txtVBWBlockAddressAKM2: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM2: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label9: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressPK: TLabel - Left = 9 - Top = 100 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWPK: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataPK: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWritePK: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWritePKClick - end - object txtVBWBlockAddressPK: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressPK: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.pas b/old_move_to_branch/uFCoderAdvance/ValueBlock.pas deleted file mode 100644 index a8e6919cfa35daa16b7d07ed67a59168a2a25536..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlock.pas +++ /dev/null @@ -1,599 +0,0 @@ -unit ValueBlock; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, - Forms,Dialogs,Global,uFCoder, - ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockReadWrite: TStatusBar; - pgValueBlockReadWrite: TPageControl; - tavValueBlockRead: TTabSheet; - pnlValueBlockRead: TPanel; - lblVBRValueAddress: TLabel; - lblVBRReadData: TLabel; - lblVBRBlockAddress: TLabel; - lblVBRead: TStaticText; - txtVBRValueAddress: TEdit; - txtVBRReadValue: TEdit; - btnBlockValueRead: TButton; - txtVBRBlockAddress: TEdit; - pnlValueBlockReadAKM1: TPanel; - lblVBRAKM1: TStaticText; - pnlValueBlockReadAKM2: TPanel; - lblVBRAKM2: TStaticText; - pnlValueBlockReadPK: TPanel; - lblBRPK: TStaticText; - tabValueBlockWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblVBWWriteData: TLabel; - lblVBWBlockAddress: TLabel; - lblBISWBlockWrite: TStaticText; - txtVBWWriteData: TEdit; - btnValueBlockWrite: TButton; - txtVBWBlockAddress: TEdit; - pnlBlockWriteAKM1: TPanel; - lblVBWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblVBWAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblVBWPK: TStaticText; - lblVBRValueAddressAKM1: TLabel; - lblVBRReadValueAKM1: TLabel; - lblVBRBlockAddressAKM1: TLabel; - txtVBRValueAddressAKM1: TEdit; - txtVBRReadValueAKM1: TEdit; - btnValueBlockReadAKM1: TButton; - txtVBRBlockAddressAKM1: TEdit; - lblVBRValueAddressAKM2: TLabel; - lblVBRReadValueAKM2: TLabel; - lblVBRBlockAddressAKM2: TLabel; - txtVBRValueAddressAKM2: TEdit; - txtVBRReadValueAKM2: TEdit; - btnValueBlockReadAKM2: TButton; - txtVBRBlockAddressAKM2: TEdit; - lblVBRValueAddressPK: TLabel; - lblVBRReadValuePK: TLabel; - lblVBRBlockAddressPK: TLabel; - txtVBRValueAddressPK: TEdit; - txtVBRReadValuePK: TEdit; - btnValueBlockReadPK: TButton; - txtVBRBlockAddressPK: TEdit; - lblVBWValueAddress: TLabel; - txtVBWValueAddress: TEdit; - lblVBWWriteDataAKM1: TLabel; - lblVBWBlockAddressAKM1: TLabel; - txtVBWWriteDataAKM1: TEdit; - btnValueBlockWriteAKM1: TButton; - txtVBWBlockAddressAKM1: TEdit; - lblVBWValueAddressAKM1: TLabel; - txtVBWValueAddressAKM1: TEdit; - lblVBWWriteDataAKM2: TLabel; - lblVBWBlockAddressAKM2: TLabel; - txtVBWWriteDataAKM2: TEdit; - btnValueBlockWriteAKM2: TButton; - txtVBWBlockAddressAKM2: TEdit; - txtVBWValueAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - Label9: TLabel; - txtVBWWriteDataPK: TEdit; - btnValueBlockWritePK: TButton; - txtVBWBlockAddressPK: TEdit; - lblVBWValueAddressPK: TLabel; - txtVBWValueAddressPK: TEdit; - lblVBWValueAddressAKM2: TLabel; - procedure FormCreate(Sender: TObject); - procedure btnBlockValueReadClick(Sender: TObject); - procedure btnValueBlockReadAKM1Click(Sender: TObject); - procedure btnValueBlockReadAKM2Click(Sender: TObject); - procedure btnValueBlockReadPKClick(Sender: TObject); - procedure btnValueBlockWriteClick(Sender: TObject); - procedure btnValueBlockWriteAKM1Click(Sender: TObject); - procedure btnValueBlockWriteAKM2Click(Sender: TObject); - procedure btnValueBlockWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockReadWrite: TfrmValueBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockReadWrite } - -procedure TfrmValueBlockReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockReadWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockReadWrite.btnBlockValueReadClick(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead(pData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtVBRValueAddress.Text:=IntToStr(bValueAddress); - txtVBRReadValue.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM1Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressAKM1.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM1(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM1.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM1.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM2Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM2(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM2.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM2.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - pData :PLongint; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressPK.Text); - pData :=@iValueData; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - - iFResult:=ValueBlockRead_PK(pData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtVBRValueAddressPK.Text:=IntToStr(bValueAddress); - txtVBRReadValuePK.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteClick(Sender: TObject); -var - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddress.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBWWriteData.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBWValueAddress.Text); - - iFResult:=ValueBlockWrite(iValueData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM1Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM1.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM1.Text); - - iFResult:=ValueBlockWrite_AKM1(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM2Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM2.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM2.Text); - - iFResult:=ValueBlockWrite_AKM2(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressPK.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataPK.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBWValueAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockWrite_PK(iValueData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.~ddp b/old_move_to_branch/uFCoderAdvance/ValueBlock.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlock.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.~dfm b/old_move_to_branch/uFCoderAdvance/ValueBlock.~dfm deleted file mode 100644 index 0b87065006a58a72d8a6fd03c67f46e834527ae5..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlock.~dfm +++ /dev/null @@ -1,1093 +0,0 @@ -object frmValueBlockReadWrite: TfrmValueBlockReadWrite - Left = 531 - Top = 222 - Width = 529 - Height = 420 - Caption = 'ValueBlockReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockReadWrite: TStatusBar - Left = 0 - Top = 363 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 306 - ActivePage = tavValueBlockRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockRead: TTabSheet - Caption = 'ValueBlock Read' - object pnlValueBlockRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBRValueAddress: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadData: TLabel - Left = 9 - Top = 86 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddress: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBRValueAddress: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtVBRReadValue: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockValueRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockValueReadClick - end - object txtVBRBlockAddress: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBRValueAddressAKM1: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM1: TLabel - Left = 9 - Top = 86 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM1: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM1: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM1: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM1: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM1Click - end - object txtVBRBlockAddressAKM1: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBRValueAddressAKM2: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM2: TLabel - Left = 9 - Top = 90 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM2: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM2: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM2: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM2: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM2Click - end - object txtVBRBlockAddressAKM2: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBRValueAddressPK: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValuePK: TLabel - Left = 9 - Top = 90 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressPK: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressPK: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValuePK: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadPK: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadPKClick - end - object txtVBRBlockAddressPK: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - end - object tabValueBlockWrite: TTabSheet - Caption = 'ValueBlock Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBWWriteData: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddress: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddress: TLabel - Left = 9 - Top = 98 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 127 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteData: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWrite: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteClick - end - object txtVBWBlockAddress: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddress: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBWWriteDataAKM1: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM1: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM1: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM1: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM1Click - end - object txtVBWBlockAddressAKM1: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM1: TEdit - Left = 114 - Top = 94 - Width = 37 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBWWriteDataAKM2: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWAKM2: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM2: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM2: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 55 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM2Click - end - object txtVBWBlockAddressAKM2: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM2: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label9: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressPK: TLabel - Left = 9 - Top = 100 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWPK: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataPK: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWritePK: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWritePKClick - end - object txtVBWBlockAddressPK: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressPK: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlock.~pas b/old_move_to_branch/uFCoderAdvance/ValueBlock.~pas deleted file mode 100644 index 68ef347c34422328b77654cf6243edc43f616a00..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlock.~pas +++ /dev/null @@ -1,598 +0,0 @@ -unit ValueBlock; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs,Global,uFCoder1x, - ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockReadWrite: TStatusBar; - pgValueBlockReadWrite: TPageControl; - tavValueBlockRead: TTabSheet; - pnlValueBlockRead: TPanel; - lblVBRValueAddress: TLabel; - lblVBRReadData: TLabel; - lblVBRBlockAddress: TLabel; - lblVBRead: TStaticText; - txtVBRValueAddress: TEdit; - txtVBRReadValue: TEdit; - btnBlockValueRead: TButton; - txtVBRBlockAddress: TEdit; - pnlValueBlockReadAKM1: TPanel; - lblVBRAKM1: TStaticText; - pnlValueBlockReadAKM2: TPanel; - lblVBRAKM2: TStaticText; - pnlValueBlockReadPK: TPanel; - lblBRPK: TStaticText; - tabValueBlockWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblVBWWriteData: TLabel; - lblVBWBlockAddress: TLabel; - lblBISWBlockWrite: TStaticText; - txtVBWWriteData: TEdit; - btnValueBlockWrite: TButton; - txtVBWBlockAddress: TEdit; - pnlBlockWriteAKM1: TPanel; - lblVBWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblVBWAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblVBWPK: TStaticText; - lblVBRValueAddressAKM1: TLabel; - lblVBRReadValueAKM1: TLabel; - lblVBRBlockAddressAKM1: TLabel; - txtVBRValueAddressAKM1: TEdit; - txtVBRReadValueAKM1: TEdit; - btnValueBlockReadAKM1: TButton; - txtVBRBlockAddressAKM1: TEdit; - lblVBRValueAddressAKM2: TLabel; - lblVBRReadValueAKM2: TLabel; - lblVBRBlockAddressAKM2: TLabel; - txtVBRValueAddressAKM2: TEdit; - txtVBRReadValueAKM2: TEdit; - btnValueBlockReadAKM2: TButton; - txtVBRBlockAddressAKM2: TEdit; - lblVBRValueAddressPK: TLabel; - lblVBRReadValuePK: TLabel; - lblVBRBlockAddressPK: TLabel; - txtVBRValueAddressPK: TEdit; - txtVBRReadValuePK: TEdit; - btnValueBlockReadPK: TButton; - txtVBRBlockAddressPK: TEdit; - lblVBWValueAddress: TLabel; - txtVBWValueAddress: TEdit; - lblVBWWriteDataAKM1: TLabel; - lblVBWBlockAddressAKM1: TLabel; - txtVBWWriteDataAKM1: TEdit; - btnValueBlockWriteAKM1: TButton; - txtVBWBlockAddressAKM1: TEdit; - lblVBWValueAddressAKM1: TLabel; - txtVBWValueAddressAKM1: TEdit; - lblVBWWriteDataAKM2: TLabel; - lblVBWBlockAddressAKM2: TLabel; - txtVBWWriteDataAKM2: TEdit; - btnValueBlockWriteAKM2: TButton; - txtVBWBlockAddressAKM2: TEdit; - txtVBWValueAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - Label9: TLabel; - txtVBWWriteDataPK: TEdit; - btnValueBlockWritePK: TButton; - txtVBWBlockAddressPK: TEdit; - lblVBWValueAddressPK: TLabel; - txtVBWValueAddressPK: TEdit; - lblVBWValueAddressAKM2: TLabel; - procedure FormCreate(Sender: TObject); - procedure btnBlockValueReadClick(Sender: TObject); - procedure btnValueBlockReadAKM1Click(Sender: TObject); - procedure btnValueBlockReadAKM2Click(Sender: TObject); - procedure btnValueBlockReadPKClick(Sender: TObject); - procedure btnValueBlockWriteClick(Sender: TObject); - procedure btnValueBlockWriteAKM1Click(Sender: TObject); - procedure btnValueBlockWriteAKM2Click(Sender: TObject); - procedure btnValueBlockWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockReadWrite: TfrmValueBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockReadWrite } - -procedure TfrmValueBlockReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockReadWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockReadWrite.btnBlockValueReadClick(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead(pData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtVBRValueAddress.Text:=IntToStr(bValueAddress); - txtVBRReadValue.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM1Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressAKM1.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM1(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM1.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM1.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM2Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM2(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM2.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM2.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - pData :PLongint; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressPK.Text); - pData :=@iValueData; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - - iFResult:=ValueBlockRead_PK(pData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtVBRValueAddressPK.Text:=IntToStr(bValueAddress); - txtVBRReadValuePK.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteClick(Sender: TObject); -var - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddress.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBWWriteData.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBWValueAddress.Text); - - iFResult:=ValueBlockWrite(iValueData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM1Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM1.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM1.Text); - - iFResult:=ValueBlockWrite_AKM1(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM2Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM2.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM2.Text); - - iFResult:=ValueBlockWrite_AKM2(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressPK.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataPK.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBWValueAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockWrite_PK(iValueData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.dcu b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.dcu deleted file mode 100644 index 47d8e8693ed213841a181e917b801c31aa237b06..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.ddp b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.dfm b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.dfm deleted file mode 100644 index 6cbb651b78293e8ad0134ce07faa0db2f8ed6113..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.dfm +++ /dev/null @@ -1,1265 +0,0 @@ -object frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite - Left = 519 - Top = 130 - Width = 527 - Height = 418 - Caption = 'ValueBlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 511 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read/Write (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 511 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSector: TStatusBar - Left = 0 - Top = 360 - Width = 511 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSector: TPageControl - Left = 0 - Top = 57 - Width = 511 - Height = 303 - ActivePage = tabValueBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorRead: TTabSheet - Caption = 'ValueBlockInSector Read' - object pnlValueBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadData: TLabel - Left = 8 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddress: TLabel - Left = 156 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadData: TEdit - Left = 6 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadClick - end - object txtVBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddress: TEdit - Left = 205 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadDataAKM1: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddressAKM1: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadDataAKM1: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM1Click - end - object txtVBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddressAKM1: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataAKM2: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressAKM2: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM2Click - end - object txtVBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataAKM2: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressAKM2: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataPK: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressPK: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadPKClick - end - object txtVBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataPK: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressPK: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - end - object tabValueBlockInSectorWrite: TTabSheet - Caption = 'ValueBlockInSector Write' - ImageIndex = 1 - object pnlVBISBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM1: TLabel - Left = 10 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM1: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM1: TLabel - Left = 156 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 234 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM1: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM1Click - end - object txtVBISWBlockAddressAKM1: TEdit - Left = 103 - Top = 55 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM1: TEdit - Left = 9 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM1: TEdit - Left = 103 - Top = 29 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM1: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 61 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM2: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM2: TLabel - Left = 9 - Top = 34 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM2: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 234 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM2: TButton - Left = 157 - Top = 28 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM2Click - end - object txtVBISWBlockAddressAKM2: TEdit - Left = 104 - Top = 56 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM2: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM2: TEdit - Left = 104 - Top = 30 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM2: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISWBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataPK: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddressPK: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddressPK: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 212 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWritePK: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWritePKClick - end - object txtVBISWBlockAddressPK: TEdit - Left = 102 - Top = 55 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataPK: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddressPK: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddressPK: TEdit - Left = 102 - Top = 29 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - object pnlVBISBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISWBlockAddress: TLabel - Left = 8 - Top = 62 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteData: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddress: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddress: TLabel - Left = 9 - Top = 36 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 189 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWrite: TButton - Left = 157 - Top = 30 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteClick - end - object txtVBISWBlockAddress: TEdit - Left = 105 - Top = 57 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteData: TEdit - Left = 8 - Top = 102 - Width = 144 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddress: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddress: TEdit - Left = 105 - Top = 31 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.pas b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.pas deleted file mode 100644 index 29bfb28e3055d935764d4d832b04fb6a3fef2715..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.pas +++ /dev/null @@ -1,670 +0,0 @@ -unit ValueBlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockInSectorReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSector: TStatusBar; - pgValueBlockInSector: TPageControl; - tabValueBlockInSectorRead: TTabSheet; - pnlValueBlockInSectorRead: TPanel; - lblVBISRSectorAddress: TLabel; - lblVBISRReadData: TLabel; - lblVBISRBlockAddress: TLabel; - lblVBISRead: TStaticText; - txtVBISRSectorAddress: TEdit; - txtVBISRReadData: TEdit; - btnValueBlockInSectorRead: TButton; - txtVBISRBlockAddress: TEdit; - pnlValueBlockInSectorReadAKM1: TPanel; - lblVBISRSectorAddressAKM1: TLabel; - lblVBISRReadDataAKM1: TLabel; - lblVBISRBlockAddressAKM1: TLabel; - lblVBISReadAKM1: TStaticText; - txtVBISRSectorAddressAKM1: TEdit; - txtVBISRReadDataAKM1: TEdit; - btnValueBlockInSectorReadAKM1: TButton; - txtVBISRBlockAddressAKM1: TEdit; - pnlValueBlockInSectorReadAKM2: TPanel; - lblVBISRSectorAddressAKM2: TLabel; - lblVBISRBlockAddressAKM2: TLabel; - lblVBISReadAKM2: TStaticText; - txtVBISRSectorAddressAKM2: TEdit; - btnValueBlockInSectorReadAKM2: TButton; - txtVBISRBlockAddressAKM2: TEdit; - pnlValueBlockReadPK: TPanel; - lblVBISRSectorAddressPK: TLabel; - lblVBISRBlockAddressPK: TLabel; - lblVBISReadPK: TStaticText; - txtVBISRSectorAddressPK: TEdit; - btnValueBlockInSectorReadPK: TButton; - txtVBISRBlockAddressPK: TEdit; - tabValueBlockInSectorWrite: TTabSheet; - pnlVBISBlockWriteAKM1: TPanel; - lblVBISWBlockWriteAKM1: TStaticText; - pnlVBISBlockWriteAKM2: TPanel; - lblVBISWBlockWriteAKM2: TStaticText; - pnlVBISBlockWritePK: TPanel; - lblVBISWBlockWritePK: TStaticText; - lblVBISRValueAddress: TLabel; - txtVBISRValueAddress: TEdit; - lblVBISRValueAddressAKM1: TLabel; - txtVBISRValueAddressAKM1: TEdit; - lblVBISRReadDataAKM2: TLabel; - txtVBISRReadDataAKM2: TEdit; - lblVBISRValueAddressAKM2: TLabel; - txtVBISRValueAddressAKM2: TEdit; - lblVBISRReadDataPK: TLabel; - txtVBISRReadDataPK: TEdit; - lblVBISRValueAddressPK: TLabel; - txtVBISRValueAddressPK: TEdit; - lblVBISWBlockAddressAKM1: TLabel; - btnValueBlockInSectorWriteAKM1: TButton; - txtVBISWBlockAddressAKM1: TEdit; - lblVBISWBlockAddressAKM2: TLabel; - btnValueBlockInSectorWriteAKM2: TButton; - txtVBISWBlockAddressAKM2: TEdit; - lblVBISWBlockAddressPK: TLabel; - btnValueBlockInSectorWritePK: TButton; - txtVBISWBlockAddressPK: TEdit; - pnlVBISBlockWrite: TPanel; - lblVBISWBlockAddress: TLabel; - lblVBISWBlockWrite: TStaticText; - btnValueBlockInSectorWrite: TButton; - txtVBISWBlockAddress: TEdit; - lblVBISWWriteData: TLabel; - txtVBISWWriteData: TEdit; - lblBISRWValueAddress: TLabel; - txtVBISWValueAddress: TEdit; - lblVBISWWriteDataAKM1: TLabel; - txtVBISWWriteDataAKM1: TEdit; - lblVBISWSectorAddress: TLabel; - txtVBISWSectorAddress: TEdit; - lblVBISWSectorAddressAKM1: TLabel; - txtVBISWSectorAddressAKM1: TEdit; - lblBISRWValueAddressAKM1: TLabel; - txtVBISWValueAddressAKM1: TEdit; - lblVBISWWriteDataAKM2: TLabel; - txtVBISWWriteDataAKM2: TEdit; - lblVBISWSectorAddressAKM2: TLabel; - txtVBISWSectorAddressAKM2: TEdit; - lblBISRWValueAddressAKM2: TLabel; - txtVBISWValueAddressAKM2: TEdit; - lblVBISWWriteDataPK: TLabel; - txtVBISWWriteDataPK: TEdit; - lblBISRWValueAddressPK: TLabel; - txtVBISWValueAddressPK: TEdit; - lblVBISWSectorAddressPK: TLabel; - txtVBISWSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorReadClick(Sender: TObject); - procedure btnValueBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorReadPKClick(Sender: TObject); - procedure btnValueBlockInSectorWriteClick(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorWritePKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockInSectorReadWrite } - -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject; - var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadClick(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtVBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddress.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtVBISRReadData.Text :=IntToStr(iValueData); - txtVBISRValueAddress.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM1Click(Sender: TObject); -var - PData :PLongint; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM1.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM1(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM1.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM1.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM2Click(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM2.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM2(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM2.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM2.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - PData :PLongint; - pPKKey :PByte; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress, - bBr :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - pData :=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_PK(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtVBISRReadDataPK.Text :=IntToStr(iValueData); - txtVBISRValueAddressPK.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - - if Trim(txtVBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddress.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBISWWriteData.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBISWValueAddress.Text); - - iFResult:=ValueBlockInSectorWrite(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM1.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM1.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM1.Text); - - iFResult:=ValueBlockInSectorWrite_AKM1(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM2.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM2.Text); - - iFResult:=ValueBlockInSectorWrite_AKM2(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataPK.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorWrite_PK(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pPKKey :=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~ddp b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~dfm b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~dfm deleted file mode 100644 index 595138217d58f70860fa344d0761b26bcd3e952f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~dfm +++ /dev/null @@ -1,1265 +0,0 @@ -object frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite - Left = 519 - Top = 130 - Width = 527 - Height = 418 - Caption = 'ValueBlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 511 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read/Write (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 511 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSector: TStatusBar - Left = 0 - Top = 361 - Width = 511 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSector: TPageControl - Left = 0 - Top = 57 - Width = 511 - Height = 304 - ActivePage = tabValueBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorRead: TTabSheet - Caption = 'ValueBlockInSector Read' - object pnlValueBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadData: TLabel - Left = 8 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddress: TLabel - Left = 156 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadData: TEdit - Left = 6 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadClick - end - object txtVBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddress: TEdit - Left = 205 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadDataAKM1: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddressAKM1: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadDataAKM1: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM1Click - end - object txtVBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddressAKM1: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataAKM2: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressAKM2: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM2Click - end - object txtVBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataAKM2: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressAKM2: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataPK: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressPK: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadPKClick - end - object txtVBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataPK: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressPK: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - end - object tabValueBlockInSectorWrite: TTabSheet - Caption = 'ValueBlockInSector Write' - ImageIndex = 1 - object pnlVBISBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM1: TLabel - Left = 10 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM1: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM1: TLabel - Left = 156 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM1: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM1Click - end - object txtVBISWBlockAddressAKM1: TEdit - Left = 103 - Top = 55 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM1: TEdit - Left = 9 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM1: TEdit - Left = 103 - Top = 29 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM1: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 61 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM2: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM2: TLabel - Left = 9 - Top = 34 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM2: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM2: TButton - Left = 157 - Top = 28 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM2Click - end - object txtVBISWBlockAddressAKM2: TEdit - Left = 104 - Top = 56 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM2: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM2: TEdit - Left = 104 - Top = 30 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM2: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISWBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataPK: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddressPK: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddressPK: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWritePK: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWritePKClick - end - object txtVBISWBlockAddressPK: TEdit - Left = 102 - Top = 55 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataPK: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddressPK: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddressPK: TEdit - Left = 102 - Top = 29 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - object pnlVBISBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISWBlockAddress: TLabel - Left = 8 - Top = 62 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteData: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddress: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddress: TLabel - Left = 9 - Top = 36 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWrite: TButton - Left = 157 - Top = 30 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteClick - end - object txtVBISWBlockAddress: TEdit - Left = 105 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteData: TEdit - Left = 8 - Top = 102 - Width = 144 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddress: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddress: TEdit - Left = 105 - Top = 31 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~pas b/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~pas deleted file mode 100644 index 43d96e1b9da4fa2cfefeb4af66e98ca6c16f59ed..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSector.~pas +++ /dev/null @@ -1,670 +0,0 @@ -unit ValueBlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder1x,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockInSectorReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSector: TStatusBar; - pgValueBlockInSector: TPageControl; - tabValueBlockInSectorRead: TTabSheet; - pnlValueBlockInSectorRead: TPanel; - lblVBISRSectorAddress: TLabel; - lblVBISRReadData: TLabel; - lblVBISRBlockAddress: TLabel; - lblVBISRead: TStaticText; - txtVBISRSectorAddress: TEdit; - txtVBISRReadData: TEdit; - btnValueBlockInSectorRead: TButton; - txtVBISRBlockAddress: TEdit; - pnlValueBlockInSectorReadAKM1: TPanel; - lblVBISRSectorAddressAKM1: TLabel; - lblVBISRReadDataAKM1: TLabel; - lblVBISRBlockAddressAKM1: TLabel; - lblVBISReadAKM1: TStaticText; - txtVBISRSectorAddressAKM1: TEdit; - txtVBISRReadDataAKM1: TEdit; - btnValueBlockInSectorReadAKM1: TButton; - txtVBISRBlockAddressAKM1: TEdit; - pnlValueBlockInSectorReadAKM2: TPanel; - lblVBISRSectorAddressAKM2: TLabel; - lblVBISRBlockAddressAKM2: TLabel; - lblVBISReadAKM2: TStaticText; - txtVBISRSectorAddressAKM2: TEdit; - btnValueBlockInSectorReadAKM2: TButton; - txtVBISRBlockAddressAKM2: TEdit; - pnlValueBlockReadPK: TPanel; - lblVBISRSectorAddressPK: TLabel; - lblVBISRBlockAddressPK: TLabel; - lblVBISReadPK: TStaticText; - txtVBISRSectorAddressPK: TEdit; - btnValueBlockInSectorReadPK: TButton; - txtVBISRBlockAddressPK: TEdit; - tabValueBlockInSectorWrite: TTabSheet; - pnlVBISBlockWriteAKM1: TPanel; - lblVBISWBlockWriteAKM1: TStaticText; - pnlVBISBlockWriteAKM2: TPanel; - lblVBISWBlockWriteAKM2: TStaticText; - pnlVBISBlockWritePK: TPanel; - lblVBISWBlockWritePK: TStaticText; - lblVBISRValueAddress: TLabel; - txtVBISRValueAddress: TEdit; - lblVBISRValueAddressAKM1: TLabel; - txtVBISRValueAddressAKM1: TEdit; - lblVBISRReadDataAKM2: TLabel; - txtVBISRReadDataAKM2: TEdit; - lblVBISRValueAddressAKM2: TLabel; - txtVBISRValueAddressAKM2: TEdit; - lblVBISRReadDataPK: TLabel; - txtVBISRReadDataPK: TEdit; - lblVBISRValueAddressPK: TLabel; - txtVBISRValueAddressPK: TEdit; - lblVBISWBlockAddressAKM1: TLabel; - btnValueBlockInSectorWriteAKM1: TButton; - txtVBISWBlockAddressAKM1: TEdit; - lblVBISWBlockAddressAKM2: TLabel; - btnValueBlockInSectorWriteAKM2: TButton; - txtVBISWBlockAddressAKM2: TEdit; - lblVBISWBlockAddressPK: TLabel; - btnValueBlockInSectorWritePK: TButton; - txtVBISWBlockAddressPK: TEdit; - pnlVBISBlockWrite: TPanel; - lblVBISWBlockAddress: TLabel; - lblVBISWBlockWrite: TStaticText; - btnValueBlockInSectorWrite: TButton; - txtVBISWBlockAddress: TEdit; - lblVBISWWriteData: TLabel; - txtVBISWWriteData: TEdit; - lblBISRWValueAddress: TLabel; - txtVBISWValueAddress: TEdit; - lblVBISWWriteDataAKM1: TLabel; - txtVBISWWriteDataAKM1: TEdit; - lblVBISWSectorAddress: TLabel; - txtVBISWSectorAddress: TEdit; - lblVBISWSectorAddressAKM1: TLabel; - txtVBISWSectorAddressAKM1: TEdit; - lblBISRWValueAddressAKM1: TLabel; - txtVBISWValueAddressAKM1: TEdit; - lblVBISWWriteDataAKM2: TLabel; - txtVBISWWriteDataAKM2: TEdit; - lblVBISWSectorAddressAKM2: TLabel; - txtVBISWSectorAddressAKM2: TEdit; - lblBISRWValueAddressAKM2: TLabel; - txtVBISWValueAddressAKM2: TEdit; - lblVBISWWriteDataPK: TLabel; - txtVBISWWriteDataPK: TEdit; - lblBISRWValueAddressPK: TLabel; - txtVBISWValueAddressPK: TEdit; - lblVBISWSectorAddressPK: TLabel; - txtVBISWSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorReadClick(Sender: TObject); - procedure btnValueBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorReadPKClick(Sender: TObject); - procedure btnValueBlockInSectorWriteClick(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorWritePKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockInSectorReadWrite } - -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject; - var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadClick(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtVBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddress.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtVBISRReadData.Text :=IntToStr(iValueData); - txtVBISRValueAddress.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM1Click(Sender: TObject); -var - PData :PLongint; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM1.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM1(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM1.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM1.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM2Click(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM2.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM2(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM2.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM2.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - PData :PLongint; - pPKKey :PByte; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress, - bBr :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - pData :=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_PK(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtVBISRReadDataPK.Text :=IntToStr(iValueData); - txtVBISRValueAddressPK.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - - if Trim(txtVBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddress.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBISWWriteData.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBISWValueAddress.Text); - - iFResult:=ValueBlockInSectorWrite(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM1.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM1.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM1.Text); - - iFResult:=ValueBlockInSectorWrite_AKM1(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM2.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM2.Text); - - iFResult:=ValueBlockInSectorWrite_AKM2(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataPK.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorWrite_PK(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pPKKey :=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.dcu b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.dcu deleted file mode 100644 index a888f67277e7912d41e865f6e2542373d65ca9f0..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.ddp b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.dfm b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.dfm deleted file mode 100644 index 7e065d301a2b4dfed23f81fc38cc6ba1f8b0577a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.dfm +++ /dev/null @@ -1,1067 +0,0 @@ -object frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr - Left = 432 - Top = 198 - Width = 529 - Height = 420 - Caption = 'ValueBlockInSectorInctDecr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Increment/Decrement (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSectorIncrDecr: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSectorIncDecr: TPageControl - Left = 0 - Top = 56 - Width = 513 - Height = 306 - ActivePage = tabValueBlockInSectorIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorIncrement: TTabSheet - Caption = 'ValueBlockInSector Increment' - object pnlValueBlockInSectorIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISIncrValue: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrement: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementClick - end - object txtVBISIncrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM1: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM1Click - end - object txtVBISIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM2: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM2Click - end - object txtVBISIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementPK: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementPKClick - end - object txtVBISIncrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlockInSector Decrement' - ImageIndex = 1 - object pnlVBISDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDec: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrement: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - HelpType = htKeyword - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementClick - end - object txtVBISDecrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM1: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM1Click - end - object txtVBISDecrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM2: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM2Click - end - object txtVBISDecrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecPK: TStaticText - Left = 2 - Top = 2 - Width = 173 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementPK: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementPKClick - end - object txtVBISDecrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.pas b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.pas deleted file mode 100644 index 7df55a9d37a15a82c550f1ece73d10b8acdc7c0e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.pas +++ /dev/null @@ -1,623 +0,0 @@ -unit ValueBlockInSectorIncrDecr; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder; - -type - TfrmValueBlockInSectorIncDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSectorIncrDecr: TStatusBar; - pgValueBlockInSectorIncDecr: TPageControl; - tabValueBlockInSectorIncrement: TTabSheet; - pnlValueBlockInSectorIncrement: TPanel; - lblVBISIncrValue: TLabel; - lblVBISIncrBlockAddress: TLabel; - lblVBISIncr: TStaticText; - txtVBISIncrementValue: TEdit; - btnValueBlockInSectorIncrement: TButton; - txtVBISIncrBlockAddress: TEdit; - pnlValueBlockInSectorIncrementAKM1: TPanel; - lblVBISIncrAKM1: TStaticText; - pnlValueBlockInSectorIncrementAKM2: TPanel; - lblVBISIncrAKM2: TStaticText; - pnlValueBlockInSectorIncrementPK: TPanel; - lblVBISIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - pnlVBISDecrement: TPanel; - lblVBISDecrementValue: TLabel; - lblVBISDecBlockAddress: TLabel; - lblVBISDec: TStaticText; - txtVBISDecrementValue: TEdit; - btnValueBlockInSectorDecrement: TButton; - txtVBISDecrBlockAddress: TEdit; - pnlVBISDecrementAKM1: TPanel; - lblVBISDecAKM1: TStaticText; - pnlVBISDecrementAKM2: TPanel; - lblVBISDecAKM2: TStaticText; - pnlVBISDecrementPK: TPanel; - lblVBISDecPK: TStaticText; - lblVBISIncSectorAddress: TLabel; - txtVBISIncrSectorAddress: TEdit; - lblVBISIncrValueAKM1: TLabel; - lblVBISIncrBlockAddressAKM1: TLabel; - txtVBISIncrementValueAKM1: TEdit; - btnValueBlockInSectorIncrementAKM1: TButton; - txtVBISIncrBlockAddressAKM1: TEdit; - lblVBISIncSectorAddressAKM1: TLabel; - txtVBISIncrSectorAddressAKM1: TEdit; - lblVBISIncrValueAKM2: TLabel; - lblVBISIncrBlockAddressAKM2: TLabel; - txtVBISIncrementValueAKM2: TEdit; - btnValueBlockInSectorIncrementAKM2: TButton; - txtVBISIncrBlockAddressAKM2: TEdit; - lblVBISIncSectorAddressAKM2: TLabel; - txtVBISIncrSectorAddressAKM2: TEdit; - lblVBISIncrValuePK: TLabel; - lblVBISIncrBlockAddressPK: TLabel; - txtVBISIncrementValuePK: TEdit; - btnValueBlockInSectorIncrementPK: TButton; - txtVBISIncrBlockAddressPK: TEdit; - lblVBISIncSectorAddressPK: TLabel; - txtVBISIncrSectorAddressPK: TEdit; - lblVBISDecrSectorAddress: TLabel; - txtVBISDecrSectorAddress: TEdit; - lblVBISDecrementValueAKM1: TLabel; - lblVBISDecBlockAddressAKM1: TLabel; - txtVBISDecrementValueAKM1: TEdit; - btnValueBlockInSectorDecrementAKM1: TButton; - txtVBISDecrBlockAddressAKM1: TEdit; - lblVBISDecrSectorAddressAKM1: TLabel; - txtVBISDecrSectorAddressAKM1: TEdit; - lblVBISDecrementValueAKM2: TLabel; - lblVBISDecBlockAddressAKM2: TLabel; - txtVBISDecrementValueAKM2: TEdit; - btnValueBlockInSectorDecrementAKM2: TButton; - txtVBISDecrBlockAddressAKM2: TEdit; - lblVBISDecrSectorAddressAKM2: TLabel; - txtVBISDecrSectorAddressAKM2: TEdit; - lblVBISDecrementValuePK: TLabel; - lblVBISDecBlockAddressPK: TLabel; - txtVBISDecrementValuePK: TEdit; - btnValueBlockInSectorDecrementPK: TButton; - txtVBISDecrBlockAddressPK: TEdit; - lblVBISDecrSectorAddressPK: TLabel; - txtVBISDecrSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorIncrementClick(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementPKClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementPKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockInSectorIncDecr.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBISIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddress.Text); - - iFResult:=ValueBlockInSectorIncrement(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM1(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM2(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorIncrement_PK(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBISDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddress.Text); - - iFResult:=ValueBlockInSectorDecrement(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM1(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM2(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; - -begin - try - if Trim(txtVBISDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorDecrement_PK(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - - - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~ddp b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~dfm b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~dfm deleted file mode 100644 index 7b8f18f19e7a80aeec238c062c0c1f4a2eb369b0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~dfm +++ /dev/null @@ -1,1067 +0,0 @@ -object frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr - Left = 432 - Top = 198 - Width = 529 - Height = 420 - Caption = 'ValueBlockInSectorInctDecr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Increment/Decrement (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSectorIncrDecr: TStatusBar - Left = 0 - Top = 363 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSectorIncDecr: TPageControl - Left = 0 - Top = 56 - Width = 513 - Height = 307 - ActivePage = tabValueBlockInSectorIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorIncrement: TTabSheet - Caption = 'ValueBlockInSector Increment' - object pnlValueBlockInSectorIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISIncrValue: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrement: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementClick - end - object txtVBISIncrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM1: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM1Click - end - object txtVBISIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM2: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM2Click - end - object txtVBISIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementPK: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementPKClick - end - object txtVBISIncrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlockInSector Decrement' - ImageIndex = 1 - object pnlVBISDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDec: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrement: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - HelpType = htKeyword - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementClick - end - object txtVBISDecrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM1: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM1Click - end - object txtVBISDecrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM2: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM2Click - end - object txtVBISDecrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecPK: TStaticText - Left = 2 - Top = 2 - Width = 173 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementPK: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementPKClick - end - object txtVBISDecrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~pas b/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~pas deleted file mode 100644 index c3b673d418368ba68cd545237054b460cd314950..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockInSectorIncrDecr.~pas +++ /dev/null @@ -1,623 +0,0 @@ -unit ValueBlockInSectorIncrDecr; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder1x; - -type - TfrmValueBlockInSectorIncDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSectorIncrDecr: TStatusBar; - pgValueBlockInSectorIncDecr: TPageControl; - tabValueBlockInSectorIncrement: TTabSheet; - pnlValueBlockInSectorIncrement: TPanel; - lblVBISIncrValue: TLabel; - lblVBISIncrBlockAddress: TLabel; - lblVBISIncr: TStaticText; - txtVBISIncrementValue: TEdit; - btnValueBlockInSectorIncrement: TButton; - txtVBISIncrBlockAddress: TEdit; - pnlValueBlockInSectorIncrementAKM1: TPanel; - lblVBISIncrAKM1: TStaticText; - pnlValueBlockInSectorIncrementAKM2: TPanel; - lblVBISIncrAKM2: TStaticText; - pnlValueBlockInSectorIncrementPK: TPanel; - lblVBISIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - pnlVBISDecrement: TPanel; - lblVBISDecrementValue: TLabel; - lblVBISDecBlockAddress: TLabel; - lblVBISDec: TStaticText; - txtVBISDecrementValue: TEdit; - btnValueBlockInSectorDecrement: TButton; - txtVBISDecrBlockAddress: TEdit; - pnlVBISDecrementAKM1: TPanel; - lblVBISDecAKM1: TStaticText; - pnlVBISDecrementAKM2: TPanel; - lblVBISDecAKM2: TStaticText; - pnlVBISDecrementPK: TPanel; - lblVBISDecPK: TStaticText; - lblVBISIncSectorAddress: TLabel; - txtVBISIncrSectorAddress: TEdit; - lblVBISIncrValueAKM1: TLabel; - lblVBISIncrBlockAddressAKM1: TLabel; - txtVBISIncrementValueAKM1: TEdit; - btnValueBlockInSectorIncrementAKM1: TButton; - txtVBISIncrBlockAddressAKM1: TEdit; - lblVBISIncSectorAddressAKM1: TLabel; - txtVBISIncrSectorAddressAKM1: TEdit; - lblVBISIncrValueAKM2: TLabel; - lblVBISIncrBlockAddressAKM2: TLabel; - txtVBISIncrementValueAKM2: TEdit; - btnValueBlockInSectorIncrementAKM2: TButton; - txtVBISIncrBlockAddressAKM2: TEdit; - lblVBISIncSectorAddressAKM2: TLabel; - txtVBISIncrSectorAddressAKM2: TEdit; - lblVBISIncrValuePK: TLabel; - lblVBISIncrBlockAddressPK: TLabel; - txtVBISIncrementValuePK: TEdit; - btnValueBlockInSectorIncrementPK: TButton; - txtVBISIncrBlockAddressPK: TEdit; - lblVBISIncSectorAddressPK: TLabel; - txtVBISIncrSectorAddressPK: TEdit; - lblVBISDecrSectorAddress: TLabel; - txtVBISDecrSectorAddress: TEdit; - lblVBISDecrementValueAKM1: TLabel; - lblVBISDecBlockAddressAKM1: TLabel; - txtVBISDecrementValueAKM1: TEdit; - btnValueBlockInSectorDecrementAKM1: TButton; - txtVBISDecrBlockAddressAKM1: TEdit; - lblVBISDecrSectorAddressAKM1: TLabel; - txtVBISDecrSectorAddressAKM1: TEdit; - lblVBISDecrementValueAKM2: TLabel; - lblVBISDecBlockAddressAKM2: TLabel; - txtVBISDecrementValueAKM2: TEdit; - btnValueBlockInSectorDecrementAKM2: TButton; - txtVBISDecrBlockAddressAKM2: TEdit; - lblVBISDecrSectorAddressAKM2: TLabel; - txtVBISDecrSectorAddressAKM2: TEdit; - lblVBISDecrementValuePK: TLabel; - lblVBISDecBlockAddressPK: TLabel; - txtVBISDecrementValuePK: TEdit; - btnValueBlockInSectorDecrementPK: TButton; - txtVBISDecrBlockAddressPK: TEdit; - lblVBISDecrSectorAddressPK: TLabel; - txtVBISDecrSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorIncrementClick(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementPKClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementPKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockInSectorIncDecr.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBISIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddress.Text); - - iFResult:=ValueBlockInSectorIncrement(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM1(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM2(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorIncrement_PK(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBISDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddress.Text); - - iFResult:=ValueBlockInSectorDecrement(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM1(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM2(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; - -begin - try - if Trim(txtVBISDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorDecrement_PK(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - - - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.dcu b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.dcu deleted file mode 100644 index 52f863af160960e9614aaced696e1aea3b4f9fee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.ddp b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.dfm b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.dfm deleted file mode 100644 index 61c1b5958929738954038ba0854775c39f2af69b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.dfm +++ /dev/null @@ -1,881 +0,0 @@ -object frmValueBlockIncrDecr: TfrmValueBlockIncrDecr - Left = 343 - Top = 186 - Width = 529 - Height = 420 - Caption = 'ValueBlockIncr/Decr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment/Decrement(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockIncrDecr: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockIncDecr: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 305 - ActivePage = tavValueBlockIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockIncrement: TTabSheet - Caption = 'ValueBlock Increment' - object pnlValueBlockIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBIncrValue: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementClick - end - object txtVBIncrBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM1Click - end - object txtVBIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM2Click - end - object txtVBIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementPKClick - end - object txtVBIncrBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlock Decrement' - ImageIndex = 1 - object pnlVBDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDec: TStaticText - Left = 2 - Top = 2 - Width = 168 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementClick - end - object txtVBDecBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM1Click - end - object txtVBDecBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM2Click - end - object txtVBDecBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecPK: TStaticText - Left = 2 - Top = 2 - Width = 191 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementPKClick - end - object txtVBDecBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.pas b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.pas deleted file mode 100644 index 67a8ae0bf3643cb944af84036515ecc1b76b3ea0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.pas +++ /dev/null @@ -1,542 +0,0 @@ -unit ValueBlockIncDec; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockIncrDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockIncrDecr: TStatusBar; - pgValueBlockIncDecr: TPageControl; - tavValueBlockIncrement: TTabSheet; - pnlValueBlockIncrement: TPanel; - lblVBIncrValue: TLabel; - lblVBIncrBlockAddress: TLabel; - lblVBIncr: TStaticText; - txtVBIncrementValue: TEdit; - btnValueBlockIncrement: TButton; - txtVBIncrBlockAddress: TEdit; - pnlValueBlockIncrAKM1: TPanel; - lblVBIncrAKM1: TStaticText; - pnlValueBlockIncrAKM2: TPanel; - lblVBIncrAKM2: TStaticText; - pnlValueBlockIncrPK: TPanel; - lblVBIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - lblVBIncrValueAKM1: TLabel; - lblVBIncrBlockAddressAKM1: TLabel; - txtVBIncrementValueAKM1: TEdit; - btnValueBlockIncrementAKM1: TButton; - txtVBIncrBlockAddressAKM1: TEdit; - lblVBIncrValueAKM2: TLabel; - lblVBIncrBlockAddressAKM2: TLabel; - txtVBIncrementValueAKM2: TEdit; - btnValueBlockIncrementAKM2: TButton; - txtVBIncrBlockAddressAKM2: TEdit; - lblVBIncrValuePK: TLabel; - lblVBIncrBlockAddressPK: TLabel; - txtVBIncrementValuePK: TEdit; - btnValueBlockIncrementPK: TButton; - txtVBIncrBlockAddressPK: TEdit; - pnlVBDecrement: TPanel; - lblVBDecrementValue: TLabel; - lblVBDecBlockAddress: TLabel; - lblVBDec: TStaticText; - txtVBDecrementValue: TEdit; - btnValueBlockDecrement: TButton; - txtVBDecBlockAddress: TEdit; - pnlVBDecrementAKM1: TPanel; - lblVBDecrementValueAKM1: TLabel; - lblVBDecBlockAddressAKM1: TLabel; - lblVBDecAKM1: TStaticText; - txtVBDecrementValueAKM1: TEdit; - btnValueBlockDecrementAKM1: TButton; - txtVBDecBlockAddressAKM1: TEdit; - pnlVBDecrementAKM2: TPanel; - lblVBDecrementValueAKM2: TLabel; - lblVBDecBlockAddressAKM2: TLabel; - lblVBDecAKM2: TStaticText; - txtVBDecrementValueAKM2: TEdit; - btnValueBlockDecrementAKM2: TButton; - txtVBDecBlockAddressAKM2: TEdit; - pnlVBDecrementPK: TPanel; - lblVBDecrementValuePK: TLabel; - lblVBDecBlockAddressPK: TLabel; - lblVBDecPK: TStaticText; - txtVBDecrementValuePK: TEdit; - btnValueBlockDecrementPK: TButton; - txtVBDecBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockIncrementClick(Sender: TObject); - procedure btnValueBlockIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockIncrementPKClick(Sender: TObject); - procedure btnValueBlockDecrementClick(Sender: TObject); - procedure btnValueBlockDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockDecrementPKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockIncrDecr: TfrmValueBlockIncrDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockIncrDecr.FormCreate(Sender: TObject); -begin - - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddress.Text); - - iFResult:=ValueBlockIncrement(iIncrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM1.Text); - - iFResult:=ValueBlockIncrement_AKM1(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM2.Text); - - iFResult:=ValueBlockIncrement_AKM2(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - - iFResult:=ValueBlockIncrement_PK(iIncrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddress.Text); - - iFResult:=ValueBlockDecrement(iDecrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM1.Text); - - iFResult:=ValueBlockDecrement_AKM1(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM2.Text); - - iFResult:=ValueBlockDecrement_AKM2(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressPK.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - iFResult:=ValueBlockDecrement_PK(iDecrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~ddp b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~dfm b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~dfm deleted file mode 100644 index b4551b90fe882109ffa2ec2af16d468cd4ac723d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~dfm +++ /dev/null @@ -1,881 +0,0 @@ -object frmValueBlockIncrDecr: TfrmValueBlockIncrDecr - Left = 343 - Top = 186 - Width = 529 - Height = 420 - Caption = 'ValueBlockIncr/Decr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment/Decrement(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockIncrDecr: TStatusBar - Left = 0 - Top = 363 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockIncDecr: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 306 - ActivePage = tavValueBlockIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockIncrement: TTabSheet - Caption = 'ValueBlock Increment' - object pnlValueBlockIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBIncrValue: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementClick - end - object txtVBIncrBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM1Click - end - object txtVBIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM2Click - end - object txtVBIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementPKClick - end - object txtVBIncrBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlock Decrement' - ImageIndex = 1 - object pnlVBDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDec: TStaticText - Left = 2 - Top = 2 - Width = 168 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementClick - end - object txtVBDecBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM1Click - end - object txtVBDecBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM2Click - end - object txtVBDecBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecPK: TStaticText - Left = 2 - Top = 2 - Width = 191 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementPKClick - end - object txtVBDecBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~pas b/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~pas deleted file mode 100644 index 29885285f0d0e6a3198fa83427be990ed1370e43..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ValueBlockIncDec.~pas +++ /dev/null @@ -1,542 +0,0 @@ -unit ValueBlockIncDec; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder1x,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockIncrDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockIncrDecr: TStatusBar; - pgValueBlockIncDecr: TPageControl; - tavValueBlockIncrement: TTabSheet; - pnlValueBlockIncrement: TPanel; - lblVBIncrValue: TLabel; - lblVBIncrBlockAddress: TLabel; - lblVBIncr: TStaticText; - txtVBIncrementValue: TEdit; - btnValueBlockIncrement: TButton; - txtVBIncrBlockAddress: TEdit; - pnlValueBlockIncrAKM1: TPanel; - lblVBIncrAKM1: TStaticText; - pnlValueBlockIncrAKM2: TPanel; - lblVBIncrAKM2: TStaticText; - pnlValueBlockIncrPK: TPanel; - lblVBIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - lblVBIncrValueAKM1: TLabel; - lblVBIncrBlockAddressAKM1: TLabel; - txtVBIncrementValueAKM1: TEdit; - btnValueBlockIncrementAKM1: TButton; - txtVBIncrBlockAddressAKM1: TEdit; - lblVBIncrValueAKM2: TLabel; - lblVBIncrBlockAddressAKM2: TLabel; - txtVBIncrementValueAKM2: TEdit; - btnValueBlockIncrementAKM2: TButton; - txtVBIncrBlockAddressAKM2: TEdit; - lblVBIncrValuePK: TLabel; - lblVBIncrBlockAddressPK: TLabel; - txtVBIncrementValuePK: TEdit; - btnValueBlockIncrementPK: TButton; - txtVBIncrBlockAddressPK: TEdit; - pnlVBDecrement: TPanel; - lblVBDecrementValue: TLabel; - lblVBDecBlockAddress: TLabel; - lblVBDec: TStaticText; - txtVBDecrementValue: TEdit; - btnValueBlockDecrement: TButton; - txtVBDecBlockAddress: TEdit; - pnlVBDecrementAKM1: TPanel; - lblVBDecrementValueAKM1: TLabel; - lblVBDecBlockAddressAKM1: TLabel; - lblVBDecAKM1: TStaticText; - txtVBDecrementValueAKM1: TEdit; - btnValueBlockDecrementAKM1: TButton; - txtVBDecBlockAddressAKM1: TEdit; - pnlVBDecrementAKM2: TPanel; - lblVBDecrementValueAKM2: TLabel; - lblVBDecBlockAddressAKM2: TLabel; - lblVBDecAKM2: TStaticText; - txtVBDecrementValueAKM2: TEdit; - btnValueBlockDecrementAKM2: TButton; - txtVBDecBlockAddressAKM2: TEdit; - pnlVBDecrementPK: TPanel; - lblVBDecrementValuePK: TLabel; - lblVBDecBlockAddressPK: TLabel; - lblVBDecPK: TStaticText; - txtVBDecrementValuePK: TEdit; - btnValueBlockDecrementPK: TButton; - txtVBDecBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockIncrementClick(Sender: TObject); - procedure btnValueBlockIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockIncrementPKClick(Sender: TObject); - procedure btnValueBlockDecrementClick(Sender: TObject); - procedure btnValueBlockDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockDecrementPKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockIncrDecr: TfrmValueBlockIncrDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockIncrDecr.FormCreate(Sender: TObject); -begin - - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddress.Text); - - iFResult:=ValueBlockIncrement(iIncrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM1.Text); - - iFResult:=ValueBlockIncrement_AKM1(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM2.Text); - - iFResult:=ValueBlockIncrement_AKM2(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - - iFResult:=ValueBlockIncrement_PK(iIncrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddress.Text); - - iFResult:=ValueBlockDecrement(iDecrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM1.Text); - - iFResult:=ValueBlockDecrement_AKM1(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM2.Text); - - iFResult:=ValueBlockDecrement_AKM2(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressPK.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - iFResult:=ValueBlockDecrement_PK(iDecrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.dcu b/old_move_to_branch/uFCoderAdvance/ViewAll.dcu deleted file mode 100644 index 094ccfacc3b98767f3d9e3a37183bb609af5c697..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ViewAll.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.ddp b/old_move_to_branch/uFCoderAdvance/ViewAll.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ViewAll.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.dfm b/old_move_to_branch/uFCoderAdvance/ViewAll.dfm deleted file mode 100644 index 4e284ef507b8fe3d4fd6e97c1421906566d0510f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ViewAll.dfm +++ /dev/null @@ -1,198 +0,0 @@ -object frmViewAll: TfrmViewAll - Left = 329 - Top = 138 - Width = 529 - Height = 436 - Caption = 'ViewAll' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - DesignSize = ( - 513 - 397) - PixelsPerInch = 96 - TextHeight = 13 - object lblKeyIndex: TLabel - Left = 159 - Top = 318 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'View All' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbViewAll: TStatusBar - Left = 0 - Top = 378 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object sgrdViewAll: TStringGrid - Left = 0 - Top = 26 - Width = 513 - Height = 277 - Cursor = crHandPoint - Ctl3D = True - DefaultColWidth = 40 - DefaultRowHeight = 20 - RowCount = 2 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - OnDrawCell = sgrdViewAllDrawCell - end - object rbHexView: TRadioButton - Left = 271 - Top = 343 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'HEX' - TabOrder = 3 - end - object btnReadData: TButton - Left = 331 - Top = 316 - Width = 177 - Height = 41 - Cursor = crHandPoint - Anchors = [akLeft, akBottom] - Caption = 'READ DATA' - TabOrder = 4 - OnClick = btnReadDataClick - end - object cboKeyIndex: TComboBox - Left = 168 - Top = 338 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object pbBar: TProgressBar - Left = 331 - Top = 361 - Width = 177 - Height = 13 - BorderWidth = 1 - Smooth = True - TabOrder = 6 - Visible = False - end - object rbgrpRadioButtonGroup: TRadioGroup - Left = 8 - Top = 305 - Width = 97 - Height = 61 - ItemIndex = 0 - Items.Strings = ( - 'AUTH 1A' - 'AUTH 1B') - TabOrder = 7 - end - object rbAscii: TRadioButton - Left = 271 - Top = 316 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'ASCII' - Checked = True - TabOrder = 8 - TabStop = True - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.pas b/old_move_to_branch/uFCoderAdvance/ViewAll.pas deleted file mode 100644 index 63d7719dd848334d0549d95c5fcd174dec99d5d0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ViewAll.pas +++ /dev/null @@ -1,273 +0,0 @@ -unit ViewAll; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder, - Grids, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmViewAll = class(TForm) - lblHeader: TStaticText; - stbViewAll: TStatusBar; - sgrdViewAll: TStringGrid; - rbHexView: TRadioButton; - btnReadData: TButton; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - pbBar: TProgressBar; - rbgrpRadioButtonGroup: TRadioGroup; - rbAscii: TRadioButton; - procedure sgrdViewAllDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState); - procedure btnReadDataClick(Sender: TObject); - private - procedure Draw1k4kGrid; - procedure Draw1k4kCardData; - procedure DrawNTAGCardData; - public - { Public declarations } - end; - -var - frmViewAll: TfrmViewAll; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmViewAll.Draw1k4kGrid; -var - bBr :Byte; -begin - - with sgrdViewAll do - begin - ColCount := 19; - // FixedRows := 3; - Cells[0, 0] := 'S'; - Cells[1, 0] := 'BiS'; - Cells[2, 0] := 'Blo'; - for bBr := 0 to 15 do - Cells[bBr + 3, 0] := IntToStr(bBr); - end; - -end; - -procedure TfrmViewAll.sgrdViewAllDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState); -begin - if sgrdViewAll.Cells[0,aRow]='SCT' then - begin - with sgrdViewAll.Canvas do - begin - Brush.Color := $02aaaaaa; - FillRect(Rect); - Font.Color := clBlack; - TextOut(Rect.Left+2,Rect.Top+2,sgrdViewAll.Cells[aCol,aRow]); - end; -end; -end; - - -procedure TfrmViewAll.btnReadDataClick(Sender: TObject); -var - cardType:Byte; -begin - cardType:=frmuFrAdvanced.bDLCardType; - if (cardType = DL_NTAG_203) or (cardType = DL_MIFARE_ULTRALIGHT) or - (cardType = DL_MIFARE_ULTRALIGHT_C) then - DrawNTAGCardData - else - if (cardType = DL_MIFARE_CLASSIC_1K) or (cardType = DL_MIFARE_CLASSIC_4K) or - (cardType = DL_MIFARE_PLUS_S_4K) then - Draw1k4kCardData; -end; - -procedure TfrmViewAll.Draw1k4kCardData; -var - chaBlockData :array[0..15] of Char; - pData :PByte; - bBlockCount :Integer; - bBISCounter, - bBISCount, - bBr, - bSectorsCounter :Byte; - iMaxBlocks :Integer; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - try - frmuFrAdvanced.FunctionStart := true; - Draw1k4kGrid; - bSectorsCounter :=0; - bBISCount :=0; - bBISCounter :=3; - bBlockCount :=0; - New(pData); - bKeyIndex :=cboKeyIndex.ItemIndex; - iMaxBlocks :=MaxBlocks(); - pbBar.Max :=iMaxBlocks; - pbBar.Visible :=true; - - if rbgrpRadioButtonGroup.ItemIndex=0 then bAuthMode :=MIFARE_AUTHENT1A - else - bAuthMode :=MIFARE_AUTHENT1B; - - sgrdViewAll.RowCount:=iMaxBlocks+1; - - while bBlockCount=31) and (bBlockCount mod 16 =0) then - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - bBISCounter:=15; - end - else - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - end; - end; - sgrdViewAll.Repaint; - if iFResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - pbBar.Visible := false; - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmViewAll.DrawNTAGCardData; -var - pData :PByte; - pPKKey :PByte; - pageData :array[0..10] of Byte; - authMode :Byte; - blockAddress :Byte; - bCounter,i :Byte; - maxBlock :integer; - bAuthMode, - bKeyIndex :Byte; - fnResult :DL_STATUS; -begin - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - - try - frmuFrAdvanced.FunctionStart := true; - maxBlock := MaxBlocks(); - - with sgrdViewAll do - begin - FixedCols :=1; - FixedRows :=1; - ColCount :=5; - RowCount :=maxBlock-2; - DefaultColWidth:=35; - Cells[0,0] :='PAGE'; - for i:=1 to 4 do - Cells[i,0]:=IntToStr(i); - end; - New(pData); - if rbgrpRadioButtonGroup.ItemIndex=0 then - authMode :=MIFARE_AUTHENT1A - else - authMode :=MIFARE_AUTHENT1B; - - bKeyIndex :=StrToInt(cboKeyIndex.Text); - pbBar.Visible :=true; - pbBar.Max :=maxBlock+2; - bcounter :=4; - while (bcounter<=maxBlock) do - begin - pData := PByte(@pageData); - fnResult := BlockRead(pData,bcounter,authMode,bKeyIndex); - if not fnResult = DL_OK then break; - - sgrdViewAll.Cells[0,bcounter-3] := IntToStr(bcounter); - for i:=0 to 3 do - begin - if rbHexView.Checked then - sgrdViewAll.Cells[i+1,bcounter-3]:='$'+IntToHex(Byte(pageData[i]),2) - else - sgrdViewAll.Cells[i+1,bcounter-3]:=chr(pageData[i]); - end; - - pbBar.Position:=bcounter; - Application.ProcessMessages; - Inc(bcounter); - end; - if fnResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,fnResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,fnResult); - end; - finally - pbBar.Visible:=false; - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart := false; - end; - -end; - - - -end. - diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.~ddp b/old_move_to_branch/uFCoderAdvance/ViewAll.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/ViewAll.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.~dfm b/old_move_to_branch/uFCoderAdvance/ViewAll.~dfm deleted file mode 100644 index 80567daba668600a0837133b174e1466c5f9d7d0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ViewAll.~dfm +++ /dev/null @@ -1,198 +0,0 @@ -object frmViewAll: TfrmViewAll - Left = 329 - Top = 138 - Width = 529 - Height = 436 - Caption = 'ViewAll' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - DesignSize = ( - 513 - 398) - PixelsPerInch = 96 - TextHeight = 13 - object lblKeyIndex: TLabel - Left = 159 - Top = 318 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'View All' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbViewAll: TStatusBar - Left = 0 - Top = 379 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object sgrdViewAll: TStringGrid - Left = 0 - Top = 26 - Width = 513 - Height = 277 - Cursor = crHandPoint - Ctl3D = True - DefaultColWidth = 40 - DefaultRowHeight = 20 - RowCount = 2 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - OnDrawCell = sgrdViewAllDrawCell - end - object rbHexView: TRadioButton - Left = 271 - Top = 343 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'HEX' - TabOrder = 3 - end - object btnReadData: TButton - Left = 331 - Top = 316 - Width = 177 - Height = 41 - Cursor = crHandPoint - Anchors = [akLeft, akBottom] - Caption = 'READ DATA' - TabOrder = 4 - OnClick = btnReadDataClick - end - object cboKeyIndex: TComboBox - Left = 168 - Top = 338 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object pbBar: TProgressBar - Left = 331 - Top = 361 - Width = 177 - Height = 13 - BorderWidth = 1 - Smooth = True - TabOrder = 6 - Visible = False - end - object rbgrpRadioButtonGroup: TRadioGroup - Left = 8 - Top = 305 - Width = 97 - Height = 61 - ItemIndex = 0 - Items.Strings = ( - 'AUTH 1A' - 'AUTH 1B') - TabOrder = 7 - end - object rbAscii: TRadioButton - Left = 271 - Top = 316 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'ASCII' - Checked = True - TabOrder = 8 - TabStop = True - end -end diff --git a/old_move_to_branch/uFCoderAdvance/ViewAll.~pas b/old_move_to_branch/uFCoderAdvance/ViewAll.~pas deleted file mode 100644 index 0fb5b595633a2abf07d2e635fcf3a8cd37fac105..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/ViewAll.~pas +++ /dev/null @@ -1,273 +0,0 @@ -unit ViewAll; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder1x, - Grids, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmViewAll = class(TForm) - lblHeader: TStaticText; - stbViewAll: TStatusBar; - sgrdViewAll: TStringGrid; - rbHexView: TRadioButton; - btnReadData: TButton; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - pbBar: TProgressBar; - rbgrpRadioButtonGroup: TRadioGroup; - rbAscii: TRadioButton; - procedure sgrdViewAllDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState); - procedure btnReadDataClick(Sender: TObject); - private - procedure Draw1k4kGrid; - procedure Draw1k4kCardData; - procedure DrawNTAGCardData; - public - { Public declarations } - end; - -var - frmViewAll: TfrmViewAll; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmViewAll.Draw1k4kGrid; -var - bBr :Byte; -begin - - with sgrdViewAll do - begin - ColCount := 19; - // FixedRows := 3; - Cells[0, 0] := 'S'; - Cells[1, 0] := 'BiS'; - Cells[2, 0] := 'Blo'; - for bBr := 0 to 15 do - Cells[bBr + 3, 0] := IntToStr(bBr); - end; - -end; - -procedure TfrmViewAll.sgrdViewAllDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState); -begin - if sgrdViewAll.Cells[0,aRow]='SCT' then - begin - with sgrdViewAll.Canvas do - begin - Brush.Color := $02aaaaaa; - FillRect(Rect); - Font.Color := clBlack; - TextOut(Rect.Left+2,Rect.Top+2,sgrdViewAll.Cells[aCol,aRow]); - end; -end; -end; - - -procedure TfrmViewAll.btnReadDataClick(Sender: TObject); -var - cardType:Byte; -begin - cardType:=frmuFrAdvanced.bDLCardType; - if (cardType = uFCoder1x.DL_NTAG_203) or (cardType = uFCoder1x.DL_MIFARE_ULTRALIGHT) or - (cardType = uFCoder1x.DL_MIFARE_ULTRALIGHT_C) then - DrawNTAGCardData - else - if (cardType = uFCoder1x.DL_MIFARE_CLASSIC_1K) or (cardType = uFCoder1x.DL_MIFARE_CLASSIC_4K) or - (cardType = uFCoder1x.DL_MIFARE_PLUS_S_4K) then - Draw1k4kCardData; -end; - -procedure TfrmViewAll.Draw1k4kCardData; -var - chaBlockData :array[0..15] of Char; - pData :PByte; - bBlockCount :Integer; - bBISCounter, - bBISCount, - bBr, - bSectorsCounter :Byte; - iMaxBlocks :Integer; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - try - frmuFrAdvanced.FunctionStart := true; - Draw1k4kGrid; - bSectorsCounter :=0; - bBISCount :=0; - bBISCounter :=3; - bBlockCount :=0; - New(pData); - bKeyIndex :=cboKeyIndex.ItemIndex; - iMaxBlocks :=MaxBlocks(); - pbBar.Max :=iMaxBlocks; - pbBar.Visible :=true; - - if rbgrpRadioButtonGroup.ItemIndex=0 then bAuthMode :=MIFARE_AUTHENT1A - else - bAuthMode :=MIFARE_AUTHENT1B; - - sgrdViewAll.RowCount:=iMaxBlocks+1; - - while bBlockCount=31) and (bBlockCount mod 16 =0) then - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - bBISCounter:=15; - end - else - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - end; - end; - sgrdViewAll.Repaint; - if iFResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - pbBar.Visible := false; - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmViewAll.DrawNTAGCardData; -var - pData :PByte; - pPKKey :PByte; - pageData :array[0..10] of Byte; - authMode :Byte; - blockAddress :Byte; - bCounter,i :Byte; - maxBlock :integer; - bAuthMode, - bKeyIndex :Byte; - fnResult :DL_STATUS; -begin - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - - try - frmuFrAdvanced.FunctionStart := true; - maxBlock := MaxBlocks(); - - with sgrdViewAll do - begin - FixedCols :=1; - FixedRows :=1; - ColCount :=5; - RowCount :=maxBlock-2; - DefaultColWidth:=35; - Cells[0,0] :='PAGE'; - for i:=1 to 4 do - Cells[i,0]:=IntToStr(i); - end; - New(pData); - if rbgrpRadioButtonGroup.ItemIndex=0 then - authMode :=MIFARE_AUTHENT1A - else - authMode :=MIFARE_AUTHENT1B; - - bKeyIndex :=StrToInt(cboKeyIndex.Text); - pbBar.Visible :=true; - pbBar.Max :=maxBlock+2; - bcounter :=4; - while (bcounter<=maxBlock) do - begin - pData := PByte(@pageData); - fnResult := BlockRead(pData,bcounter,authMode,bKeyIndex); - if not fnResult = DL_OK then break; - - sgrdViewAll.Cells[0,bcounter-3] := IntToStr(bcounter); - for i:=0 to 3 do - begin - if rbHexView.Checked then - sgrdViewAll.Cells[i+1,bcounter-3]:='$'+IntToHex(Byte(pageData[i]),2) - else - sgrdViewAll.Cells[i+1,bcounter-3]:=chr(pageData[i]); - end; - - pbBar.Position:=bcounter; - Application.ProcessMessages; - Inc(bcounter); - end; - if fnResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,fnResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,fnResult); - end; - finally - pbBar.Visible:=false; - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart := false; - end; - -end; - - - -end. - diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.dcu b/old_move_to_branch/uFCoderAdvance/uFAdvanced.dcu deleted file mode 100644 index 865a4f026ca84f353557b7ce6b10a75a4d37723f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFAdvanced.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.ddp b/old_move_to_branch/uFCoderAdvance/uFAdvanced.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFAdvanced.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.dfm b/old_move_to_branch/uFCoderAdvance/uFAdvanced.dfm deleted file mode 100644 index 1c5c97dd910ce0461fcfcaacd66930540c1ca726..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFAdvanced.dfm +++ /dev/null @@ -1,523 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 639 - Top = 184 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advance' - ClientHeight = 668 - ClientWidth = 541 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poDesktopCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 541 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 37 - Top = 16 - Width = 72 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 37 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 292 - Top = 16 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 293 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 504 - Height = 5 - end - object lblLightMode: TLabel - Left = 41 - Top = 82 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 41 - Top = 105 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 421 - Top = 17 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 539 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 133 - Top = 78 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 1 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 133 - Top = 102 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 2 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 276 - Top = 79 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 3 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 392 - Top = 77 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 4 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 392 - Top = 101 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 5 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 39 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 6 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - object txtReaderType: TEdit - Left = 126 - Top = 15 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 7 - end - object txtReaderSerial: TEdit - Left = 126 - Top = 39 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - object txtCardType: TEdit - Left = 369 - Top = 14 - Width = 33 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 480 - Top = 14 - Width = 33 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 10 - end - object txtCardSerial: TEdit - Left = 369 - Top = 38 - Width = 144 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 541 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuReaderHardwareFirmwareversionItem: TMenuItem - Caption = 'Reader Hardware/Firmware version' - OnClick = mnuReaderHardwareFirmwareversionItemClick - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.pas b/old_move_to_branch/uFCoderAdvance/uFAdvanced.pas deleted file mode 100644 index 95b36e160d9ffb33974ed8d722f3a66d6f3335f4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFAdvanced.pas +++ /dev/null @@ -1,476 +0,0 @@ - -unit uFAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - lblReaderSerial: TLabel; - lblCardType: TLabel; - lblCardSerial: TLabel; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - lblCardUIDSize: TLabel; - txtReaderType: TEdit; - txtReaderSerial: TEdit; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - txtCardSerial: TEdit; - mnuReaderHardwareFirmwareversionItem: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); - private - boCONN, - boFunctionStart, - boReaderStart :Boolean; - procedure MainLoop; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - - procedure SetMenuItems(const aValue:Boolean); //set menu items (enabled ?) - function GetFunctStart: Boolean; - function GetReaderStart: Boolean; - public - bDLCardType:Byte; - procedure SetFunctStart(const Value: Boolean); - procedure SetReaderStart(const Value: Boolean); - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - pUserData :PByte; - iFResult :DL_STATUS; -begin - if (txtNewUserData.Text=EmptyStr) then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(pUserData); - - pUserData:=PByte(txtNewUserData.Text); - iFResult :=WriteUserData(pUserData); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end - else - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end; - finally - pUserData:=nil; - Dispose(pUserData); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - bCounter :Byte; - PReaderKey :PByte; - bKeyIndex :Byte; - baReaderKey:array[0..5] of Byte; - s:string; - iFResult :DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - bKeyIndex:=cboKeyIndex.ItemIndex; - New(PReaderKey); - for bCounter:=0 to 5 do - begin - if chkReaderHex.Checked then - baReaderKey[bCounter]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text) - else - baReaderKey[bCounter]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text); - end; - PReaderKey:=@baReaderKey; - iFResult :=ReaderKeyWrite(PReaderKey,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbReader,iFResult); - end - else - begin - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbReader,iFResult); - end; - finally - SetFunctStart(false); - PReaderKey:=nil; - Dispose(PReaderKey); - end; -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderSoftRestart(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderReset(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.MainLoop; -var - iRResult, - iCResult, - iReaderType, - iReaderSerial, - iCardSerial, - iUDResult :DL_STATUS; - bCardUIDSize, - bCardType, - bBr :Byte; - caUserData :array[0..16] of Char; - baCardUID :array[0..9] of Byte; - pUserData :PByte; - sBuffer :string; -begin - SetReaderStart(true); - sBuffer:=''; - New(pUserData); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - SetStatusBar(stbReader,iRResult); - end; - end; - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult); - end - else - begin - boCONN:=false; - ReaderClose(); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - SetStatusBar(stbReader,iRResult); - end; - - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=DL_NTAG_216 then - SetMenuItems(false) - else - SetMenuItems(true); - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize -1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial.Text :='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - SetMenuItems(true); - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - SetStatusBar(stbCard,iCResult); - end; - - pUserData:=PByte(@caUserData); - iUDResult:=ReadUserData(pUserData); - if iUDResult=DL_OK then - txtUserData.Text:=String(caUserData) - else - txtUserData.Text:=#0; - end; - SetReaderStart(false); - pUserData:=0; - FreeAndNil(pUserData); -end; - -function TfrmuFrAdvanced.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -function TfrmuFrAdvanced.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrAdvanced.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -procedure TfrmuFrAdvanced.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - - - - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - if FunctionStart then Exit; - MainLoop; -end; - -procedure TfrmuFrAdvanced.mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); -var - bRHMajor, - bRHMinor, - bRFMajor, - bRFMinor : Byte; -begin - GetReaderHardwareVersion(bRHMajor,bRHMinor); - GetReaderFirmwareVersion(bRFMajor,bRFMinor); - MessageDlg('Hardware version : ' + IntToStr(bRHMajor) + '.' + IntToStr(bRHMinor) +#13+ - 'Firmware version : ' + IntToStr(bRFMajor) + '.' + IntToStr(bRFMinor),mtInformation,[mbOK],0); - -end; - -procedure TfrmuFrAdvanced.SetMenuItems(const aValue: Boolean); -begin - mnuValueBlockReadWriteItem.Enabled :=aValue; - mnuValueBlockIncrementDecrementItem.Enabled :=aValue; - mnuBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorIncrDecrItems.Enabled :=aValue; - mnuLinearFormatCardItem.Enabled :=aValue; - mnuSectorTrailerWriteItem.Enabled :=aValue; -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.~ddp b/old_move_to_branch/uFCoderAdvance/uFAdvanced.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFAdvanced.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.~dfm b/old_move_to_branch/uFCoderAdvance/uFAdvanced.~dfm deleted file mode 100644 index b82cc69f374d98023963edd36936bef40f721b32..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFAdvanced.~dfm +++ /dev/null @@ -1,523 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 331 - Top = 3 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advance' - ClientHeight = 668 - ClientWidth = 541 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poDesktopCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 541 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 37 - Top = 16 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 37 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 292 - Top = 16 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 293 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 504 - Height = 5 - end - object lblLightMode: TLabel - Left = 41 - Top = 82 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 41 - Top = 105 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 421 - Top = 17 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 539 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 133 - Top = 78 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 1 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 133 - Top = 102 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 2 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 276 - Top = 79 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 3 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 392 - Top = 77 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 4 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 392 - Top = 101 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 5 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 39 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 6 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - object txtReaderType: TEdit - Left = 126 - Top = 15 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 7 - end - object txtReaderSerial: TEdit - Left = 126 - Top = 39 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - object txtCardType: TEdit - Left = 369 - Top = 14 - Width = 33 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 480 - Top = 14 - Width = 33 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 10 - end - object txtCardSerial: TEdit - Left = 369 - Top = 38 - Width = 144 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 541 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuReaderHardwareFirmwareversionItem: TMenuItem - Caption = 'Reader Hardware/Firmware version' - OnClick = mnuReaderHardwareFirmwareversionItemClick - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoderAdvance/uFAdvanced.~pas b/old_move_to_branch/uFCoderAdvance/uFAdvanced.~pas deleted file mode 100644 index 93adf920bb78f48e1748729c0cd0e087b8cda40d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFAdvanced.~pas +++ /dev/null @@ -1,476 +0,0 @@ - -unit uFAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder1x, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - lblReaderSerial: TLabel; - lblCardType: TLabel; - lblCardSerial: TLabel; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - lblCardUIDSize: TLabel; - txtReaderType: TEdit; - txtReaderSerial: TEdit; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - txtCardSerial: TEdit; - mnuReaderHardwareFirmwareversionItem: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); - private - boCONN, - boFunctionStart, - boReaderStart :Boolean; - procedure MainLoop; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - - procedure SetMenuItems(const aValue:Boolean); //set menu items (enabled ?) - function GetFunctStart: Boolean; - function GetReaderStart: Boolean; - public - bDLCardType:Byte; - procedure SetFunctStart(const Value: Boolean); - procedure SetReaderStart(const Value: Boolean); - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - pUserData :PByte; - iFResult :DL_STATUS; -begin - if (txtNewUserData.Text=EmptyStr) then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(pUserData); - - pUserData:=PByte(txtNewUserData.Text); - iFResult :=WriteUserData(pUserData); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end - else - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end; - finally - pUserData:=nil; - Dispose(pUserData); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - bCounter :Byte; - PReaderKey :PByte; - bKeyIndex :Byte; - baReaderKey:array[0..5] of Byte; - s:string; - iFResult :DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - bKeyIndex:=cboKeyIndex.ItemIndex; - New(PReaderKey); - for bCounter:=0 to 5 do - begin - if chkReaderHex.Checked then - baReaderKey[bCounter]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text) - else - baReaderKey[bCounter]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text); - end; - PReaderKey:=@baReaderKey; - iFResult :=ReaderKeyWrite(PReaderKey,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbReader,iFResult); - end - else - begin - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbReader,iFResult); - end; - finally - SetFunctStart(false); - PReaderKey:=nil; - Dispose(PReaderKey); - end; -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderSoftRestart(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderReset(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.MainLoop; -var - iRResult, - iCResult, - iReaderType, - iReaderSerial, - iCardSerial, - iUDResult :DL_STATUS; - bCardUIDSize, - bCardType, - bBr :Byte; - caUserData :array[0..16] of Char; - baCardUID :array[0..9] of Byte; - pUserData :PByte; - sBuffer :string; -begin - SetReaderStart(true); - sBuffer:=''; - New(pUserData); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - SetStatusBar(stbReader,iRResult); - end; - end; - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult); - end - else - begin - boCONN:=false; - ReaderClose(); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - SetStatusBar(stbReader,iRResult); - end; - - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder1x.DL_NTAG_216 then - SetMenuItems(false) - else - SetMenuItems(true); - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize -1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial.Text :='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - SetMenuItems(true); - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - SetStatusBar(stbCard,iCResult); - end; - - pUserData:=PByte(@caUserData); - iUDResult:=ReadUserData(pUserData); - if iUDResult=DL_OK then - txtUserData.Text:=String(caUserData) - else - txtUserData.Text:=#0; - end; - SetReaderStart(false); - pUserData:=0; - FreeAndNil(pUserData); -end; - -function TfrmuFrAdvanced.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -function TfrmuFrAdvanced.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrAdvanced.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -procedure TfrmuFrAdvanced.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - - - - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - if FunctionStart then Exit; - MainLoop; -end; - -procedure TfrmuFrAdvanced.mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); -var - bRHMajor, - bRHMinor, - bRFMajor, - bRFMinor : Byte; -begin - GetReaderHardwareVersion(bRHMajor,bRHMinor); - GetReaderFirmwareVersion(bRFMajor,bRFMinor); - MessageDlg('Hardware version : ' + IntToStr(bRHMajor) + '.' + IntToStr(bRHMinor) +#13+ - 'Firmware version : ' + IntToStr(bRFMajor) + '.' + IntToStr(bRFMinor),mtInformation,[mbOK],0); - -end; - -procedure TfrmuFrAdvanced.SetMenuItems(const aValue: Boolean); -begin - mnuValueBlockReadWriteItem.Enabled :=aValue; - mnuValueBlockIncrementDecrementItem.Enabled :=aValue; - mnuBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorIncrDecrItems.Enabled :=aValue; - mnuLinearFormatCardItem.Enabled :=aValue; - mnuSectorTrailerWriteItem.Enabled :=aValue; -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/uFCoder-x86.dll b/old_move_to_branch/uFCoderAdvance/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFCoder.dcu b/old_move_to_branch/uFCoderAdvance/uFCoder.dcu deleted file mode 100644 index 7917f987d3de2f00fc32aa84bfadec0caf346cc3..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFCoder.pas b/old_move_to_branch/uFCoderAdvance/uFCoder.pas deleted file mode 100644 index 671d6a39ef6a4e0473a8e27168ea96e7b572ad47..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFCoder.pas +++ /dev/null @@ -1,640 +0,0 @@ -unit uFCoder; - -interface - -const DLL_NAME ='uFCoder-x86.dll'; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderReset: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function ReaderSoftRestart: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType : Byte; - var bCardUID : Byte; - var bCardUIDSize : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeysLock(const bPassword:PByte):DL_STATUS stdcall; -function ReaderKeysUnlock(const bPassword:PByte):DL_STATUS stdcall; - - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -function ReadUserData(aucData:PByte): DL_STATUS stdcall; - -function WriteUserData(const aucData: PByte): DL_STATUS stdcall; - - - -function BlockRead(data:PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockWrite(const data: PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte; - key_index:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockRead(value:PLongint; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead(value:PLongint; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall ; - - -function ValueBlockInSectorDecrement(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM1(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM1(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM1(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite_AKM1(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM1(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM1(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM1(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM1(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_AKM1(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM1(value: PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM1(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM1(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM1(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM1(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM1(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM1(decrement_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM1(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM2(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM2(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM2(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall ; - - -function BlockInSectorWrite_AKM2(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM2(data: PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM2(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM2(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM2(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall ; - -function SectorTrailerWriteUnsafe_AKM2(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM2(value: pLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM2(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM2(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM2(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM2(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM2(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM2(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM2(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_PK(data:PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockWrite_PK(const data: PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorRead_PK(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorWrite_PK(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearRead_PK(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - - -function LinearWrite_PK(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearFormatCard_PK(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - -function SectorTrailerWrite_PK(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B:PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_PK(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockRead_PK(value:PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_PK(value: PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockWrite_PK(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_PK(value:LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockIncrement_PK(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_PK(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockDecrement_PK(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_PK(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function GetReaderHardwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - -function GetReaderFirmwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - - - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderReset; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderSoftRestart; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function ReadUserData; external DLL_NAME; -function WriteUserData; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderKeysLock; external DLL_NAME; -function ReaderKeysUnlock; external DLL_NAME; -function BlockRead; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function BlockInSectorRead; external DLL_NAME; -function BlockInSectorWrite; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function SectorTrailerWrite; external DLL_NAME; -function SectorTrailerWriteUnsafe; external DLL_NAME; -function ValueBlockRead; external DLL_NAME; -function ValueBlockInSectorRead; external DLL_NAME; -function ValueBlockWrite; external DLL_NAME; -function ValueBlockInSectorWrite; external DLL_NAME; -function ValueBlockIncrement; external DLL_NAME; -function ValueBlockInSectorIncrement; external DLL_NAME; -function ValueBlockDecrement; external DLL_NAME; -function ValueBlockInSectorDecrement; external DLL_NAME; -function BlockRead_AKM1; external DLL_NAME; -function BlockWrite_AKM1; external DLL_NAME; -function BlockInSectorRead_AKM1; external DLL_NAME; -function BlockInSectorWrite_AKM1; external DLL_NAME; -function LinearRead_AKM1; external DLL_NAME; -function LinearWrite_AKM1; external DLL_NAME; -function LinearFormatCard_AKM1; external DLL_NAME; -function SectorTrailerWrite_AKM1; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM1; external DLL_NAME; -function ValueBlockRead_AKM1; external DLL_NAME; -function ValueBlockInSectorRead_AKM1; external DLL_NAME; -function ValueBlockWrite_AKM1; external DLL_NAME; -function ValueBlockInSectorWrite_AKM1; external DLL_NAME; -function ValueBlockIncrement_AKM1; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM1; external DLL_NAME; -function ValueBlockDecrement_AKM1; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM1; external DLL_NAME; -function BlockRead_AKM2; external DLL_NAME; -function BlockWrite_AKM2; external DLL_NAME; -function BlockInSectorRead_AKM2; external DLL_NAME; -function BlockInSectorWrite_AKM2; external DLL_NAME; -function LinearRead_AKM2; external DLL_NAME; -function LinearWrite_AKM2; external DLL_NAME; -function LinearFormatCard_AKM2; external DLL_NAME; -function SectorTrailerWrite_AKM2; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM2; external DLL_NAME; -function ValueBlockRead_AKM2; external DLL_NAME; -function ValueBlockInSectorRead_AKM2; external DLL_NAME; -function ValueBlockWrite_AKM2; external DLL_NAME; -function ValueBlockInSectorWrite_AKM2; external DLL_NAME; -function ValueBlockIncrement_AKM2; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM2; external DLL_NAME; -function ValueBlockDecrement_AKM2; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM2; external DLL_NAME; -function BlockRead_PK; external DLL_NAME; -function BlockWrite_PK; external DLL_NAME; -function BlockInSectorRead_PK; external DLL_NAME; -function BlockInSectorWrite_PK; external DLL_NAME; -function LinearRead_PK; external DLL_NAME; -function LinearWrite_PK; external DLL_NAME; -function LinearFormatCard_PK; external DLL_NAME; -function SectorTrailerWrite_PK; external DLL_NAME; -function SectorTrailerWriteUnsafe_PK; external DLL_NAME; -function ValueBlockRead_PK; external DLL_NAME; -function ValueBlockInSectorRead_PK; external DLL_NAME; -function ValueBlockWrite_PK; external DLL_NAME; -function ValueBlockInSectorWrite_PK; external DLL_NAME; -function ValueBlockIncrement_PK; external DLL_NAME; -function ValueBlockInSectorIncrement_PK; external DLL_NAME; -function ValueBlockDecrement_PK; external DLL_NAME; -function ValueBlockInSectorDecrement_PK; external DLL_NAME; -function GetReaderHardwareVersion; external DLL_NAME; -function GetReaderFirmwareVersion; external DLL_NAME; - - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoderAdvance/uFCoder_coff.lib b/old_move_to_branch/uFCoderAdvance/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFCoder_omf.lib b/old_move_to_branch/uFCoderAdvance/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.cfg b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.ddp b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dfm b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dfm deleted file mode 100644 index fe9b0646f1a9de0ab5f4f72d664382103adceea4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dfm +++ /dev/null @@ -1,501 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 423 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advanced' - ClientHeight = 668 - ClientWidth = 529 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 529 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 529 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 24 - Top = 16 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 24 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 277 - Top = 16 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 277 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 478 - Height = 5 - end - object lblLightMode: TLabel - Left = 25 - Top = 83 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 25 - Top = 106 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object txtReaderType: TStaticText - Left = 116 - Top = 15 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtReaderSerial: TStaticText - Left = 116 - Top = 39 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object txtCardType: TStaticText - Left = 365 - Top = 15 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 2 - end - object txtCardSerial: TStaticText - Left = 365 - Top = 39 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 527 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 117 - Top = 79 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 117 - Top = 103 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 6 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 260 - Top = 80 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 7 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 376 - Top = 78 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 8 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 376 - Top = 102 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 9 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 24 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 10 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 529 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dof b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dof deleted file mode 100644 index 305eb3d50db6f58a815c16d61040958e2d7ad1c0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Advanced version.Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dpr b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dpr deleted file mode 100644 index a3742ca46a15a8294dddce70e6e888f586c00f2e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.dpr +++ /dev/null @@ -1,36 +0,0 @@ -program uFrAdvanced; - -uses - Forms, - uFAdvanced in 'uFAdvanced.pas' {frmuFrAdvanced}, - Global in 'Global.pas', - uFCoder in 'uFCoder.pas', - LinearReadWrite in 'LinearReadWrite.pas' {frmLinearReadWrite}, - BlockInSector in 'BlockInSector.pas' {frmBlockInSectorReadWrite}, - ValueBlock in 'ValueBlock.pas' {frmValueBlockReadWrite}, - ValueBlockIncDec in 'ValueBlockIncDec.pas' {frmValueBlockIncrDecr}, - ValueBlockInSector in 'ValueBlockInSector.pas' {frmValueBlockInSectorReadWrite}, - ValueBlockInSectorIncrDecr in 'ValueBlockInSectorIncrDecr.pas' {frmValueBlockInSectorIncDecr}, - SectorTrailersWrite in 'SectorTrailersWrite.pas' {frmSectorTrailerWrite}, - ViewAll in 'ViewAll.pas' {frmViewAll}, - LinearFormatsCard in 'LinearFormatsCard.pas' {frmLinearFormatCard}, - BlockReadWrite in 'BlockReadWrite.pas' {frmBlockReadWrite}; - -{$R *.res} - -begin - Application.Initialize; - Application.Title := 'uFr Advanced'; - Application.CreateForm(TfrmuFrAdvanced, frmuFrAdvanced); - Application.CreateForm(TfrmLinearReadWrite, frmLinearReadWrite); - Application.CreateForm(TfrmBlockInSectorReadWrite, frmBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockReadWrite, frmValueBlockReadWrite); - Application.CreateForm(TfrmValueBlockIncrDecr, frmValueBlockIncrDecr); - Application.CreateForm(TfrmValueBlockInSectorReadWrite, frmValueBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockInSectorIncDecr, frmValueBlockInSectorIncDecr); - Application.CreateForm(TfrmSectorTrailerWrite, frmSectorTrailerWrite); - Application.CreateForm(TfrmViewAll, frmViewAll); - Application.CreateForm(TfrmLinearFormatCard, frmLinearFormatCard); - Application.CreateForm(TfrmBlockReadWrite, frmBlockReadWrite); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.exe b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.exe deleted file mode 100644 index 92ae6548e796b1be37a087c78b5643e221460d3f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.pas b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.pas deleted file mode 100644 index 16f6afd6210e0cf1e23c8e541525cf8ed12c54bc..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.pas +++ /dev/null @@ -1,330 +0,0 @@ -unit uFrAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder2x, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - txtReaderType: TStaticText; - lblReaderSerial: TLabel; - txtReaderSerial: TStaticText; - lblCardType: TLabel; - txtCardType: TStaticText; - lblCardSerial: TLabel; - txtCardSerial: TStaticText; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - procedure TimerTimer(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - private - CONNECTION:Boolean; - res:DL_STATUS; - reader_type:Longint; - reader_serial:LongInt; - card_type:Byte; - card_serial:LongInt; - Pread_user_data:PByte; - user_data:array[0..15] of Char; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - - Pread_user_data:=nil; - if not CONNECTION then - begin - res:=ReaderOpen(); - if res=DL_OK then - begin - CONNECTION:=true; - stbReader.Panels[0].Text:='CONNECTED'; - Status_Bar_Error_Reporting(stbReader,res); - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - Status_Bar_Error_Reporting(stbReader,res); - txtReaderType.Caption:=''; - txtReaderSerial.Caption:=''; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - txtUserData.Text:=''; - txtNewUserData.Text:=''; - end; - end; - if CONNECTION then - begin - res:=GetReaderType(reader_type); - if res=DL_OK then begin - txtReaderType.Caption:='$'+IntToHex(reader_type,8); - Status_Bar_Error_Reporting(stbReader,res); - end - else - begin - CONNECTION:=false; - ReaderClose(); - end; - res:=GetReaderSerialNumber(reader_serial); - if res=DL_OK then txtReaderSerial.Caption:='$'+IntToHex(reader_serial,8); - res:=GetCardId(card_type,card_serial); - if res=DL_OK then - begin - txtCardType.Caption:='$'+IntToHex(card_type,2); - txtCardSerial.Caption:='$'+IntToHex(card_serial,8); - Status_Bar_Error_Reporting(stbCard,res); - end - else - begin - txtCardType.Caption:=''; - txtCardSerial.Caption:=''; - Status_Bar_Error_Reporting(stbCard,res); - end; - PRead_user_data:=PByte(@user_data); - res:=ReadUserData(Pread_user_data); - if res=DL_OK then - txtUserData.Text:=user_data - else - txtUserData.Text:=#0; - end; -end; - - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - PWrite_user_data:PByte; -begin - if (txtNewUserData.Text=EmptyStr) then begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - PWrite_user_data:=PByte(txtNewUserData.Text); - res:=WriteUserData(PWrite_user_data); - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end - else begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end; - - end; - - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - br:byte; - PReader_key:PByte; - key_index:Byte; - reader_key:array[0..5] of Byte; - s:string; -begin - key_index:=cboKeyIndex.ItemIndex; - PReader_key:=nil; - for br:=0 to 5 do begin - if chkReaderHex.Checked then - reader_key[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(br+1))).Text) - else - reader_key[br]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(br+1))).Text); - end; - PReader_key:=@reader_key; - res:=ReaderKeyWrite(PReader_key,key_index); - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end - else begin - ReaderUISignal(ERROR_LIGHT,ERROR_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end; - -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - ReaderSoftRestart(); -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - ReaderReset(); -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.res b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.res deleted file mode 100644 index 44134338ca0e97d4a975aa827429aa12eac90905..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.~dpr b/old_move_to_branch/uFCoderAdvance/uFrAdvanced.~dpr deleted file mode 100644 index 58fcb6cd4357da888865426d4826de7ebba04315..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance/uFrAdvanced.~dpr +++ /dev/null @@ -1,36 +0,0 @@ -program uFrAdvanced; - -uses - Forms, - uFAdvanced in 'uFAdvanced.pas' {frmuFrAdvanced}, - Global in 'Global.pas', - uFCoder1x in 'uFCoder1x.pas', - LinearReadWrite in 'LinearReadWrite.pas' {frmLinearReadWrite}, - BlockInSector in 'BlockInSector.pas' {frmBlockInSectorReadWrite}, - ValueBlock in 'ValueBlock.pas' {frmValueBlockReadWrite}, - ValueBlockIncDec in 'ValueBlockIncDec.pas' {frmValueBlockIncrDecr}, - ValueBlockInSector in 'ValueBlockInSector.pas' {frmValueBlockInSectorReadWrite}, - ValueBlockInSectorIncrDecr in 'ValueBlockInSectorIncrDecr.pas' {frmValueBlockInSectorIncDecr}, - SectorTrailersWrite in 'SectorTrailersWrite.pas' {frmSectorTrailerWrite}, - ViewAll in 'ViewAll.pas' {frmViewAll}, - LinearFormatsCard in 'LinearFormatsCard.pas' {frmLinearFormatCard}, - BlockReadWrite in 'BlockReadWrite.pas' {frmBlockReadWrite}; - -{$R *.res} - -begin - Application.Initialize; - Application.Title := 'uFr Advanced'; - Application.CreateForm(TfrmuFrAdvanced, frmuFrAdvanced); - Application.CreateForm(TfrmLinearReadWrite, frmLinearReadWrite); - Application.CreateForm(TfrmBlockInSectorReadWrite, frmBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockReadWrite, frmValueBlockReadWrite); - Application.CreateForm(TfrmValueBlockIncrDecr, frmValueBlockIncrDecr); - Application.CreateForm(TfrmValueBlockInSectorReadWrite, frmValueBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockInSectorIncDecr, frmValueBlockInSectorIncDecr); - Application.CreateForm(TfrmSectorTrailerWrite, frmSectorTrailerWrite); - Application.CreateForm(TfrmViewAll, frmViewAll); - Application.CreateForm(TfrmLinearFormatCard, frmLinearFormatCard); - Application.CreateForm(TfrmBlockReadWrite, frmBlockReadWrite); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.dcu b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.dcu deleted file mode 100644 index 03959705ecc62aad890463b347c4ffa637b72c42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.ddp b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.dfm b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.dfm deleted file mode 100644 index 2f80812c221da10136bf4d30ac6549bb1ef85b42..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.dfm +++ /dev/null @@ -1,1021 +0,0 @@ -object frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite - Left = 516 - Top = 235 - Width = 529 - Height = 427 - Caption = 'BlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object stbBlockInSectorReadWrite: TStatusBar - Left = 0 - Top = 369 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockInSectorReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 312 - ActivePage = tabBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabBlockInSectorRead: TTabSheet - Caption = 'BlockInSector Read' - object pnlBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadData: TLabel - Left = 9 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBlockInSectorRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadData: TEdit - Left = 8 - Top = 108 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadClick - end - object txtBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM1: TLabel - Left = 10 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM1: TEdit - Left = 9 - Top = 109 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM1Click - end - object txtBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM2: TLabel - Left = 9 - Top = 96 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM2: TEdit - Left = 8 - Top = 114 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM2Click - end - object txtBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataPK: TLabel - Left = 10 - Top = 97 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataPK: TEdit - Left = 9 - Top = 115 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadPKClick - end - object txtBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabBlockInSectorWrite: TTabSheet - Caption = 'BlockInSector Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISWWriteData: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddress: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddress: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 148 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteData: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddress: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object brnBlockInSectorWrite: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = brnBlockInSectorWriteClick - end - object txtBISWBlockAddress: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISWWriteDataAKM1: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label5: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 193 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM1: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM1: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM1: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM1Click - end - object txtBISWBlockAddressAKM1: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISWWriteDataAKM2: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectoAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 193 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM2: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM2: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM2: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM2Click - end - object txtBISWBlockAddressAKM2: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddressPK: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressPK: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataPK: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressPK: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWritePK: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWritePKClick - end - object txtBISWBlockAddressPK: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.pas b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.pas deleted file mode 100644 index e489ba355194c0433e4d735902bf5ed32e33d19a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.pas +++ /dev/null @@ -1,624 +0,0 @@ -unit BlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder, StdCtrls, ExtCtrls, ComCtrls; - -type - TfrmBlockInSectorReadWrite = class(TForm) - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - lblHeader: TStaticText; - stbBlockInSectorReadWrite: TStatusBar; - pgBlockInSectorReadWrite: TPageControl; - tabBlockInSectorRead: TTabSheet; - pnlBlockInSectorRead: TPanel; - lblBISRSectorAddress: TLabel; - lblBISRReadData: TLabel; - lblBlockInSectorRead: TStaticText; - txtBISRSectorAddress: TEdit; - txtBISRReadData: TEdit; - btnBlockInSectorRead: TButton; - pnlBlockInSectorReadAKM1: TPanel; - lblBISRSectorAddressAKM1: TLabel; - lblBISRReadDataAKM1: TLabel; - lblBISRAKM1: TStaticText; - txtBISRSectorAddressAKM1: TEdit; - txtBISRReadDataAKM1: TEdit; - btnBlockInSectorReadAKM1: TButton; - pnlBlockInSectorReadAKM2: TPanel; - lblBISRSectorAddressAKM2: TLabel; - lblBISRReadDataAKM2: TLabel; - lblBRAKM2: TStaticText; - txtBISRSectorAddressAKM2: TEdit; - txtBISRReadDataAKM2: TEdit; - btnBlockInSectorReadAKM2: TButton; - pnlBlockReadPK: TPanel; - lblBISRSectorAddressPK: TLabel; - lblBISRReadDataPK: TLabel; - lblBRPK: TStaticText; - txtBISRSectorAddressPK: TEdit; - txtBISRReadDataPK: TEdit; - btnBlockInSectorReadPK: TButton; - tabBlockInSectorWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblBISWBlockWrite: TStaticText; - pnlBlockWriteAKM1: TPanel; - lblBISWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBISWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBISRBlockAddress: TLabel; - txtBISRBlockAddress: TEdit; - lblBISRBlockAddressAKM1: TLabel; - txtBISRBlockAddressAKM1: TEdit; - lblBISRBlockAddressAKM2: TLabel; - txtBISRBlockAddressAKM2: TEdit; - lblBISRBlockAddressPK: TLabel; - txtBISRBlockAddressPK: TEdit; - lblBISWWriteData: TLabel; - txtBISWWriteData: TEdit; - lblBISWSectorAddress: TLabel; - txtBISWSectorAddress: TEdit; - brnBlockInSectorWrite: TButton; - lblBISWBlockAddress: TLabel; - txtBISWBlockAddress: TEdit; - lblBISWWriteDataAKM1: TLabel; - txtBISWWriteDataAKM1: TEdit; - Label5: TLabel; - txtBISWSectorAddressAKM1: TEdit; - btnBlockInSectorWriteAKM1: TButton; - lblBISWBlockAddressAKM1: TLabel; - txtBISWBlockAddressAKM1: TEdit; - lblBISWWriteDataAKM2: TLabel; - txtBISWWriteDataAKM2: TEdit; - lblBISWSectoAddressAKM2: TLabel; - txtBISWSectorAddressAKM2: TEdit; - btnBlockInSectorWriteAKM2: TButton; - lblBISWBlockAddressAKM2: TLabel; - txtBISWBlockAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - txtBISWWriteDataPK: TEdit; - lblBISWSectorAddressPK: TLabel; - txtBISWSectorAddressPK: TEdit; - btnBlockInSectorWritePK: TButton; - lblBISWBlockAddressPK: TLabel; - txtBISWBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnBlockInSectorReadClick(Sender: TObject); - procedure btnBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnBlockInSectorReadPKClick(Sender: TObject); - procedure brnBlockInSectorWriteClick(Sender: TObject); - procedure btnBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnBlockInSectorWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmBlockInSectorReadWrite } - -procedure TfrmBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadClick(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddress.Text); - - iFResult:=BlockInSectorRead(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBISRReadData.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM1Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM1.Text); - - iFResult:=BlockInSectorRead_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM1.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM2Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM2.Text); - - iFResult:=BlockInSectorRead_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM2.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadPKClick(Sender: TObject); -var - pData, - pPKKEY :PByte; - baPKKey :array[0..5] of Byte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressPK.Text); - - iFResult:=BlockInSectorRead_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtBISRReadDataPK.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.brnBlockInSectorWriteClick(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddress.Text); - pData :=PByte(txtBISWWriteData.Text); - - iFResult:=BlockInSectorWrite(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM1.Text); - pData :=PByte(txtBISWWriteDataAKM1.Text); - - iFResult:=BlockInSectorWrite_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM2.Text); - pData :=PByte(txtBISWWriteDataAKM2.Text); - - iFResult:=BlockInSectorWrite_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - baPKKey :array[0..5] of Byte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bSectorAddress :=StrToInt(txtBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressPK.Text); - pData :=PByte(txtBISWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockInSectorWrite_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~ddp b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~dfm b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~dfm deleted file mode 100644 index 4e44f9b63fb6d48ad7c80fcb1c4bd900872201e4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~dfm +++ /dev/null @@ -1,1021 +0,0 @@ -object frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite - Left = 516 - Top = 235 - Width = 529 - Height = 427 - Caption = 'BlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object stbBlockInSectorReadWrite: TStatusBar - Left = 0 - Top = 370 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockInSectorReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 313 - ActivePage = tabBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabBlockInSectorRead: TTabSheet - Caption = 'BlockInSector Read' - object pnlBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadData: TLabel - Left = 9 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBlockInSectorRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadData: TEdit - Left = 8 - Top = 108 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadClick - end - object txtBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM1: TLabel - Left = 10 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM1: TEdit - Left = 9 - Top = 109 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM1Click - end - object txtBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataAKM2: TLabel - Left = 9 - Top = 96 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataAKM2: TEdit - Left = 8 - Top = 114 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadAKM2Click - end - object txtBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISRReadDataPK: TLabel - Left = 10 - Top = 97 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBISRReadDataPK: TEdit - Left = 9 - Top = 115 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockInSectorReadPKClick - end - object txtBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabBlockInSectorWrite: TTabSheet - Caption = 'BlockInSector Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBISWWriteData: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddress: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddress: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteData: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddress: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object brnBlockInSectorWrite: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = brnBlockInSectorWriteClick - end - object txtBISWBlockAddress: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBISWWriteDataAKM1: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label5: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM1: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM1: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM1: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM1Click - end - object txtBISWBlockAddressAKM1: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBISWWriteDataAKM2: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectoAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataAKM2: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressAKM2: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWriteAKM2: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWriteAKM2Click - end - object txtBISWBlockAddressAKM2: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 9 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISWSectorAddressPK: TLabel - Left = 8 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblBISWBlockAddressPK: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtBISWWriteDataPK: TEdit - Left = 8 - Top = 40 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object txtBISWSectorAddressPK: TEdit - Left = 100 - Top = 69 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockInSectorWritePK: TButton - Left = 152 - Top = 69 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnBlockInSectorWritePKClick - end - object txtBISWBlockAddressPK: TEdit - Left = 100 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~pas b/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~pas deleted file mode 100644 index 4c1b046ba80b95803cc6dffafd4e6f92a7050551..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockInSector.~pas +++ /dev/null @@ -1,624 +0,0 @@ -unit BlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder1x, StdCtrls, ExtCtrls, ComCtrls; - -type - TfrmBlockInSectorReadWrite = class(TForm) - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - lblHeader: TStaticText; - stbBlockInSectorReadWrite: TStatusBar; - pgBlockInSectorReadWrite: TPageControl; - tabBlockInSectorRead: TTabSheet; - pnlBlockInSectorRead: TPanel; - lblBISRSectorAddress: TLabel; - lblBISRReadData: TLabel; - lblBlockInSectorRead: TStaticText; - txtBISRSectorAddress: TEdit; - txtBISRReadData: TEdit; - btnBlockInSectorRead: TButton; - pnlBlockInSectorReadAKM1: TPanel; - lblBISRSectorAddressAKM1: TLabel; - lblBISRReadDataAKM1: TLabel; - lblBISRAKM1: TStaticText; - txtBISRSectorAddressAKM1: TEdit; - txtBISRReadDataAKM1: TEdit; - btnBlockInSectorReadAKM1: TButton; - pnlBlockInSectorReadAKM2: TPanel; - lblBISRSectorAddressAKM2: TLabel; - lblBISRReadDataAKM2: TLabel; - lblBRAKM2: TStaticText; - txtBISRSectorAddressAKM2: TEdit; - txtBISRReadDataAKM2: TEdit; - btnBlockInSectorReadAKM2: TButton; - pnlBlockReadPK: TPanel; - lblBISRSectorAddressPK: TLabel; - lblBISRReadDataPK: TLabel; - lblBRPK: TStaticText; - txtBISRSectorAddressPK: TEdit; - txtBISRReadDataPK: TEdit; - btnBlockInSectorReadPK: TButton; - tabBlockInSectorWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblBISWBlockWrite: TStaticText; - pnlBlockWriteAKM1: TPanel; - lblBISWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBISWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBISRBlockAddress: TLabel; - txtBISRBlockAddress: TEdit; - lblBISRBlockAddressAKM1: TLabel; - txtBISRBlockAddressAKM1: TEdit; - lblBISRBlockAddressAKM2: TLabel; - txtBISRBlockAddressAKM2: TEdit; - lblBISRBlockAddressPK: TLabel; - txtBISRBlockAddressPK: TEdit; - lblBISWWriteData: TLabel; - txtBISWWriteData: TEdit; - lblBISWSectorAddress: TLabel; - txtBISWSectorAddress: TEdit; - brnBlockInSectorWrite: TButton; - lblBISWBlockAddress: TLabel; - txtBISWBlockAddress: TEdit; - lblBISWWriteDataAKM1: TLabel; - txtBISWWriteDataAKM1: TEdit; - Label5: TLabel; - txtBISWSectorAddressAKM1: TEdit; - btnBlockInSectorWriteAKM1: TButton; - lblBISWBlockAddressAKM1: TLabel; - txtBISWBlockAddressAKM1: TEdit; - lblBISWWriteDataAKM2: TLabel; - txtBISWWriteDataAKM2: TEdit; - lblBISWSectoAddressAKM2: TLabel; - txtBISWSectorAddressAKM2: TEdit; - btnBlockInSectorWriteAKM2: TButton; - lblBISWBlockAddressAKM2: TLabel; - txtBISWBlockAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - txtBISWWriteDataPK: TEdit; - lblBISWSectorAddressPK: TLabel; - txtBISWSectorAddressPK: TEdit; - btnBlockInSectorWritePK: TButton; - lblBISWBlockAddressPK: TLabel; - txtBISWBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnBlockInSectorReadClick(Sender: TObject); - procedure btnBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnBlockInSectorReadPKClick(Sender: TObject); - procedure brnBlockInSectorWriteClick(Sender: TObject); - procedure btnBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnBlockInSectorWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmBlockInSectorReadWrite: TfrmBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmBlockInSectorReadWrite } - -procedure TfrmBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadClick(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddress.Text); - - iFResult:=BlockInSectorRead(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBISRReadData.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM1Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM1.Text); - - iFResult:=BlockInSectorRead_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM1.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadAKM2Click(Sender: TObject); -var - pData :PByte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressAKM2.Text); - - iFResult:=BlockInSectorRead_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBISRReadDataAKM2.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorReadPKClick(Sender: TObject); -var - pData, - pPKKEY :PByte; - baPKKey :array[0..5] of Byte; - baReadBlock :array[0..15] of Char; - bSectorAddress, - bBlockAddress :Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - pData :=PByte(@baReadBlock); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - pData :=PByte(@baReadBlock); - bSectorAddress :=StrToInt(txtBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISRBlockAddressPK.Text); - - iFResult:=BlockInSectorRead_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtBISRReadDataPK.Text:=baReadBlock; - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.brnBlockInSectorWriteClick(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddress.Text); - pData :=PByte(txtBISWWriteData.Text); - - iFResult:=BlockInSectorWrite(pData,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM1.Text); - pData :=PByte(txtBISWWriteDataAKM1.Text); - - iFResult:=BlockInSectorWrite_AKM1(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bSectorAddress, - bBlockAddress, - bAuthMode :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressAKM2.Text); - pData :=PByte(txtBISWWriteDataAKM2.Text); - - iFResult:=BlockInSectorWrite_AKM2(pData,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockInSectorReadWrite.btnBlockInSectorWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - baPKKey :array[0..5] of Byte; - bSectorAddress, - bBlockAddress, - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBISWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bSectorAddress :=StrToInt(txtBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtBISWBlockAddressPK.Text); - pData :=PByte(txtBISWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockInSectorWrite_PK(pData,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockInSectorReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.dcu b/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.dcu deleted file mode 100644 index b5dc7286ddd0877401d61d8ebc2dec11f6858fd8..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.ddp b/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.dfm b/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.dfm deleted file mode 100644 index 949b5d688ff70ac802b2a7c90ae6e42708f4fb5d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.dfm +++ /dev/null @@ -1,893 +0,0 @@ -object frmBlockReadWrite: TfrmBlockReadWrite - Left = 310 - Top = 193 - Width = 540 - Height = 420 - Caption = 'BlockReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 524 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Block Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 524 - Height = 30 - Align = alTop - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbBlockReadWrite: TStatusBar - Left = 0 - Top = 362 - Width = 524 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 524 - Height = 305 - ActivePage = tabBlockRead - Align = alClient - TabOrder = 3 - object tabBlockRead: TTabSheet - Caption = 'BlockRead' - object pnlBlockRead: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBRBlockAddress: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblReadData: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadData: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockRead: TButton - Left = 152 - Top = 30 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadClick - end - object chkBRHex: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexClick - end - end - object pnlBlockReadAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBRBlockAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM1: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM1: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM1: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM1Click - end - object chkBRHexAKM1: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM1Click - end - end - object pnlBlockReadAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBRBlockAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM2: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM2: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM2: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM2Click - end - object chkBRHexAKM2: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM2Click - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBRBlockAddressPK: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataPK: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataPK: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadPK: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadPKClick - end - object chkBRHexPK: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexPKClick - end - end - end - object tabBlockWrite: TTabSheet - Caption = 'BlockWrite' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBWBlockAddress: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteData: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 82 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddress: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWrite: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteClick - end - object txtBWWriteData: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHex: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBWBlockAddressAKM1: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM1: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWiteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM1: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWriteAKM1: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteAKM1Click - end - object txtBWWriteDataAKM1: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM1: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBWBlockAddressAKM2: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM2: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM2: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBWBlockWriteAKM2: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBWBlockWriteAKM2Click - end - object txtBWWriteDataAKM2: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM2: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBWBlockAddressPK: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataPK: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressPK: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWritePK: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWritePKClick - end - object txtBWWriteDataPK: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexPK: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.pas b/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.pas deleted file mode 100644 index cf13a1fa6dd6a3de85c55976a283b34ce43c6f6c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.pas +++ /dev/null @@ -1,675 +0,0 @@ -unit BlockReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder, StdCtrls, ExtCtrls, ComCtrls; - - const - ARRAY_LENGTH=16; -type - TbaReadData=array[0..ARRAY_LENGTH] of byte; - PbaReadData=^TbaReadData; -type - TfrmBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbBlockReadWrite: TStatusBar; - pgBlockReadWrite: TPageControl; - tabBlockRead: TTabSheet; - tabBlockWrite: TTabSheet; - pnlBlockRead: TPanel; - pnlBlockReadAKM1: TPanel; - pnlBlockReadAKM2: TPanel; - pnlBlockReadPK: TPanel; - lblBlockRead: TStaticText; - lblBRAKM1: TStaticText; - lblBRAKM2: TStaticText; - lblBRPK: TStaticText; - lblBRBlockAddress: TLabel; - txtBRBlockAddress: TEdit; - txtBRReadData: TEdit; - lblReadData: TLabel; - btnBlockRead: TButton; - lblBRBlockAddressAKM1: TLabel; - txtBRBlockAddressAKM1: TEdit; - txtBRReadDataAKM1: TEdit; - lblBRReadDataAKM1: TLabel; - btnBlockReadAKM1: TButton; - lblBRBlockAddressAKM2: TLabel; - txtBRBlockAddressAKM2: TEdit; - txtBRReadDataAKM2: TEdit; - lblBRReadDataAKM2: TLabel; - btnBlockReadAKM2: TButton; - lblBRBlockAddressPK: TLabel; - txtBRBlockAddressPK: TEdit; - txtBRReadDataPK: TEdit; - lblBRReadDataPK: TLabel; - btnBlockReadPK: TButton; - pnlBlockWrite: TPanel; - lblBWBlockAddress: TLabel; - lblBWBlockRead: TStaticText; - txtBWBlockAddress: TEdit; - btnBlockWrite: TButton; - pnlBlockWriteAKM1: TPanel; - lblBWBlockWiteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBWWriteData: TLabel; - txtBWWriteData: TEdit; - lblBWBlockAddressAKM1: TLabel; - txtBWBlockAddressAKM1: TEdit; - btnBlockWriteAKM1: TButton; - lblBWWriteDataAKM1: TLabel; - txtBWWriteDataAKM1: TEdit; - lblBWBlockAddressAKM2: TLabel; - txtBWBlockAddressAKM2: TEdit; - btnBWBlockWriteAKM2: TButton; - lblBWWriteDataAKM2: TLabel; - txtBWWriteDataAKM2: TEdit; - lblBWBlockAddressPK: TLabel; - txtBWBlockAddressPK: TEdit; - btnBlockWritePK: TButton; - lblBWWriteDataPK: TLabel; - txtBWWriteDataPK: TEdit; - chkBRHex: TCheckBox; - chkBRHexAKM1: TCheckBox; - chkBRHexAKM2: TCheckBox; - chkBRHexPK: TCheckBox; - chkBWHex: TCheckBox; - chkBWHexAKM1: TCheckBox; - chkBWHexAKM2: TCheckBox; - chkBWHexPK: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure btnBlockReadClick(Sender: TObject); - procedure btnBlockReadAKM1Click(Sender: TObject); - procedure btnBlockReadAKM2Click(Sender: TObject); - procedure btnBlockReadPKClick(Sender: TObject); - procedure btnBlockWriteClick(Sender: TObject); - procedure btnBlockWriteAKM1Click(Sender: TObject); - procedure btnBWBlockWriteAKM2Click(Sender: TObject); - procedure btnBlockWritePKClick(Sender: TObject); - - procedure chkBRHexClick(Sender: TObject); - procedure chkBRHexAKM1Click(Sender: TObject); - procedure chkBRHexAKM2Click(Sender: TObject); - procedure chkBRHexPKClick(Sender: TObject); - private - PBufferData:PByte; - caReadData :array[0..ARRAY_LENGTH] of char; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - function HexConvert(sTextBoxValue:String):TbaReadData; - function ConvertToHex(chkBox: Boolean): string; - public - { Public declarations } - end; - -var - frmBlockReadWrite: TfrmBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmBlockReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockReadWrite.btnBlockReadClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBRBlockAddress.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtBRReadData.Text:=ConvertToHex(chkBRHex.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM1.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM1(pData,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBRReadDataAKM1.Text:=ConvertToHex(chkBRHexAKM1.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM2.SetFocus(); - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM2.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM2(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtBRReadDataAKM2.Text:=ConvertToHex(chkBRHexAKM2.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockReadPKClick(Sender: TObject); -var - pPKKey :PByte; - pData :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; -begin - try - if Trim(txtBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bBlockAddress :=StrToInt(txtBRBlockAddressPK.Text); - pData :=PByte(@caReadData); - pPKKey :=@baPKKey; - - iFResult:=BlockRead_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtBRReadDataPK.Text:=ConvertToHex(chkBRHexPK.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress, - bKeyIndex :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBWBlockAddress.Text); - - if chkBWHex.Checked then - begin - baBufferData :=HexConvert(txtBWWriteData.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM1.Text); - - if chkBWHexAKM1.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM1.Text); - pData :=PByte(@baBufferData); - end - else - pData:=PByte(txtBWWriteDataAKM1.Text); - - iFResult:=BlockWrite_AKM1(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBWBlockWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM2.Text); - - if chkBWHexAKM2.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM2.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite_AKM2(PData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - if chkBWHexPK.Checked then - begin - baBufferData:=HexConvert(txtBWWriteDataPK.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockWrite_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -function TfrmBlockReadWrite.HexConvert(sTextBoxValue: String):TbaReadData; -var - bCount:byte; - bLength:byte; - bHexCounter:byte; - sTextBuffer:String; - bArrayHex:array[0..ARRAY_LENGTH] of byte; - -begin - bCount:=1; - bHexCounter:=0; - bLength:= Length(sTextBoxValue); - try - while bCount - UseSystemFont = False - end - object pgBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 524 - Height = 306 - ActivePage = tabBlockRead - Align = alClient - TabOrder = 3 - object tabBlockRead: TTabSheet - Caption = 'BlockRead' - object pnlBlockRead: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBRBlockAddress: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblReadData: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadData: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockRead: TButton - Left = 152 - Top = 30 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadClick - end - object chkBRHex: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexClick - end - end - object pnlBlockReadAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBRBlockAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM1: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM1: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM1: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM1Click - end - object chkBRHexAKM1: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM1Click - end - end - object pnlBlockReadAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBRBlockAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataAKM2: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataAKM2: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadAKM2: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadAKM2Click - end - object chkBRHexAKM2: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexAKM2Click - end - end - object pnlBlockReadPK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBRBlockAddressPK: TLabel - Left = 8 - Top = 34 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRReadDataPK: TLabel - Left = 8 - Top = 82 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBRBlockAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtBRReadDataPK: TEdit - Left = 7 - Top = 100 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - end - object btnBlockReadPK: TButton - Left = 152 - Top = 30 - Width = 85 - Height = 47 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 1 - OnClick = btnBlockReadPKClick - end - object chkBRHexPK: TCheckBox - Left = 197 - Top = 80 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - OnClick = chkBRHexPKClick - end - end - end - object tabBlockWrite: TTabSheet - Caption = 'BlockWrite' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblBWBlockAddress: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteData: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockRead: TStaticText - Left = 2 - Top = 2 - Width = 82 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddress: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWrite: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteClick - end - object txtBWWriteData: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHex: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblBWBlockAddressAKM1: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM1: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWiteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM1: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWriteAKM1: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWriteAKM1Click - end - object txtBWWriteDataAKM1: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM1: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblBWBlockAddressAKM2: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataAKM2: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 131 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressAKM2: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBWBlockWriteAKM2: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBWBlockWriteAKM2Click - end - object txtBWWriteDataAKM2: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexAKM2: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBWBlockAddressPK: TLabel - Left = 8 - Top = 86 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBWWriteDataPK: TLabel - Left = 8 - Top = 26 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 109 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'BlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtBWBlockAddressPK: TEdit - Left = 100 - Top = 83 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnBlockWritePK: TButton - Left = 152 - Top = 70 - Width = 87 - Height = 46 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 2 - OnClick = btnBlockWritePKClick - end - object txtBWWriteDataPK: TEdit - Left = 7 - Top = 43 - Width = 231 - Height = 21 - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - end - object chkBWHexPK: TCheckBox - Left = 197 - Top = 24 - Width = 41 - Height = 17 - Caption = 'Hex' - TabOrder = 4 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.~pas b/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.~pas deleted file mode 100644 index 3efeba8657b05da8c37b587f67182ab28e41c9bb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/BlockReadWrite.~pas +++ /dev/null @@ -1,675 +0,0 @@ -unit BlockReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, StdCtrls, ExtCtrls, ComCtrls; - - const - ARRAY_LENGTH=16; -type - TbaReadData=array[0..ARRAY_LENGTH] of byte; - PbaReadData=^TbaReadData; -type - TfrmBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbBlockReadWrite: TStatusBar; - pgBlockReadWrite: TPageControl; - tabBlockRead: TTabSheet; - tabBlockWrite: TTabSheet; - pnlBlockRead: TPanel; - pnlBlockReadAKM1: TPanel; - pnlBlockReadAKM2: TPanel; - pnlBlockReadPK: TPanel; - lblBlockRead: TStaticText; - lblBRAKM1: TStaticText; - lblBRAKM2: TStaticText; - lblBRPK: TStaticText; - lblBRBlockAddress: TLabel; - txtBRBlockAddress: TEdit; - txtBRReadData: TEdit; - lblReadData: TLabel; - btnBlockRead: TButton; - lblBRBlockAddressAKM1: TLabel; - txtBRBlockAddressAKM1: TEdit; - txtBRReadDataAKM1: TEdit; - lblBRReadDataAKM1: TLabel; - btnBlockReadAKM1: TButton; - lblBRBlockAddressAKM2: TLabel; - txtBRBlockAddressAKM2: TEdit; - txtBRReadDataAKM2: TEdit; - lblBRReadDataAKM2: TLabel; - btnBlockReadAKM2: TButton; - lblBRBlockAddressPK: TLabel; - txtBRBlockAddressPK: TEdit; - txtBRReadDataPK: TEdit; - lblBRReadDataPK: TLabel; - btnBlockReadPK: TButton; - pnlBlockWrite: TPanel; - lblBWBlockAddress: TLabel; - lblBWBlockRead: TStaticText; - txtBWBlockAddress: TEdit; - btnBlockWrite: TButton; - pnlBlockWriteAKM1: TPanel; - lblBWBlockWiteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblBWBlockWriteAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblBWBlockWritePK: TStaticText; - lblBWWriteData: TLabel; - txtBWWriteData: TEdit; - lblBWBlockAddressAKM1: TLabel; - txtBWBlockAddressAKM1: TEdit; - btnBlockWriteAKM1: TButton; - lblBWWriteDataAKM1: TLabel; - txtBWWriteDataAKM1: TEdit; - lblBWBlockAddressAKM2: TLabel; - txtBWBlockAddressAKM2: TEdit; - btnBWBlockWriteAKM2: TButton; - lblBWWriteDataAKM2: TLabel; - txtBWWriteDataAKM2: TEdit; - lblBWBlockAddressPK: TLabel; - txtBWBlockAddressPK: TEdit; - btnBlockWritePK: TButton; - lblBWWriteDataPK: TLabel; - txtBWWriteDataPK: TEdit; - chkBRHex: TCheckBox; - chkBRHexAKM1: TCheckBox; - chkBRHexAKM2: TCheckBox; - chkBRHexPK: TCheckBox; - chkBWHex: TCheckBox; - chkBWHexAKM1: TCheckBox; - chkBWHexAKM2: TCheckBox; - chkBWHexPK: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure btnBlockReadClick(Sender: TObject); - procedure btnBlockReadAKM1Click(Sender: TObject); - procedure btnBlockReadAKM2Click(Sender: TObject); - procedure btnBlockReadPKClick(Sender: TObject); - procedure btnBlockWriteClick(Sender: TObject); - procedure btnBlockWriteAKM1Click(Sender: TObject); - procedure btnBWBlockWriteAKM2Click(Sender: TObject); - procedure btnBlockWritePKClick(Sender: TObject); - - procedure chkBRHexClick(Sender: TObject); - procedure chkBRHexAKM1Click(Sender: TObject); - procedure chkBRHexAKM2Click(Sender: TObject); - procedure chkBRHexPKClick(Sender: TObject); - private - PBufferData:PByte; - caReadData :array[0..ARRAY_LENGTH] of char; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - function HexConvert(sTextBoxValue:String):TbaReadData; - function ConvertToHex(chkBox: Boolean): string; - public - { Public declarations } - end; - -var - frmBlockReadWrite: TfrmBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmBlockReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmBlockReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmBlockReadWrite.btnBlockReadClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBRBlockAddress.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtBRReadData.Text:=ConvertToHex(chkBRHex.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM1.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM1(pData,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtBRReadDataAKM1.Text:=ConvertToHex(chkBRHexAKM1.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmBlockReadWrite.btnBlockReadAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressAKM2.SetFocus(); - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBRBlockAddressAKM2.Text); - pData :=PByte(@caReadData); - - iFResult:=BlockRead_AKM2(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtBRReadDataAKM2.Text:=ConvertToHex(chkBRHexAKM2.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockReadPKClick(Sender: TObject); -var - pPKKey :PByte; - pData :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; -begin - try - if Trim(txtBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - bBlockAddress :=StrToInt(txtBRBlockAddressPK.Text); - pData :=PByte(@caReadData); - pPKKey :=@baPKKey; - - iFResult:=BlockRead_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtBRReadDataPK.Text:=ConvertToHex(chkBRHexPK.Checked); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteClick(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress, - bKeyIndex :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtBWBlockAddress.Text); - - if chkBWHex.Checked then - begin - baBufferData :=HexConvert(txtBWWriteData.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite(pData,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWriteAKM1Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData :TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM1.Text); - - if chkBWHexAKM1.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM1.Text); - pData :=PByte(@baBufferData); - end - else - pData:=PByte(txtBWWriteDataAKM1.Text); - - iFResult:=BlockWrite_AKM1(pData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBWBlockWriteAKM2Click(Sender: TObject); -var - pData :PByte; - bAuthMode, - bBlockAddress :Byte; - iFResult :DL_STATUS; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressAKM2.Text); - - if chkBWHexAKM2.Checked then - begin - baBufferData :=HexConvert(txtBWWriteDataAKM2.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteData.Text); - - iFResult:=BlockWrite_AKM2(PData,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmBlockReadWrite.btnBlockWritePKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - bAuthMode, - bBlockAddress, - bBr :Byte; - iFResult :DL_STATUS; - baPKKey :array[0..5] of Byte; - baBufferData:TbaReadData; -begin - try - if Trim(txtBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtBWBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtBWBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - if chkBWHexPK.Checked then - begin - baBufferData:=HexConvert(txtBWWriteDataPK.Text); - pData :=PByte(@baBufferData); - end - else - pData :=PByte(txtBWWriteDataPK.Text); - pPKKey :=@baPKKey; - - iFResult:=BlockWrite_PK(pData,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbBlockReadWrite,iFResult); - end; - - finally - pData :=nil; - pPKKey:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -function TfrmBlockReadWrite.HexConvert(sTextBoxValue: String):TbaReadData; -var - bCount:byte; - bLength:byte; - bHexCounter:byte; - sTextBuffer:String; - bArrayHex:array[0..ARRAY_LENGTH] of byte; - -begin - bCount:=1; - bHexCounter:=0; - bLength:= Length(sTextBoxValue); - try - while bCountIntToStr(255)) or ((Sender as TEdit).Text=EmptyStr) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; -end; -procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); -begin - if (Sender as TEdit).Text=EmptyStr then begin - with (Sender as TEdit) do - begin - Undo(); - SetFocus(); - end; - end; - if check_hex_box.Checked then Exit; - if ((sender as TEdit).Text>IntToStr(255)) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; - -end; -procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); -begin - if (check_hex_box.Checked) then - begin - (Sender as TEdit).MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else begin - (Sender as TEdit).MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; -end; - - - - //-----End--- -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/Global.~pas b/old_move_to_branch/uFCoderAdvance_D7/Global.~pas deleted file mode 100644 index 86cd4bab89b26cdb0d51b106684fb1fb708e7a56..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/Global.~pas +++ /dev/null @@ -1,263 +0,0 @@ -unit Global; -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus, ComCtrls, StdCtrls, ExtCtrls,uFCoder1x; - - - procedure Errors_Code; - procedure SetStatusBar(StatusBar: TStatusBar;Result: integer); - procedure ShowForm(the_form:TForm;pnlContainer:TPanel); - procedure CreateKey(key_owner:TForm;key_height, key_width, key_top,key_left: Integer; - key_parent: TPanel;key_name:string;key_read_only:Boolean;OnKey_press:TKeyPressEvent; - OnKey_Exit:TNotifyEvent); - - procedure CheckHex(owner:TForm;number_edit:Byte;Check_box:TCheckBox;edit_name:string); - procedure CheckDefault(owner:TForm;number_edit:Byte;def_check_box,hex_box:TCheckBox;edit_name:string); - procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); - procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); - procedure OnPK_KEY_Exit(Sender:TObject); - function AuthMode(RadioButton:TRadioButton):Byte; - function MaxBlocks(): Integer; - - const - FERROR_LIGHT = 2; - FERROR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT ='You must enter a number between 0 and 255 !'; - MEMORY_FILL =0; - - // sectors and blocks - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - - // max page for NTAG and MIFARE ULTRALIGHT - MAX_PAGE_NTAG203 = 39; - MAX_PAGE_ULTRALIGHT = 15; - MAX_PAGE_ULTRALIGHT_C = 39; - -var - ERROR_CODE:array[0..200] of string; - - - -implementation -uses - uFAdvanced; - - - -function AuthMode(RadioButton:TRadioButton):Byte; -begin - if RadioButton.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - - -procedure ShowForm(the_form:TForm;pnlContainer:TPanel); -begin - with the_form do begin - the_form.BorderStyle:=bsNone; - the_form.Align :=alClient; - the_form.Parent :=pnlContainer; - the_form.Show; - end; -end; -procedure Errors_Code; -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; -end; - -procedure SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -function MaxBlocks(): Integer; -var - bTypeOfCard:Byte; -begin - bTypeOfCard:=frmuFrAdvanced.bDLCardType; - - case bTypeOfCard of - DL_NTAG_203 : Result:= MAX_PAGE_NTAG203; - DL_MIFARE_ULTRALIGHT : Result:= MAX_PAGE_ULTRALIGHT; - DL_MIFARE_ULTRALIGHT_C : Result:= MAX_PAGE_ULTRALIGHT_C; - DL_MIFARE_CLASSIC_1k : Result:=(MAX_SECTORS_1k *4); - DL_MIFARE_CLASSIC_4k, - DL_MIFARE_PLUS_S_4K : Result:=((MAX_SECTORS_1k*2)*4)+((MAX_SECTORS_1k-8)*16) ; - end; -end; - - - - -procedure CreateKey(key_owner:TForm;key_height, key_width, key_top,key_left: Integer; key_parent: TPanel; - key_name:string;key_read_only:Boolean;OnKey_press:TKeyPressEvent;OnKey_Exit:TNotifyEvent); -var - br:Byte; - edit_key:array[0..5] of TEdit; - -begin - for br:=0 to 5 do - begin - edit_key[br] :=TEdit.Create(key_owner); - with edit_key[br] do begin - Height :=key_height; - Width :=key_width; - Top :=key_top; - Left :=key_left+(key_width*br+2); - Name :=key_name+IntToStr(br+1); - CharCase :=ecUpperCase; - Font.Name :='Verdana'; - Font.Style:=[fsBold]; - OnKeyPress:=OnKey_press; - OnExit :=OnKey_Exit; - Text :='255'; - MaxLength :=3; - ReadOnly :=key_read_only; - Parent :=key_parent; - end; - end; -end; -procedure CheckHex(owner:TForm;number_edit:Byte;Check_box:TCheckBox;edit_name:string); -var - br:Byte; -begin - case Check_box.Checked of - true:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:= - IntToHex(StrToInt(TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text),2); - end; - end; - false:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:=IntToStr(StrToInt(HexDisplayPrefix+TEdit - (owner.FindComponent(edit_name+IntToStr(br+1))).Text)); - end; - end; - end; -end; -procedure CheckDefault(owner:TForm;number_edit:Byte;def_check_box,hex_box:TCheckBox;edit_name:string); -var - br:Byte; -begin - case def_check_box.Checked of - true:begin for br:=0 to number_edit do begin - - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).Text:='255'; - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).ReadOnly:=true; - end; - hex_box.Checked:=false; - end; - false:begin - for br:=0 to number_edit do begin - TEdit(owner.FindComponent(edit_name+IntToStr(br+1))).ReadOnly:=false; - end; - end; - end; -end; -procedure OnPK_KEY_Exit(Sender:TObject); -begin - - if ((sender as TEdit).Text>IntToStr(255)) or ((Sender as TEdit).Text=EmptyStr) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; -end; -procedure OnMyExit(Sender:TObject;check_hex_box:TCheckBox); -begin - if (Sender as TEdit).Text=EmptyStr then begin - with (Sender as TEdit) do - begin - Undo(); - SetFocus(); - end; - end; - if check_hex_box.Checked then Exit; - if ((sender as TEdit).Text>IntToStr(255)) then - begin - MessageDlg('Wrong entry !'+#13#10+'You must enter the numeric value between 0 - 255 !',mtWarning,[mbOK],0); - (sender as TEdit).Undo; - (sender as TEdit).SetFocus; - end; - -end; -procedure Check_Key_press(Sender:TObject;check_hex_box:TCheckBox;var Key:Char); -begin - if (check_hex_box.Checked) then - begin - (Sender as TEdit).MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else begin - (Sender as TEdit).MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; -end; - - - - //-----End--- -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.dcu b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.dcu deleted file mode 100644 index 12eb1babd6c905b3f1ab4ceac93e23b1d4b16bc5..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.ddp b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.dfm b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.dfm deleted file mode 100644 index 3c91461b8f7d075501331bdd9cec538db78ad26f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.dfm +++ /dev/null @@ -1,780 +0,0 @@ -object frmLinearFormatCard: TfrmLinearFormatCard - Left = 316 - Top = 154 - Width = 529 - Height = 460 - Caption = 'LinearFormatCard' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'LinearFormat Card(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbLinearFormatCard: TStatusBar - Left = 0 - Top = 402 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyConteiner: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 99 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 97 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 97 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object pgLinearFormatsCard: TPageControl - Left = 0 - Top = 155 - Width = 513 - Height = 247 - ActivePage = tabLinearFormat - Align = alClient - TabOrder = 4 - object tabLinearFormat: TTabSheet - Caption = 'LinearFormat ' - object lblBlockAccessBits: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBits: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormatted: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBits: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBits: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormat: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatClick - end - object txtSectorFormatted: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 26 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM1: TTabSheet - Caption = 'LinearFormat AKM1' - ImageIndex = 1 - object lblBlockAccessBitsAKM1: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM1: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM1: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM1: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM1: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM1: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM1: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM1: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM1Click - end - object txtSectorFormattedAKM1: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM2: TTabSheet - Caption = 'LinearFormat AKM2' - ImageIndex = 2 - object lblBlockAccessBitsAKM2: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM2: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM2: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM2: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM2: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM2: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM2: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM2: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM2Click - end - object txtSectorFormattedAKM2: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatPK: TTabSheet - Caption = 'LinearFormat PK' - ImageIndex = 3 - object lblBlockAccessBitsPK: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsPK: TLabel - Left = 46 - Top = 82 - Width = 149 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9PK: TLabel - Left = 47 - Top = 112 - Width = 118 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedPK: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsPK: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsPK: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9PK: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatPK: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatPKClick - end - object txtSectorFormattedPK: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.pas b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.pas deleted file mode 100644 index b8db279db69640f1e59764be91ee3bbf11cbb5a0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.pas +++ /dev/null @@ -1,436 +0,0 @@ -unit LinearFormatsCard; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder; - -type - TfrmLinearFormatCard = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbLinearFormatCard: TStatusBar; - pnlKeyConteiner: TPanel; - pnlKeyA: TPanel; - lblKeyA: TStaticText; - chkKeyAHex: TCheckBox; - pnlKeyB: TPanel; - lblKeyB: TStaticText; - chkKeyBHex: TCheckBox; - pgLinearFormatsCard: TPageControl; - tabLinearFormat: TTabSheet; - tabLinearFormatAKM1: TTabSheet; - tabLinearFormatAKM2: TTabSheet; - tabLinearFormatPK: TTabSheet; - lblBlockAccessBits: TLabel; - cboBlockAccessBits: TComboBox; - lblSectorTrailerAccessBits: TLabel; - cboSectorTrailerAccessBits: TComboBox; - lblSectorTrailerByte9: TLabel; - txtSectorTrailerByte9: TEdit; - btnLinearFormat: TButton; - lblSectorFormatted: TLabel; - txtSectorFormatted: TEdit; - lblBlockAccessBitsAKM1: TLabel; - cboBlockAccessBitsAKM1: TComboBox; - lblSectorTrailerAccessBitsAKM1: TLabel; - cboSectorTrailerAccessBitsAKM1: TComboBox; - lblSectorTrailerByte9AKM1: TLabel; - txtSectorTrailerByte9AKM1: TEdit; - btnLinearFormatAKM1: TButton; - lblSectorFormattedAKM1: TLabel; - txtSectorFormattedAKM1: TEdit; - lblBlockAccessBitsAKM2: TLabel; - cboBlockAccessBitsAKM2: TComboBox; - lblSectorTrailerAccessBitsAKM2: TLabel; - cboSectorTrailerAccessBitsAKM2: TComboBox; - lblSectorTrailerByte9AKM2: TLabel; - txtSectorTrailerByte9AKM2: TEdit; - btnLinearFormatAKM2: TButton; - lblSectorFormattedAKM2: TLabel; - txtSectorFormattedAKM2: TEdit; - lblBlockAccessBitsPK: TLabel; - cboBlockAccessBitsPK: TComboBox; - lblSectorTrailerAccessBitsPK: TLabel; - cboSectorTrailerAccessBitsPK: TComboBox; - lblSectorTrailerByte9PK: TLabel; - txtSectorTrailerByte9PK: TEdit; - btnLinearFormatPK: TButton; - lblSectorFormattedPK: TLabel; - txtSectorFormattedPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure btnLinearFormatClick(Sender: TObject); - procedure btnLinearFormatAKM1Click(Sender: TObject); - procedure btnLinearFormatAKM2Click(Sender: TObject); - procedure btnLinearFormatPKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - public - { Public declarations } - end; - -var - frmLinearFormatCard: TfrmLinearFormatCard; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmLinearFormatCard } - -procedure TfrmLinearFormatCard.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmLinearFormatCard.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearFormatCard.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; - -procedure TfrmLinearFormatCard.OnKeyAPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; -procedure TfrmLinearFormatCard.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmLinearFormatCard.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmLinearFormatCard.OnKeyBPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmLinearFormatCard.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyADefaultClick(Sender: TObject); -begin - //CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.chkKeyBDefaultClick(Sender: TObject); -begin - // CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; -end; - - - - -procedure TfrmLinearFormatCard.btnLinearFormatClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAccessBits :=cboBlockAccessBits.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9,pKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM1.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM1.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard_AKM1(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM2.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM2.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - iFResult:=LinearFormatCard_AKM2(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9PK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsPK.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsPK.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9PK.Text); - WriteKeyAB; - PKeyA:=@baKeyA; - PKeyB:=@baKeyB; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - iFResult:=LinearFormatCard_PK(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode,pPKkey); - if iFResult=DL_OK then - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; -finally - pKeyA :=nil; - pKeyB :=nil; - pPKKey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - - - - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~ddp b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~dfm b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~dfm deleted file mode 100644 index 1f05ce7f10f865e878965015c136b20446d53407..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~dfm +++ /dev/null @@ -1,780 +0,0 @@ -object frmLinearFormatCard: TfrmLinearFormatCard - Left = 316 - Top = 154 - Width = 529 - Height = 460 - Caption = 'LinearFormatCard' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'LinearFormat Card(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbLinearFormatCard: TStatusBar - Left = 0 - Top = 403 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyConteiner: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 99 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 97 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 97 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object pgLinearFormatsCard: TPageControl - Left = 0 - Top = 155 - Width = 513 - Height = 248 - ActivePage = tabLinearFormat - Align = alClient - TabOrder = 4 - object tabLinearFormat: TTabSheet - Caption = 'LinearFormat ' - object lblBlockAccessBits: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBits: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormatted: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBits: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBits: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormat: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatClick - end - object txtSectorFormatted: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 26 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM1: TTabSheet - Caption = 'LinearFormat AKM1' - ImageIndex = 1 - object lblBlockAccessBitsAKM1: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM1: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM1: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM1: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM1: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM1: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM1: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM1: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM1Click - end - object txtSectorFormattedAKM1: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatAKM2: TTabSheet - Caption = 'LinearFormat AKM2' - ImageIndex = 2 - object lblBlockAccessBitsAKM2: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsAKM2: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9AKM2: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedAKM2: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsAKM2: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsAKM2: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9AKM2: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatAKM2: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatAKM2Click - end - object txtSectorFormattedAKM2: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - object tabLinearFormatPK: TTabSheet - Caption = 'LinearFormat PK' - ImageIndex = 3 - object lblBlockAccessBitsPK: TLabel - Left = 47 - Top = 52 - Width = 99 - Height = 13 - Caption = 'Block Access Bits' - end - object lblSectorTrailerAccessBitsPK: TLabel - Left = 46 - Top = 82 - Width = 150 - Height = 13 - Caption = 'Sector Trailer Access Bits ' - end - object lblSectorTrailerByte9PK: TLabel - Left = 47 - Top = 112 - Width = 119 - Height = 13 - Caption = 'Sector Trailer Byte 9' - end - object lblSectorFormattedPK: TLabel - Left = 297 - Top = 155 - Width = 99 - Height = 13 - Caption = 'Sector Formatted' - end - object cboBlockAccessBitsPK: TComboBox - Left = 207 - Top = 48 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboSectorTrailerAccessBitsPK: TComboBox - Left = 207 - Top = 78 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtSectorTrailerByte9PK: TEdit - Left = 207 - Top = 108 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object btnLinearFormatPK: TButton - Left = 280 - Top = 59 - Width = 193 - Height = 65 - Cursor = crHandPoint - Caption = 'FORMAT' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearFormatPKClick - end - object txtSectorFormattedPK: TEdit - Left = 412 - Top = 149 - Width = 44 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~pas b/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~pas deleted file mode 100644 index 9fa64083e5ba4e2249f8e16abb3be2bb7e62d99f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearFormatsCard.~pas +++ /dev/null @@ -1,436 +0,0 @@ -unit LinearFormatsCard; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder1x; - -type - TfrmLinearFormatCard = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbLinearFormatCard: TStatusBar; - pnlKeyConteiner: TPanel; - pnlKeyA: TPanel; - lblKeyA: TStaticText; - chkKeyAHex: TCheckBox; - pnlKeyB: TPanel; - lblKeyB: TStaticText; - chkKeyBHex: TCheckBox; - pgLinearFormatsCard: TPageControl; - tabLinearFormat: TTabSheet; - tabLinearFormatAKM1: TTabSheet; - tabLinearFormatAKM2: TTabSheet; - tabLinearFormatPK: TTabSheet; - lblBlockAccessBits: TLabel; - cboBlockAccessBits: TComboBox; - lblSectorTrailerAccessBits: TLabel; - cboSectorTrailerAccessBits: TComboBox; - lblSectorTrailerByte9: TLabel; - txtSectorTrailerByte9: TEdit; - btnLinearFormat: TButton; - lblSectorFormatted: TLabel; - txtSectorFormatted: TEdit; - lblBlockAccessBitsAKM1: TLabel; - cboBlockAccessBitsAKM1: TComboBox; - lblSectorTrailerAccessBitsAKM1: TLabel; - cboSectorTrailerAccessBitsAKM1: TComboBox; - lblSectorTrailerByte9AKM1: TLabel; - txtSectorTrailerByte9AKM1: TEdit; - btnLinearFormatAKM1: TButton; - lblSectorFormattedAKM1: TLabel; - txtSectorFormattedAKM1: TEdit; - lblBlockAccessBitsAKM2: TLabel; - cboBlockAccessBitsAKM2: TComboBox; - lblSectorTrailerAccessBitsAKM2: TLabel; - cboSectorTrailerAccessBitsAKM2: TComboBox; - lblSectorTrailerByte9AKM2: TLabel; - txtSectorTrailerByte9AKM2: TEdit; - btnLinearFormatAKM2: TButton; - lblSectorFormattedAKM2: TLabel; - txtSectorFormattedAKM2: TEdit; - lblBlockAccessBitsPK: TLabel; - cboBlockAccessBitsPK: TComboBox; - lblSectorTrailerAccessBitsPK: TLabel; - cboSectorTrailerAccessBitsPK: TComboBox; - lblSectorTrailerByte9PK: TLabel; - txtSectorTrailerByte9PK: TEdit; - btnLinearFormatPK: TButton; - lblSectorFormattedPK: TLabel; - txtSectorFormattedPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure btnLinearFormatClick(Sender: TObject); - procedure btnLinearFormatAKM1Click(Sender: TObject); - procedure btnLinearFormatAKM2Click(Sender: TObject); - procedure btnLinearFormatPKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - public - { Public declarations } - end; - -var - frmLinearFormatCard: TfrmLinearFormatCard; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmLinearFormatCard } - -procedure TfrmLinearFormatCard.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmLinearFormatCard.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearFormatCard.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; - -procedure TfrmLinearFormatCard.OnKeyAPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; -procedure TfrmLinearFormatCard.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmLinearFormatCard.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmLinearFormatCard.OnKeyBPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmLinearFormatCard.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyADefaultClick(Sender: TObject); -begin - //CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmLinearFormatCard.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.chkKeyBDefaultClick(Sender: TObject); -begin - // CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmLinearFormatCard.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; -end; - - - - -procedure TfrmLinearFormatCard.btnLinearFormatClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAccessBits :=cboBlockAccessBits.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9,pKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormatted.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM1.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM1.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=LinearFormatCard_AKM1(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM1.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(PKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsAKM2.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9AKM2.Text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - iFResult:=LinearFormatCard_AKM2(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode); - if iFResult=DL_OK then - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedAKM2.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmLinearFormatCard.btnLinearFormatPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAccessBits, - bSectorTrailerAccessBits, - bSectorTrailerByte9, - bSectorsFormatted :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtSectorTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR TRAILER BYTE 9',mtWarning,[mbOK],0); - txtSectorTrailerByte9PK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAccessBits :=cboBlockAccessBitsPK.ItemIndex; - bSectorTrailerAccessBits :=cboSectorTrailerAccessBitsPK.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtSectorTrailerByte9PK.Text); - WriteKeyAB; - PKeyA:=@baKeyA; - PKeyB:=@baKeyB; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - iFResult:=LinearFormatCard_PK(pKeyA,bBlockAccessBits,bSectorTrailerAccessBits,bSectorTrailerByte9, - PKeyB,bSectorsFormatted,bAuthMode,pPKkey); - if iFResult=DL_OK then - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end - else - begin - txtSectorFormattedPK.Text:=IntToStr(bSectorsFormatted); - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearFormatCard,iFResult); - end; -finally - pKeyA :=nil; - pKeyB :=nil; - pPKKey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - - - - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.dcu b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.dcu deleted file mode 100644 index 002c2bf5e0f2bbaaec666e31fb63bd17ad491e7f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.ddp b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.dfm b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.dfm deleted file mode 100644 index 45dde048d5343ff6786563bf936e4e8139d59414..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.dfm +++ /dev/null @@ -1,1089 +0,0 @@ -object frmLinearReadWrite: TfrmLinearReadWrite - Left = 756 - Top = 224 - Width = 529 - Height = 428 - Caption = 'LinearRead/Write' - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Linear Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbLinearReadWrite: TStatusBar - Left = 0 - Top = 370 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - TabOrder = 2 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object pgLinearReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 313 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 3 - object tabLinearRead: TTabSheet - Caption = 'LinearRead' - object lblLinearRead: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLReadLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesRead: TLabel - Left = 176 - Top = 244 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 328 - Top = 228 - Width = 160 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 261 - Top = 242 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearRead: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM12: TTabSheet - Caption = 'LinearRead_AKM1/AKM2' - ImageIndex = 1 - object pgLinearReadAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 285 - ActivePage = tabLinearReadAKM1 - Align = alClient - TabOrder = 0 - object tabLinearReadAKM1: TTabSheet - Caption = 'LinearRead_AKM1' - object lblLRAKM1LinearRead: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRAKM1LinearAddress: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRAKM1DataLength: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM1: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM1Click - end - object txtReadBytesAKM1: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM2: TTabSheet - Caption = 'LinearRead_AKM2' - ImageIndex = 1 - object Label4: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM2: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM2Click - end - object txtReadBytesAKM2: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - end - end - object tabLinearReadPK: TTabSheet - Caption = 'LinearRead_PK' - ImageIndex = 2 - object Label7: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesPK: TLabel - Left = 169 - Top = 250 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadPK: TButton - Left = 322 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadPKClick - end - object txtReadBytesPK: TEdit - Left = 250 - Top = 247 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadPK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'LinearWrite' - ImageIndex = 3 - object lblLWLinearWrite: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWritten: TLabel - Left = 171 - Top = 244 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWrite: TButton - Left = 324 - Top = 228 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 256 - Top = 242 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWrite: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteChange - end - end - object tabLinearWriteAKM12: TTabSheet - Caption = 'LinearWrite_AKM1/AKM2' - ImageIndex = 4 - object pgLinearWriteAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 285 - ActivePage = tabLinearWriteAKM1 - Align = alClient - TabOrder = 0 - object tabLinearWriteAKM1: TTabSheet - Caption = 'LinearWrite_AKM1' - object lblLinearWriteAKM1: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM1: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM1: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM1: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM1Click - end - object txtBytesWrittenAKM1: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM1Change - end - end - object tabLinearWriteAKM2: TTabSheet - Caption = 'LinearWrite_AKM2' - ImageIndex = 1 - object lblLinearWriteAKM2: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM2: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM2Click - end - object txtBytesWrittenAKM2: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM2Change - end - end - end - end - object tabLinearWritePK: TTabSheet - Caption = 'LinearWrite_PK' - ImageIndex = 5 - object lblLinearWritePK: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenPK: TLabel - Left = 171 - Top = 249 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWritePK: TButton - Left = 323 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWritePKClick - end - object txtBytesWrittenPK: TEdit - Left = 256 - Top = 246 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWritePK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWritePKChange - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.pas b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.pas deleted file mode 100644 index 762b3d97c28013c8df31c88f23f4a9382a8dfdae..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.pas +++ /dev/null @@ -1,689 +0,0 @@ -unit LinearReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, - Global,uFCoder, ComCtrls, ExtCtrls; - -type - TfrmLinearReadWrite = class(TForm) - lblHeader: TStaticText; - stbLinearReadWrite: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblKeyIndex: TLabel; - cboKeyIndex: TComboBox; - lblPKKey: TLabel; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearReadAKM12: TTabSheet; - tabLinearReadPK: TTabSheet; - tabLinearWrite: TTabSheet; - tabLinearWriteAKM12: TTabSheet; - tabLinearWritePK: TTabSheet; - lblLinearRead: TLabel; - lblLReadLinearAddress: TLabel; - txtLRLinearAddress: TEdit; - lblLRDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - pgLinearReadAKM12: TPageControl; - tabLinearReadAKM1: TTabSheet; - tabLinearReadAKM2: TTabSheet; - lblLRAKM1LinearRead: TLabel; - lblLRAKM1LinearAddress: TLabel; - txtLRLinearAddressAKM1: TEdit; - lblLRAKM1DataLength: TLabel; - txtLRDataLengthAKM1: TEdit; - btnLinearReadAKM1: TButton; - Label4: TLabel; - lblLRLinearAddressAKM2: TLabel; - txtLRLinearAddressAKM2: TEdit; - txtLRDataLengthAKM2: TEdit; - btnLinearReadAKM2: TButton; - lblLRDataLengthAKM2: TLabel; - Label7: TLabel; - lblLRLinearAddressPK: TLabel; - txtLRLinearAddressPK: TEdit; - lblLRDataLengthPK: TLabel; - txtLRDataLengthPK: TEdit; - btnLinearReadPK: TButton; - lblLWLinearWrite: TLabel; - lblLWLinearAddress: TLabel; - txtLWLinearAddress: TEdit; - lblLWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - lblLinearWritePK: TLabel; - lblLWLinearAddressPK: TLabel; - txtLWLinearAddressPK: TEdit; - lblLWDataLengthPK: TLabel; - txtLWDataLengthPK: TEdit; - btnLinearWritePK: TButton; - pgLinearWriteAKM12: TPageControl; - tabLinearWriteAKM1: TTabSheet; - lblLinearWriteAKM1: TLabel; - lblLWLinearAddressAKM1: TLabel; - lblLWDataLengthAKM1: TLabel; - txtLWLinearAddressAKM1: TEdit; - txtLWDataLengthAKM1: TEdit; - btnLinearWriteAKM1: TButton; - tabLinearWriteAKM2: TTabSheet; - lblLinearWriteAKM2: TLabel; - lblLWLinearAddressAKM2: TLabel; - lblLWDataLengthAKM2: TLabel; - txtLWLinearAddressAKM2: TEdit; - txtLWDataLengthAKM2: TEdit; - btnLinearWriteAKM2: TButton; - lblBytesRead: TLabel; - txtReadBytes: TEdit; - lblReadBytesAKM1: TLabel; - txtReadBytesAKM1: TEdit; - lblReadBytesAKM2: TLabel; - txtReadBytesAKM2: TEdit; - lblReadBytesPK: TLabel; - txtReadBytesPK: TEdit; - lblBytesWritten: TLabel; - txtBytesWritten: TEdit; - lblBytesWrittenAKM1: TLabel; - txtBytesWrittenAKM1: TEdit; - lblBytesWrittenAKM2: TLabel; - txtBytesWrittenAKM2: TEdit; - lblBytesWrittenPK: TLabel; - txtBytesWrittenPK: TEdit; - txtLinearRead: TRichEdit; - txtLinearReadAKM1: TRichEdit; - txtLinearReadAKM2: TRichEdit; - txtLinearReadPK: TRichEdit; - txtLinearWrite: TRichEdit; - txtLinearWritePK: TRichEdit; - txtLinearWriteAKM1: TRichEdit; - txtLinearWriteAKM2: TRichEdit; - procedure FormCreate(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearReadAKM1Click(Sender: TObject); - procedure btnLinearReadAKM2Click(Sender: TObject); - procedure btnLinearReadPKClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnLinearWriteAKM1Click(Sender: TObject); - procedure btnLinearWriteAKM2Click(Sender: TObject); - procedure btnLinearWritePKClick(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - procedure txtLinearWriteAKM2Change(Sender: TObject); - procedure txtLinearWriteAKM1Change(Sender: TObject); - procedure txtLinearWritePKChange(Sender: TObject); - private - - procedure OnPKKeyExit(Sender:TObject); - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - public - { Public declarations } - end; - type - TByteArray=array of Byte; -var - frmLinearReadWrite: TfrmLinearReadWrite; - - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmLinearReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmLinearReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmLinearReadWrite.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLRLinearAddress.Text); - wDataLength :=StrToInt(txtLRDataLength.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - txtLinearRead.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(Trim(txtLRLinearAddressAKM1.Text)); - wDataLength :=StrToInt(Trim(txtLRDataLengthAKM1.Text)); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM1(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtLinearReadAKM1.Text:=String(baReadData); - txtReadBytesAKM1.Text :=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM1.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLRDataLengthAKM2.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM2(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtReadBytesAKM2.Text :=IntToStr(wBytesRet); - txtLinearReadAKM2.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM2.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadPKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - bBr :Byte; -begin - try - if Trim(txtLRLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - New(pData); - New(pPKKey); - - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressPK.Text); - wDataLength :=StrToInt(txtLRDataLengthPK.Text); - - SetLength(baReadData,wDataLength); - pData :=PByte(@baReadData[0]); - pPKKEY:=@PKKey; - iFResult:=LinearRead_PK(pData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtLinearReadPK.Text:=String(baReadData); - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLWLinearAddress.Text); - wDataLength :=StrToInt(txtLWDataLength.Text); - pData :=PByte(txtLinearWrite.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM1.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM1.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM1.Text); - pData :=PByte(txtLinearWriteAKM1.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM1(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM2.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM2.Text); - pData :=PByte(txtLinearWriteAKM2.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM2(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWritePKClick(Sender: TObject); -var - pPKKEY, - pData :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLinearWritePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWritePK.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressPK.Text); - wDataLength :=StrToInt(txtLWDataLengthPK.Text); - pData :=PByte(txtLinearWritePK.Text); - pPKKEY :=@PKKey; - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_PK(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,pPKKEY); - if iFResult=DL_OK then - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKEY); - frmuFrAdvanced.FunctionStart:=false; - end; - end; - - - -procedure TfrmLinearReadWrite.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(Trim(txtLinearWrite.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM2Change(Sender: TObject); -begin - txtLWDataLengthAKM2.Text:=IntToStr(Length(Trim(txtLinearWriteAKM2.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM1Change(Sender: TObject); -begin - txtLWDataLengthAKM1.Text:=IntToStr(Length(Trim(txtLinearWriteAKM1.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWritePKChange(Sender: TObject); -begin - txtLWDataLengthPK.Text:=IntToStr(Length(Trim(txtLinearWritePK.Text))); -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~ddp b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~dfm b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~dfm deleted file mode 100644 index 8b9619cda97f3b1f6aeba9cd7111c4e8b706945e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~dfm +++ /dev/null @@ -1,1089 +0,0 @@ -object frmLinearReadWrite: TfrmLinearReadWrite - Left = 403 - Top = 171 - Width = 529 - Height = 428 - Caption = 'LinearRead/Write' - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'Linear Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbLinearReadWrite: TStatusBar - Left = 0 - Top = 371 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - TabOrder = 2 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object pgLinearReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 314 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 3 - object tabLinearRead: TTabSheet - Caption = 'LinearRead' - object lblLinearRead: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLReadLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesRead: TLabel - Left = 176 - Top = 244 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 328 - Top = 228 - Width = 160 - Height = 45 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 261 - Top = 242 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearRead: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM12: TTabSheet - Caption = 'LinearRead_AKM1/AKM2' - ImageIndex = 1 - object pgLinearReadAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 286 - ActivePage = tabLinearReadAKM1 - Align = alClient - TabOrder = 0 - object tabLinearReadAKM1: TTabSheet - Caption = 'LinearRead_AKM1' - object lblLRAKM1LinearRead: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRAKM1LinearAddress: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRAKM1DataLength: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM1: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM1Click - end - object txtReadBytesAKM1: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearReadAKM2: TTabSheet - Caption = 'LinearRead_AKM2' - ImageIndex = 1 - object Label4: TLabel - Left = 7 - Top = 3 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesAKM2: TLabel - Left = 169 - Top = 227 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadAKM2Click - end - object txtReadBytesAKM2: TEdit - Left = 250 - Top = 224 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - end - end - object tabLinearReadPK: TTabSheet - Caption = 'LinearRead_PK' - ImageIndex = 2 - object Label7: TLabel - Left = 11 - Top = 8 - Width = 68 - Height = 13 - Caption = 'Linear Read' - end - object lblLRLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLRDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblReadBytesPK: TLabel - Left = 169 - Top = 250 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - end - object txtLRLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtLRDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearReadPK: TButton - Left = 322 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadPKClick - end - object txtReadBytesPK: TEdit - Left = 250 - Top = 247 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object txtLinearReadPK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'LinearWrite' - ImageIndex = 3 - object lblLWLinearWrite: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddress: TLabel - Left = 11 - Top = 229 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLength: TLabel - Left = 11 - Top = 253 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWritten: TLabel - Left = 171 - Top = 244 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddress: TEdit - Left = 104 - Top = 227 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLength: TEdit - Left = 104 - Top = 251 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWrite: TButton - Left = 324 - Top = 228 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 256 - Top = 242 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWrite: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteChange - end - end - object tabLinearWriteAKM12: TTabSheet - Caption = 'LinearWrite_AKM1/AKM2' - ImageIndex = 4 - object pgLinearWriteAKM12: TPageControl - Left = 0 - Top = 0 - Width = 505 - Height = 286 - ActivePage = tabLinearWriteAKM1 - Align = alClient - TabOrder = 0 - object tabLinearWriteAKM1: TTabSheet - Caption = 'LinearWrite_AKM1' - object lblLinearWriteAKM1: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM1: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM1: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM1: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM1: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM1: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM1: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM1Click - end - object txtBytesWrittenAKM1: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM1: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM1Change - end - end - object tabLinearWriteAKM2: TTabSheet - Caption = 'LinearWrite_AKM2' - ImageIndex = 1 - object lblLinearWriteAKM2: TLabel - Left = 7 - Top = 3 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressAKM2: TLabel - Left = 8 - Top = 215 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthAKM2: TLabel - Left = 8 - Top = 239 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenAKM2: TLabel - Left = 171 - Top = 228 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressAKM2: TEdit - Left = 103 - Top = 211 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthAKM2: TEdit - Left = 103 - Top = 234 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWriteAKM2: TButton - Left = 320 - Top = 210 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWriteAKM2Click - end - object txtBytesWrittenAKM2: TEdit - Left = 256 - Top = 225 - Width = 47 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWriteAKM2: TRichEdit - Left = 8 - Top = 21 - Width = 473 - Height = 180 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWriteAKM2Change - end - end - end - end - object tabLinearWritePK: TTabSheet - Caption = 'LinearWrite_PK' - ImageIndex = 5 - object lblLinearWritePK: TLabel - Left = 11 - Top = 8 - Width = 69 - Height = 13 - Caption = 'Linear Write' - end - object lblLWLinearAddressPK: TLabel - Left = 11 - Top = 235 - Width = 85 - Height = 13 - Caption = 'Linear Address' - end - object lblLWDataLengthPK: TLabel - Left = 11 - Top = 259 - Width = 69 - Height = 13 - Caption = 'Data Length' - end - object lblBytesWrittenPK: TLabel - Left = 171 - Top = 249 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - end - object txtLWLinearAddressPK: TEdit - Left = 104 - Top = 233 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtLWDataLengthPK: TEdit - Left = 104 - Top = 257 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object btnLinearWritePK: TButton - Left = 323 - Top = 235 - Width = 163 - Height = 42 - Cursor = crHandPoint - Caption = 'WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnLinearWritePKClick - end - object txtBytesWrittenPK: TEdit - Left = 256 - Top = 246 - Width = 47 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object txtLinearWritePK: TRichEdit - Left = 12 - Top = 25 - Width = 477 - Height = 185 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnChange = txtLinearWritePKChange - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~pas b/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~pas deleted file mode 100644 index 1e5f30a7997c9078639f2cd98cd3832b3a6b679c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/LinearReadWrite.~pas +++ /dev/null @@ -1,689 +0,0 @@ -unit LinearReadWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, - Global,uFCoder1x, ComCtrls, ExtCtrls; - -type - TfrmLinearReadWrite = class(TForm) - lblHeader: TStaticText; - stbLinearReadWrite: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblKeyIndex: TLabel; - cboKeyIndex: TComboBox; - lblPKKey: TLabel; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearReadAKM12: TTabSheet; - tabLinearReadPK: TTabSheet; - tabLinearWrite: TTabSheet; - tabLinearWriteAKM12: TTabSheet; - tabLinearWritePK: TTabSheet; - lblLinearRead: TLabel; - lblLReadLinearAddress: TLabel; - txtLRLinearAddress: TEdit; - lblLRDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - pgLinearReadAKM12: TPageControl; - tabLinearReadAKM1: TTabSheet; - tabLinearReadAKM2: TTabSheet; - lblLRAKM1LinearRead: TLabel; - lblLRAKM1LinearAddress: TLabel; - txtLRLinearAddressAKM1: TEdit; - lblLRAKM1DataLength: TLabel; - txtLRDataLengthAKM1: TEdit; - btnLinearReadAKM1: TButton; - Label4: TLabel; - lblLRLinearAddressAKM2: TLabel; - txtLRLinearAddressAKM2: TEdit; - txtLRDataLengthAKM2: TEdit; - btnLinearReadAKM2: TButton; - lblLRDataLengthAKM2: TLabel; - Label7: TLabel; - lblLRLinearAddressPK: TLabel; - txtLRLinearAddressPK: TEdit; - lblLRDataLengthPK: TLabel; - txtLRDataLengthPK: TEdit; - btnLinearReadPK: TButton; - lblLWLinearWrite: TLabel; - lblLWLinearAddress: TLabel; - txtLWLinearAddress: TEdit; - lblLWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - lblLinearWritePK: TLabel; - lblLWLinearAddressPK: TLabel; - txtLWLinearAddressPK: TEdit; - lblLWDataLengthPK: TLabel; - txtLWDataLengthPK: TEdit; - btnLinearWritePK: TButton; - pgLinearWriteAKM12: TPageControl; - tabLinearWriteAKM1: TTabSheet; - lblLinearWriteAKM1: TLabel; - lblLWLinearAddressAKM1: TLabel; - lblLWDataLengthAKM1: TLabel; - txtLWLinearAddressAKM1: TEdit; - txtLWDataLengthAKM1: TEdit; - btnLinearWriteAKM1: TButton; - tabLinearWriteAKM2: TTabSheet; - lblLinearWriteAKM2: TLabel; - lblLWLinearAddressAKM2: TLabel; - lblLWDataLengthAKM2: TLabel; - txtLWLinearAddressAKM2: TEdit; - txtLWDataLengthAKM2: TEdit; - btnLinearWriteAKM2: TButton; - lblBytesRead: TLabel; - txtReadBytes: TEdit; - lblReadBytesAKM1: TLabel; - txtReadBytesAKM1: TEdit; - lblReadBytesAKM2: TLabel; - txtReadBytesAKM2: TEdit; - lblReadBytesPK: TLabel; - txtReadBytesPK: TEdit; - lblBytesWritten: TLabel; - txtBytesWritten: TEdit; - lblBytesWrittenAKM1: TLabel; - txtBytesWrittenAKM1: TEdit; - lblBytesWrittenAKM2: TLabel; - txtBytesWrittenAKM2: TEdit; - lblBytesWrittenPK: TLabel; - txtBytesWrittenPK: TEdit; - txtLinearRead: TRichEdit; - txtLinearReadAKM1: TRichEdit; - txtLinearReadAKM2: TRichEdit; - txtLinearReadPK: TRichEdit; - txtLinearWrite: TRichEdit; - txtLinearWritePK: TRichEdit; - txtLinearWriteAKM1: TRichEdit; - txtLinearWriteAKM2: TRichEdit; - procedure FormCreate(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearReadAKM1Click(Sender: TObject); - procedure btnLinearReadAKM2Click(Sender: TObject); - procedure btnLinearReadPKClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnLinearWriteAKM1Click(Sender: TObject); - procedure btnLinearWriteAKM2Click(Sender: TObject); - procedure btnLinearWritePKClick(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - procedure txtLinearWriteAKM2Change(Sender: TObject); - procedure txtLinearWriteAKM1Change(Sender: TObject); - procedure txtLinearWritePKChange(Sender: TObject); - private - - procedure OnPKKeyExit(Sender:TObject); - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - public - { Public declarations } - end; - type - TByteArray=array of Byte; -var - frmLinearReadWrite: TfrmLinearReadWrite; - - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmLinearReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmLinearReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmLinearReadWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmLinearReadWrite.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLRLinearAddress.Text); - wDataLength :=StrToInt(txtLRDataLength.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - txtLinearRead.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytes.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(Trim(txtLRLinearAddressAKM1.Text)); - wDataLength :=StrToInt(Trim(txtLRDataLengthAKM1.Text)); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM1(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtLinearReadAKM1.Text:=String(baReadData); - txtReadBytesAKM1.Text :=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM1.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - PData :PByte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLRDataLengthAKM2.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - - iFResult:=LinearRead_AKM2(PData,wLinearAddress,wDataLength,wBytesRet,bAuthMode); - if iFResult=DL_OK then - begin - txtReadBytesAKM2.Text :=IntToStr(wBytesRet); - txtLinearReadAKM2.Text:=String(baReadData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesAKM2.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearReadPKClick(Sender: TObject); -var - pData, - pPKKey :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesRet :Word; - baReadData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - bBr :Byte; -begin - try - if Trim(txtLRLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLRDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - New(pData); - New(pPKKey); - - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLRLinearAddressPK.Text); - wDataLength :=StrToInt(txtLRDataLengthPK.Text); - - SetLength(baReadData,wDataLength); - pData :=PByte(@baReadData[0]); - pPKKEY:=@PKKey; - iFResult:=LinearRead_PK(pData,wLinearAddress,wDataLength,wBytesRet,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtLinearReadPK.Text:=String(baReadData); - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtReadBytesPK.Text:=IntToStr(wBytesRet); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - wLinearAddress :=StrToInt(txtLWLinearAddress.Text); - wDataLength :=StrToInt(txtLWDataLength.Text); - pData :=PByte(txtLinearWrite.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM1Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM1.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM1.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM1.Text); - pData :=PByte(txtLinearWriteAKM1.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM1(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM1.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmLinearReadWrite.btnLinearWriteAKM2Click(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode :Byte; - iFResult :DL_STATUS; - pData :PByte; -begin - try - if Trim(txtLinearWriteAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWriteAKM2.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(PData); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressAKM2.Text); - wDataLength :=StrToInt(txtLWDataLengthAKM2.Text); - pData :=PByte(txtLinearWriteAKM2.Text); - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_AKM2(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode); - if iFResult=DL_OK then - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenAKM2.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmLinearReadWrite.btnLinearWritePKClick(Sender: TObject); -var - pPKKEY, - pData :PByte; - PKKey :array[0..5] of Byte; - wLinearAddress, - wDataLength, - wBytesWritten :Word; - baWriteData :array of Byte; - bAuthMode, - bBr :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLinearWritePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtLinearWritePK.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLWLinearAddressPK.SetFocus; - Exit; - end; - if Trim(txtLWDataLengthPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLengthPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - for bBr:=0 to 5 do - PKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - New(pData); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - wLinearAddress :=StrToInt(txtLWLinearAddressPK.Text); - wDataLength :=StrToInt(txtLWDataLengthPK.Text); - pData :=PByte(txtLinearWritePK.Text); - pPKKEY :=@PKKey; - SetLength(baWriteData,wDataLength); - - iFResult:=LinearWrite_PK(pData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,pPKKEY); - if iFResult=DL_OK then - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end - else - begin - txtBytesWrittenPK.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbLinearReadWrite,iFResult); - end; - finally - pData :=nil; - pPKKEY:=nil; - Dispose(pData); - Dispose(pPKKEY); - frmuFrAdvanced.FunctionStart:=false; - end; - end; - - - -procedure TfrmLinearReadWrite.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(Trim(txtLinearWrite.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM2Change(Sender: TObject); -begin - txtLWDataLengthAKM2.Text:=IntToStr(Length(Trim(txtLinearWriteAKM2.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWriteAKM1Change(Sender: TObject); -begin - txtLWDataLengthAKM1.Text:=IntToStr(Length(Trim(txtLinearWriteAKM1.Text))); -end; - -procedure TfrmLinearReadWrite.txtLinearWritePKChange(Sender: TObject); -begin - txtLWDataLengthPK.Text:=IntToStr(Length(Trim(txtLinearWritePK.Text))); -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.dcu b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.dcu deleted file mode 100644 index f8be859138c5d1c14a4d7b807ec6ebd59194e551..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.ddp b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.dfm b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.dfm deleted file mode 100644 index bb49d1c2f4547c0f4dc18dc076d0e31610e29aff..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.dfm +++ /dev/null @@ -1,1117 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 379 - Top = 147 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 521 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 521 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 414 - Width = 521 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 521 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - object chkKeyADefault: TCheckBox - Left = 170 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Default' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chkKeyADefaultClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 260 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 258 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - object chkKeyBDefault: TCheckBox - Left = 170 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Default' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chkKeyBDefaultClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 521 - Height = 261 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.pas b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.pas deleted file mode 100644 index 1780c3096ac9519d590d0c4d8a781159fab460fb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailerWrite.pas +++ /dev/null @@ -1,244 +0,0 @@ -unit SectorTrailerWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyADefault: TCheckBox; - chkKeyBHex: TCheckBox; - chkKeyBDefault: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - private - res:DL_STATUS; - KeyA:array[0..5] of Byte; - KeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - UFRCoder; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',true,OnKeyAPress); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',true,OnKeyBPress); -end; - -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin - CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin - CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - KeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - KeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else begin - for br:=0 to 5 do begin - KeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - KeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - key_index:Byte; - auth_mode:Byte; - addressing_mode:Byte; - block_or_sector_address:Byte; - access_bits0:Byte; - access_bits1:Byte; - access_bits2:Byte; - trailer_access_bits:Byte; - trailer_Byte_9:Byte; - PKeyA:PByte; - PKeyB:PByte; -begin - - PKeyA:=nil; - PKeyB:=nil; - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then begin - MessageDlg('You must enter BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then begin - MessageDlg('You must enter TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - key_index:=cboKeyIndex.ItemIndex; - if rbAUTH1A.Checked then auth_mode:=MIFARE_AUTHENT1A else auth_mode:=MIFARE_AUTHENT1B; - - addressing_mode:=cboAddressingMode.ItemIndex; - block_or_sector_address:=StrToInt(txtBlockSectorAddress.Text); - access_bits0:=cboAccessBits0.ItemIndex; - access_bits1:=cboAccessBits1.ItemIndex; - access_bits2:=cboAccessBits2.ItemIndex; - trailer_access_bits:=cboTrailerAccessBits.ItemIndex; - trailer_Byte_9:=StrToInt(txtTrailerByte9.text); - WriteKeyAB; - PKeyA:=@KeyA; - PKeyB:=@KeyB; - res:=SectorTrailerWrite(addressing_mode,block_or_sector_address,PKeyA,access_bits0,access_bits1, - access_bits2,trailer_access_bits,trailer_Byte_9,PKeyB,auth_mode,key_index); - - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbSectorTrailerWrite,res); - end - else - begin - ReaderUiSignal(ERROR_LIGHT,ERROR_SOUND); - Status_Bar_Error_Reporting(stbSectorTrailerWrite,res); - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.dcu b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.dcu deleted file mode 100644 index 6879d87f9a84097a5fda818c4ba3d850f4886297..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.ddp b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.dfm b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.dfm deleted file mode 100644 index 26b053bef01e3f512e79895635ab6cd969b1bd72..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.dfm +++ /dev/null @@ -1,1100 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 389 - Top = 154 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 402 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 513 - Height = 249 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM1Click - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM2Click - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 108 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 77 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWritePKClick - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.pas b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.pas deleted file mode 100644 index 17e935f2abec2edcbc90fffe75d70f4d0e0726be..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.pas +++ /dev/null @@ -1,520 +0,0 @@ -unit SectorTrailersWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyBHex: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - procedure btnSectorTrailerWriteAKM1Click(Sender: TObject); - procedure btnSectorTrailerWriteAKM2Click(Sender: TObject); - procedure btnSectorTrailerWritePKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmSectorTrailerWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; -procedure TfrmSectorTrailerWrite.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmSectorTrailerWrite.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - - bAddressingMode :=cboAddressingMode.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddress.Text); - bAccessBits0 :=cboAccessBits0.ItemIndex; - bAccessBits1 :=cboAccessBits1.ItemIndex; - bAccessBits2 :=cboAccessBits2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9.text); - - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM1.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM1.Text); - bAccessBits0 :=cboAccessBits0AKM1.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM1.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM1.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM1.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM1(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM2(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9PK.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=SectorTrailerWrite_PK(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode, - pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA :=nil; - pKeyB :=nil; - pPKkey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~ddp b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~dfm b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~dfm deleted file mode 100644 index 1503392c97d5e21a5c95222ec895e52d5e67cd2e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~dfm +++ /dev/null @@ -1,1100 +0,0 @@ -object frmSectorTrailerWrite: TfrmSectorTrailerWrite - Left = 389 - Top = 154 - Width = 529 - Height = 460 - Caption = 'SectorTrailerWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'SectorTrailer Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbSectorTrailerWrite: TStatusBar - Left = 0 - Top = 403 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlKeyContainer: TPanel - Left = 0 - Top = 56 - Width = 513 - Height = 97 - Align = alTop - TabOrder = 3 - object pnlKeyA: TPanel - Left = 1 - Top = 1 - Width = 259 - Height = 95 - Align = alLeft - TabOrder = 0 - object lblKeyA: TStaticText - Left = 1 - Top = 1 - Width = 257 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY A' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyAHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyAHexClick - end - end - object pnlKeyB: TPanel - Left = 260 - Top = 1 - Width = 252 - Height = 95 - Align = alClient - TabOrder = 1 - object lblKeyB: TStaticText - Left = 1 - Top = 1 - Width = 250 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'KEY B' - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object chkKeyBHex: TCheckBox - Left = 34 - Top = 64 - Width = 65 - Height = 17 - Caption = 'Hex' - TabOrder = 1 - OnClick = chkKeyBHexClick - end - end - end - object tpgSectorTrailerWrite: TPageControl - Left = 0 - Top = 153 - Width = 513 - Height = 250 - ActivePage = tabSectorTrailerWrite - Align = alClient - TabOrder = 4 - object tabSectorTrailerWrite: TTabSheet - Caption = 'SectorTrailer Write' - object lblAdressinhMode: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockorSectorAddress: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBits: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingMode: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddress: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBits: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWrite: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteClick - end - end - object tabSectorTrailerAKM1: TTabSheet - Caption = 'SectorTrailer AKM1' - ImageIndex = 1 - object Label1: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM1: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBitsAKM1: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM1: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2AKM1: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM1: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM1: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM1: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM1: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM1: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM1: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM1: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM1: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM1: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM1: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM1Click - end - end - object tabSectorTrailerAKM2: TTabSheet - Caption = 'SectorTrailer AKM2' - ImageIndex = 2 - object lblAddressingModeAKM2: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressAKM2: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0AKM2: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1AKM2: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object Label12: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsAKM2: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9AKM2: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModeAKM2: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressAKM2: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0AKM2: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1AKM2: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2AKM2: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsAKM2: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9AKM2: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWriteAKM2: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWriteAKM2Click - end - end - object tabSectorTrailerPK: TTabSheet - Caption = 'SectorTrailer PK' - ImageIndex = 3 - object lblAddressingModePK: TLabel - Left = 32 - Top = 46 - Width = 97 - Height = 13 - Caption = 'Addressing Mode' - end - object lblBlockSectorAddressPK: TLabel - Left = 32 - Top = 74 - Width = 138 - Height = 13 - Caption = 'Block or Sector Address' - end - object lblAccessBits0PK: TLabel - Left = 32 - Top = 102 - Width = 75 - Height = 13 - Caption = 'Access Bits 0' - end - object lblAccessBits1PK: TLabel - Left = 32 - Top = 130 - Width = 75 - Height = 13 - Caption = 'Access Bits 1' - end - object lblAccessBits2PK: TLabel - Left = 32 - Top = 158 - Width = 75 - Height = 13 - Caption = 'Access Bits 2' - end - object lblTrailerAccessBitsPK: TLabel - Left = 272 - Top = 44 - Width = 109 - Height = 13 - Caption = 'Trailer Access Bits ' - end - object lblTrailerByte9PK: TLabel - Left = 273 - Top = 72 - Width = 78 - Height = 13 - Caption = 'Trailer Byte 9' - end - object cboAddressingModePK: TComboBox - Left = 176 - Top = 42 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 0 - Text = '0' - Items.Strings = ( - '0' - '1') - end - object txtBlockSectorAddressPK: TEdit - Left = 176 - Top = 70 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object cboAccessBits0PK: TComboBox - Left = 177 - Top = 98 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits1PK: TComboBox - Left = 177 - Top = 125 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 3 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboAccessBits2PK: TComboBox - Left = 177 - Top = 153 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 4 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object cboTrailerAccessBitsPK: TComboBox - Left = 417 - Top = 40 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 18 - ItemIndex = 0 - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7') - end - object txtTrailerByte9PK: TEdit - Left = 417 - Top = 68 - Width = 44 - Height = 26 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object btnSectorTrailerWritePK: TButton - Left = 272 - Top = 100 - Width = 190 - Height = 78 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 7 - OnClick = btnSectorTrailerWritePKClick - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~pas b/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~pas deleted file mode 100644 index d5021db3944e85ccaa930b126c251e030756bd4d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/SectorTrailersWrite.~pas +++ /dev/null @@ -1,520 +0,0 @@ -unit SectorTrailersWrite; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,Global,uFCoder1x, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmSectorTrailerWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbSectorTrailerWrite: TStatusBar; - pnlKeyContainer: TPanel; - pnlKeyA: TPanel; - pnlKeyB: TPanel; - tpgSectorTrailerWrite: TPageControl; - tabSectorTrailerWrite: TTabSheet; - tabSectorTrailerAKM2: TTabSheet; - tabSectorTrailerPK: TTabSheet; - tabSectorTrailerAKM1: TTabSheet; - lblAdressinhMode: TLabel; - cboAddressingMode: TComboBox; - lblBlockorSectorAddress: TLabel; - txtBlockSectorAddress: TEdit; - lblAccessBits0: TLabel; - cboAccessBits0: TComboBox; - lblAccessBits1: TLabel; - cboAccessBits1: TComboBox; - lblAccessBits2: TLabel; - cboAccessBits2: TComboBox; - lblTrailerAccessBits: TLabel; - cboTrailerAccessBits: TComboBox; - lblTrailerByte9: TLabel; - txtTrailerByte9: TEdit; - btnSectorTrailerWrite: TButton; - Label1: TLabel; - lblBlockSectorAddressAKM1: TLabel; - lblAccessBitsAKM1: TLabel; - cboAddressingModeAKM1: TComboBox; - txtBlockSectorAddressAKM1: TEdit; - cboAccessBits0AKM1: TComboBox; - lblAccessBits1AKM1: TLabel; - cboAccessBits1AKM1: TComboBox; - lblAccessBits2AKM1: TLabel; - cboAccessBits2AKM1: TComboBox; - lblTrailerAccessBitsAKM1: TLabel; - cboTrailerAccessBitsAKM1: TComboBox; - lblTrailerByte9AKM1: TLabel; - txtTrailerByte9AKM1: TEdit; - btnSectorTrailerWriteAKM1: TButton; - lblAddressingModeAKM2: TLabel; - lblBlockSectorAddressAKM2: TLabel; - lblAccessBits0AKM2: TLabel; - cboAddressingModeAKM2: TComboBox; - txtBlockSectorAddressAKM2: TEdit; - cboAccessBits0AKM2: TComboBox; - lblAccessBits1AKM2: TLabel; - cboAccessBits1AKM2: TComboBox; - Label12: TLabel; - cboAccessBits2AKM2: TComboBox; - lblTrailerAccessBitsAKM2: TLabel; - cboTrailerAccessBitsAKM2: TComboBox; - lblTrailerByte9AKM2: TLabel; - txtTrailerByte9AKM2: TEdit; - btnSectorTrailerWriteAKM2: TButton; - lblAddressingModePK: TLabel; - lblBlockSectorAddressPK: TLabel; - lblAccessBits0PK: TLabel; - cboAddressingModePK: TComboBox; - txtBlockSectorAddressPK: TEdit; - cboAccessBits0PK: TComboBox; - lblAccessBits1PK: TLabel; - cboAccessBits1PK: TComboBox; - lblAccessBits2PK: TLabel; - cboAccessBits2PK: TComboBox; - lblTrailerAccessBitsPK: TLabel; - cboTrailerAccessBitsPK: TComboBox; - lblTrailerByte9PK: TLabel; - txtTrailerByte9PK: TEdit; - btnSectorTrailerWritePK: TButton; - lblKeyA: TStaticText; - lblKeyB: TStaticText; - chkKeyAHex: TCheckBox; - chkKeyBHex: TCheckBox; - procedure FormCreate(Sender: TObject); - procedure chkKeyAHexClick(Sender: TObject); - procedure chkKeyADefaultClick(Sender: TObject); - procedure chkKeyBDefaultClick(Sender: TObject); - procedure chkKeyBHexClick(Sender: TObject); - procedure btnSectorTrailerWriteClick(Sender: TObject); - procedure btnSectorTrailerWriteAKM1Click(Sender: TObject); - procedure btnSectorTrailerWriteAKM2Click(Sender: TObject); - procedure btnSectorTrailerWritePKClick(Sender: TObject); - private - - baKeyA:array[0..5] of Byte; - baKeyB:array[0..5] of Byte; - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - procedure OnKeyAPress(Sender:TObject;var Key:Char); - procedure OnKeyBPress(Sender:TObject;var Key:Char); - procedure OnKeysA_Exit(Sender:TObject); - procedure OnKeysB_Exit(Sender:TObject); - procedure WriteKeyAB; - public - { Public declarations } - end; - -var - frmSectorTrailerWrite: TfrmSectorTrailerWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TForm1 } - -procedure TfrmSectorTrailerWrite.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmSectorTrailerWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmSectorTrailerWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); - CreateKey(self,21,33,32,32,pnlKeyA,'txtKeyA',false,OnKeyAPress,OnKeysA_Exit); - CreateKey(self,21,33,32,32,pnlKeyB,'txtKeyB',false,OnKeyBPress,OnKeysB_Exit); -end; -procedure TfrmSectorTrailerWrite.OnKeysA_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyAHex); -end; -procedure TfrmSectorTrailerWrite.OnKeysB_Exit(Sender: TObject); -begin - OnMyExit(Sender,chkKeyBHex); -end; -procedure TfrmSectorTrailerWrite.OnKeyAPress(Sender: TObject;var Key: Char); -begin - Check_Key_press(Sender,chkKeyAHex,Key); -end; - -procedure TfrmSectorTrailerWrite.chkKeyAHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyADefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyADefault,chkKeyAHex,'txtKeyA'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBDefaultClick(Sender: TObject); -begin -// CheckDefault(self,5,chkKeyBDefault,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.chkKeyBHexClick(Sender: TObject); -begin - CheckHex(self,5,chkKeyBHex,'txtKeyB'); -end; - -procedure TfrmSectorTrailerWrite.OnKeyBPress(Sender: TObject; - var Key: Char); -begin - Check_Key_press(Sender,chkKeyBHex,Key); -end; - -procedure TfrmSectorTrailerWrite.WriteKeyAB; -var - br:integer; -begin - if (chkKeyAHex.Checked) or (chkKeyBHex.Checked) then begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end - else - begin - for br:=0 to 5 do - begin - baKeyA[br]:=StrToInt(TEdit(FindComponent('txtKeyA'+IntToStr(br+1))).Text); - baKeyB[br]:=StrToInt(TEdit(FindComponent('txtKeyB'+IntToStr(br+1))).Text); - end; - end; - -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteClick(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode, - bKeyIndex :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddress.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - - bAddressingMode :=cboAddressingMode.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddress.Text); - bAccessBits0 :=cboAccessBits0.ItemIndex; - bAccessBits1 :=cboAccessBits1.ItemIndex; - bAccessBits2 :=cboAccessBits2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBits.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9.text); - - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM1Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM1.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM1.Text); - bAccessBits0 :=cboAccessBits0AKM1.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM1.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM1.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM1.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM1.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM1(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWriteAKM2Click(Sender: TObject); -var - pKeyA, - pKeyB :PByte; - bAuthMode :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9AKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9AKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - iFResult:=SectorTrailerWrite_AKM2(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA:=nil; - pKeyB:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmSectorTrailerWrite.btnSectorTrailerWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pKeyA, - pKeyB, - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bAddressingMode, - bBlockOrSectorAddress, - bAccessBits0, - bAccessBits1, - bAccessBits2, - bSectorTrailerAccessBits, - bSectorTrailerByte9 :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtBlockSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK or SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtBlockSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtTrailerByte9PK.Text)=EmptyStr then - begin - MessageDlg('You must enter the TRAILER BYTE 9 !',mtWarning,[mbOK],0); - txtTrailerByte9PK.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pKeyA); - New(pKeyB); - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - bAddressingMode :=cboAddressingModeAKM2.ItemIndex; - bBlockOrSectorAddress :=StrToInt(txtBlockSectorAddressAKM2.Text); - bAccessBits0 :=cboAccessBits0AKM2.ItemIndex; - bAccessBits1 :=cboAccessBits1AKM2.ItemIndex; - bAccessBits2 :=cboAccessBits2AKM2.ItemIndex; - bSectorTrailerAccessBits :=cboTrailerAccessBitsAKM2.ItemIndex; - bSectorTrailerByte9 :=StrToInt(txtTrailerByte9AKM2.text); - WriteKeyAB; - pKeyA:=@baKeyA; - pKeyB:=@baKeyB; - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=SectorTrailerWrite_PK(bAddressingMode,bBlockOrSectorAddress, - pKeyA, - bAccessBits0,bAccessBits1,bAccessBits2, - bSectorTrailerAccessBits,bSectorTrailerByte9, - pKeyB, - bAuthMode, - pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbSectorTrailerWrite,iFResult); - end; - finally - pKeyA :=nil; - pKeyB :=nil; - pPKkey:=nil; - Dispose(pKeyA); - Dispose(pKeyB); - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.dcu b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.dcu deleted file mode 100644 index 3b197f6f921458d9bd4ff72a41f1ecd7149b064b..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.dfm deleted file mode 100644 index 827585cf4ad3dcc94ceeb276007e6ef3f52165d4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.dfm +++ /dev/null @@ -1,1093 +0,0 @@ -object frmValueBlockReadWrite: TfrmValueBlockReadWrite - Left = 531 - Top = 222 - Width = 529 - Height = 420 - Caption = 'ValueBlockReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockReadWrite: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 305 - ActivePage = tavValueBlockRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockRead: TTabSheet - Caption = 'ValueBlock Read' - object pnlValueBlockRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBRValueAddress: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadData: TLabel - Left = 9 - Top = 86 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddress: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBRValueAddress: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtVBRReadValue: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockValueRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockValueReadClick - end - object txtVBRBlockAddress: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBRValueAddressAKM1: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM1: TLabel - Left = 9 - Top = 86 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM1: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM1: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM1: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM1: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM1Click - end - object txtVBRBlockAddressAKM1: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBRValueAddressAKM2: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM2: TLabel - Left = 9 - Top = 90 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM2: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM2: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM2: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM2: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM2Click - end - object txtVBRBlockAddressAKM2: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBRValueAddressPK: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValuePK: TLabel - Left = 9 - Top = 90 - Width = 64 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressPK: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressPK: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValuePK: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadPK: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadPKClick - end - object txtVBRBlockAddressPK: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - end - object tabValueBlockWrite: TTabSheet - Caption = 'ValueBlock Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBWWriteData: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddress: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddress: TLabel - Left = 9 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 127 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteData: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWrite: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteClick - end - object txtVBWBlockAddress: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddress: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBWWriteDataAKM1: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM1: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM1: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM1: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM1Click - end - object txtVBWBlockAddressAKM1: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM1: TEdit - Left = 114 - Top = 94 - Width = 37 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBWWriteDataAKM2: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWAKM2: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM2: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM2: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 55 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM2Click - end - object txtVBWBlockAddressAKM2: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM2: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label9: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressPK: TLabel - Left = 9 - Top = 100 - Width = 81 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWPK: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataPK: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWritePK: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWritePKClick - end - object txtVBWBlockAddressPK: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressPK: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.pas deleted file mode 100644 index a8e6919cfa35daa16b7d07ed67a59168a2a25536..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.pas +++ /dev/null @@ -1,599 +0,0 @@ -unit ValueBlock; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, - Forms,Dialogs,Global,uFCoder, - ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockReadWrite: TStatusBar; - pgValueBlockReadWrite: TPageControl; - tavValueBlockRead: TTabSheet; - pnlValueBlockRead: TPanel; - lblVBRValueAddress: TLabel; - lblVBRReadData: TLabel; - lblVBRBlockAddress: TLabel; - lblVBRead: TStaticText; - txtVBRValueAddress: TEdit; - txtVBRReadValue: TEdit; - btnBlockValueRead: TButton; - txtVBRBlockAddress: TEdit; - pnlValueBlockReadAKM1: TPanel; - lblVBRAKM1: TStaticText; - pnlValueBlockReadAKM2: TPanel; - lblVBRAKM2: TStaticText; - pnlValueBlockReadPK: TPanel; - lblBRPK: TStaticText; - tabValueBlockWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblVBWWriteData: TLabel; - lblVBWBlockAddress: TLabel; - lblBISWBlockWrite: TStaticText; - txtVBWWriteData: TEdit; - btnValueBlockWrite: TButton; - txtVBWBlockAddress: TEdit; - pnlBlockWriteAKM1: TPanel; - lblVBWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblVBWAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblVBWPK: TStaticText; - lblVBRValueAddressAKM1: TLabel; - lblVBRReadValueAKM1: TLabel; - lblVBRBlockAddressAKM1: TLabel; - txtVBRValueAddressAKM1: TEdit; - txtVBRReadValueAKM1: TEdit; - btnValueBlockReadAKM1: TButton; - txtVBRBlockAddressAKM1: TEdit; - lblVBRValueAddressAKM2: TLabel; - lblVBRReadValueAKM2: TLabel; - lblVBRBlockAddressAKM2: TLabel; - txtVBRValueAddressAKM2: TEdit; - txtVBRReadValueAKM2: TEdit; - btnValueBlockReadAKM2: TButton; - txtVBRBlockAddressAKM2: TEdit; - lblVBRValueAddressPK: TLabel; - lblVBRReadValuePK: TLabel; - lblVBRBlockAddressPK: TLabel; - txtVBRValueAddressPK: TEdit; - txtVBRReadValuePK: TEdit; - btnValueBlockReadPK: TButton; - txtVBRBlockAddressPK: TEdit; - lblVBWValueAddress: TLabel; - txtVBWValueAddress: TEdit; - lblVBWWriteDataAKM1: TLabel; - lblVBWBlockAddressAKM1: TLabel; - txtVBWWriteDataAKM1: TEdit; - btnValueBlockWriteAKM1: TButton; - txtVBWBlockAddressAKM1: TEdit; - lblVBWValueAddressAKM1: TLabel; - txtVBWValueAddressAKM1: TEdit; - lblVBWWriteDataAKM2: TLabel; - lblVBWBlockAddressAKM2: TLabel; - txtVBWWriteDataAKM2: TEdit; - btnValueBlockWriteAKM2: TButton; - txtVBWBlockAddressAKM2: TEdit; - txtVBWValueAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - Label9: TLabel; - txtVBWWriteDataPK: TEdit; - btnValueBlockWritePK: TButton; - txtVBWBlockAddressPK: TEdit; - lblVBWValueAddressPK: TLabel; - txtVBWValueAddressPK: TEdit; - lblVBWValueAddressAKM2: TLabel; - procedure FormCreate(Sender: TObject); - procedure btnBlockValueReadClick(Sender: TObject); - procedure btnValueBlockReadAKM1Click(Sender: TObject); - procedure btnValueBlockReadAKM2Click(Sender: TObject); - procedure btnValueBlockReadPKClick(Sender: TObject); - procedure btnValueBlockWriteClick(Sender: TObject); - procedure btnValueBlockWriteAKM1Click(Sender: TObject); - procedure btnValueBlockWriteAKM2Click(Sender: TObject); - procedure btnValueBlockWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockReadWrite: TfrmValueBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockReadWrite } - -procedure TfrmValueBlockReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockReadWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockReadWrite.btnBlockValueReadClick(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead(pData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtVBRValueAddress.Text:=IntToStr(bValueAddress); - txtVBRReadValue.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM1Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressAKM1.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM1(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM1.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM1.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM2Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM2(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM2.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM2.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - pData :PLongint; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressPK.Text); - pData :=@iValueData; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - - iFResult:=ValueBlockRead_PK(pData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtVBRValueAddressPK.Text:=IntToStr(bValueAddress); - txtVBRReadValuePK.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteClick(Sender: TObject); -var - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddress.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBWWriteData.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBWValueAddress.Text); - - iFResult:=ValueBlockWrite(iValueData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM1Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM1.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM1.Text); - - iFResult:=ValueBlockWrite_AKM1(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM2Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM2.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM2.Text); - - iFResult:=ValueBlockWrite_AKM2(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressPK.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataPK.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBWValueAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockWrite_PK(iValueData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~dfm deleted file mode 100644 index 0b87065006a58a72d8a6fd03c67f46e834527ae5..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~dfm +++ /dev/null @@ -1,1093 +0,0 @@ -object frmValueBlockReadWrite: TfrmValueBlockReadWrite - Left = 531 - Top = 222 - Width = 529 - Height = 420 - Caption = 'ValueBlockReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read/Write(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockReadWrite: TStatusBar - Left = 0 - Top = 363 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockReadWrite: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 306 - ActivePage = tavValueBlockRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockRead: TTabSheet - Caption = 'ValueBlock Read' - object pnlValueBlockRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBRValueAddress: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadData: TLabel - Left = 9 - Top = 86 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddress: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBRValueAddress: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtVBRReadValue: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 4 - end - object btnBlockValueRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnBlockValueReadClick - end - object txtVBRBlockAddress: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBRValueAddressAKM1: TLabel - Left = 154 - Top = 100 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM1: TLabel - Left = 9 - Top = 86 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM1: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM1: TEdit - Left = 203 - Top = 101 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM1: TEdit - Left = 8 - Top = 104 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM1: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM1Click - end - object txtVBRBlockAddressAKM1: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBRValueAddressAKM2: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValueAKM2: TLabel - Left = 9 - Top = 90 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressAKM2: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBRAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressAKM2: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValueAKM2: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadAKM2: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadAKM2Click - end - object txtVBRBlockAddressAKM2: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 144 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBRValueAddressPK: TLabel - Left = 154 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBRReadValuePK: TLabel - Left = 9 - Top = 90 - Width = 65 - Height = 13 - Caption = 'Read Value' - end - object lblVBRBlockAddressPK: TLabel - Left = 8 - Top = 35 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblBRPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtVBRValueAddressPK: TEdit - Left = 203 - Top = 105 - Width = 35 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtVBRReadValuePK: TEdit - Left = 8 - Top = 108 - Width = 143 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object btnValueBlockReadPK: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 3 - OnClick = btnValueBlockReadPKClick - end - object txtVBRBlockAddressPK: TEdit - Left = 100 - Top = 32 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 4 - end - end - end - object tabValueBlockWrite: TTabSheet - Caption = 'ValueBlock Write' - ImageIndex = 1 - object pnlBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBWWriteData: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddress: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddress: TLabel - Left = 9 - Top = 98 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 127 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteData: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWrite: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteClick - end - object txtVBWBlockAddress: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddress: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBWWriteDataAKM1: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM1: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM1: TLabel - Left = 8 - Top = 98 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM1: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM1: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM1Click - end - object txtVBWBlockAddressAKM1: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM1: TEdit - Left = 114 - Top = 94 - Width = 37 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBWWriteDataAKM2: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBWBlockAddressAKM2: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressAKM2: TLabel - Left = 8 - Top = 98 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWAKM2: TStaticText - Left = 2 - Top = 2 - Width = 172 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataAKM2: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWriteAKM2: TButton - Left = 157 - Top = 67 - Width = 87 - Height = 55 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWriteAKM2Click - end - object txtVBWBlockAddressAKM2: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressAKM2: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - object pnlBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblBISWWriteDataPK: TLabel - Left = 49 - Top = 25 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object Label9: TLabel - Left = 8 - Top = 72 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBWValueAddressPK: TLabel - Left = 9 - Top = 100 - Width = 82 - Height = 13 - Alignment = taCenter - Caption = 'Value Address' - end - object lblVBWPK: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBWWriteDataPK: TEdit - Left = 48 - Top = 40 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockWritePK: TButton - Left = 157 - Top = 68 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 3 - OnClick = btnValueBlockWritePKClick - end - object txtVBWBlockAddressPK: TEdit - Left = 114 - Top = 67 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBWValueAddressPK: TEdit - Left = 114 - Top = 94 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~pas deleted file mode 100644 index 68ef347c34422328b77654cf6243edc43f616a00..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlock.~pas +++ /dev/null @@ -1,598 +0,0 @@ -unit ValueBlock; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs,Global,uFCoder1x, - ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockReadWrite: TStatusBar; - pgValueBlockReadWrite: TPageControl; - tavValueBlockRead: TTabSheet; - pnlValueBlockRead: TPanel; - lblVBRValueAddress: TLabel; - lblVBRReadData: TLabel; - lblVBRBlockAddress: TLabel; - lblVBRead: TStaticText; - txtVBRValueAddress: TEdit; - txtVBRReadValue: TEdit; - btnBlockValueRead: TButton; - txtVBRBlockAddress: TEdit; - pnlValueBlockReadAKM1: TPanel; - lblVBRAKM1: TStaticText; - pnlValueBlockReadAKM2: TPanel; - lblVBRAKM2: TStaticText; - pnlValueBlockReadPK: TPanel; - lblBRPK: TStaticText; - tabValueBlockWrite: TTabSheet; - pnlBlockWrite: TPanel; - lblVBWWriteData: TLabel; - lblVBWBlockAddress: TLabel; - lblBISWBlockWrite: TStaticText; - txtVBWWriteData: TEdit; - btnValueBlockWrite: TButton; - txtVBWBlockAddress: TEdit; - pnlBlockWriteAKM1: TPanel; - lblVBWBlockWriteAKM1: TStaticText; - pnlBlockWriteAKM2: TPanel; - lblVBWAKM2: TStaticText; - pnlBlockWritePK: TPanel; - lblVBWPK: TStaticText; - lblVBRValueAddressAKM1: TLabel; - lblVBRReadValueAKM1: TLabel; - lblVBRBlockAddressAKM1: TLabel; - txtVBRValueAddressAKM1: TEdit; - txtVBRReadValueAKM1: TEdit; - btnValueBlockReadAKM1: TButton; - txtVBRBlockAddressAKM1: TEdit; - lblVBRValueAddressAKM2: TLabel; - lblVBRReadValueAKM2: TLabel; - lblVBRBlockAddressAKM2: TLabel; - txtVBRValueAddressAKM2: TEdit; - txtVBRReadValueAKM2: TEdit; - btnValueBlockReadAKM2: TButton; - txtVBRBlockAddressAKM2: TEdit; - lblVBRValueAddressPK: TLabel; - lblVBRReadValuePK: TLabel; - lblVBRBlockAddressPK: TLabel; - txtVBRValueAddressPK: TEdit; - txtVBRReadValuePK: TEdit; - btnValueBlockReadPK: TButton; - txtVBRBlockAddressPK: TEdit; - lblVBWValueAddress: TLabel; - txtVBWValueAddress: TEdit; - lblVBWWriteDataAKM1: TLabel; - lblVBWBlockAddressAKM1: TLabel; - txtVBWWriteDataAKM1: TEdit; - btnValueBlockWriteAKM1: TButton; - txtVBWBlockAddressAKM1: TEdit; - lblVBWValueAddressAKM1: TLabel; - txtVBWValueAddressAKM1: TEdit; - lblVBWWriteDataAKM2: TLabel; - lblVBWBlockAddressAKM2: TLabel; - txtVBWWriteDataAKM2: TEdit; - btnValueBlockWriteAKM2: TButton; - txtVBWBlockAddressAKM2: TEdit; - txtVBWValueAddressAKM2: TEdit; - lblBISWWriteDataPK: TLabel; - Label9: TLabel; - txtVBWWriteDataPK: TEdit; - btnValueBlockWritePK: TButton; - txtVBWBlockAddressPK: TEdit; - lblVBWValueAddressPK: TLabel; - txtVBWValueAddressPK: TEdit; - lblVBWValueAddressAKM2: TLabel; - procedure FormCreate(Sender: TObject); - procedure btnBlockValueReadClick(Sender: TObject); - procedure btnValueBlockReadAKM1Click(Sender: TObject); - procedure btnValueBlockReadAKM2Click(Sender: TObject); - procedure btnValueBlockReadPKClick(Sender: TObject); - procedure btnValueBlockWriteClick(Sender: TObject); - procedure btnValueBlockWriteAKM1Click(Sender: TObject); - procedure btnValueBlockWriteAKM2Click(Sender: TObject); - procedure btnValueBlockWritePKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockReadWrite: TfrmValueBlockReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockReadWrite } - -procedure TfrmValueBlockReadWrite.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockReadWrite.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockReadWrite.btnBlockValueReadClick(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead(pData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtVBRValueAddress.Text:=IntToStr(bValueAddress); - txtVBRReadValue.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM1Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressAKM1.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM1(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM1.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM1.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadAKM2Click(Sender: TObject); -var - pData :PLongint; - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddress.Text); - pData :=@iValueData; - - iFResult:=ValueBlockRead_AKM2(pData,bValueAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - txtVBRValueAddressAKM2.Text:=IntToStr(bValueAddress); - txtVBRReadValueAKM2.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - pData :PLongint; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bBlockAddress :=StrToInt(txtVBRBlockAddressPK.Text); - pData :=@iValueData; - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - - iFResult:=ValueBlockRead_PK(pData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - if iFResult=DL_OK then - begin - txtVBRValueAddressPK.Text:=IntToStr(bValueAddress); - txtVBRReadValuePK.Text :=IntToStr(iValueData); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteClick(Sender: TObject); -var - iValueData :Longint; - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteData.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddress.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBWWriteData.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBWValueAddress.Text); - - iFResult:=ValueBlockWrite(iValueData,bValueAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM1Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM1.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM1.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM1.Text); - - iFResult:=ValueBlockWrite_AKM1(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWriteAKM2Click(Sender: TObject); -var - iValueData :Longint; - bAuthMode :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressAKM2.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataAKM2.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBWValueAddressAKM2.Text); - - iFResult:=ValueBlockWrite_AKM2(iValueData,bValueAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockReadWrite.btnValueBlockWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - iValueData :Longint; - bAuthMode, - bBr :Byte; - bBlockAddress, - bValueAddress :Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBWWriteDataPK.SetFocus; - Exit; - end; - - if Trim(txtVBWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBWBlockAddressPK.SetFocus; - Exit; - end; - - if Trim(txtVBWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBWWriteDataPK.Text); - bBlockAddress :=StrToInt(txtVBWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBWValueAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockWrite_PK(iValueData,bValueAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockReadWrite,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.dcu b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.dcu deleted file mode 100644 index 47d8e8693ed213841a181e917b801c31aa237b06..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.dfm deleted file mode 100644 index 6cbb651b78293e8ad0134ce07faa0db2f8ed6113..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.dfm +++ /dev/null @@ -1,1265 +0,0 @@ -object frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite - Left = 519 - Top = 130 - Width = 527 - Height = 418 - Caption = 'ValueBlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 511 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read/Write (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 511 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSector: TStatusBar - Left = 0 - Top = 360 - Width = 511 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSector: TPageControl - Left = 0 - Top = 57 - Width = 511 - Height = 303 - ActivePage = tabValueBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorRead: TTabSheet - Caption = 'ValueBlockInSector Read' - object pnlValueBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadData: TLabel - Left = 8 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddress: TLabel - Left = 156 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadData: TEdit - Left = 6 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadClick - end - object txtVBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddress: TEdit - Left = 205 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadDataAKM1: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddressAKM1: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadDataAKM1: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM1Click - end - object txtVBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddressAKM1: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataAKM2: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressAKM2: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM2Click - end - object txtVBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataAKM2: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressAKM2: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataPK: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressPK: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadPKClick - end - object txtVBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataPK: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressPK: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - end - object tabValueBlockInSectorWrite: TTabSheet - Caption = 'ValueBlockInSector Write' - ImageIndex = 1 - object pnlVBISBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM1: TLabel - Left = 10 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM1: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM1: TLabel - Left = 156 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 234 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM1: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM1Click - end - object txtVBISWBlockAddressAKM1: TEdit - Left = 103 - Top = 55 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM1: TEdit - Left = 9 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM1: TEdit - Left = 103 - Top = 29 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM1: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 61 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM2: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM2: TLabel - Left = 9 - Top = 34 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM2: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 234 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM2: TButton - Left = 157 - Top = 28 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM2Click - end - object txtVBISWBlockAddressAKM2: TEdit - Left = 104 - Top = 56 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM2: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM2: TEdit - Left = 104 - Top = 30 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM2: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISWBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataPK: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddressPK: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddressPK: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 212 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWritePK: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWritePKClick - end - object txtVBISWBlockAddressPK: TEdit - Left = 102 - Top = 55 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataPK: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddressPK: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddressPK: TEdit - Left = 102 - Top = 29 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - object pnlVBISBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISWBlockAddress: TLabel - Left = 8 - Top = 62 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteData: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddress: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddress: TLabel - Left = 9 - Top = 36 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 189 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWrite: TButton - Left = 157 - Top = 30 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteClick - end - object txtVBISWBlockAddress: TEdit - Left = 105 - Top = 57 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteData: TEdit - Left = 8 - Top = 102 - Width = 144 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddress: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddress: TEdit - Left = 105 - Top = 31 - Width = 38 - Height = 21 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.pas deleted file mode 100644 index 29bfb28e3055d935764d4d832b04fb6a3fef2715..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.pas +++ /dev/null @@ -1,670 +0,0 @@ -unit ValueBlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockInSectorReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSector: TStatusBar; - pgValueBlockInSector: TPageControl; - tabValueBlockInSectorRead: TTabSheet; - pnlValueBlockInSectorRead: TPanel; - lblVBISRSectorAddress: TLabel; - lblVBISRReadData: TLabel; - lblVBISRBlockAddress: TLabel; - lblVBISRead: TStaticText; - txtVBISRSectorAddress: TEdit; - txtVBISRReadData: TEdit; - btnValueBlockInSectorRead: TButton; - txtVBISRBlockAddress: TEdit; - pnlValueBlockInSectorReadAKM1: TPanel; - lblVBISRSectorAddressAKM1: TLabel; - lblVBISRReadDataAKM1: TLabel; - lblVBISRBlockAddressAKM1: TLabel; - lblVBISReadAKM1: TStaticText; - txtVBISRSectorAddressAKM1: TEdit; - txtVBISRReadDataAKM1: TEdit; - btnValueBlockInSectorReadAKM1: TButton; - txtVBISRBlockAddressAKM1: TEdit; - pnlValueBlockInSectorReadAKM2: TPanel; - lblVBISRSectorAddressAKM2: TLabel; - lblVBISRBlockAddressAKM2: TLabel; - lblVBISReadAKM2: TStaticText; - txtVBISRSectorAddressAKM2: TEdit; - btnValueBlockInSectorReadAKM2: TButton; - txtVBISRBlockAddressAKM2: TEdit; - pnlValueBlockReadPK: TPanel; - lblVBISRSectorAddressPK: TLabel; - lblVBISRBlockAddressPK: TLabel; - lblVBISReadPK: TStaticText; - txtVBISRSectorAddressPK: TEdit; - btnValueBlockInSectorReadPK: TButton; - txtVBISRBlockAddressPK: TEdit; - tabValueBlockInSectorWrite: TTabSheet; - pnlVBISBlockWriteAKM1: TPanel; - lblVBISWBlockWriteAKM1: TStaticText; - pnlVBISBlockWriteAKM2: TPanel; - lblVBISWBlockWriteAKM2: TStaticText; - pnlVBISBlockWritePK: TPanel; - lblVBISWBlockWritePK: TStaticText; - lblVBISRValueAddress: TLabel; - txtVBISRValueAddress: TEdit; - lblVBISRValueAddressAKM1: TLabel; - txtVBISRValueAddressAKM1: TEdit; - lblVBISRReadDataAKM2: TLabel; - txtVBISRReadDataAKM2: TEdit; - lblVBISRValueAddressAKM2: TLabel; - txtVBISRValueAddressAKM2: TEdit; - lblVBISRReadDataPK: TLabel; - txtVBISRReadDataPK: TEdit; - lblVBISRValueAddressPK: TLabel; - txtVBISRValueAddressPK: TEdit; - lblVBISWBlockAddressAKM1: TLabel; - btnValueBlockInSectorWriteAKM1: TButton; - txtVBISWBlockAddressAKM1: TEdit; - lblVBISWBlockAddressAKM2: TLabel; - btnValueBlockInSectorWriteAKM2: TButton; - txtVBISWBlockAddressAKM2: TEdit; - lblVBISWBlockAddressPK: TLabel; - btnValueBlockInSectorWritePK: TButton; - txtVBISWBlockAddressPK: TEdit; - pnlVBISBlockWrite: TPanel; - lblVBISWBlockAddress: TLabel; - lblVBISWBlockWrite: TStaticText; - btnValueBlockInSectorWrite: TButton; - txtVBISWBlockAddress: TEdit; - lblVBISWWriteData: TLabel; - txtVBISWWriteData: TEdit; - lblBISRWValueAddress: TLabel; - txtVBISWValueAddress: TEdit; - lblVBISWWriteDataAKM1: TLabel; - txtVBISWWriteDataAKM1: TEdit; - lblVBISWSectorAddress: TLabel; - txtVBISWSectorAddress: TEdit; - lblVBISWSectorAddressAKM1: TLabel; - txtVBISWSectorAddressAKM1: TEdit; - lblBISRWValueAddressAKM1: TLabel; - txtVBISWValueAddressAKM1: TEdit; - lblVBISWWriteDataAKM2: TLabel; - txtVBISWWriteDataAKM2: TEdit; - lblVBISWSectorAddressAKM2: TLabel; - txtVBISWSectorAddressAKM2: TEdit; - lblBISRWValueAddressAKM2: TLabel; - txtVBISWValueAddressAKM2: TEdit; - lblVBISWWriteDataPK: TLabel; - txtVBISWWriteDataPK: TEdit; - lblBISRWValueAddressPK: TLabel; - txtVBISWValueAddressPK: TEdit; - lblVBISWSectorAddressPK: TLabel; - txtVBISWSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorReadClick(Sender: TObject); - procedure btnValueBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorReadPKClick(Sender: TObject); - procedure btnValueBlockInSectorWriteClick(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorWritePKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockInSectorReadWrite } - -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject; - var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadClick(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtVBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddress.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtVBISRReadData.Text :=IntToStr(iValueData); - txtVBISRValueAddress.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM1Click(Sender: TObject); -var - PData :PLongint; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM1.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM1(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM1.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM1.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM2Click(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM2.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM2(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM2.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM2.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - PData :PLongint; - pPKKey :PByte; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress, - bBr :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - pData :=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_PK(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtVBISRReadDataPK.Text :=IntToStr(iValueData); - txtVBISRValueAddressPK.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - - if Trim(txtVBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddress.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBISWWriteData.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBISWValueAddress.Text); - - iFResult:=ValueBlockInSectorWrite(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM1.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM1.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM1.Text); - - iFResult:=ValueBlockInSectorWrite_AKM1(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM2.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM2.Text); - - iFResult:=ValueBlockInSectorWrite_AKM2(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataPK.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorWrite_PK(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pPKKey :=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~dfm deleted file mode 100644 index 595138217d58f70860fa344d0761b26bcd3e952f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~dfm +++ /dev/null @@ -1,1265 +0,0 @@ -object frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite - Left = 519 - Top = 130 - Width = 527 - Height = 418 - Caption = 'ValueBlockInSectorReadWrite' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 511 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read/Write (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 511 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSector: TStatusBar - Left = 0 - Top = 361 - Width = 511 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSector: TPageControl - Left = 0 - Top = 57 - Width = 511 - Height = 304 - ActivePage = tabValueBlockInSectorRead - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorRead: TTabSheet - Caption = 'ValueBlockInSector Read' - object pnlValueBlockInSectorRead: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISRSectorAddress: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadData: TLabel - Left = 8 - Top = 90 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddress: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddress: TLabel - Left = 156 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISRead: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Read' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddress: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadData: TEdit - Left = 6 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorRead: TButton - Left = 152 - Top = 31 - Width = 87 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadClick - end - object txtVBISRBlockAddress: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddress: TEdit - Left = 205 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISRSectorAddressAKM1: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRReadDataAKM1: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRValueAddressAKM1: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM1: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISRReadDataAKM1: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object btnValueBlockInSectorReadAKM1: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 54 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM1Click - end - object txtVBISRBlockAddressAKM1: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRValueAddressAKM1: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockInSectorReadAKM2: TPanel - Left = 3 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISRSectorAddressAKM2: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressAKM2: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataAKM2: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressAKM2: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressAKM2: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadAKM2: TButton - Left = 152 - Top = 31 - Width = 88 - Height = 52 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadAKM2Click - end - object txtVBISRBlockAddressAKM2: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataAKM2: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressAKM2: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - object pnlValueBlockReadPK: TPanel - Left = 262 - Top = 144 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISRSectorAddressPK: TLabel - Left = 8 - Top = 34 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISRBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISRReadDataPK: TLabel - Left = 8 - Top = 91 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblVBISRValueAddressPK: TLabel - Left = 157 - Top = 104 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISReadPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorRead_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBISRSectorAddressPK: TEdit - Left = 100 - Top = 31 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorReadPK: TButton - Left = 154 - Top = 30 - Width = 85 - Height = 53 - Cursor = crHandPoint - Caption = 'READ' - TabOrder = 2 - OnClick = btnValueBlockInSectorReadPKClick - end - object txtVBISRBlockAddressPK: TEdit - Left = 100 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISRReadDataPK: TEdit - Left = 8 - Top = 107 - Width = 147 - Height = 21 - Ctl3D = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 4 - end - object txtVBISRValueAddressPK: TEdit - Left = 206 - Top = 105 - Width = 33 - Height = 24 - Color = clSilver - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 5 - end - end - end - object tabValueBlockInSectorWrite: TTabSheet - Caption = 'ValueBlockInSector Write' - ImageIndex = 1 - object pnlVBISBlockWriteAKM1: TPanel - Left = 262 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISWBlockAddressAKM1: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM1: TLabel - Left = 10 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM1: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM1: TLabel - Left = 156 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM1: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM1Click - end - object txtVBISWBlockAddressAKM1: TEdit - Left = 103 - Top = 55 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM1: TEdit - Left = 9 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM1: TEdit - Left = 103 - Top = 29 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM1: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWriteAKM2: TPanel - Left = 3 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISWBlockAddressAKM2: TLabel - Left = 8 - Top = 61 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataAKM2: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblVBISWSectorAddressAKM2: TLabel - Left = 9 - Top = 34 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblBISRWValueAddressAKM2: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWBlockWriteAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWriteAKM2: TButton - Left = 157 - Top = 28 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteAKM2Click - end - object txtVBISWBlockAddressAKM2: TEdit - Left = 104 - Top = 56 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataAKM2: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWSectorAddressAKM2: TEdit - Left = 104 - Top = 30 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object txtVBISWValueAddressAKM2: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - end - object pnlVBISBlockWritePK: TPanel - Left = 262 - Top = 145 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISWBlockAddressPK: TLabel - Left = 8 - Top = 60 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteDataPK: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddressPK: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddressPK: TLabel - Left = 9 - Top = 33 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWritePK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSectorWrite_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWritePK: TButton - Left = 157 - Top = 27 - Width = 87 - Height = 54 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWritePKClick - end - object txtVBISWBlockAddressPK: TEdit - Left = 102 - Top = 55 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteDataPK: TEdit - Left = 8 - Top = 102 - Width = 145 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddressPK: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddressPK: TEdit - Left = 102 - Top = 29 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - object pnlVBISBlockWrite: TPanel - Left = 3 - Top = 9 - Width = 252 - Height = 132 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISWBlockAddress: TLabel - Left = 8 - Top = 62 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISWWriteData: TLabel - Left = 9 - Top = 87 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblBISRWValueAddress: TLabel - Left = 157 - Top = 98 - Width = 46 - Height = 26 - Alignment = taCenter - Caption = 'Value Address' - WordWrap = True - end - object lblVBISWSectorAddress: TLabel - Left = 9 - Top = 36 - Width = 87 - Height = 13 - Alignment = taCenter - Caption = 'Sector Address' - end - object lblVBISWBlockWrite: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Write' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 5 - end - object btnValueBlockInSectorWrite: TButton - Left = 157 - Top = 30 - Width = 87 - Height = 53 - Cursor = crHandPoint - Caption = 'WRITE' - TabOrder = 4 - OnClick = btnValueBlockInSectorWriteClick - end - object txtVBISWBlockAddress: TEdit - Left = 105 - Top = 57 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object txtVBISWWriteData: TEdit - Left = 8 - Top = 102 - Width = 144 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISWValueAddress: TEdit - Left = 205 - Top = 97 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 3 - end - object txtVBISWSectorAddress: TEdit - Left = 105 - Top = 31 - Width = 38 - Height = 26 - Color = clWhite - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~pas deleted file mode 100644 index 43d96e1b9da4fa2cfefeb4af66e98ca6c16f59ed..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSector.~pas +++ /dev/null @@ -1,670 +0,0 @@ -unit ValueBlockInSector; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder1x,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockInSectorReadWrite = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSector: TStatusBar; - pgValueBlockInSector: TPageControl; - tabValueBlockInSectorRead: TTabSheet; - pnlValueBlockInSectorRead: TPanel; - lblVBISRSectorAddress: TLabel; - lblVBISRReadData: TLabel; - lblVBISRBlockAddress: TLabel; - lblVBISRead: TStaticText; - txtVBISRSectorAddress: TEdit; - txtVBISRReadData: TEdit; - btnValueBlockInSectorRead: TButton; - txtVBISRBlockAddress: TEdit; - pnlValueBlockInSectorReadAKM1: TPanel; - lblVBISRSectorAddressAKM1: TLabel; - lblVBISRReadDataAKM1: TLabel; - lblVBISRBlockAddressAKM1: TLabel; - lblVBISReadAKM1: TStaticText; - txtVBISRSectorAddressAKM1: TEdit; - txtVBISRReadDataAKM1: TEdit; - btnValueBlockInSectorReadAKM1: TButton; - txtVBISRBlockAddressAKM1: TEdit; - pnlValueBlockInSectorReadAKM2: TPanel; - lblVBISRSectorAddressAKM2: TLabel; - lblVBISRBlockAddressAKM2: TLabel; - lblVBISReadAKM2: TStaticText; - txtVBISRSectorAddressAKM2: TEdit; - btnValueBlockInSectorReadAKM2: TButton; - txtVBISRBlockAddressAKM2: TEdit; - pnlValueBlockReadPK: TPanel; - lblVBISRSectorAddressPK: TLabel; - lblVBISRBlockAddressPK: TLabel; - lblVBISReadPK: TStaticText; - txtVBISRSectorAddressPK: TEdit; - btnValueBlockInSectorReadPK: TButton; - txtVBISRBlockAddressPK: TEdit; - tabValueBlockInSectorWrite: TTabSheet; - pnlVBISBlockWriteAKM1: TPanel; - lblVBISWBlockWriteAKM1: TStaticText; - pnlVBISBlockWriteAKM2: TPanel; - lblVBISWBlockWriteAKM2: TStaticText; - pnlVBISBlockWritePK: TPanel; - lblVBISWBlockWritePK: TStaticText; - lblVBISRValueAddress: TLabel; - txtVBISRValueAddress: TEdit; - lblVBISRValueAddressAKM1: TLabel; - txtVBISRValueAddressAKM1: TEdit; - lblVBISRReadDataAKM2: TLabel; - txtVBISRReadDataAKM2: TEdit; - lblVBISRValueAddressAKM2: TLabel; - txtVBISRValueAddressAKM2: TEdit; - lblVBISRReadDataPK: TLabel; - txtVBISRReadDataPK: TEdit; - lblVBISRValueAddressPK: TLabel; - txtVBISRValueAddressPK: TEdit; - lblVBISWBlockAddressAKM1: TLabel; - btnValueBlockInSectorWriteAKM1: TButton; - txtVBISWBlockAddressAKM1: TEdit; - lblVBISWBlockAddressAKM2: TLabel; - btnValueBlockInSectorWriteAKM2: TButton; - txtVBISWBlockAddressAKM2: TEdit; - lblVBISWBlockAddressPK: TLabel; - btnValueBlockInSectorWritePK: TButton; - txtVBISWBlockAddressPK: TEdit; - pnlVBISBlockWrite: TPanel; - lblVBISWBlockAddress: TLabel; - lblVBISWBlockWrite: TStaticText; - btnValueBlockInSectorWrite: TButton; - txtVBISWBlockAddress: TEdit; - lblVBISWWriteData: TLabel; - txtVBISWWriteData: TEdit; - lblBISRWValueAddress: TLabel; - txtVBISWValueAddress: TEdit; - lblVBISWWriteDataAKM1: TLabel; - txtVBISWWriteDataAKM1: TEdit; - lblVBISWSectorAddress: TLabel; - txtVBISWSectorAddress: TEdit; - lblVBISWSectorAddressAKM1: TLabel; - txtVBISWSectorAddressAKM1: TEdit; - lblBISRWValueAddressAKM1: TLabel; - txtVBISWValueAddressAKM1: TEdit; - lblVBISWWriteDataAKM2: TLabel; - txtVBISWWriteDataAKM2: TEdit; - lblVBISWSectorAddressAKM2: TLabel; - txtVBISWSectorAddressAKM2: TEdit; - lblBISRWValueAddressAKM2: TLabel; - txtVBISWValueAddressAKM2: TEdit; - lblVBISWWriteDataPK: TLabel; - txtVBISWWriteDataPK: TEdit; - lblBISRWValueAddressPK: TLabel; - txtVBISWValueAddressPK: TEdit; - lblVBISWSectorAddressPK: TLabel; - txtVBISWSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorReadClick(Sender: TObject); - procedure btnValueBlockInSectorReadAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorReadAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorReadPKClick(Sender: TObject); - procedure btnValueBlockInSectorWriteClick(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorWriteAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorWritePKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorReadWrite: TfrmValueBlockInSectorReadWrite; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -{ TfrmValueBlockInSectorReadWrite } - -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyPress(Sender: TObject; - var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; -procedure TfrmValueBlockInSectorReadWrite.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorReadWrite.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadClick(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - bSectorAddress :=StrToInt(txtVBISRSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddress.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - txtVBISRReadData.Text :=IntToStr(iValueData); - txtVBISRValueAddress.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM1Click(Sender: TObject); -var - PData :PLongint; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM1.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM1(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM1.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM1.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadAKM2Click(Sender: TObject); -var - PData :PLongint; - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressAKM2.Text); - pData:=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_AKM2(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - txtVBISRReadDataAKM2.Text :=IntToStr(iValueData); - txtVBISRValueAddressAKM2.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorReadPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - PData :PLongint; - pPKKey :PByte; - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress, - bBr :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISRSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISRBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISRBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pData); - bAuthMode :=AuthMode(rbAUTH1A); - bSectorAddress :=StrToInt(txtVBISRSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISRBlockAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - pData :=PLongint(@iValueData); - - iFResult:=ValueBlockInSectorRead_PK(pData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - txtVBISRReadDataPK.Text :=IntToStr(iValueData); - txtVBISRValueAddressPK.Text:=IntToStr(bValueAddress); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pData :=nil; - Dispose(pData); - pPKKey :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - - if Trim(txtVBISWSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddress.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteData.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteData.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddress.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iValueData :=StrToInt(txtVBISWWriteData.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddress.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddress.Text); - bValueAddress :=StrToInt(txtVBISWValueAddress.Text); - - iFResult:=ValueBlockInSectorWrite(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM1.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM1.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM1.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM1.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM1.Text); - - iFResult:=ValueBlockInSectorWrite_AKM1(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWriteAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressAKM2.SetFocus; - Exit; - end; -Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataAKM2.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressAKM2.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressAKM2.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressAKM2.Text); - - iFResult:=ValueBlockInSectorWrite_AKM2(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorReadWrite.btnValueBlockInSectorWritePKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bSectorAddress, - bBlockAddress, - bValueAddress :Byte; - iValueData :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISWSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR ADDRESS !',mtWarning,[mbOK],0); - txtVBISWSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBISWBlockAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISWWriteDataPK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISWWriteDataPK.SetFocus; - Exit; - end; - if Trim(txtVBISWValueAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the VALUE ADDRESS !',mtWarning,[mbOK],0); - txtVBISWValueAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iValueData :=StrToInt(txtVBISWWriteDataPK.Text); - bSectorAddress :=StrToInt(txtVBISWSectorAddressPK.Text); - bBlockAddress :=StrToInt(txtVBISWBlockAddressPK.Text); - bValueAddress :=StrToInt(txtVBISWValueAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorWrite_PK(iValueData,bValueAddress,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFresult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSector,iFResult); - end; - finally - pPKKey :=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.dcu b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.dcu deleted file mode 100644 index a888f67277e7912d41e865f6e2542373d65ca9f0..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.dfm deleted file mode 100644 index 7e065d301a2b4dfed23f81fc38cc6ba1f8b0577a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.dfm +++ /dev/null @@ -1,1067 +0,0 @@ -object frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr - Left = 432 - Top = 198 - Width = 529 - Height = 420 - Caption = 'ValueBlockInSectorInctDecr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Increment/Decrement (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSectorIncrDecr: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSectorIncDecr: TPageControl - Left = 0 - Top = 56 - Width = 513 - Height = 306 - ActivePage = tabValueBlockInSectorIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorIncrement: TTabSheet - Caption = 'ValueBlockInSector Increment' - object pnlValueBlockInSectorIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISIncrValue: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrement: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementClick - end - object txtVBISIncrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM1: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM1Click - end - object txtVBISIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM2: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM2Click - end - object txtVBISIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementPK: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementPKClick - end - object txtVBISIncrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlockInSector Decrement' - ImageIndex = 1 - object pnlVBISDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDec: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrement: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - HelpType = htKeyword - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementClick - end - object txtVBISDecrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM1: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM1Click - end - object txtVBISDecrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM2: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM2Click - end - object txtVBISDecrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecPK: TStaticText - Left = 2 - Top = 2 - Width = 173 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementPK: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementPKClick - end - object txtVBISDecrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.pas deleted file mode 100644 index 7df55a9d37a15a82c550f1ece73d10b8acdc7c0e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.pas +++ /dev/null @@ -1,623 +0,0 @@ -unit ValueBlockInSectorIncrDecr; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder; - -type - TfrmValueBlockInSectorIncDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSectorIncrDecr: TStatusBar; - pgValueBlockInSectorIncDecr: TPageControl; - tabValueBlockInSectorIncrement: TTabSheet; - pnlValueBlockInSectorIncrement: TPanel; - lblVBISIncrValue: TLabel; - lblVBISIncrBlockAddress: TLabel; - lblVBISIncr: TStaticText; - txtVBISIncrementValue: TEdit; - btnValueBlockInSectorIncrement: TButton; - txtVBISIncrBlockAddress: TEdit; - pnlValueBlockInSectorIncrementAKM1: TPanel; - lblVBISIncrAKM1: TStaticText; - pnlValueBlockInSectorIncrementAKM2: TPanel; - lblVBISIncrAKM2: TStaticText; - pnlValueBlockInSectorIncrementPK: TPanel; - lblVBISIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - pnlVBISDecrement: TPanel; - lblVBISDecrementValue: TLabel; - lblVBISDecBlockAddress: TLabel; - lblVBISDec: TStaticText; - txtVBISDecrementValue: TEdit; - btnValueBlockInSectorDecrement: TButton; - txtVBISDecrBlockAddress: TEdit; - pnlVBISDecrementAKM1: TPanel; - lblVBISDecAKM1: TStaticText; - pnlVBISDecrementAKM2: TPanel; - lblVBISDecAKM2: TStaticText; - pnlVBISDecrementPK: TPanel; - lblVBISDecPK: TStaticText; - lblVBISIncSectorAddress: TLabel; - txtVBISIncrSectorAddress: TEdit; - lblVBISIncrValueAKM1: TLabel; - lblVBISIncrBlockAddressAKM1: TLabel; - txtVBISIncrementValueAKM1: TEdit; - btnValueBlockInSectorIncrementAKM1: TButton; - txtVBISIncrBlockAddressAKM1: TEdit; - lblVBISIncSectorAddressAKM1: TLabel; - txtVBISIncrSectorAddressAKM1: TEdit; - lblVBISIncrValueAKM2: TLabel; - lblVBISIncrBlockAddressAKM2: TLabel; - txtVBISIncrementValueAKM2: TEdit; - btnValueBlockInSectorIncrementAKM2: TButton; - txtVBISIncrBlockAddressAKM2: TEdit; - lblVBISIncSectorAddressAKM2: TLabel; - txtVBISIncrSectorAddressAKM2: TEdit; - lblVBISIncrValuePK: TLabel; - lblVBISIncrBlockAddressPK: TLabel; - txtVBISIncrementValuePK: TEdit; - btnValueBlockInSectorIncrementPK: TButton; - txtVBISIncrBlockAddressPK: TEdit; - lblVBISIncSectorAddressPK: TLabel; - txtVBISIncrSectorAddressPK: TEdit; - lblVBISDecrSectorAddress: TLabel; - txtVBISDecrSectorAddress: TEdit; - lblVBISDecrementValueAKM1: TLabel; - lblVBISDecBlockAddressAKM1: TLabel; - txtVBISDecrementValueAKM1: TEdit; - btnValueBlockInSectorDecrementAKM1: TButton; - txtVBISDecrBlockAddressAKM1: TEdit; - lblVBISDecrSectorAddressAKM1: TLabel; - txtVBISDecrSectorAddressAKM1: TEdit; - lblVBISDecrementValueAKM2: TLabel; - lblVBISDecBlockAddressAKM2: TLabel; - txtVBISDecrementValueAKM2: TEdit; - btnValueBlockInSectorDecrementAKM2: TButton; - txtVBISDecrBlockAddressAKM2: TEdit; - lblVBISDecrSectorAddressAKM2: TLabel; - txtVBISDecrSectorAddressAKM2: TEdit; - lblVBISDecrementValuePK: TLabel; - lblVBISDecBlockAddressPK: TLabel; - txtVBISDecrementValuePK: TEdit; - btnValueBlockInSectorDecrementPK: TButton; - txtVBISDecrBlockAddressPK: TEdit; - lblVBISDecrSectorAddressPK: TLabel; - txtVBISDecrSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorIncrementClick(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementPKClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementPKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockInSectorIncDecr.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBISIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddress.Text); - - iFResult:=ValueBlockInSectorIncrement(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM1(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM2(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorIncrement_PK(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBISDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddress.Text); - - iFResult:=ValueBlockInSectorDecrement(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM1(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM2(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; - -begin - try - if Trim(txtVBISDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorDecrement_PK(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - - - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~dfm deleted file mode 100644 index 7b8f18f19e7a80aeec238c062c0c1f4a2eb369b0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~dfm +++ /dev/null @@ -1,1067 +0,0 @@ -object frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr - Left = 432 - Top = 198 - Width = 529 - Height = 420 - Caption = 'ValueBlockInSectorInctDecr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'ValueBlockInSector Increment/Decrement (AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 26 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockInSectorIncrDecr: TStatusBar - Left = 0 - Top = 363 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockInSectorIncDecr: TPageControl - Left = 0 - Top = 56 - Width = 513 - Height = 307 - ActivePage = tabValueBlockInSectorIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tabValueBlockInSectorIncrement: TTabSheet - Caption = 'ValueBlockInSector Increment' - object pnlValueBlockInSectorIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISIncrValue: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrement: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementClick - end - object txtVBISIncrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM1: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM1Click - end - object txtVBISIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementAKM2: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementAKM2Click - end - object txtVBISIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockInSectorIncrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBISIncrBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISIncSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorIncrementPK: TButton - Left = 162 - Top = 69 - Width = 77 - Height = 52 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorIncrementPKClick - end - object txtVBISIncrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISIncrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlockInSector Decrement' - ImageIndex = 1 - object pnlVBISDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBISDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddress: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddress: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDec: TStaticText - Left = 2 - Top = 2 - Width = 150 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSector Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrement: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - HelpType = htKeyword - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementClick - end - object txtVBISDecrBlockAddress: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddress: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBISDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM1: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM1: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM1: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM1Click - end - object txtVBISDecrBlockAddressAKM1: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM1: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBISDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressAKM2: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressAKM2: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 195 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementAKM2: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementAKM2Click - end - object txtVBISDecrBlockAddressAKM2: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressAKM2: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBISDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBISDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBISDecBlockAddressPK: TLabel - Left = 14 - Top = 102 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBISDecrSectorAddressPK: TLabel - Left = 14 - Top = 75 - Width = 87 - Height = 13 - Caption = 'Sector Address' - end - object lblVBISDecPK: TStaticText - Left = 2 - Top = 2 - Width = 173 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'InSectorDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 4 - end - object txtVBISDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockInSectorDecrementPK: TButton - Left = 160 - Top = 67 - Width = 79 - Height = 55 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 3 - OnClick = btnValueBlockInSectorDecrementPKClick - end - object txtVBISDecrBlockAddressPK: TEdit - Left = 119 - Top = 95 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - end - object txtVBISDecrSectorAddressPK: TEdit - Left = 119 - Top = 68 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~pas deleted file mode 100644 index c3b673d418368ba68cd545237054b460cd314950..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockInSectorIncrDecr.~pas +++ /dev/null @@ -1,623 +0,0 @@ -unit ValueBlockInSectorIncrDecr; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, StdCtrls, ExtCtrls,Global,uFCoder1x; - -type - TfrmValueBlockInSectorIncDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockInSectorIncrDecr: TStatusBar; - pgValueBlockInSectorIncDecr: TPageControl; - tabValueBlockInSectorIncrement: TTabSheet; - pnlValueBlockInSectorIncrement: TPanel; - lblVBISIncrValue: TLabel; - lblVBISIncrBlockAddress: TLabel; - lblVBISIncr: TStaticText; - txtVBISIncrementValue: TEdit; - btnValueBlockInSectorIncrement: TButton; - txtVBISIncrBlockAddress: TEdit; - pnlValueBlockInSectorIncrementAKM1: TPanel; - lblVBISIncrAKM1: TStaticText; - pnlValueBlockInSectorIncrementAKM2: TPanel; - lblVBISIncrAKM2: TStaticText; - pnlValueBlockInSectorIncrementPK: TPanel; - lblVBISIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - pnlVBISDecrement: TPanel; - lblVBISDecrementValue: TLabel; - lblVBISDecBlockAddress: TLabel; - lblVBISDec: TStaticText; - txtVBISDecrementValue: TEdit; - btnValueBlockInSectorDecrement: TButton; - txtVBISDecrBlockAddress: TEdit; - pnlVBISDecrementAKM1: TPanel; - lblVBISDecAKM1: TStaticText; - pnlVBISDecrementAKM2: TPanel; - lblVBISDecAKM2: TStaticText; - pnlVBISDecrementPK: TPanel; - lblVBISDecPK: TStaticText; - lblVBISIncSectorAddress: TLabel; - txtVBISIncrSectorAddress: TEdit; - lblVBISIncrValueAKM1: TLabel; - lblVBISIncrBlockAddressAKM1: TLabel; - txtVBISIncrementValueAKM1: TEdit; - btnValueBlockInSectorIncrementAKM1: TButton; - txtVBISIncrBlockAddressAKM1: TEdit; - lblVBISIncSectorAddressAKM1: TLabel; - txtVBISIncrSectorAddressAKM1: TEdit; - lblVBISIncrValueAKM2: TLabel; - lblVBISIncrBlockAddressAKM2: TLabel; - txtVBISIncrementValueAKM2: TEdit; - btnValueBlockInSectorIncrementAKM2: TButton; - txtVBISIncrBlockAddressAKM2: TEdit; - lblVBISIncSectorAddressAKM2: TLabel; - txtVBISIncrSectorAddressAKM2: TEdit; - lblVBISIncrValuePK: TLabel; - lblVBISIncrBlockAddressPK: TLabel; - txtVBISIncrementValuePK: TEdit; - btnValueBlockInSectorIncrementPK: TButton; - txtVBISIncrBlockAddressPK: TEdit; - lblVBISIncSectorAddressPK: TLabel; - txtVBISIncrSectorAddressPK: TEdit; - lblVBISDecrSectorAddress: TLabel; - txtVBISDecrSectorAddress: TEdit; - lblVBISDecrementValueAKM1: TLabel; - lblVBISDecBlockAddressAKM1: TLabel; - txtVBISDecrementValueAKM1: TEdit; - btnValueBlockInSectorDecrementAKM1: TButton; - txtVBISDecrBlockAddressAKM1: TEdit; - lblVBISDecrSectorAddressAKM1: TLabel; - txtVBISDecrSectorAddressAKM1: TEdit; - lblVBISDecrementValueAKM2: TLabel; - lblVBISDecBlockAddressAKM2: TLabel; - txtVBISDecrementValueAKM2: TEdit; - btnValueBlockInSectorDecrementAKM2: TButton; - txtVBISDecrBlockAddressAKM2: TEdit; - lblVBISDecrSectorAddressAKM2: TLabel; - txtVBISDecrSectorAddressAKM2: TEdit; - lblVBISDecrementValuePK: TLabel; - lblVBISDecBlockAddressPK: TLabel; - txtVBISDecrementValuePK: TEdit; - btnValueBlockInSectorDecrementPK: TButton; - txtVBISDecrBlockAddressPK: TEdit; - lblVBISDecrSectorAddressPK: TLabel; - txtVBISDecrSectorAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockInSectorIncrementClick(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorIncrementPKClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementClick(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockInSectorDecrementPKClick(Sender: TObject); - - private - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockInSectorIncDecr: TfrmValueBlockInSectorIncDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockInSectorIncDecr.FormCreate(Sender: TObject); -begin - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockInSectorIncDecr.OnPKKeyPress(Sender: TObject; var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBISIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddress.Text); - - iFResult:=ValueBlockInSectorIncrement(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM1(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorIncrement_AKM2(iIncrement,bSectorAddress,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBISIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISIncrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISIncrSectorAddressPK.Text); - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorIncrement_PK(iIncrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddress.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBISDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddress.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddress.Text); - - iFResult:=ValueBlockInSectorDecrement(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM1.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM1.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM1.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM1(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBISDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressAKM2.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressAKM2.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressAKM2.Text); - - iFResult:=ValueBlockInSectorDecrement_AKM2(iDecrement,bSectorAddress,bBlockAddress,bAuthMode); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - - -end; - -procedure TfrmValueBlockInSectorIncDecr.btnValueBlockInSectorDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress, - bSectorAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; - -begin - try - if Trim(txtVBISDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtVBISDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrSectorAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the SECTOR_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrSectorAddressPK.SetFocus; - Exit; - end; - if Trim(txtVBISDecrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK_ADDRESS !',mtWarning,[mbOK],0); - txtVBISDecrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBISDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBISDecrBlockAddressPK.Text); - bSectorAddress :=StrToInt(txtVBISDecrSectorAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey:=@baPKKey; - - iFResult:=ValueBlockInSectorDecrement_PK(iDecrement,bSectorAddress,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockInSectorIncrDecr,iFResult); - end; - - - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.dcu b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.dcu deleted file mode 100644 index 52f863af160960e9614aaced696e1aea3b4f9fee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.dfm deleted file mode 100644 index 61c1b5958929738954038ba0854775c39f2af69b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.dfm +++ /dev/null @@ -1,881 +0,0 @@ -object frmValueBlockIncrDecr: TfrmValueBlockIncrDecr - Left = 343 - Top = 186 - Width = 529 - Height = 420 - Caption = 'ValueBlockIncr/Decr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment/Decrement(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockIncrDecr: TStatusBar - Left = 0 - Top = 362 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockIncDecr: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 305 - ActivePage = tavValueBlockIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockIncrement: TTabSheet - Caption = 'ValueBlock Increment' - object pnlValueBlockIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBIncrValue: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementClick - end - object txtVBIncrBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM1Click - end - object txtVBIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM2Click - end - object txtVBIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 94 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementPKClick - end - object txtVBIncrBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlock Decrement' - ImageIndex = 1 - object pnlVBDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDec: TStaticText - Left = 2 - Top = 2 - Width = 168 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementClick - end - object txtVBDecBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM1Click - end - object txtVBDecBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM2Click - end - object txtVBDecBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 98 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecPK: TStaticText - Left = 2 - Top = 2 - Width = 191 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementPKClick - end - object txtVBDecBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.pas deleted file mode 100644 index 67a8ae0bf3643cb944af84036515ecc1b76b3ea0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.pas +++ /dev/null @@ -1,542 +0,0 @@ -unit ValueBlockIncDec; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockIncrDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockIncrDecr: TStatusBar; - pgValueBlockIncDecr: TPageControl; - tavValueBlockIncrement: TTabSheet; - pnlValueBlockIncrement: TPanel; - lblVBIncrValue: TLabel; - lblVBIncrBlockAddress: TLabel; - lblVBIncr: TStaticText; - txtVBIncrementValue: TEdit; - btnValueBlockIncrement: TButton; - txtVBIncrBlockAddress: TEdit; - pnlValueBlockIncrAKM1: TPanel; - lblVBIncrAKM1: TStaticText; - pnlValueBlockIncrAKM2: TPanel; - lblVBIncrAKM2: TStaticText; - pnlValueBlockIncrPK: TPanel; - lblVBIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - lblVBIncrValueAKM1: TLabel; - lblVBIncrBlockAddressAKM1: TLabel; - txtVBIncrementValueAKM1: TEdit; - btnValueBlockIncrementAKM1: TButton; - txtVBIncrBlockAddressAKM1: TEdit; - lblVBIncrValueAKM2: TLabel; - lblVBIncrBlockAddressAKM2: TLabel; - txtVBIncrementValueAKM2: TEdit; - btnValueBlockIncrementAKM2: TButton; - txtVBIncrBlockAddressAKM2: TEdit; - lblVBIncrValuePK: TLabel; - lblVBIncrBlockAddressPK: TLabel; - txtVBIncrementValuePK: TEdit; - btnValueBlockIncrementPK: TButton; - txtVBIncrBlockAddressPK: TEdit; - pnlVBDecrement: TPanel; - lblVBDecrementValue: TLabel; - lblVBDecBlockAddress: TLabel; - lblVBDec: TStaticText; - txtVBDecrementValue: TEdit; - btnValueBlockDecrement: TButton; - txtVBDecBlockAddress: TEdit; - pnlVBDecrementAKM1: TPanel; - lblVBDecrementValueAKM1: TLabel; - lblVBDecBlockAddressAKM1: TLabel; - lblVBDecAKM1: TStaticText; - txtVBDecrementValueAKM1: TEdit; - btnValueBlockDecrementAKM1: TButton; - txtVBDecBlockAddressAKM1: TEdit; - pnlVBDecrementAKM2: TPanel; - lblVBDecrementValueAKM2: TLabel; - lblVBDecBlockAddressAKM2: TLabel; - lblVBDecAKM2: TStaticText; - txtVBDecrementValueAKM2: TEdit; - btnValueBlockDecrementAKM2: TButton; - txtVBDecBlockAddressAKM2: TEdit; - pnlVBDecrementPK: TPanel; - lblVBDecrementValuePK: TLabel; - lblVBDecBlockAddressPK: TLabel; - lblVBDecPK: TStaticText; - txtVBDecrementValuePK: TEdit; - btnValueBlockDecrementPK: TButton; - txtVBDecBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockIncrementClick(Sender: TObject); - procedure btnValueBlockIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockIncrementPKClick(Sender: TObject); - procedure btnValueBlockDecrementClick(Sender: TObject); - procedure btnValueBlockDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockDecrementPKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockIncrDecr: TfrmValueBlockIncrDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockIncrDecr.FormCreate(Sender: TObject); -begin - - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddress.Text); - - iFResult:=ValueBlockIncrement(iIncrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM1.Text); - - iFResult:=ValueBlockIncrement_AKM1(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM2.Text); - - iFResult:=ValueBlockIncrement_AKM2(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - - iFResult:=ValueBlockIncrement_PK(iIncrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddress.Text); - - iFResult:=ValueBlockDecrement(iDecrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM1.Text); - - iFResult:=ValueBlockDecrement_AKM1(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM2.Text); - - iFResult:=ValueBlockDecrement_AKM2(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressPK.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - iFResult:=ValueBlockDecrement_PK(iDecrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~ddp b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~dfm b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~dfm deleted file mode 100644 index b4551b90fe882109ffa2ec2af16d468cd4ac723d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~dfm +++ /dev/null @@ -1,881 +0,0 @@ -object frmValueBlockIncrDecr: TfrmValueBlockIncrDecr - Left = 343 - Top = 186 - Width = 529 - Height = 420 - Caption = 'ValueBlockIncr/Decr' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 27 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment/Decrement(AKM1,AKM2,PK)' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object pnlAuth: TPanel - Left = 0 - Top = 27 - Width = 513 - Height = 30 - Align = alTop - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - object lblKeyIndex: TLabel - Left = 176 - Top = 8 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblPKKey: TLabel - Left = 288 - Top = 8 - Width = 41 - Height = 13 - Caption = 'PK Key' - end - object rbAUTH1A: TRadioButton - Left = 11 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 93 - Top = 7 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Ctl3D = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object cboKeyIndex: TComboBox - Left = 240 - Top = 3 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - end - object stbValueBlockIncrDecr: TStatusBar - Left = 0 - Top = 363 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pgValueBlockIncDecr: TPageControl - Left = 0 - Top = 57 - Width = 513 - Height = 306 - ActivePage = tavValueBlockIncrement - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 3 - object tavValueBlockIncrement: TTabSheet - Caption = 'ValueBlock Increment' - object pnlValueBlockIncrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBIncrValue: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncr: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Increment' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementClick - end - object txtVBIncrBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBIncrValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM1: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM1Click - end - object txtVBIncrBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBIncrValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrAKM2: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementAKM2Click - end - object txtVBIncrBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlValueBlockIncrPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBIncrValuePK: TLabel - Left = 14 - Top = 39 - Width = 95 - Height = 13 - Caption = 'Increment Value' - end - object lblVBIncrBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBIncrPK: TStaticText - Left = 2 - Top = 2 - Width = 246 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockIncrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBIncrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 24 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockIncrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'INCREMENT' - TabOrder = 2 - OnClick = btnValueBlockIncrementPKClick - end - object txtVBIncrBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 26 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - object tabValueBlockDecrement: TTabSheet - Caption = 'ValueBlock Decrement' - ImageIndex = 1 - object pnlVBDecrement: TPanel - Left = 3 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object lblVBDecrementValue: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddress: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDec: TStaticText - Left = 2 - Top = 2 - Width = 168 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlock Decrement' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValue: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrement: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementClick - end - object txtVBDecBlockAddress: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM1: TPanel - Left = 262 - Top = 2 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object lblVBDecrementValueAKM1: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM1: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM1: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM1' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM1: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM1: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM1Click - end - object txtVBDecBlockAddressAKM1: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementAKM2: TPanel - Left = 3 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object lblVBDecrementValueAKM2: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressAKM2: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecAKM2: TStaticText - Left = 2 - Top = 2 - Width = 213 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_AKM2' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValueAKM2: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementAKM2: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementAKM2Click - end - object txtVBDecBlockAddressAKM2: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - object pnlVBDecrementPK: TPanel - Left = 262 - Top = 142 - Width = 252 - Height = 138 - BevelInner = bvRaised - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 3 - object lblVBDecrementValuePK: TLabel - Left = 14 - Top = 39 - Width = 99 - Height = 13 - Caption = 'Decrement Value' - end - object lblVBDecBlockAddressPK: TLabel - Left = 14 - Top = 69 - Width = 81 - Height = 13 - Caption = 'Block Address' - end - object lblVBDecPK: TStaticText - Left = 2 - Top = 2 - Width = 191 - Height = 20 - Align = alTop - Alignment = taCenter - BorderStyle = sbsSingle - Caption = 'ValueBlockDecrement_PK' - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object txtVBDecrementValuePK: TEdit - Left = 119 - Top = 36 - Width = 119 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - end - object btnValueBlockDecrementPK: TButton - Left = 13 - Top = 93 - Width = 225 - Height = 33 - Cursor = crHandPoint - Caption = 'DECREMENT' - TabOrder = 2 - OnClick = btnValueBlockDecrementPKClick - end - object txtVBDecBlockAddressPK: TEdit - Left = 119 - Top = 62 - Width = 38 - Height = 21 - Ctl3D = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - end - end - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~pas b/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~pas deleted file mode 100644 index 29885285f0d0e6a3198fa83427be990ed1370e43..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ValueBlockIncDec.~pas +++ /dev/null @@ -1,542 +0,0 @@ -unit ValueBlockIncDec; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs,uFCoder1x,Global, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmValueBlockIncrDecr = class(TForm) - lblHeader: TStaticText; - pnlAuth: TPanel; - lblKeyIndex: TLabel; - lblPKKey: TLabel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - cboKeyIndex: TComboBox; - stbValueBlockIncrDecr: TStatusBar; - pgValueBlockIncDecr: TPageControl; - tavValueBlockIncrement: TTabSheet; - pnlValueBlockIncrement: TPanel; - lblVBIncrValue: TLabel; - lblVBIncrBlockAddress: TLabel; - lblVBIncr: TStaticText; - txtVBIncrementValue: TEdit; - btnValueBlockIncrement: TButton; - txtVBIncrBlockAddress: TEdit; - pnlValueBlockIncrAKM1: TPanel; - lblVBIncrAKM1: TStaticText; - pnlValueBlockIncrAKM2: TPanel; - lblVBIncrAKM2: TStaticText; - pnlValueBlockIncrPK: TPanel; - lblVBIncrPK: TStaticText; - tabValueBlockDecrement: TTabSheet; - lblVBIncrValueAKM1: TLabel; - lblVBIncrBlockAddressAKM1: TLabel; - txtVBIncrementValueAKM1: TEdit; - btnValueBlockIncrementAKM1: TButton; - txtVBIncrBlockAddressAKM1: TEdit; - lblVBIncrValueAKM2: TLabel; - lblVBIncrBlockAddressAKM2: TLabel; - txtVBIncrementValueAKM2: TEdit; - btnValueBlockIncrementAKM2: TButton; - txtVBIncrBlockAddressAKM2: TEdit; - lblVBIncrValuePK: TLabel; - lblVBIncrBlockAddressPK: TLabel; - txtVBIncrementValuePK: TEdit; - btnValueBlockIncrementPK: TButton; - txtVBIncrBlockAddressPK: TEdit; - pnlVBDecrement: TPanel; - lblVBDecrementValue: TLabel; - lblVBDecBlockAddress: TLabel; - lblVBDec: TStaticText; - txtVBDecrementValue: TEdit; - btnValueBlockDecrement: TButton; - txtVBDecBlockAddress: TEdit; - pnlVBDecrementAKM1: TPanel; - lblVBDecrementValueAKM1: TLabel; - lblVBDecBlockAddressAKM1: TLabel; - lblVBDecAKM1: TStaticText; - txtVBDecrementValueAKM1: TEdit; - btnValueBlockDecrementAKM1: TButton; - txtVBDecBlockAddressAKM1: TEdit; - pnlVBDecrementAKM2: TPanel; - lblVBDecrementValueAKM2: TLabel; - lblVBDecBlockAddressAKM2: TLabel; - lblVBDecAKM2: TStaticText; - txtVBDecrementValueAKM2: TEdit; - btnValueBlockDecrementAKM2: TButton; - txtVBDecBlockAddressAKM2: TEdit; - pnlVBDecrementPK: TPanel; - lblVBDecrementValuePK: TLabel; - lblVBDecBlockAddressPK: TLabel; - lblVBDecPK: TStaticText; - txtVBDecrementValuePK: TEdit; - btnValueBlockDecrementPK: TButton; - txtVBDecBlockAddressPK: TEdit; - procedure FormCreate(Sender: TObject); - procedure btnValueBlockIncrementClick(Sender: TObject); - procedure btnValueBlockIncrementAKM1Click(Sender: TObject); - procedure btnValueBlockIncrementAKM2Click(Sender: TObject); - procedure btnValueBlockIncrementPKClick(Sender: TObject); - procedure btnValueBlockDecrementClick(Sender: TObject); - procedure btnValueBlockDecrementAKM1Click(Sender: TObject); - procedure btnValueBlockDecrementAKM2Click(Sender: TObject); - procedure btnValueBlockDecrementPKClick(Sender: TObject); - private - - procedure OnPKKeyPress(Sender:TObject;var Key:Char); - procedure OnPKKeyExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmValueBlockIncrDecr: TfrmValueBlockIncrDecr; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmValueBlockIncrDecr.FormCreate(Sender: TObject); -begin - - CreateKey(self,21,30,4,333,pnlAuth,'txtPKKey',false,OnPKKeyPress,OnPKKeyExit); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyExit(Sender: TObject); -begin - OnPK_KEY_Exit(Sender); -end; -procedure TfrmValueBlockIncrDecr.OnPKKeyPress(Sender: TObject;var Key: Char); -begin - if (Key in ['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValue.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iIncrement :=StrToInt(txtVBIncrementValue.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddress.Text); - - iFResult:=ValueBlockIncrement(iIncrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM1.Text); - - iFResult:=ValueBlockIncrement_AKM1(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressAKM2.Text); - - iFResult:=ValueBlockIncrement_AKM2(iIncrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockIncrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iIncrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBIncrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the INCREMENT VALUE !',mtWarning,[mbOK],0); - txtVBIncrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBIncrBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBIncrBlockAddressPK.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iIncrement :=StrToInt(txtVBIncrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBIncrBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - pPKKey :=@baPKKey; - - iFResult:=ValueBlockIncrement_PK(iIncrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementClick(Sender: TObject); -var - bAuthMode, - bKeyIndex :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValue.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValue.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddress.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - bKeyIndex :=cboKeyIndex.ItemIndex; - iDecrement :=StrToInt(txtVBDecrementValue.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddress.Text); - - iFResult:=ValueBlockDecrement(iDecrement,bBlockAddress,bAuthMode,bKeyIndex); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM1Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM1.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM1.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM1.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM1.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM1.Text); - - iFResult:=ValueBlockDecrement_AKM1(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementAKM2Click(Sender: TObject); -var - bAuthMode :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValueAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValueAKM2.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressAKM2.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressAKM2.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValueAKM2.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressAKM2.Text); - - iFResult:=ValueBlockDecrement_AKM2(iDecrement,bBlockAddress,bAuthMode); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - frmuFrAdvanced.FunctionStart:=false; - end; - -end; - -procedure TfrmValueBlockIncrDecr.btnValueBlockDecrementPKClick(Sender: TObject); -var - baPKKey :array[0..5] of Byte; - pPKKey :PByte; - bAuthMode, - bBr :Byte; - bBlockAddress :Byte; - iDecrement :Longint; - iFResult :DL_STATUS; -begin - try - if Trim(txtVBDecrementValuePK.Text)=EmptyStr then - begin - MessageDlg('You must enter the DECREMENT VALUE !',mtWarning,[mbOK],0); - txtVBDecrementValuePK.SetFocus; - Exit; - end; - if Trim(txtVBDecBlockAddressPK.Text)=EmptyStr then - begin - MessageDlg('You must enter the BLOCK ADDRESS !',mtWarning,[mbOK],0); - txtVBDecBlockAddressPK.SetFocus; - Exit; - end; - - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtWarning,[mbOK],0); - end; - - if frmuFrAdvanced.FunctionStart or frmuFrAdvanced.ReaderStart then Exit; - try - frmuFrAdvanced.FunctionStart := true; - New(pPKKey); - bAuthMode :=AuthMode(rbAUTH1A); - iDecrement :=StrToInt(txtVBDecrementValuePK.Text); - bBlockAddress :=StrToInt(txtVBDecBlockAddressPK.Text); - - for bBr:=0 to 5 do - baPKKey[bBr]:=StrToInt(TEdit(FindComponent('txtPKKey'+IntToStr(bBr+1))).Text); - - pPKKey :=@baPKKey; - iFResult:=ValueBlockDecrement_PK(iDecrement,bBlockAddress,bAuthMode,pPKKey); - - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbValueBlockIncrDecr,iFResult); - end; - finally - pPKKey:=nil; - Dispose(pPKKey); - frmuFrAdvanced.FunctionStart:=false; - end; -end; - - - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.dcu b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.dcu deleted file mode 100644 index 094ccfacc3b98767f3d9e3a37183bb609af5c697..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.ddp b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.dfm b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.dfm deleted file mode 100644 index 4e284ef507b8fe3d4fd6e97c1421906566d0510f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.dfm +++ /dev/null @@ -1,198 +0,0 @@ -object frmViewAll: TfrmViewAll - Left = 329 - Top = 138 - Width = 529 - Height = 436 - Caption = 'ViewAll' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - DesignSize = ( - 513 - 397) - PixelsPerInch = 96 - TextHeight = 13 - object lblKeyIndex: TLabel - Left = 159 - Top = 318 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'View All' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbViewAll: TStatusBar - Left = 0 - Top = 378 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object sgrdViewAll: TStringGrid - Left = 0 - Top = 26 - Width = 513 - Height = 277 - Cursor = crHandPoint - Ctl3D = True - DefaultColWidth = 40 - DefaultRowHeight = 20 - RowCount = 2 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - OnDrawCell = sgrdViewAllDrawCell - end - object rbHexView: TRadioButton - Left = 271 - Top = 343 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'HEX' - TabOrder = 3 - end - object btnReadData: TButton - Left = 331 - Top = 316 - Width = 177 - Height = 41 - Cursor = crHandPoint - Anchors = [akLeft, akBottom] - Caption = 'READ DATA' - TabOrder = 4 - OnClick = btnReadDataClick - end - object cboKeyIndex: TComboBox - Left = 168 - Top = 338 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object pbBar: TProgressBar - Left = 331 - Top = 361 - Width = 177 - Height = 13 - BorderWidth = 1 - Smooth = True - TabOrder = 6 - Visible = False - end - object rbgrpRadioButtonGroup: TRadioGroup - Left = 8 - Top = 305 - Width = 97 - Height = 61 - ItemIndex = 0 - Items.Strings = ( - 'AUTH 1A' - 'AUTH 1B') - TabOrder = 7 - end - object rbAscii: TRadioButton - Left = 271 - Top = 316 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'ASCII' - Checked = True - TabOrder = 8 - TabStop = True - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.pas b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.pas deleted file mode 100644 index 63d7719dd848334d0549d95c5fcd174dec99d5d0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.pas +++ /dev/null @@ -1,273 +0,0 @@ -unit ViewAll; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder, - Grids, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmViewAll = class(TForm) - lblHeader: TStaticText; - stbViewAll: TStatusBar; - sgrdViewAll: TStringGrid; - rbHexView: TRadioButton; - btnReadData: TButton; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - pbBar: TProgressBar; - rbgrpRadioButtonGroup: TRadioGroup; - rbAscii: TRadioButton; - procedure sgrdViewAllDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState); - procedure btnReadDataClick(Sender: TObject); - private - procedure Draw1k4kGrid; - procedure Draw1k4kCardData; - procedure DrawNTAGCardData; - public - { Public declarations } - end; - -var - frmViewAll: TfrmViewAll; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmViewAll.Draw1k4kGrid; -var - bBr :Byte; -begin - - with sgrdViewAll do - begin - ColCount := 19; - // FixedRows := 3; - Cells[0, 0] := 'S'; - Cells[1, 0] := 'BiS'; - Cells[2, 0] := 'Blo'; - for bBr := 0 to 15 do - Cells[bBr + 3, 0] := IntToStr(bBr); - end; - -end; - -procedure TfrmViewAll.sgrdViewAllDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState); -begin - if sgrdViewAll.Cells[0,aRow]='SCT' then - begin - with sgrdViewAll.Canvas do - begin - Brush.Color := $02aaaaaa; - FillRect(Rect); - Font.Color := clBlack; - TextOut(Rect.Left+2,Rect.Top+2,sgrdViewAll.Cells[aCol,aRow]); - end; -end; -end; - - -procedure TfrmViewAll.btnReadDataClick(Sender: TObject); -var - cardType:Byte; -begin - cardType:=frmuFrAdvanced.bDLCardType; - if (cardType = DL_NTAG_203) or (cardType = DL_MIFARE_ULTRALIGHT) or - (cardType = DL_MIFARE_ULTRALIGHT_C) then - DrawNTAGCardData - else - if (cardType = DL_MIFARE_CLASSIC_1K) or (cardType = DL_MIFARE_CLASSIC_4K) or - (cardType = DL_MIFARE_PLUS_S_4K) then - Draw1k4kCardData; -end; - -procedure TfrmViewAll.Draw1k4kCardData; -var - chaBlockData :array[0..15] of Char; - pData :PByte; - bBlockCount :Integer; - bBISCounter, - bBISCount, - bBr, - bSectorsCounter :Byte; - iMaxBlocks :Integer; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - try - frmuFrAdvanced.FunctionStart := true; - Draw1k4kGrid; - bSectorsCounter :=0; - bBISCount :=0; - bBISCounter :=3; - bBlockCount :=0; - New(pData); - bKeyIndex :=cboKeyIndex.ItemIndex; - iMaxBlocks :=MaxBlocks(); - pbBar.Max :=iMaxBlocks; - pbBar.Visible :=true; - - if rbgrpRadioButtonGroup.ItemIndex=0 then bAuthMode :=MIFARE_AUTHENT1A - else - bAuthMode :=MIFARE_AUTHENT1B; - - sgrdViewAll.RowCount:=iMaxBlocks+1; - - while bBlockCount=31) and (bBlockCount mod 16 =0) then - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - bBISCounter:=15; - end - else - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - end; - end; - sgrdViewAll.Repaint; - if iFResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - pbBar.Visible := false; - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmViewAll.DrawNTAGCardData; -var - pData :PByte; - pPKKey :PByte; - pageData :array[0..10] of Byte; - authMode :Byte; - blockAddress :Byte; - bCounter,i :Byte; - maxBlock :integer; - bAuthMode, - bKeyIndex :Byte; - fnResult :DL_STATUS; -begin - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - - try - frmuFrAdvanced.FunctionStart := true; - maxBlock := MaxBlocks(); - - with sgrdViewAll do - begin - FixedCols :=1; - FixedRows :=1; - ColCount :=5; - RowCount :=maxBlock-2; - DefaultColWidth:=35; - Cells[0,0] :='PAGE'; - for i:=1 to 4 do - Cells[i,0]:=IntToStr(i); - end; - New(pData); - if rbgrpRadioButtonGroup.ItemIndex=0 then - authMode :=MIFARE_AUTHENT1A - else - authMode :=MIFARE_AUTHENT1B; - - bKeyIndex :=StrToInt(cboKeyIndex.Text); - pbBar.Visible :=true; - pbBar.Max :=maxBlock+2; - bcounter :=4; - while (bcounter<=maxBlock) do - begin - pData := PByte(@pageData); - fnResult := BlockRead(pData,bcounter,authMode,bKeyIndex); - if not fnResult = DL_OK then break; - - sgrdViewAll.Cells[0,bcounter-3] := IntToStr(bcounter); - for i:=0 to 3 do - begin - if rbHexView.Checked then - sgrdViewAll.Cells[i+1,bcounter-3]:='$'+IntToHex(Byte(pageData[i]),2) - else - sgrdViewAll.Cells[i+1,bcounter-3]:=chr(pageData[i]); - end; - - pbBar.Position:=bcounter; - Application.ProcessMessages; - Inc(bcounter); - end; - if fnResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,fnResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,fnResult); - end; - finally - pbBar.Visible:=false; - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart := false; - end; - -end; - - - -end. - diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~ddp b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~dfm b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~dfm deleted file mode 100644 index 80567daba668600a0837133b174e1466c5f9d7d0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~dfm +++ /dev/null @@ -1,198 +0,0 @@ -object frmViewAll: TfrmViewAll - Left = 329 - Top = 138 - Width = 529 - Height = 436 - Caption = 'ViewAll' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - OldCreateOrder = False - DesignSize = ( - 513 - 398) - PixelsPerInch = 96 - TextHeight = 13 - object lblKeyIndex: TLabel - Left = 159 - Top = 318 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object lblHeader: TStaticText - Left = 0 - Top = 0 - Width = 513 - Height = 26 - Align = alTop - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSingle - Caption = 'View All' - Color = clWhite - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object stbViewAll: TStatusBar - Left = 0 - Top = 379 - Width = 513 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 109 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object sgrdViewAll: TStringGrid - Left = 0 - Top = 26 - Width = 513 - Height = 277 - Cursor = crHandPoint - Ctl3D = True - DefaultColWidth = 40 - DefaultRowHeight = 20 - RowCount = 2 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing] - ParentCtl3D = False - ParentFont = False - TabOrder = 2 - OnDrawCell = sgrdViewAllDrawCell - end - object rbHexView: TRadioButton - Left = 271 - Top = 343 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'HEX' - TabOrder = 3 - end - object btnReadData: TButton - Left = 331 - Top = 316 - Width = 177 - Height = 41 - Cursor = crHandPoint - Anchors = [akLeft, akBottom] - Caption = 'READ DATA' - TabOrder = 4 - OnClick = btnReadDataClick - end - object cboKeyIndex: TComboBox - Left = 168 - Top = 338 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 5 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object pbBar: TProgressBar - Left = 331 - Top = 361 - Width = 177 - Height = 13 - BorderWidth = 1 - Smooth = True - TabOrder = 6 - Visible = False - end - object rbgrpRadioButtonGroup: TRadioGroup - Left = 8 - Top = 305 - Width = 97 - Height = 61 - ItemIndex = 0 - Items.Strings = ( - 'AUTH 1A' - 'AUTH 1B') - TabOrder = 7 - end - object rbAscii: TRadioButton - Left = 271 - Top = 316 - Width = 54 - Height = 16 - Cursor = crHandPoint - Caption = 'ASCII' - Checked = True - TabOrder = 8 - TabStop = True - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~pas b/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~pas deleted file mode 100644 index 0fb5b595633a2abf07d2e635fcf3a8cd37fac105..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/ViewAll.~pas +++ /dev/null @@ -1,273 +0,0 @@ -unit ViewAll; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Global,uFCoder1x, - Grids, ComCtrls, StdCtrls, ExtCtrls; - -type - TfrmViewAll = class(TForm) - lblHeader: TStaticText; - stbViewAll: TStatusBar; - sgrdViewAll: TStringGrid; - rbHexView: TRadioButton; - btnReadData: TButton; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - pbBar: TProgressBar; - rbgrpRadioButtonGroup: TRadioGroup; - rbAscii: TRadioButton; - procedure sgrdViewAllDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState); - procedure btnReadDataClick(Sender: TObject); - private - procedure Draw1k4kGrid; - procedure Draw1k4kCardData; - procedure DrawNTAGCardData; - public - { Public declarations } - end; - -var - frmViewAll: TfrmViewAll; - -implementation -uses - uFAdvanced; -{$R *.dfm} - -procedure TfrmViewAll.Draw1k4kGrid; -var - bBr :Byte; -begin - - with sgrdViewAll do - begin - ColCount := 19; - // FixedRows := 3; - Cells[0, 0] := 'S'; - Cells[1, 0] := 'BiS'; - Cells[2, 0] := 'Blo'; - for bBr := 0 to 15 do - Cells[bBr + 3, 0] := IntToStr(bBr); - end; - -end; - -procedure TfrmViewAll.sgrdViewAllDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState); -begin - if sgrdViewAll.Cells[0,aRow]='SCT' then - begin - with sgrdViewAll.Canvas do - begin - Brush.Color := $02aaaaaa; - FillRect(Rect); - Font.Color := clBlack; - TextOut(Rect.Left+2,Rect.Top+2,sgrdViewAll.Cells[aCol,aRow]); - end; -end; -end; - - -procedure TfrmViewAll.btnReadDataClick(Sender: TObject); -var - cardType:Byte; -begin - cardType:=frmuFrAdvanced.bDLCardType; - if (cardType = uFCoder1x.DL_NTAG_203) or (cardType = uFCoder1x.DL_MIFARE_ULTRALIGHT) or - (cardType = uFCoder1x.DL_MIFARE_ULTRALIGHT_C) then - DrawNTAGCardData - else - if (cardType = uFCoder1x.DL_MIFARE_CLASSIC_1K) or (cardType = uFCoder1x.DL_MIFARE_CLASSIC_4K) or - (cardType = uFCoder1x.DL_MIFARE_PLUS_S_4K) then - Draw1k4kCardData; -end; - -procedure TfrmViewAll.Draw1k4kCardData; -var - chaBlockData :array[0..15] of Char; - pData :PByte; - bBlockCount :Integer; - bBISCounter, - bBISCount, - bBr, - bSectorsCounter :Byte; - iMaxBlocks :Integer; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - try - frmuFrAdvanced.FunctionStart := true; - Draw1k4kGrid; - bSectorsCounter :=0; - bBISCount :=0; - bBISCounter :=3; - bBlockCount :=0; - New(pData); - bKeyIndex :=cboKeyIndex.ItemIndex; - iMaxBlocks :=MaxBlocks(); - pbBar.Max :=iMaxBlocks; - pbBar.Visible :=true; - - if rbgrpRadioButtonGroup.ItemIndex=0 then bAuthMode :=MIFARE_AUTHENT1A - else - bAuthMode :=MIFARE_AUTHENT1B; - - sgrdViewAll.RowCount:=iMaxBlocks+1; - - while bBlockCount=31) and (bBlockCount mod 16 =0) then - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - bBISCounter:=15; - end - else - begin - for bBr:=0 to 2 do - begin - sgrdViewAll.Cells[bBr,bBlockCount]:='SCT'; - end; - Inc(bSectorsCounter); - end; - end; - sgrdViewAll.Repaint; - if iFResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,iFResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,iFResult); - end; - finally - pData:=nil; - Dispose(pData); - pbBar.Visible := false; - frmuFrAdvanced.FunctionStart:=false; - end; -end; - -procedure TfrmViewAll.DrawNTAGCardData; -var - pData :PByte; - pPKKey :PByte; - pageData :array[0..10] of Byte; - authMode :Byte; - blockAddress :Byte; - bCounter,i :Byte; - maxBlock :integer; - bAuthMode, - bKeyIndex :Byte; - fnResult :DL_STATUS; -begin - if (frmuFrAdvanced.FunctionStart) or (frmuFrAdvanced.ReaderStart) then Exit; - - try - frmuFrAdvanced.FunctionStart := true; - maxBlock := MaxBlocks(); - - with sgrdViewAll do - begin - FixedCols :=1; - FixedRows :=1; - ColCount :=5; - RowCount :=maxBlock-2; - DefaultColWidth:=35; - Cells[0,0] :='PAGE'; - for i:=1 to 4 do - Cells[i,0]:=IntToStr(i); - end; - New(pData); - if rbgrpRadioButtonGroup.ItemIndex=0 then - authMode :=MIFARE_AUTHENT1A - else - authMode :=MIFARE_AUTHENT1B; - - bKeyIndex :=StrToInt(cboKeyIndex.Text); - pbBar.Visible :=true; - pbBar.Max :=maxBlock+2; - bcounter :=4; - while (bcounter<=maxBlock) do - begin - pData := PByte(@pageData); - fnResult := BlockRead(pData,bcounter,authMode,bKeyIndex); - if not fnResult = DL_OK then break; - - sgrdViewAll.Cells[0,bcounter-3] := IntToStr(bcounter); - for i:=0 to 3 do - begin - if rbHexView.Checked then - sgrdViewAll.Cells[i+1,bcounter-3]:='$'+IntToHex(Byte(pageData[i]),2) - else - sgrdViewAll.Cells[i+1,bcounter-3]:=chr(pageData[i]); - end; - - pbBar.Position:=bcounter; - Application.ProcessMessages; - Inc(bcounter); - end; - if fnResult=DL_OK then - begin - ReaderUiSignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbViewAll,fnResult); - end - else - begin - ReaderUiSignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbViewAll,fnResult); - end; - finally - pbBar.Visible:=false; - pData :=nil; - Dispose(pData); - frmuFrAdvanced.FunctionStart := false; - end; - -end; - - - -end. - diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.dcu b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.dcu deleted file mode 100644 index 865a4f026ca84f353557b7ce6b10a75a4d37723f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.ddp b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.dfm b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.dfm deleted file mode 100644 index 1c5c97dd910ce0461fcfcaacd66930540c1ca726..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.dfm +++ /dev/null @@ -1,523 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 639 - Top = 184 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advance' - ClientHeight = 668 - ClientWidth = 541 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poDesktopCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 541 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 37 - Top = 16 - Width = 72 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 37 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 292 - Top = 16 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 293 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 504 - Height = 5 - end - object lblLightMode: TLabel - Left = 41 - Top = 82 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 41 - Top = 105 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 421 - Top = 17 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 539 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 133 - Top = 78 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 1 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 133 - Top = 102 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 2 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 276 - Top = 79 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 3 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 392 - Top = 77 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 4 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 392 - Top = 101 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 5 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 39 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 6 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - object txtReaderType: TEdit - Left = 126 - Top = 15 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 7 - end - object txtReaderSerial: TEdit - Left = 126 - Top = 39 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - object txtCardType: TEdit - Left = 369 - Top = 14 - Width = 33 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 480 - Top = 14 - Width = 33 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 10 - end - object txtCardSerial: TEdit - Left = 369 - Top = 38 - Width = 144 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 541 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuReaderHardwareFirmwareversionItem: TMenuItem - Caption = 'Reader Hardware/Firmware version' - OnClick = mnuReaderHardwareFirmwareversionItemClick - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.pas b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.pas deleted file mode 100644 index 95b36e160d9ffb33974ed8d722f3a66d6f3335f4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.pas +++ /dev/null @@ -1,476 +0,0 @@ - -unit uFAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - lblReaderSerial: TLabel; - lblCardType: TLabel; - lblCardSerial: TLabel; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - lblCardUIDSize: TLabel; - txtReaderType: TEdit; - txtReaderSerial: TEdit; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - txtCardSerial: TEdit; - mnuReaderHardwareFirmwareversionItem: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); - private - boCONN, - boFunctionStart, - boReaderStart :Boolean; - procedure MainLoop; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - - procedure SetMenuItems(const aValue:Boolean); //set menu items (enabled ?) - function GetFunctStart: Boolean; - function GetReaderStart: Boolean; - public - bDLCardType:Byte; - procedure SetFunctStart(const Value: Boolean); - procedure SetReaderStart(const Value: Boolean); - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - pUserData :PByte; - iFResult :DL_STATUS; -begin - if (txtNewUserData.Text=EmptyStr) then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(pUserData); - - pUserData:=PByte(txtNewUserData.Text); - iFResult :=WriteUserData(pUserData); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end - else - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end; - finally - pUserData:=nil; - Dispose(pUserData); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - bCounter :Byte; - PReaderKey :PByte; - bKeyIndex :Byte; - baReaderKey:array[0..5] of Byte; - s:string; - iFResult :DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - bKeyIndex:=cboKeyIndex.ItemIndex; - New(PReaderKey); - for bCounter:=0 to 5 do - begin - if chkReaderHex.Checked then - baReaderKey[bCounter]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text) - else - baReaderKey[bCounter]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text); - end; - PReaderKey:=@baReaderKey; - iFResult :=ReaderKeyWrite(PReaderKey,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbReader,iFResult); - end - else - begin - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbReader,iFResult); - end; - finally - SetFunctStart(false); - PReaderKey:=nil; - Dispose(PReaderKey); - end; -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderSoftRestart(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderReset(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.MainLoop; -var - iRResult, - iCResult, - iReaderType, - iReaderSerial, - iCardSerial, - iUDResult :DL_STATUS; - bCardUIDSize, - bCardType, - bBr :Byte; - caUserData :array[0..16] of Char; - baCardUID :array[0..9] of Byte; - pUserData :PByte; - sBuffer :string; -begin - SetReaderStart(true); - sBuffer:=''; - New(pUserData); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - SetStatusBar(stbReader,iRResult); - end; - end; - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult); - end - else - begin - boCONN:=false; - ReaderClose(); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - SetStatusBar(stbReader,iRResult); - end; - - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=DL_NTAG_216 then - SetMenuItems(false) - else - SetMenuItems(true); - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize -1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial.Text :='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - SetMenuItems(true); - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - SetStatusBar(stbCard,iCResult); - end; - - pUserData:=PByte(@caUserData); - iUDResult:=ReadUserData(pUserData); - if iUDResult=DL_OK then - txtUserData.Text:=String(caUserData) - else - txtUserData.Text:=#0; - end; - SetReaderStart(false); - pUserData:=0; - FreeAndNil(pUserData); -end; - -function TfrmuFrAdvanced.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -function TfrmuFrAdvanced.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrAdvanced.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -procedure TfrmuFrAdvanced.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - - - - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - if FunctionStart then Exit; - MainLoop; -end; - -procedure TfrmuFrAdvanced.mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); -var - bRHMajor, - bRHMinor, - bRFMajor, - bRFMinor : Byte; -begin - GetReaderHardwareVersion(bRHMajor,bRHMinor); - GetReaderFirmwareVersion(bRFMajor,bRFMinor); - MessageDlg('Hardware version : ' + IntToStr(bRHMajor) + '.' + IntToStr(bRHMinor) +#13+ - 'Firmware version : ' + IntToStr(bRFMajor) + '.' + IntToStr(bRFMinor),mtInformation,[mbOK],0); - -end; - -procedure TfrmuFrAdvanced.SetMenuItems(const aValue: Boolean); -begin - mnuValueBlockReadWriteItem.Enabled :=aValue; - mnuValueBlockIncrementDecrementItem.Enabled :=aValue; - mnuBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorIncrDecrItems.Enabled :=aValue; - mnuLinearFormatCardItem.Enabled :=aValue; - mnuSectorTrailerWriteItem.Enabled :=aValue; -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~ddp b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~dfm b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~dfm deleted file mode 100644 index b82cc69f374d98023963edd36936bef40f721b32..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~dfm +++ /dev/null @@ -1,523 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 331 - Top = 3 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advance' - ClientHeight = 668 - ClientWidth = 541 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poDesktopCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 541 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 37 - Top = 16 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 37 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 292 - Top = 16 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 293 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 504 - Height = 5 - end - object lblLightMode: TLabel - Left = 41 - Top = 82 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 41 - Top = 105 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 421 - Top = 17 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 539 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 133 - Top = 78 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 1 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 133 - Top = 102 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 2 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 276 - Top = 79 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 3 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 392 - Top = 77 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 4 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 392 - Top = 101 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 5 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 39 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 6 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - object txtReaderType: TEdit - Left = 126 - Top = 15 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 7 - end - object txtReaderSerial: TEdit - Left = 126 - Top = 39 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - object txtCardType: TEdit - Left = 369 - Top = 14 - Width = 33 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 480 - Top = 14 - Width = 33 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 10 - end - object txtCardSerial: TEdit - Left = 369 - Top = 38 - Width = 144 - Height = 19 - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 541 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuReaderHardwareFirmwareversionItem: TMenuItem - Caption = 'Reader Hardware/Firmware version' - OnClick = mnuReaderHardwareFirmwareversionItemClick - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~pas b/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~pas deleted file mode 100644 index 93adf920bb78f48e1748729c0cd0e087b8cda40d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFAdvanced.~pas +++ /dev/null @@ -1,476 +0,0 @@ - -unit uFAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder1x, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - lblReaderSerial: TLabel; - lblCardType: TLabel; - lblCardSerial: TLabel; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - lblCardUIDSize: TLabel; - txtReaderType: TEdit; - txtReaderSerial: TEdit; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - txtCardSerial: TEdit; - mnuReaderHardwareFirmwareversionItem: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); - private - boCONN, - boFunctionStart, - boReaderStart :Boolean; - procedure MainLoop; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - - procedure SetMenuItems(const aValue:Boolean); //set menu items (enabled ?) - function GetFunctStart: Boolean; - function GetReaderStart: Boolean; - public - bDLCardType:Byte; - procedure SetFunctStart(const Value: Boolean); - procedure SetReaderStart(const Value: Boolean); - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - pUserData :PByte; - iFResult :DL_STATUS; -begin - if (txtNewUserData.Text=EmptyStr) then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(pUserData); - - pUserData:=PByte(txtNewUserData.Text); - iFResult :=WriteUserData(pUserData); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end - else - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - end; - finally - pUserData:=nil; - Dispose(pUserData); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - bCounter :Byte; - PReaderKey :PByte; - bKeyIndex :Byte; - baReaderKey:array[0..5] of Byte; - s:string; - iFResult :DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - bKeyIndex:=cboKeyIndex.ItemIndex; - New(PReaderKey); - for bCounter:=0 to 5 do - begin - if chkReaderHex.Checked then - baReaderKey[bCounter]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text) - else - baReaderKey[bCounter]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(bCounter+1))).Text); - end; - PReaderKey:=@baReaderKey; - iFResult :=ReaderKeyWrite(PReaderKey,bKeyIndex); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbReader,iFResult); - end - else - begin - ReaderUISignal(FERROR_LIGHT,FERROR_SOUND); - SetStatusBar(stbReader,iFResult); - end; - finally - SetFunctStart(false); - PReaderKey:=nil; - Dispose(PReaderKey); - end; -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderSoftRestart(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderReset(); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrAdvanced.MainLoop; -var - iRResult, - iCResult, - iReaderType, - iReaderSerial, - iCardSerial, - iUDResult :DL_STATUS; - bCardUIDSize, - bCardType, - bBr :Byte; - caUserData :array[0..16] of Char; - baCardUID :array[0..9] of Byte; - pUserData :PByte; - sBuffer :string; -begin - SetReaderStart(true); - sBuffer:=''; - New(pUserData); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - SetStatusBar(stbReader,iRResult); - end; - end; - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult); - end - else - begin - boCONN:=false; - ReaderClose(); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - txtUserData .Clear; - txtNewUserData .Clear; - SetStatusBar(stbReader,iRResult); - end; - - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder1x.DL_NTAG_216 then - SetMenuItems(false) - else - SetMenuItems(true); - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize -1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial.Text :='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - SetMenuItems(true); - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - SetStatusBar(stbCard,iCResult); - end; - - pUserData:=PByte(@caUserData); - iUDResult:=ReadUserData(pUserData); - if iUDResult=DL_OK then - txtUserData.Text:=String(caUserData) - else - txtUserData.Text:=#0; - end; - SetReaderStart(false); - pUserData:=0; - FreeAndNil(pUserData); -end; - -function TfrmuFrAdvanced.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -function TfrmuFrAdvanced.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrAdvanced.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -procedure TfrmuFrAdvanced.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - - - - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - if FunctionStart then Exit; - MainLoop; -end; - -procedure TfrmuFrAdvanced.mnuReaderHardwareFirmwareversionItemClick(Sender: TObject); -var - bRHMajor, - bRHMinor, - bRFMajor, - bRFMinor : Byte; -begin - GetReaderHardwareVersion(bRHMajor,bRHMinor); - GetReaderFirmwareVersion(bRFMajor,bRFMinor); - MessageDlg('Hardware version : ' + IntToStr(bRHMajor) + '.' + IntToStr(bRHMinor) +#13+ - 'Firmware version : ' + IntToStr(bRFMajor) + '.' + IntToStr(bRFMinor),mtInformation,[mbOK],0); - -end; - -procedure TfrmuFrAdvanced.SetMenuItems(const aValue: Boolean); -begin - mnuValueBlockReadWriteItem.Enabled :=aValue; - mnuValueBlockIncrementDecrementItem.Enabled :=aValue; - mnuBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorReadWriteItem.Enabled :=aValue; - mnuValueBlockInSectorIncrDecrItems.Enabled :=aValue; - mnuLinearFormatCardItem.Enabled :=aValue; - mnuSectorTrailerWriteItem.Enabled :=aValue; -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFCoder-x86.dll b/old_move_to_branch/uFCoderAdvance_D7/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFCoder.dcu b/old_move_to_branch/uFCoderAdvance_D7/uFCoder.dcu deleted file mode 100644 index 7917f987d3de2f00fc32aa84bfadec0caf346cc3..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFCoder.pas b/old_move_to_branch/uFCoderAdvance_D7/uFCoder.pas deleted file mode 100644 index 671d6a39ef6a4e0473a8e27168ea96e7b572ad47..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFCoder.pas +++ /dev/null @@ -1,640 +0,0 @@ -unit uFCoder; - -interface - -const DLL_NAME ='uFCoder-x86.dll'; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderReset: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function ReaderSoftRestart: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType : Byte; - var bCardUID : Byte; - var bCardUIDSize : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeysLock(const bPassword:PByte):DL_STATUS stdcall; -function ReaderKeysUnlock(const bPassword:PByte):DL_STATUS stdcall; - - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -function ReadUserData(aucData:PByte): DL_STATUS stdcall; - -function WriteUserData(const aucData: PByte): DL_STATUS stdcall; - - - -function BlockRead(data:PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockWrite(const data: PByte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte; - key_index:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockRead(value:PLongint; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead(value:PLongint; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall ; - - -function ValueBlockInSectorDecrement(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM1(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM1(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM1(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorWrite_AKM1(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM1(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM1(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM1(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM1(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_AKM1(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM1(value: PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM1(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM1(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM1(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM1(increment_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM1(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM1(decrement_value: LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM1(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_AKM2(data:PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockWrite_AKM2(const data: PByte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockInSectorRead_AKM2(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall ; - - -function BlockInSectorWrite_AKM2(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearRead_AKM2(data: PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearWrite_AKM2(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte): DL_STATUS stdcall; - - -function LinearFormatCard_AKM2(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function SectorTrailerWrite_AKM2(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B: PByte; - auth_mode:Byte): DL_STATUS stdcall ; - -function SectorTrailerWriteUnsafe_AKM2(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockRead_AKM2(value: pLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_AKM2(value:PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockWrite_AKM2(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_AKM2(value: LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockIncrement_AKM2(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_AKM2(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockDecrement_AKM2(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_AKM2(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte): DL_STATUS stdcall; - - -function BlockRead_PK(data:PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockWrite_PK(const data: PByte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorRead_PK(data:PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function BlockInSectorWrite_PK(const data: PByte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearRead_PK(data:PByte; - linear_address: Word; - length: Word; - var bytes_returned: Word; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - - -function LinearWrite_PK(const data: PByte; - linear_address: Word; - length: Word; - var bytes_written: Word; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function LinearFormatCard_PK(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var sector_formatted:Byte; - auth_mode: Byte; - const key:PByte): DL_STATUS stdcall; - -function SectorTrailerWrite_PK(addressing_mode: Byte; - address: Byte; - const new_key_A: PByte; - block0_access_bits: Byte; - block1_access_bits: Byte; - block2_access_bits: Byte; - sector_trailer_access_bits: Byte; - sector_trailer_byte9:Byte; - const new_key_B:PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function SectorTrailerWriteUnsafe_PK(addressing_mode: Byte; - address: Byte; - const sector_trailer: PByte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockRead_PK(value:PLongInt; - var value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorRead_PK(value: PLongInt; - var value_addr: Byte; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockWrite_PK(value: LongInt; - value_addr: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorWrite_PK(value:LongInt; - value_addr: Byte; - sector_address: Byte; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockIncrement_PK(increment_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorIncrement_PK(increment_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockDecrement_PK(decrement_value:LongInt; - block_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - - -function ValueBlockInSectorDecrement_PK(decrement_value: LongInt; - sector_address: Byte; - block_in_sector_address: Byte; - auth_mode: Byte; - const key: PByte): DL_STATUS stdcall; - -function GetReaderHardwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - -function GetReaderFirmwareVersion(var bMajor:Byte; - var bMinor:Byte):DL_STATUS stdcall; - - - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderReset; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderSoftRestart; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function ReadUserData; external DLL_NAME; -function WriteUserData; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderKeysLock; external DLL_NAME; -function ReaderKeysUnlock; external DLL_NAME; -function BlockRead; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function BlockInSectorRead; external DLL_NAME; -function BlockInSectorWrite; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function SectorTrailerWrite; external DLL_NAME; -function SectorTrailerWriteUnsafe; external DLL_NAME; -function ValueBlockRead; external DLL_NAME; -function ValueBlockInSectorRead; external DLL_NAME; -function ValueBlockWrite; external DLL_NAME; -function ValueBlockInSectorWrite; external DLL_NAME; -function ValueBlockIncrement; external DLL_NAME; -function ValueBlockInSectorIncrement; external DLL_NAME; -function ValueBlockDecrement; external DLL_NAME; -function ValueBlockInSectorDecrement; external DLL_NAME; -function BlockRead_AKM1; external DLL_NAME; -function BlockWrite_AKM1; external DLL_NAME; -function BlockInSectorRead_AKM1; external DLL_NAME; -function BlockInSectorWrite_AKM1; external DLL_NAME; -function LinearRead_AKM1; external DLL_NAME; -function LinearWrite_AKM1; external DLL_NAME; -function LinearFormatCard_AKM1; external DLL_NAME; -function SectorTrailerWrite_AKM1; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM1; external DLL_NAME; -function ValueBlockRead_AKM1; external DLL_NAME; -function ValueBlockInSectorRead_AKM1; external DLL_NAME; -function ValueBlockWrite_AKM1; external DLL_NAME; -function ValueBlockInSectorWrite_AKM1; external DLL_NAME; -function ValueBlockIncrement_AKM1; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM1; external DLL_NAME; -function ValueBlockDecrement_AKM1; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM1; external DLL_NAME; -function BlockRead_AKM2; external DLL_NAME; -function BlockWrite_AKM2; external DLL_NAME; -function BlockInSectorRead_AKM2; external DLL_NAME; -function BlockInSectorWrite_AKM2; external DLL_NAME; -function LinearRead_AKM2; external DLL_NAME; -function LinearWrite_AKM2; external DLL_NAME; -function LinearFormatCard_AKM2; external DLL_NAME; -function SectorTrailerWrite_AKM2; external DLL_NAME; -function SectorTrailerWriteUnsafe_AKM2; external DLL_NAME; -function ValueBlockRead_AKM2; external DLL_NAME; -function ValueBlockInSectorRead_AKM2; external DLL_NAME; -function ValueBlockWrite_AKM2; external DLL_NAME; -function ValueBlockInSectorWrite_AKM2; external DLL_NAME; -function ValueBlockIncrement_AKM2; external DLL_NAME; -function ValueBlockInSectorIncrement_AKM2; external DLL_NAME; -function ValueBlockDecrement_AKM2; external DLL_NAME; -function ValueBlockInSectorDecrement_AKM2; external DLL_NAME; -function BlockRead_PK; external DLL_NAME; -function BlockWrite_PK; external DLL_NAME; -function BlockInSectorRead_PK; external DLL_NAME; -function BlockInSectorWrite_PK; external DLL_NAME; -function LinearRead_PK; external DLL_NAME; -function LinearWrite_PK; external DLL_NAME; -function LinearFormatCard_PK; external DLL_NAME; -function SectorTrailerWrite_PK; external DLL_NAME; -function SectorTrailerWriteUnsafe_PK; external DLL_NAME; -function ValueBlockRead_PK; external DLL_NAME; -function ValueBlockInSectorRead_PK; external DLL_NAME; -function ValueBlockWrite_PK; external DLL_NAME; -function ValueBlockInSectorWrite_PK; external DLL_NAME; -function ValueBlockIncrement_PK; external DLL_NAME; -function ValueBlockInSectorIncrement_PK; external DLL_NAME; -function ValueBlockDecrement_PK; external DLL_NAME; -function ValueBlockInSectorDecrement_PK; external DLL_NAME; -function GetReaderHardwareVersion; external DLL_NAME; -function GetReaderFirmwareVersion; external DLL_NAME; - - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFCoder_coff.lib b/old_move_to_branch/uFCoderAdvance_D7/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFCoder_omf.lib b/old_move_to_branch/uFCoderAdvance_D7/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.cfg b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.ddp b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dfm b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dfm deleted file mode 100644 index fe9b0646f1a9de0ab5f4f72d664382103adceea4..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dfm +++ /dev/null @@ -1,501 +0,0 @@ -object frmuFrAdvanced: TfrmuFrAdvanced - Left = 423 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Advanced' - ClientHeight = 668 - ClientWidth = 529 - Color = clWindow - Ctl3D = False - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object stbCard: TStatusBar - Left = 0 - Top = 649 - Width = 529 - Height = 19 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 529 - Height = 256 - Align = alTop - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object lblReaderType: TLabel - Left = 24 - Top = 16 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 24 - Top = 40 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 277 - Top = 16 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 277 - Top = 40 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 25 - Top = 65 - Width = 478 - Height = 5 - end - object lblLightMode: TLabel - Left = 25 - Top = 83 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 25 - Top = 106 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object txtReaderType: TStaticText - Left = 116 - Top = 15 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 0 - end - object txtReaderSerial: TStaticText - Left = 116 - Top = 39 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 1 - end - object txtCardType: TStaticText - Left = 365 - Top = 15 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 2 - end - object txtCardSerial: TStaticText - Left = 365 - Top = 39 - Width = 137 - Height = 19 - Alignment = taCenter - AutoSize = False - BorderStyle = sbsSunken - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - TabOrder = 3 - end - object stbReader: TStatusBar - Left = 1 - Top = 234 - Width = 527 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object cboLightMode: TComboBox - Left = 117 - Top = 79 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 117 - Top = 103 - Width = 137 - Height = 21 - ItemHeight = 13 - ItemIndex = 0 - TabOrder = 6 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUiSignal: TButton - Left = 260 - Top = 80 - Width = 110 - Height = 44 - Cursor = crHandPoint - Caption = 'Reader Ui Signal' - TabOrder = 7 - OnClick = btnReaderUiSignalClick - end - object btnSoftRestart: TButton - Left = 376 - Top = 78 - Width = 125 - Height = 23 - Cursor = crHandPoint - Caption = 'Soft Restart' - TabOrder = 8 - OnClick = btnSoftRestartClick - end - object btnReaderReset: TButton - Left = 376 - Top = 102 - Width = 125 - Height = 23 - Caption = 'Reader Reset' - TabOrder = 9 - OnClick = btnReaderResetClick - end - object pgReaderKeyUserData: TPageControl - Left = 24 - Top = 131 - Width = 481 - Height = 97 - ActivePage = tabReaderKey - TabOrder = 10 - object tabReaderKey: TTabSheet - Caption = 'Reader Key' - object pnlReaderKey: TPanel - Left = 2 - Top = 0 - Width = 470 - Height = 67 - TabOrder = 0 - object lblKeyIndex: TLabel - Left = 260 - Top = 48 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object chkReaderHex: TCheckBox - Left = 26 - Top = 38 - Width = 54 - Height = 15 - Caption = 'Hex' - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - OnClick = chkReaderHexClick - end - object cboKeyIndex: TComboBox - Left = 272 - Top = 13 - Width = 41 - Height = 24 - Cursor = crHandPoint - Ctl3D = True - DropDownCount = 15 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ItemHeight = 16 - ItemIndex = 0 - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - Text = '0' - Items.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '29' - '30' - '31') - end - object btnSaveReaderKey: TButton - Left = 332 - Top = 12 - Width = 125 - Height = 33 - Caption = 'Save ' - TabOrder = 2 - OnClick = btnSaveKeyIndexClick - end - end - end - object tabUserData: TTabSheet - Caption = 'User Data' - ImageIndex = 1 - object lblUserData: TLabel - Left = 9 - Top = 16 - Width = 57 - Height = 13 - Caption = 'User Data' - end - object lblNewUserData: TLabel - Left = 202 - Top = 16 - Width = 85 - Height = 13 - Caption = 'New User Data' - end - object txtUserData: TEdit - Left = 10 - Top = 32 - Width = 183 - Height = 21 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object txtNewUserData: TEdit - Left = 203 - Top = 32 - Width = 174 - Height = 21 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - object btnWriteUserData: TButton - Left = 387 - Top = 21 - Width = 81 - Height = 32 - Cursor = crHandPoint - Caption = 'Save' - TabOrder = 2 - OnClick = btnSaveUserDataClick - end - end - end - end - object pnlContainer: TPanel - Left = 0 - Top = 256 - Width = 529 - Height = 393 - Align = alClient - TabOrder = 2 - end - object mnuMeni: TMainMenu - Left = 480 - Top = 616 - object mnuFunctionsItem: TMenuItem - Caption = 'Functions' - object mnuLinearReadWriteItems: TMenuItem - Caption = 'Linear Read/Write' - OnClick = mnuLinearReadWriteItemsClick - end - object SEP1: TMenuItem - Caption = '-' - end - object mnuBlockReadWriteItems: TMenuItem - Caption = 'Block Read/Write' - OnClick = mnuBlockReadWriteItemsClick - end - object mnuBlockInSectorReadWriteItem: TMenuItem - Caption = 'BlockInSector Read/Write' - OnClick = mnuBlockInSectorReadWriteItemClick - end - object SEP2: TMenuItem - Caption = '-' - end - object mnuValueBlockReadWriteItem: TMenuItem - Caption = 'ValueBlock Read/Write' - OnClick = mnuValueBlockReadWriteItemClick - end - object mnuValueBlockIncrementDecrementItem: TMenuItem - Caption = 'ValueBlock Increment/Decrement' - OnClick = mnuValueBlockIncrementDecrementItemClick - end - object SEP3: TMenuItem - Caption = '-' - end - object mnuValueBlockInSectorReadWriteItem: TMenuItem - Caption = 'ValueBlockInSector Read/Write' - OnClick = mnuValueBlockInSectorReadWriteItemClick - end - object mnuValueBlockInSectorIncrDecrItems: TMenuItem - Caption = 'ValueBlockInSector Increment/Decrement' - OnClick = mnuValueBlockInSectorIncrDecrItemsClick - end - object SEP4: TMenuItem - Caption = '-' - end - object mnuSectorTrailerWriteItem: TMenuItem - Caption = 'SectorTrailer Write' - OnClick = mnuSectorTrailerWriteItemClick - end - object mnuLinearFormatCardItem: TMenuItem - Caption = 'LinearFormat Card' - OnClick = mnuLinearFormatCardItemClick - end - object SEP5: TMenuItem - Caption = '-' - end - object mnuExitItem: TMenuItem - Caption = 'Exit' - ShortCut = 16465 - OnClick = mnuExitItemClick - end - end - object mnuViewAlItems: TMenuItem - Caption = 'View All' - OnClick = mnuViewAlItemsClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 480 - Top = 584 - end -end diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dof b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dof deleted file mode 100644 index 305eb3d50db6f58a815c16d61040958e2d7ad1c0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Advanced version.Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dpr b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dpr deleted file mode 100644 index a3742ca46a15a8294dddce70e6e888f586c00f2e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.dpr +++ /dev/null @@ -1,36 +0,0 @@ -program uFrAdvanced; - -uses - Forms, - uFAdvanced in 'uFAdvanced.pas' {frmuFrAdvanced}, - Global in 'Global.pas', - uFCoder in 'uFCoder.pas', - LinearReadWrite in 'LinearReadWrite.pas' {frmLinearReadWrite}, - BlockInSector in 'BlockInSector.pas' {frmBlockInSectorReadWrite}, - ValueBlock in 'ValueBlock.pas' {frmValueBlockReadWrite}, - ValueBlockIncDec in 'ValueBlockIncDec.pas' {frmValueBlockIncrDecr}, - ValueBlockInSector in 'ValueBlockInSector.pas' {frmValueBlockInSectorReadWrite}, - ValueBlockInSectorIncrDecr in 'ValueBlockInSectorIncrDecr.pas' {frmValueBlockInSectorIncDecr}, - SectorTrailersWrite in 'SectorTrailersWrite.pas' {frmSectorTrailerWrite}, - ViewAll in 'ViewAll.pas' {frmViewAll}, - LinearFormatsCard in 'LinearFormatsCard.pas' {frmLinearFormatCard}, - BlockReadWrite in 'BlockReadWrite.pas' {frmBlockReadWrite}; - -{$R *.res} - -begin - Application.Initialize; - Application.Title := 'uFr Advanced'; - Application.CreateForm(TfrmuFrAdvanced, frmuFrAdvanced); - Application.CreateForm(TfrmLinearReadWrite, frmLinearReadWrite); - Application.CreateForm(TfrmBlockInSectorReadWrite, frmBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockReadWrite, frmValueBlockReadWrite); - Application.CreateForm(TfrmValueBlockIncrDecr, frmValueBlockIncrDecr); - Application.CreateForm(TfrmValueBlockInSectorReadWrite, frmValueBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockInSectorIncDecr, frmValueBlockInSectorIncDecr); - Application.CreateForm(TfrmSectorTrailerWrite, frmSectorTrailerWrite); - Application.CreateForm(TfrmViewAll, frmViewAll); - Application.CreateForm(TfrmLinearFormatCard, frmLinearFormatCard); - Application.CreateForm(TfrmBlockReadWrite, frmBlockReadWrite); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.exe b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.exe deleted file mode 100644 index 92ae6548e796b1be37a087c78b5643e221460d3f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.pas b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.pas deleted file mode 100644 index 16f6afd6210e0cf1e23c8e541525cf8ed12c54bc..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.pas +++ /dev/null @@ -1,330 +0,0 @@ -unit uFrAdvanced; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, - Menus,ComCtrls, StdCtrls, ExtCtrls, - uFCoder2x, - Global, - LinearReadWrite, - BlockReadWrite, - BlockInSector, - ValueBlock, - ValueBlockIncDec, - ValueBlockInSector, - ValueBlockInSectorIncrDecr, - SectorTrailersWrite, - LinearFormatsCard, - ViewAll; - - -type - TfrmuFrAdvanced = class(TForm) - stbCard: TStatusBar; - mnuMeni: TMainMenu; - mnuFunctionsItem: TMenuItem; - mnuLinearReadWriteItems: TMenuItem; - pnlReader: TPanel; - lblReaderType: TLabel; - txtReaderType: TStaticText; - lblReaderSerial: TLabel; - txtReaderSerial: TStaticText; - lblCardType: TLabel; - txtCardType: TStaticText; - lblCardSerial: TLabel; - txtCardSerial: TStaticText; - Bevel1: TBevel; - Timer: TTimer; - stbReader: TStatusBar; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUiSignal: TButton; - btnSoftRestart: TButton; - btnReaderReset: TButton; - pnlContainer: TPanel; - SEP1: TMenuItem; - mnuBlockReadWriteItems: TMenuItem; - mnuBlockInSectorReadWriteItem: TMenuItem; - SEP2: TMenuItem; - mnuValueBlockReadWriteItem: TMenuItem; - mnuValueBlockIncrementDecrementItem: TMenuItem; - SEP3: TMenuItem; - mnuExitItem: TMenuItem; - SEP4: TMenuItem; - mnuValueBlockInSectorReadWriteItem: TMenuItem; - mnuValueBlockInSectorIncrDecrItems: TMenuItem; - mnuSectorTrailerWriteItem: TMenuItem; - SEP5: TMenuItem; - mnuViewAlItems: TMenuItem; - mnuLinearFormatCardItem: TMenuItem; - pgReaderKeyUserData: TPageControl; - tabUserData: TTabSheet; - lblUserData: TLabel; - lblNewUserData: TLabel; - txtUserData: TEdit; - txtNewUserData: TEdit; - btnWriteUserData: TButton; - tabReaderKey: TTabSheet; - pnlReaderKey: TPanel; - chkReaderHex: TCheckBox; - cboKeyIndex: TComboBox; - lblKeyIndex: TLabel; - btnSaveReaderKey: TButton; - procedure TimerTimer(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnSaveUserDataClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure chkReaderHexClick(Sender: TObject); - procedure btnSaveKeyIndexClick(Sender: TObject); - procedure mnuBlockReadWriteItemsClick(Sender: TObject); - procedure mnuLinearReadWriteItemsClick(Sender: TObject); - procedure mnuBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockIncrementDecrementItemClick(Sender: TObject); - procedure mnuExitItemClick(Sender: TObject); - procedure mnuValueBlockInSectorReadWriteItemClick(Sender: TObject); - procedure mnuValueBlockInSectorIncrDecrItemsClick(Sender: TObject); - procedure mnuSectorTrailerWriteItemClick(Sender: TObject); - procedure mnuViewAlItemsClick(Sender: TObject); - procedure mnuLinearFormatCardItemClick(Sender: TObject); - procedure btnSoftRestartClick(Sender: TObject); - procedure btnReaderResetClick(Sender: TObject); - procedure btnReaderUiSignalClick(Sender: TObject); - private - CONNECTION:Boolean; - res:DL_STATUS; - reader_type:Longint; - reader_serial:LongInt; - card_type:Byte; - card_serial:LongInt; - Pread_user_data:PByte; - user_data:array[0..15] of Char; - procedure OnReaderKeyPress(Sender:TObject;var Key:Char); - procedure OnReaderExit(Sender:TObject); - public - { Public declarations } - end; - -var - frmuFrAdvanced: TfrmuFrAdvanced; - -implementation - -{$R *.dfm} - -procedure TfrmuFrAdvanced.TimerTimer(Sender: TObject); -begin - - Pread_user_data:=nil; - if not CONNECTION then - begin - res:=ReaderOpen(); - if res=DL_OK then - begin - CONNECTION:=true; - stbReader.Panels[0].Text:='CONNECTED'; - Status_Bar_Error_Reporting(stbReader,res); - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - Status_Bar_Error_Reporting(stbReader,res); - txtReaderType.Caption:=''; - txtReaderSerial.Caption:=''; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - txtUserData.Text:=''; - txtNewUserData.Text:=''; - end; - end; - if CONNECTION then - begin - res:=GetReaderType(reader_type); - if res=DL_OK then begin - txtReaderType.Caption:='$'+IntToHex(reader_type,8); - Status_Bar_Error_Reporting(stbReader,res); - end - else - begin - CONNECTION:=false; - ReaderClose(); - end; - res:=GetReaderSerialNumber(reader_serial); - if res=DL_OK then txtReaderSerial.Caption:='$'+IntToHex(reader_serial,8); - res:=GetCardId(card_type,card_serial); - if res=DL_OK then - begin - txtCardType.Caption:='$'+IntToHex(card_type,2); - txtCardSerial.Caption:='$'+IntToHex(card_serial,8); - Status_Bar_Error_Reporting(stbCard,res); - end - else - begin - txtCardType.Caption:=''; - txtCardSerial.Caption:=''; - Status_Bar_Error_Reporting(stbCard,res); - end; - PRead_user_data:=PByte(@user_data); - res:=ReadUserData(Pread_user_data); - if res=DL_OK then - txtUserData.Text:=user_data - else - txtUserData.Text:=#0; - end; -end; - - -procedure TfrmuFrAdvanced.FormCreate(Sender: TObject); -begin - Errors_Code; - CreateKey(self,21,33,13,24,pnlReaderKey,'txtReaderKey',false,OnReaderKeyPress,OnReaderExit); - -end; -procedure TfrmuFrAdvanced.OnReaderExit(Sender: TObject); -begin - OnMyExit(Sender,chkReaderHex); -end; - -procedure TfrmuFrAdvanced.OnReaderKeyPress(Sender: TObject; var Key: Char); -begin - Check_Key_press(Sender,chkReaderHex,Key); -end; - -procedure TfrmuFrAdvanced.btnSaveUserDataClick(Sender: TObject); -var - PWrite_user_data:PByte; -begin - if (txtNewUserData.Text=EmptyStr) then begin - MessageDlg('You must enter any data !',mtWarning,[mbOK],0); - txtNewUserData.SetFocus; - Exit; - end; - PWrite_user_data:=PByte(txtNewUserData.Text); - res:=WriteUserData(PWrite_user_data); - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end - else begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end; - - end; - - -procedure TfrmuFrAdvanced.FormShow(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.chkReaderHexClick(Sender: TObject); -begin - CheckHex(self,5,chkReaderHex,'txtReaderKey'); -end; - -procedure TfrmuFrAdvanced.btnSaveKeyIndexClick(Sender: TObject); -var - br:byte; - PReader_key:PByte; - key_index:Byte; - reader_key:array[0..5] of Byte; - s:string; -begin - key_index:=cboKeyIndex.ItemIndex; - PReader_key:=nil; - for br:=0 to 5 do begin - if chkReaderHex.Checked then - reader_key[br]:=StrToInt(HexDisplayPrefix+TEdit(FindComponent('txtReaderKey'+IntToStr(br+1))).Text) - else - reader_key[br]:=StrToInt(TEdit(FindComponent('txtReaderKey'+IntToStr(br+1))).Text); - end; - PReader_key:=@reader_key; - res:=ReaderKeyWrite(PReader_key,key_index); - if res=DL_OK then begin - ReaderUISignal(RES_OK_LIGHT,RES_OK_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end - else begin - ReaderUISignal(ERROR_LIGHT,ERROR_SOUND); - Status_Bar_Error_Reporting(stbReader,res); - end; - -end; - -procedure TfrmuFrAdvanced.mnuBlockReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearReadWriteItemsClick(Sender: TObject); -begin - ShowForm(frmLinearReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuBlockInSectorReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockReadWriteItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockIncrementDecrementItemClick(Sender: TObject); -begin - ShowForm(frmValueBlockIncrDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorReadWriteItemClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorReadWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuValueBlockInSectorIncrDecrItemsClick( - Sender: TObject); -begin - ShowForm(frmValueBlockInSectorIncDecr,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuSectorTrailerWriteItemClick(Sender: TObject); -begin - ShowForm(frmSectorTrailerWrite,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuViewAlItemsClick(Sender: TObject); -begin - ShowForm(frmViewAll,pnlContainer); -end; - -procedure TfrmuFrAdvanced.mnuLinearFormatCardItemClick(Sender: TObject); -begin - ShowForm(frmLinearFormatCard,pnlContainer); -end; - -procedure TfrmuFrAdvanced.btnSoftRestartClick(Sender: TObject); -begin - ReaderSoftRestart(); -end; - -procedure TfrmuFrAdvanced.btnReaderResetClick(Sender: TObject); -begin - ReaderReset(); -end; - -procedure TfrmuFrAdvanced.btnReaderUiSignalClick(Sender: TObject); -begin - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); -end; - -end. diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.res b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.res deleted file mode 100644 index 44134338ca0e97d4a975aa827429aa12eac90905..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.~dpr b/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.~dpr deleted file mode 100644 index 58fcb6cd4357da888865426d4826de7ebba04315..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderAdvance_D7/uFrAdvanced.~dpr +++ /dev/null @@ -1,36 +0,0 @@ -program uFrAdvanced; - -uses - Forms, - uFAdvanced in 'uFAdvanced.pas' {frmuFrAdvanced}, - Global in 'Global.pas', - uFCoder1x in 'uFCoder1x.pas', - LinearReadWrite in 'LinearReadWrite.pas' {frmLinearReadWrite}, - BlockInSector in 'BlockInSector.pas' {frmBlockInSectorReadWrite}, - ValueBlock in 'ValueBlock.pas' {frmValueBlockReadWrite}, - ValueBlockIncDec in 'ValueBlockIncDec.pas' {frmValueBlockIncrDecr}, - ValueBlockInSector in 'ValueBlockInSector.pas' {frmValueBlockInSectorReadWrite}, - ValueBlockInSectorIncrDecr in 'ValueBlockInSectorIncrDecr.pas' {frmValueBlockInSectorIncDecr}, - SectorTrailersWrite in 'SectorTrailersWrite.pas' {frmSectorTrailerWrite}, - ViewAll in 'ViewAll.pas' {frmViewAll}, - LinearFormatsCard in 'LinearFormatsCard.pas' {frmLinearFormatCard}, - BlockReadWrite in 'BlockReadWrite.pas' {frmBlockReadWrite}; - -{$R *.res} - -begin - Application.Initialize; - Application.Title := 'uFr Advanced'; - Application.CreateForm(TfrmuFrAdvanced, frmuFrAdvanced); - Application.CreateForm(TfrmLinearReadWrite, frmLinearReadWrite); - Application.CreateForm(TfrmBlockInSectorReadWrite, frmBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockReadWrite, frmValueBlockReadWrite); - Application.CreateForm(TfrmValueBlockIncrDecr, frmValueBlockIncrDecr); - Application.CreateForm(TfrmValueBlockInSectorReadWrite, frmValueBlockInSectorReadWrite); - Application.CreateForm(TfrmValueBlockInSectorIncDecr, frmValueBlockInSectorIncDecr); - Application.CreateForm(TfrmSectorTrailerWrite, frmSectorTrailerWrite); - Application.CreateForm(TfrmViewAll, frmViewAll); - Application.CreateForm(TfrmLinearFormatCard, frmLinearFormatCard); - Application.CreateForm(TfrmBlockReadWrite, frmBlockReadWrite); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimple_D7/uFCoder-x86.dll b/old_move_to_branch/uFCoderSimple_D7/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFCoder.dcu b/old_move_to_branch/uFCoderSimple_D7/uFCoder.dcu deleted file mode 100644 index 9599e60b9bcf8429b101ab8c1478a58351cc053e..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFCoder.pas b/old_move_to_branch/uFCoderSimple_D7/uFCoder.pas deleted file mode 100644 index e9779aa0c444f685fcd0434dad88c572d4b29e78..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFCoder.pas +++ /dev/null @@ -1,101 +0,0 @@ -unit uFCoder; - -interface - - Type - TDLCardType = ( - DL_MIFARE_ULTRALIGHT = $01, - DL_MIFARE_ULTRALIGHT_EV1_11 = $02, - DL_MIFARE_ULTRALIGHT_EV1_21 = $03, - DL_MIFARE_ULTRALIGHT_C = $04, - DL_NTAG_203 = $05, - DL_NTAG_210 = $06, - DL_NTAG_212 = $07, - DL_NTAG_213 = $08, - DL_NTAG_215 = $09, - DL_NTAG_216 = $0A, - DL_MIFARE_MINI = $20, - DL_MIFARE_CLASSIC_1K = $21, - DL_MIFARE_CLASSIC_4K = $22, - DL_MIFARE_PLUS_S_2K = $23, - DL_MIFARE_PLUS_S_4K = $24, - DL_MIFARE_PLUS_X_2K = $25, - DL_MIFARE_PLUS_X_4K = $26, - DL_MIFARE_DESFIRE = $27, - DL_MIFARE_DESFIRE_EV1_2K = $28, - DL_MIFARE_DESFIRE_EV1_4K = $29, - DL_MIFARE_DESFIRE_EV1_8K = $2A - ); - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -const - DLL_NAME='uFCoder-x86.dll'; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - TOTAL_BYTES_NTAG203 = 168; - TOTAL_BYTES_ULTRALIGHT_C = 168; - TOTAL_BYTES_ULTRALIGHT = 64; -const - MAX_BLOCK = 15; - FORMAT_SIGN = $00;//$FF - KEY_INDEX = 0; - - - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoderSimple_D7/uFCoder.~pas b/old_move_to_branch/uFCoderSimple_D7/uFCoder.~pas deleted file mode 100644 index f774211b868083a85c3b4ac2933b4ba23460b192..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFCoder.~pas +++ /dev/null @@ -1,101 +0,0 @@ -unit uFCoder; - -interface - - Type - TDLCardType = ( - DL_MIFARE_ULTRALIGHT = $01, - DL_MIFARE_ULTRALIGHT_EV1_11 = $02, - DL_MIFARE_ULTRALIGHT_EV1_21 = $03, - DL_MIFARE_ULTRALIGHT_C = $04, - DL_NTAG_203 = $05, - DL_NTAG_210 = $06, - DL_NTAG_212 = $07, - DL_NTAG_213 = $08, - DL_NTAG_215 = $09, - DL_NTAG_216 = $0A, - DL_MIFARE_MINI = $20, - DL_MIFARE_CLASSIC_1K = $21, - DL_MIFARE_CLASSIC_4K = $22, - DL_MIFARE_PLUS_S_2K = $23, - DL_MIFARE_PLUS_S_4K = $24, - DL_MIFARE_PLUS_X_2K = $25, - DL_MIFARE_PLUS_X_4K = $26, - DL_MIFARE_DESFIRE = $27, - DL_MIFARE_DESFIRE_EV1_2K = $28, - DL_MIFARE_DESFIRE_EV1_4K = $29, - DL_MIFARE_DESFIRE_EV1_8K = $2A - ); - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -const - DLL_NAME='uFCoder1x-x86.dll'; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - TOTAL_BYTES_NTAG203 = 168; - TOTAL_BYTES_ULTRALIGHT_C = 168; - TOTAL_BYTES_ULTRALIGHT = 64; -const - MAX_BLOCK = 15; - FORMAT_SIGN = $00;//$FF - KEY_INDEX = 0; - - - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoderSimple_D7/uFCoder_coff.lib b/old_move_to_branch/uFCoderSimple_D7/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFCoder_omf.lib b/old_move_to_branch/uFCoderSimple_D7/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.cfg b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.dof b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.dof deleted file mode 100644 index ed723d98874941c369f061f16193212d10f5d07e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Formating keys card and key of reader card .Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.dpr b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.dpr deleted file mode 100644 index 23245c02e12397156a833926aee8cc30f26e102b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.dpr +++ /dev/null @@ -1,16 +0,0 @@ -program uFrSimple; - -uses - Forms, - uFSimple in 'uFSimple.pas' {frmuFrSimple}, - uFCoder in 'uFCoder.pas'; - -{$R *.res} - - -begin - Application.Initialize; - Application.Title := 'uFr Simple'; - Application.CreateForm(TfrmuFrSimple, frmuFrSimple); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.exe b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.exe deleted file mode 100644 index b73ca8aa1d69758c42bea80b5d1ab81aa45e51d6..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.identcache b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.identcache deleted file mode 100644 index dfd02a2fde1b18dc033d8c0408b9480e2940b8f8..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.identcache and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.res b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.res deleted file mode 100644 index 511c5b082348ab39a5773b09ba6c0808f918b64f..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.~dpr b/old_move_to_branch/uFCoderSimple_D7/uFRSimple.~dpr deleted file mode 100644 index 22b4fbb20d4e03fd4d47801e14c904fd92cdb1fc..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFRSimple.~dpr +++ /dev/null @@ -1,16 +0,0 @@ -program uFrSimple; - -uses - Forms, - uFSimple in 'uFSimple.pas' {frmuFrSimple}, - uFCoder1x in 'uFCoder1x.pas'; - -{$R *.res} - - -begin - Application.Initialize; - Application.Title := 'uFr Simple'; - Application.CreateForm(TfrmuFrSimple, frmuFrSimple); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimple_D7/uFRSimple_Icon.ico b/old_move_to_branch/uFCoderSimple_D7/uFRSimple_Icon.ico deleted file mode 100644 index cfd8992a5b8ff4b89478d89e93ae9205bb8125ef..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFRSimple_Icon.ico and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.dcu b/old_move_to_branch/uFCoderSimple_D7/uFSimple.dcu deleted file mode 100644 index d8e3e221b423c8963bb3576562c624a906a34dc0..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFSimple.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.ddp b/old_move_to_branch/uFCoderSimple_D7/uFSimple.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFSimple.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.dfm b/old_move_to_branch/uFCoderSimple_D7/uFSimple.dfm deleted file mode 100644 index e95031b5a1802372cf1c5c03e74080e2a86b4558..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFSimple.dfm +++ /dev/null @@ -1,755 +0,0 @@ -object frmuFrSimple: TfrmuFrSimple - Left = 424 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simple ' - ClientHeight = 636 - ClientWidth = 516 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMain - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 516 - Height = 182 - Align = alTop - Caption = ' ' - TabOrder = 0 - object lblReaderType: TLabel - Left = 27 - Top = 24 - Width = 72 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 27 - Top = 48 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 273 - Top = 24 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 273 - Top = 48 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 27 - Top = 80 - Width = 477 - Height = 6 - end - object lblLightMode: TLabel - Left = 47 - Top = 104 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 47 - Top = 128 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 405 - Top = 24 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 160 - Width = 514 - Height = 21 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtReaderType: TEdit - Left = 118 - Top = 22 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtReaderSerial: TEdit - Left = 118 - Top = 46 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object txtCardType: TEdit - Left = 343 - Top = 22 - Width = 34 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object cboLightMode: TComboBox - Left = 138 - Top = 99 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 4 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 138 - Top = 123 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUISignal: TButton - Left = 304 - Top = 99 - Width = 173 - Height = 45 - Cursor = crHandPoint - Caption = 'READER UI SIGNAL' - TabOrder = 6 - OnClick = btnReaderUISignalClick - end - object txtCardUIDSize: TEdit - Left = 465 - Top = 22 - Width = 34 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 7 - end - object txtCardSerial: TEdit - Left = 344 - Top = 46 - Width = 156 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - end - object pnlFormattCard: TPanel - Left = 0 - Top = 213 - Width = 516 - Height = 132 - Align = alTop - BorderStyle = bsSingle - Caption = ' ' - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object pgNewCardReaderKeys: TPageControl - Left = 24 - Top = 8 - Width = 449 - Height = 113 - ActivePage = tabNewCardKeys - TabOrder = 0 - object tabNewCardKeys: TTabSheet - Caption = 'New Card Keys' - object lblKeyB: TLabel - Left = 24 - Top = 33 - Width = 34 - Height = 13 - Caption = 'Key B' - end - object lblKeyA: TLabel - Left = 24 - Top = 10 - Width = 34 - Height = 13 - Caption = 'Key A' - end - object lblSectorFormatted: TLabel - Left = 273 - Top = 61 - Width = 99 - Height = 13 - Alignment = taCenter - Caption = 'Sector Formatted' - end - object chkNewCardKeysHex: TCheckBox - Left = 72 - Top = 59 - Width = 65 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - OnClick = chkNewCardKeysHexClick - end - object btnFormatCardKeys: TButton - Left = 271 - Top = 4 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnFormatCardKeysClick - end - object txtSectorForrmatted: TEdit - Left = 400 - Top = 53 - Width = 33 - Height = 24 - Color = clSilver - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object pnlNewCardKeys: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 53 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - object tabNewRaedarKey: TTabSheet - Caption = 'New Reader Key' - ImageIndex = 1 - object lblKeyIndex: TLabel - Left = 163 - Top = 56 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object btnFormatReaderKey: TButton - Left = 271 - Top = 18 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnClick = btnFormatReaderKeyClick - end - object chkNewReaderKeyHex: TCheckBox - Left = 74 - Top = 51 - Width = 52 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - OnClick = chkNewReaderKeyHexClick - end - object txtKeyIndex: TEdit - Left = 235 - Top = 51 - Width = 21 - Height = 29 - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentFont = False - ReadOnly = True - TabOrder = 2 - Text = '0' - end - object pnlNewReaderKey: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 41 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - end - end - object stbCard: TStatusBar - Left = 0 - Top = 617 - Width = 516 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlLinearRW: TPanel - Left = 0 - Top = 345 - Width = 516 - Height = 272 - Align = alClient - TabOrder = 3 - object pgLinearReadWrite: TPageControl - Left = 1 - Top = 1 - Width = 514 - Height = 251 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 0 - object tabLinearRead: TTabSheet - Caption = 'Linear Read' - object Label1: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLRLinearAddress - end - object lblReadData: TLabel - Left = 7 - Top = 3 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLRDataLength - end - object lblReadBytes: TLabel - Left = 182 - Top = 186 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - FocusControl = txtReadBytes - end - object txtLRLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLRDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearRead: TRichEdit - Left = 8 - Top = 20 - Width = 467 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'Linear Write' - ImageIndex = 1 - object lblLWLinearAddress: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLWLinearAddress - end - object lblWriteData: TLabel - Left = 6 - Top = 3 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblRWDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLWDataLength - end - object Label2: TLabel - Left = 182 - Top = 186 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - FocusControl = txtBytesWritten - end - object txtLWLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLWDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearWrite: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearWrite: TRichEdit - Left = 8 - Top = 20 - Width = 466 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - OnChange = txtLinearWriteChange - end - end - end - object stbFunction: TStatusBar - Left = 1 - Top = 252 - Width = 514 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 107 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - end - object pnlAuth: TPanel - Left = 0 - Top = 182 - Width = 516 - Height = 31 - Align = alTop - BevelOuter = bvLowered - Caption = ' ' - Ctl3D = True - ParentCtl3D = False - TabOrder = 4 - object rbAUTH1A: TRadioButton - Left = 103 - Top = 8 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 316 - Top = 8 - Width = 81 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 384 - Top = 488 - end - object mnuMain: TMainMenu - Left = 384 - Top = 528 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end -end diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.pas b/old_move_to_branch/uFCoderSimple_D7/uFSimple.pas deleted file mode 100644 index e8875ffe06ee923d781e331fae1911090adf0665..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFSimple.pas +++ /dev/null @@ -1,718 +0,0 @@ - - -unit uFSimple; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls,uFCoder, StdCtrls,Menus; -type - TKeyArray=array[0..5] of byte; -type - TfrmuFrSimple = class(TForm) - pnlReader: TPanel; - pnlFormattCard: TPanel; - stbCard: TStatusBar; - stbReader: TStatusBar; - pnlLinearRW: TPanel; - lblReaderType: TLabel; - txtReaderType: TEdit; - lblReaderSerial: TLabel; - txtReaderSerial: TEdit; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardSerial: TLabel; - Bevel1: TBevel; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUISignal: TButton; - Timer: TTimer; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearWrite: TTabSheet; - Label1: TLabel; - lblReadData: TLabel; - txtLRLinearAddress: TEdit; - lblDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - lblLWLinearAddress: TLabel; - lblWriteData: TLabel; - txtLWLinearAddress: TEdit; - lblRWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - mnuMain: TMainMenu; - mnuExitItem: TMenuItem; - stbFunction: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblReadBytes: TLabel; - txtReadBytes: TEdit; - Label2: TLabel; - txtBytesWritten: TEdit; - pgNewCardReaderKeys: TPageControl; - tabNewCardKeys: TTabSheet; - tabNewRaedarKey: TTabSheet; - lblKeyB: TLabel; - lblKeyA: TLabel; - chkNewCardKeysHex: TCheckBox; - btnFormatCardKeys: TButton; - lblSectorFormatted: TLabel; - txtSectorForrmatted: TEdit; - btnFormatReaderKey: TButton; - chkNewReaderKeyHex: TCheckBox; - lblKeyIndex: TLabel; - txtKeyIndex: TEdit; - pnlNewCardKeys: TPanel; - pnlNewReaderKey: TPanel; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - txtLinearWrite: TRichEdit; - txtLinearRead: TRichEdit; - txtCardSerial: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnReaderUISignalClick(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnFormatCardKeysClick(Sender: TObject); - - procedure chkNewCardKeysHexClick(Sender: TObject); - procedure chkNewReaderKeyHexClick(Sender: TObject); - procedure btnFormatReaderKeyClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - private - boFunctionStart, - boReaderStart : Boolean; - function GetFunctStart: Boolean; - procedure SetFunctStart(const Value: Boolean); - function GetReaderStart: Boolean; - procedure SetReaderStart(const Value: Boolean); - - private - boCONN :Boolean; - ERROR_CODE:array[0..200] of string; - - procedure CreateKey(key_height,key_width,key_left,key_top:Byte;key_name:string;bKeyTag:byte;pnlContainer:TPanel); - procedure OnMyKeyPress(Sender:TObject;var Key:Char); - procedure OnMyKeyExit(Sender:TObject); - procedure ConvertDecHex(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel); - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - function DecHexConversion(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel):TKeyArray; - function AuthMode:byte; - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - public - - end; -const - - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_LOCKED = 118; - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT='You must enter a number between 0 and 255 !'; - - NEW_CARD_KEY_A = 'txtNewCardKeyA'; - NEW_CARD_KEY_B = 'txtNewCardKeyB'; - NEW_READER_KEY = 'txtNewReaderKey'; - - - - -var - frmuFrSimple: TfrmuFrSimple; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimple.CreateKey(key_height, key_width, key_left,key_top: Byte; key_name: string;bKeyTag:byte; pnlContainer:TPanel); -var - br :byte; - edit_key:array[0..6] of TEdit; -begin - for br:=0 to MAX_KEY_INDEX do - begin - edit_key[br] :=TEdit.Create(self); - with edit_key[br] do - begin - Height :=key_height; - Width :=key_width; - Left :=key_left+(key_width*br+2); - Top :=key_top; - Font.Name :='Verdana'; - Font.Style :=[fsBold]; - Font.Size :=8; - MaxLength :=3; - Text :='255'; - Tag :=bKeyTag; - ReadOnly :=false; - name :=key_name+IntToStr(br); - OnKeyPress :=OnMyKeyPress; - OnExit :=OnMyKeyExit; - CharCase :=ecUpperCase; - Parent :=pnlContainer; - end; - end; - -end; - -procedure TfrmuFrSimple.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimple.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - - - CreateKey(24,30,3,3,NEW_CARD_KEY_A,1, pnlNewCardKeys); - CreateKey(24,30,3,23,NEW_CARD_KEY_B,2,pnlNewCardKeys); - CreateKey(24,30,3,8,NEW_READER_KEY,3,pnlNewReaderKey); - boCONN:=false; -end; - -procedure TfrmuFrSimple.btnReaderUISignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wReadBytes :Word; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr Then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - On Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - txtLinearRead.Clear; - New(PData); - wReadBytes := 0; - wLinearAddress := StrToInt(Trim(txtLRLinearAddress.Text)); - wDataLength := StrToInt(Trim(txtLRDataLength.Text)); - bAuthMode := AuthMode(); - bKeyIndex := StrToInt(txtKeyIndex.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - iFResult := LinearRead(PData,wLinearAddress,wDataLength,wReadBytes,bAuthMode,bKeyIndex); - - if iFResult = DL_OK then - begin - txtLinearRead.Text :=String(baReadData); - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult) - end - else - begin - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; - - -end; - -procedure TfrmuFrSimple.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - PData :PByte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOk],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOk],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PData); - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - wLinearAddress:=StrToInt(Trim(txtLWLinearAddress.Text)); - wDataLength :=StrToInt(Trim(txtLWDataLength.Text)); - PData :=PByte(txtLinearWrite.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; -end; - - - -procedure TfrmuFrSimple.btnFormatCardKeysClick(Sender: TObject); -var - PKeyA:PByte; - PKeyB:PByte; - KeyA:TKeyArray; - KeyB:TKeyArray; - bSectorsFormatted:Byte; - bBlockAccessBits, - bTrailerAccessBits, - bTrailerBits9 :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - bytes_ret:word; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - try - New(PKeyA); - New(PKeyB); - - KeyA:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - KeyB:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); - - PKeyA:=PByte(@KeyA); - PKeyB:=PByte(@KeyB); - bBlockAccessBits :=0; - bTrailerAccessBits :=1; - bTrailerBits9 :=45; - bSectorsFormatted :=0; - - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - - - iFResult:=LinearFormatCard(PKeyA,bBlockAccessBits,bTrailerAccessBits,bTrailerBits9,PKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are not formatted successfully !',mtError,[mbOK],0); - end; - except - on EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - finally - PKeyA:=nil; - PKeyB:=nil; - Dispose(PKeyA); - Dispose(PKeyB); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.chkNewCardKeysHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); -end; - -procedure TfrmuFrSimple.OnMyKeyPress(Sender: TObject; var Key: Char); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - try - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) then - begin - TB.MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else - begin - TB.MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; - except - on EConvertError do - end; -end; - - - -function TfrmuFrSimple.AuthMode: byte; -begin - if rbAUTH1A.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - -function TfrmuFrSimple.DecHexConversion(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel): TKeyArray; -var - baKeyArray:TKeyArray; - bCounter:byte; -begin - for bCounter:=0 to MAX_KEY_INDEX do - begin - if chkCheckBox.Checked then - begin - baKeyArray[bCounter]:=StrToInt(HexDisplayPrefix+(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text))); - end - else - begin - baKeyArray[bCounter]:=StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text)); - end; - end; - Result:=baKeyArray; - end; - - - - -procedure TfrmuFrSimple.ConvertDecHex(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel); -var - bBr:byte; -begin - try - for bBr:=0 to MAX_KEY_INDEX do - begin - if Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)=EmptyStr then - Continue - else - begin - if chkCheckBox.Checked then - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToHex(StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)),2); - end - else - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToStr(StrToInt(HexDisplayPrefix+Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text))); - end; - end; - end; - except - on EConvertError do - Exit; - end; -end; - -procedure TfrmuFrSimple.chkNewReaderKeyHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); -end; - -procedure TfrmuFrSimple.btnFormatReaderKeyClick(Sender: TObject); -var - PReaderKey:PByte; - baReaderKey:TKeyArray; - iFResult:DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PReaderKey); - PReaderKey:=@baReaderKey; - baReaderKey:=DecHexConversion(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); - iFResult:=ReaderKeyWrite(PReaderKey,key_index); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is not formatted successfully !',mtError,[mbOK],0); - end; - - finally - PReaderKey:=nil; - Dispose(PReaderKey); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.OnMyKeyExit(Sender: TObject); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) or (Trim(TB.Text)=EmptyStr) Then Exit; - if StrToInt(Trim(TB.Text))>255 then - begin - MessageDlg(APPROPRIATE_FORMAT,mtError,[mbOK],0); - TB.Undo(); - TB.SetFocus(); - Exit; - end; -end; - - - - -procedure TfrmuFrSimple.MainLoop; -var - iRResult, - iCResult :LongInt; - iReaderType, - iReaderSerial, - iCardSerial:LongInt; - bCardType, - bDLCardType, - bCardUIDSize, - bBr :Byte; - baCardUID:array[0..9] of Byte; - sBuffer :String; - -begin - sBuffer:=''; - SetReaderStart(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - SetStatusBar(stbReader,iRResult); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult) - end - else - begin - boCONN:=false; - ReaderClose(); - SetStatusBar(stbReader,iRResult); - end; - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=DL_NTAG_216 then - btnFormatCardKeys.Enabled:=false - else - btnFormatCardKeys.Enabled:=true; - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType .Text:='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial .Text:='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - txtCardSerial .Clear; - txtCardType .Clear; - txtCardUIDSize.Clear; - btnFormatCardKeys.Enabled:=true; - SetStatusBar(stbCard,iCResult); - end; - end; - SetReaderStart(false); - -end; - -function TfrmuFrSimple.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -procedure TfrmuFrSimple.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimple.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrSimple.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - -procedure TfrmuFrSimple.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -procedure TfrmuFrSimple.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop(); -end; - -procedure TfrmuFrSimple.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(txtLinearWrite.Text)); -end; - -end. diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.~ddp b/old_move_to_branch/uFCoderSimple_D7/uFSimple.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_D7/uFSimple.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.~dfm b/old_move_to_branch/uFCoderSimple_D7/uFSimple.~dfm deleted file mode 100644 index 1114e157e903e92412124159ef7f1e5bd1b0a2c0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFSimple.~dfm +++ /dev/null @@ -1,755 +0,0 @@ -object frmuFrSimple: TfrmuFrSimple - Left = 424 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simple ' - ClientHeight = 636 - ClientWidth = 516 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMain - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 516 - Height = 182 - Align = alTop - Caption = ' ' - TabOrder = 0 - object lblReaderType: TLabel - Left = 27 - Top = 24 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 27 - Top = 48 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 273 - Top = 24 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 273 - Top = 48 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 27 - Top = 80 - Width = 477 - Height = 6 - end - object lblLightMode: TLabel - Left = 47 - Top = 104 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 47 - Top = 128 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 405 - Top = 24 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 160 - Width = 514 - Height = 21 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtReaderType: TEdit - Left = 118 - Top = 22 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtReaderSerial: TEdit - Left = 118 - Top = 46 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object txtCardType: TEdit - Left = 343 - Top = 22 - Width = 34 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object cboLightMode: TComboBox - Left = 138 - Top = 99 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 4 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 138 - Top = 123 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUISignal: TButton - Left = 304 - Top = 99 - Width = 173 - Height = 45 - Cursor = crHandPoint - Caption = 'READER UI SIGNAL' - TabOrder = 6 - OnClick = btnReaderUISignalClick - end - object txtCardUIDSize: TEdit - Left = 465 - Top = 22 - Width = 34 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 7 - end - object txtCardSerial: TEdit - Left = 344 - Top = 46 - Width = 156 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - end - object pnlFormattCard: TPanel - Left = 0 - Top = 213 - Width = 516 - Height = 132 - Align = alTop - BorderStyle = bsSingle - Caption = ' ' - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object pgNewCardReaderKeys: TPageControl - Left = 24 - Top = 8 - Width = 449 - Height = 113 - ActivePage = tabNewCardKeys - TabOrder = 0 - object tabNewCardKeys: TTabSheet - Caption = 'New Card Keys' - object lblKeyB: TLabel - Left = 24 - Top = 33 - Width = 34 - Height = 13 - Caption = 'Key B' - end - object lblKeyA: TLabel - Left = 24 - Top = 10 - Width = 34 - Height = 13 - Caption = 'Key A' - end - object lblSectorFormatted: TLabel - Left = 273 - Top = 61 - Width = 99 - Height = 13 - Alignment = taCenter - Caption = 'Sector Formatted' - end - object chkNewCardKeysHex: TCheckBox - Left = 72 - Top = 59 - Width = 65 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - OnClick = chkNewCardKeysHexClick - end - object btnFormatCardKeys: TButton - Left = 271 - Top = 4 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnFormatCardKeysClick - end - object txtSectorForrmatted: TEdit - Left = 400 - Top = 53 - Width = 33 - Height = 24 - Color = clSilver - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object pnlNewCardKeys: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 53 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - object tabNewRaedarKey: TTabSheet - Caption = 'New Reader Key' - ImageIndex = 1 - object lblKeyIndex: TLabel - Left = 163 - Top = 56 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object btnFormatReaderKey: TButton - Left = 271 - Top = 18 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnClick = btnFormatReaderKeyClick - end - object chkNewReaderKeyHex: TCheckBox - Left = 74 - Top = 51 - Width = 52 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - OnClick = chkNewReaderKeyHexClick - end - object txtKeyIndex: TEdit - Left = 235 - Top = 51 - Width = 21 - Height = 29 - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentFont = False - ReadOnly = True - TabOrder = 2 - Text = '0' - end - object pnlNewReaderKey: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 41 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - end - end - object stbCard: TStatusBar - Left = 0 - Top = 617 - Width = 516 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlLinearRW: TPanel - Left = 0 - Top = 345 - Width = 516 - Height = 272 - Align = alClient - TabOrder = 3 - object pgLinearReadWrite: TPageControl - Left = 1 - Top = 1 - Width = 514 - Height = 251 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 0 - object tabLinearRead: TTabSheet - Caption = 'Linear Read' - object Label1: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLRLinearAddress - end - object lblReadData: TLabel - Left = 7 - Top = 3 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLRDataLength - end - object lblReadBytes: TLabel - Left = 182 - Top = 186 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - FocusControl = txtReadBytes - end - object txtLRLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLRDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearRead: TRichEdit - Left = 8 - Top = 20 - Width = 467 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'Linear Write' - ImageIndex = 1 - object lblLWLinearAddress: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLWLinearAddress - end - object lblWriteData: TLabel - Left = 6 - Top = 3 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblRWDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLWDataLength - end - object Label2: TLabel - Left = 182 - Top = 186 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - FocusControl = txtBytesWritten - end - object txtLWLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLWDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearWrite: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearWrite: TRichEdit - Left = 8 - Top = 20 - Width = 466 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - OnChange = txtLinearWriteChange - end - end - end - object stbFunction: TStatusBar - Left = 1 - Top = 252 - Width = 514 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 107 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - end - object pnlAuth: TPanel - Left = 0 - Top = 182 - Width = 516 - Height = 31 - Align = alTop - BevelOuter = bvLowered - Caption = ' ' - Ctl3D = True - ParentCtl3D = False - TabOrder = 4 - object rbAUTH1A: TRadioButton - Left = 103 - Top = 8 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 316 - Top = 8 - Width = 81 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 384 - Top = 488 - end - object mnuMain: TMainMenu - Left = 384 - Top = 528 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end -end diff --git a/old_move_to_branch/uFCoderSimple_D7/uFSimple.~pas b/old_move_to_branch/uFCoderSimple_D7/uFSimple.~pas deleted file mode 100644 index b16e8eee5d1abcee421124f1ef269e64ccee603e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_D7/uFSimple.~pas +++ /dev/null @@ -1,718 +0,0 @@ - - -unit uFSimple; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls,uFCoder1x, StdCtrls,Menus; -type - TKeyArray=array[0..5] of byte; -type - TfrmuFrSimple = class(TForm) - pnlReader: TPanel; - pnlFormattCard: TPanel; - stbCard: TStatusBar; - stbReader: TStatusBar; - pnlLinearRW: TPanel; - lblReaderType: TLabel; - txtReaderType: TEdit; - lblReaderSerial: TLabel; - txtReaderSerial: TEdit; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardSerial: TLabel; - Bevel1: TBevel; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUISignal: TButton; - Timer: TTimer; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearWrite: TTabSheet; - Label1: TLabel; - lblReadData: TLabel; - txtLRLinearAddress: TEdit; - lblDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - lblLWLinearAddress: TLabel; - lblWriteData: TLabel; - txtLWLinearAddress: TEdit; - lblRWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - mnuMain: TMainMenu; - mnuExitItem: TMenuItem; - stbFunction: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblReadBytes: TLabel; - txtReadBytes: TEdit; - Label2: TLabel; - txtBytesWritten: TEdit; - pgNewCardReaderKeys: TPageControl; - tabNewCardKeys: TTabSheet; - tabNewRaedarKey: TTabSheet; - lblKeyB: TLabel; - lblKeyA: TLabel; - chkNewCardKeysHex: TCheckBox; - btnFormatCardKeys: TButton; - lblSectorFormatted: TLabel; - txtSectorForrmatted: TEdit; - btnFormatReaderKey: TButton; - chkNewReaderKeyHex: TCheckBox; - lblKeyIndex: TLabel; - txtKeyIndex: TEdit; - pnlNewCardKeys: TPanel; - pnlNewReaderKey: TPanel; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - txtLinearWrite: TRichEdit; - txtLinearRead: TRichEdit; - txtCardSerial: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnReaderUISignalClick(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnFormatCardKeysClick(Sender: TObject); - - procedure chkNewCardKeysHexClick(Sender: TObject); - procedure chkNewReaderKeyHexClick(Sender: TObject); - procedure btnFormatReaderKeyClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - private - boFunctionStart, - boReaderStart : Boolean; - function GetFunctStart: Boolean; - procedure SetFunctStart(const Value: Boolean); - function GetReaderStart: Boolean; - procedure SetReaderStart(const Value: Boolean); - - private - boCONN :Boolean; - ERROR_CODE:array[0..200] of string; - - procedure CreateKey(key_height,key_width,key_left,key_top:Byte;key_name:string;bKeyTag:byte;pnlContainer:TPanel); - procedure OnMyKeyPress(Sender:TObject;var Key:Char); - procedure OnMyKeyExit(Sender:TObject); - procedure ConvertDecHex(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel); - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - function DecHexConversion(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel):TKeyArray; - function AuthMode:byte; - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - public - - end; -const - - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_LOCKED = 118; - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT='You must enter a number between 0 and 255 !'; - - NEW_CARD_KEY_A = 'txtNewCardKeyA'; - NEW_CARD_KEY_B = 'txtNewCardKeyB'; - NEW_READER_KEY = 'txtNewReaderKey'; - - - - -var - frmuFrSimple: TfrmuFrSimple; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimple.CreateKey(key_height, key_width, key_left,key_top: Byte; key_name: string;bKeyTag:byte; pnlContainer:TPanel); -var - br :byte; - edit_key:array[0..6] of TEdit; -begin - for br:=0 to MAX_KEY_INDEX do - begin - edit_key[br] :=TEdit.Create(self); - with edit_key[br] do - begin - Height :=key_height; - Width :=key_width; - Left :=key_left+(key_width*br+2); - Top :=key_top; - Font.Name :='Verdana'; - Font.Style :=[fsBold]; - Font.Size :=8; - MaxLength :=3; - Text :='255'; - Tag :=bKeyTag; - ReadOnly :=false; - name :=key_name+IntToStr(br); - OnKeyPress :=OnMyKeyPress; - OnExit :=OnMyKeyExit; - CharCase :=ecUpperCase; - Parent :=pnlContainer; - end; - end; - -end; - -procedure TfrmuFrSimple.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimple.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - - - CreateKey(24,30,3,3,NEW_CARD_KEY_A,1, pnlNewCardKeys); - CreateKey(24,30,3,23,NEW_CARD_KEY_B,2,pnlNewCardKeys); - CreateKey(24,30,3,8,NEW_READER_KEY,3,pnlNewReaderKey); - boCONN:=false; -end; - -procedure TfrmuFrSimple.btnReaderUISignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wReadBytes :Word; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr Then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - On Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - txtLinearRead.Clear; - New(PData); - wReadBytes := 0; - wLinearAddress := StrToInt(Trim(txtLRLinearAddress.Text)); - wDataLength := StrToInt(Trim(txtLRDataLength.Text)); - bAuthMode := AuthMode(); - bKeyIndex := StrToInt(txtKeyIndex.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - iFResult := LinearRead(PData,wLinearAddress,wDataLength,wReadBytes,bAuthMode,bKeyIndex); - - if iFResult = DL_OK then - begin - txtLinearRead.Text :=String(baReadData); - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult) - end - else - begin - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; - - -end; - -procedure TfrmuFrSimple.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - PData :PByte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOk],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOk],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PData); - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - wLinearAddress:=StrToInt(Trim(txtLWLinearAddress.Text)); - wDataLength :=StrToInt(Trim(txtLWDataLength.Text)); - PData :=PByte(txtLinearWrite.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; -end; - - - -procedure TfrmuFrSimple.btnFormatCardKeysClick(Sender: TObject); -var - PKeyA:PByte; - PKeyB:PByte; - KeyA:TKeyArray; - KeyB:TKeyArray; - bSectorsFormatted:Byte; - bBlockAccessBits, - bTrailerAccessBits, - bTrailerBits9 :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - bytes_ret:word; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - try - New(PKeyA); - New(PKeyB); - - KeyA:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - KeyB:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); - - PKeyA:=PByte(@KeyA); - PKeyB:=PByte(@KeyB); - bBlockAccessBits :=0; - bTrailerAccessBits :=1; - bTrailerBits9 :=45; - bSectorsFormatted :=0; - - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - - - iFResult:=LinearFormatCard(PKeyA,bBlockAccessBits,bTrailerAccessBits,bTrailerBits9,PKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are not formatted successfully !',mtError,[mbOK],0); - end; - except - on EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - finally - PKeyA:=nil; - PKeyB:=nil; - Dispose(PKeyA); - Dispose(PKeyB); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.chkNewCardKeysHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); -end; - -procedure TfrmuFrSimple.OnMyKeyPress(Sender: TObject; var Key: Char); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - try - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) then - begin - TB.MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else - begin - TB.MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; - except - on EConvertError do - end; -end; - - - -function TfrmuFrSimple.AuthMode: byte; -begin - if rbAUTH1A.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - -function TfrmuFrSimple.DecHexConversion(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel): TKeyArray; -var - baKeyArray:TKeyArray; - bCounter:byte; -begin - for bCounter:=0 to MAX_KEY_INDEX do - begin - if chkCheckBox.Checked then - begin - baKeyArray[bCounter]:=StrToInt(HexDisplayPrefix+(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text))); - end - else - begin - baKeyArray[bCounter]:=StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text)); - end; - end; - Result:=baKeyArray; - end; - - - - -procedure TfrmuFrSimple.ConvertDecHex(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel); -var - bBr:byte; -begin - try - for bBr:=0 to MAX_KEY_INDEX do - begin - if Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)=EmptyStr then - Continue - else - begin - if chkCheckBox.Checked then - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToHex(StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)),2); - end - else - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToStr(StrToInt(HexDisplayPrefix+Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text))); - end; - end; - end; - except - on EConvertError do - Exit; - end; -end; - -procedure TfrmuFrSimple.chkNewReaderKeyHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); -end; - -procedure TfrmuFrSimple.btnFormatReaderKeyClick(Sender: TObject); -var - PReaderKey:PByte; - baReaderKey:TKeyArray; - iFResult:DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PReaderKey); - PReaderKey:=@baReaderKey; - baReaderKey:=DecHexConversion(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); - iFResult:=ReaderKeyWrite(PReaderKey,key_index); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is not formatted successfully !',mtError,[mbOK],0); - end; - - finally - PReaderKey:=nil; - Dispose(PReaderKey); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.OnMyKeyExit(Sender: TObject); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) or (Trim(TB.Text)=EmptyStr) Then Exit; - if StrToInt(Trim(TB.Text))>255 then - begin - MessageDlg(APPROPRIATE_FORMAT,mtError,[mbOK],0); - TB.Undo(); - TB.SetFocus(); - Exit; - end; -end; - - - - -procedure TfrmuFrSimple.MainLoop; -var - iRResult, - iCResult :LongInt; - iReaderType, - iReaderSerial, - iCardSerial:LongInt; - bCardType, - bDLCardType, - bCardUIDSize, - bBr :Byte; - baCardUID:array[0..9] of Byte; - sBuffer :String; - -begin - sBuffer:=''; - SetReaderStart(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - SetStatusBar(stbReader,iRResult); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult) - end - else - begin - boCONN:=false; - ReaderClose(); - SetStatusBar(stbReader,iRResult); - end; - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder1x.DL_NTAG_216 then - btnFormatCardKeys.Enabled:=false - else - btnFormatCardKeys.Enabled:=true; - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType .Text:='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial .Text:='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - txtCardSerial .Clear; - txtCardType .Clear; - txtCardUIDSize.Clear; - btnFormatCardKeys.Enabled:=true; - SetStatusBar(stbCard,iCResult); - end; - end; - SetReaderStart(false); - -end; - -function TfrmuFrSimple.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -procedure TfrmuFrSimple.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimple.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrSimple.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - -procedure TfrmuFrSimple.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -procedure TfrmuFrSimple.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop(); -end; - -procedure TfrmuFrSimple.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(txtLinearWrite.Text)); -end; - -end. diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder-x86.dll b/old_move_to_branch/uFCoderSimple_XE/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder-x86_64.dll b/old_move_to_branch/uFCoderSimple_XE/uFCoder-x86_64.dll deleted file mode 100644 index dac4290609d32257ca8a0caf4418d0ab8dcddd26..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFCoder-x86_64.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder.dcu b/old_move_to_branch/uFCoderSimple_XE/uFCoder.dcu deleted file mode 100644 index 24ab7a00b6ff4eeffa21073e5d351ae40abc1c8a..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder.pas b/old_move_to_branch/uFCoderSimple_XE/uFCoder.pas deleted file mode 100644 index 98d96f316f10a97956319e8c9b75f47e030790ee..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFCoder.pas +++ /dev/null @@ -1,129 +0,0 @@ - -unit uFCoder; - -interface -const - MIFARE_CLASSIC_1k = $08; -const - MF1ICS50 = $08; -const - SLE66R35 = $88; -const - MIFARE_CLASSIC_4k = $18; -const - MF1ICS70 = $18; -const - MIFARE_CLASSIC_MINI = $09; -const - MF1ICS20 = $09; -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - - - -const DLL_NAME = 'uFCoder-x86.dll'; -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - MAX_BLOCK = 15; - FORMAT_SIGN = $FF; - KEY_INDEX = 0; - -function ReaderOpen: DL_STATUS stdcall; - -function ReaderClose: DL_STATUS stdcall; - -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - -function GetReaderSerialNumber(var lpulSerialNumber: LongInt): DL_STATUS stdcall ; - -function ReaderUISignal(light_mode: Byte;sound_mode: Byte): DL_STATUS stdcall; - -function GetCardId(var lpucCardType: Byte;var lpulCardSerial: LongInt): DL_STATUS stdcall; - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; - - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -function LinearRead(aucData :PByte; - usLinearAddress : Word; - usDataLength : Word; - var iBytesReturned: Word; - ucKeyMode : Byte; - ucReaderKeyIndex : Byte): DL_STATUS stdcall; - - -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function LinearFormatCard(const new_key_A: PByte; - blocks_access_bits: Byte; - sector_trailers_access_bits: Byte; - sector_trailers_byte9: Byte; - const new_key_B: PByte; - var SectorsFormatted:Byte; - auth_mode: Byte; - key_index: Byte): DL_STATUS stdcall; - -function ReaderKeyWrite(const aucKey:PByte;ucKeyIndex: Byte): DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetReaderSerialNumber; external DLL_NAME; -function GetCardId; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function LinearFormatCard; external DLL_NAME; -function ReaderKeyWrite; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder_coff-x86_64.lib b/old_move_to_branch/uFCoderSimple_XE/uFCoder_coff-x86_64.lib deleted file mode 100644 index cb2f101bab717bf1fe4a597c5aa2c8c66b5aea13..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFCoder_coff-x86_64.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder_coff.lib b/old_move_to_branch/uFCoderSimple_XE/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFCoder_omf.lib b/old_move_to_branch/uFCoderSimple_XE/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.cfg b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dof b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dof deleted file mode 100644 index ed723d98874941c369f061f16193212d10f5d07e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Formating keys card and key of reader card .Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dpr b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dpr deleted file mode 100644 index 23245c02e12397156a833926aee8cc30f26e102b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dpr +++ /dev/null @@ -1,16 +0,0 @@ -program uFrSimple; - -uses - Forms, - uFSimple in 'uFSimple.pas' {frmuFrSimple}, - uFCoder in 'uFCoder.pas'; - -{$R *.res} - - -begin - Application.Initialize; - Application.Title := 'uFr Simple'; - Application.CreateForm(TfrmuFrSimple, frmuFrSimple); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dproj b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dproj deleted file mode 100644 index a57fabb0ecb2dcf5b60ef21e71c760c0717f7d14..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dproj +++ /dev/null @@ -1,131 +0,0 @@ - - - {943D0AB1-7CFE-4199-AE84-24B897211986} - uFRSimple.dpr - True - Debug - 1 - Application - VCL - 16.1 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - 00400000 - Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) - 2 - false - false - uFRSimple - 2074 - vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FLabel;$(DCC_UsePackage) - CompanyName=D-Logic;FileDescription=Formating keys card and key of reader card .Support for 4k;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0.0.0;Comments= - 1 - false - false - true - 1 - true - - - uFRSimple_Icon1.ico - System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - 1033 - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - true - $(BDS)\bin\default_app.manifest - - - uFRSimple_Icon1.ico - - - 0 - RELEASE;$(DCC_Define) - false - 0 - - - DEBUG;$(DCC_Define) - false - true - - - 1 - $(BDS)\bin\delphi_PROJECTICON.ico - 1033 - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - - - - MainSource - - -
frmuFrSimple
-
- - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - - - - - uFRSimple.dpr - - - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - True - False - - - 12 - - - -
diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dproj.local b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dproj.local deleted file mode 100644 index d576f03962027e2bac3b906aeeac122ec124b397..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.dproj.local +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.exe b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.exe deleted file mode 100644 index af6a8a9d2a4a8462482acc0f47ee23002ac9a242..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.identcache b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.identcache deleted file mode 100644 index b072f6f58b30688069b03d7c2b491f9e2ec946b7..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.identcache and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.res b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.res deleted file mode 100644 index d6cf6329cd078224d25f1d767092617dce629de1..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.~dpr b/old_move_to_branch/uFCoderSimple_XE/uFRSimple.~dpr deleted file mode 100644 index 22b4fbb20d4e03fd4d47801e14c904fd92cdb1fc..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFRSimple.~dpr +++ /dev/null @@ -1,16 +0,0 @@ -program uFrSimple; - -uses - Forms, - uFSimple in 'uFSimple.pas' {frmuFrSimple}, - uFCoder1x in 'uFCoder1x.pas'; - -{$R *.res} - - -begin - Application.Initialize; - Application.Title := 'uFr Simple'; - Application.CreateForm(TfrmuFrSimple, frmuFrSimple); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple_Icon.ico b/old_move_to_branch/uFCoderSimple_XE/uFRSimple_Icon.ico deleted file mode 100644 index cfd8992a5b8ff4b89478d89e93ae9205bb8125ef..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFRSimple_Icon.ico and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFRSimple_Icon1.ico b/old_move_to_branch/uFCoderSimple_XE/uFRSimple_Icon1.ico deleted file mode 100644 index cfd8992a5b8ff4b89478d89e93ae9205bb8125ef..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFRSimple_Icon1.ico and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.dcu b/old_move_to_branch/uFCoderSimple_XE/uFSimple.dcu deleted file mode 100644 index f5fa4bcb51147bd437fcb4af60a520a997d41758..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFSimple.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.ddp b/old_move_to_branch/uFCoderSimple_XE/uFSimple.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFSimple.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.dfm b/old_move_to_branch/uFCoderSimple_XE/uFSimple.dfm deleted file mode 100644 index 17948ac38dd18a4c86286f1c9994d1e7c3ff96e9..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFSimple.dfm +++ /dev/null @@ -1,755 +0,0 @@ -object frmuFrSimple: TfrmuFrSimple - Left = 424 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simple ' - ClientHeight = 636 - ClientWidth = 516 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMain - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 516 - Height = 182 - Align = alTop - Caption = ' ' - TabOrder = 0 - object lblReaderType: TLabel - Left = 27 - Top = 24 - Width = 72 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 27 - Top = 48 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 273 - Top = 24 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 273 - Top = 48 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 27 - Top = 80 - Width = 477 - Height = 6 - end - object lblLightMode: TLabel - Left = 47 - Top = 104 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 47 - Top = 128 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 405 - Top = 24 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 160 - Width = 514 - Height = 21 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtReaderType: TEdit - Left = 118 - Top = 22 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtReaderSerial: TEdit - Left = 118 - Top = 46 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object txtCardType: TEdit - Left = 343 - Top = 22 - Width = 34 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object cboLightMode: TComboBox - Left = 138 - Top = 99 - Width = 115 - Height = 21 - Ctl3D = False - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 4 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 138 - Top = 123 - Width = 115 - Height = 21 - Ctl3D = False - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUISignal: TButton - Left = 304 - Top = 99 - Width = 173 - Height = 45 - Cursor = crHandPoint - Caption = 'READER UI SIGNAL' - TabOrder = 6 - OnClick = btnReaderUISignalClick - end - object txtCardUIDSize: TEdit - Left = 465 - Top = 22 - Width = 34 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 7 - end - object txtCardSerial: TEdit - Left = 344 - Top = 46 - Width = 156 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - end - object pnlFormattCard: TPanel - Left = 0 - Top = 213 - Width = 516 - Height = 132 - Align = alTop - BorderStyle = bsSingle - Caption = ' ' - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object pgNewCardReaderKeys: TPageControl - Left = 24 - Top = 8 - Width = 449 - Height = 113 - ActivePage = tabNewCardKeys - TabOrder = 0 - object tabNewCardKeys: TTabSheet - Caption = 'New Card Keys' - object lblKeyB: TLabel - Left = 24 - Top = 33 - Width = 34 - Height = 13 - Caption = 'Key B' - end - object lblKeyA: TLabel - Left = 24 - Top = 10 - Width = 34 - Height = 13 - Caption = 'Key A' - end - object lblSectorFormatted: TLabel - Left = 273 - Top = 61 - Width = 99 - Height = 13 - Alignment = taCenter - Caption = 'Sector Formatted' - end - object chkNewCardKeysHex: TCheckBox - Left = 72 - Top = 59 - Width = 65 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - OnClick = chkNewCardKeysHexClick - end - object btnFormatCardKeys: TButton - Left = 271 - Top = 4 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnFormatCardKeysClick - end - object txtSectorForrmatted: TEdit - Left = 400 - Top = 53 - Width = 33 - Height = 24 - Color = clSilver - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object pnlNewCardKeys: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 53 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - object tabNewRaedarKey: TTabSheet - Caption = 'New Reader Key' - ImageIndex = 1 - object lblKeyIndex: TLabel - Left = 163 - Top = 56 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object btnFormatReaderKey: TButton - Left = 271 - Top = 18 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnClick = btnFormatReaderKeyClick - end - object chkNewReaderKeyHex: TCheckBox - Left = 74 - Top = 51 - Width = 52 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - OnClick = chkNewReaderKeyHexClick - end - object txtKeyIndex: TEdit - Left = 235 - Top = 51 - Width = 21 - Height = 29 - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentFont = False - ReadOnly = True - TabOrder = 2 - Text = '0' - end - object pnlNewReaderKey: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 41 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - end - end - object stbCard: TStatusBar - Left = 0 - Top = 617 - Width = 516 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlLinearRW: TPanel - Left = 0 - Top = 345 - Width = 516 - Height = 272 - Align = alClient - TabOrder = 3 - object pgLinearReadWrite: TPageControl - Left = 1 - Top = 1 - Width = 514 - Height = 251 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 0 - object tabLinearRead: TTabSheet - Caption = 'Linear Read' - object Label1: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLRLinearAddress - end - object lblReadData: TLabel - Left = 7 - Top = 3 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLRDataLength - end - object lblReadBytes: TLabel - Left = 182 - Top = 186 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - FocusControl = txtReadBytes - end - object txtLRLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLRDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearRead: TRichEdit - Left = 8 - Top = 20 - Width = 467 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - end - end - object tabLinearWrite: TTabSheet - Caption = 'Linear Write' - ImageIndex = 1 - object lblLWLinearAddress: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLWLinearAddress - end - object lblWriteData: TLabel - Left = 6 - Top = 3 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblRWDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLWDataLength - end - object Label2: TLabel - Left = 182 - Top = 186 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - FocusControl = txtBytesWritten - end - object txtLWLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLWDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearWrite: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearWrite: TRichEdit - Left = 8 - Top = 20 - Width = 466 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - Zoom = 100 - OnChange = txtLinearWriteChange - end - end - end - object stbFunction: TStatusBar - Left = 1 - Top = 252 - Width = 514 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 107 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - end - object pnlAuth: TPanel - Left = 0 - Top = 182 - Width = 516 - Height = 31 - Align = alTop - BevelOuter = bvLowered - Caption = ' ' - Ctl3D = True - ParentCtl3D = False - TabOrder = 4 - object rbAUTH1A: TRadioButton - Left = 103 - Top = 8 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 316 - Top = 8 - Width = 81 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 384 - Top = 488 - end - object mnuMain: TMainMenu - Left = 384 - Top = 528 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end -end diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.pas b/old_move_to_branch/uFCoderSimple_XE/uFSimple.pas deleted file mode 100644 index 2738b296af942107e5bfa5fe4d7cf285b4e6e40f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFSimple.pas +++ /dev/null @@ -1,723 +0,0 @@ - - -unit uFSimple; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls,uFCoder, StdCtrls,Menus; -type - TKeyArray=array[0..5] of byte; -type - TfrmuFrSimple = class(TForm) - pnlReader: TPanel; - pnlFormattCard: TPanel; - stbCard: TStatusBar; - stbReader: TStatusBar; - pnlLinearRW: TPanel; - lblReaderType: TLabel; - txtReaderType: TEdit; - lblReaderSerial: TLabel; - txtReaderSerial: TEdit; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardSerial: TLabel; - Bevel1: TBevel; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUISignal: TButton; - Timer: TTimer; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearWrite: TTabSheet; - Label1: TLabel; - lblReadData: TLabel; - txtLRLinearAddress: TEdit; - lblDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - lblLWLinearAddress: TLabel; - lblWriteData: TLabel; - txtLWLinearAddress: TEdit; - lblRWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - mnuMain: TMainMenu; - mnuExitItem: TMenuItem; - stbFunction: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblReadBytes: TLabel; - txtReadBytes: TEdit; - Label2: TLabel; - txtBytesWritten: TEdit; - pgNewCardReaderKeys: TPageControl; - tabNewCardKeys: TTabSheet; - tabNewRaedarKey: TTabSheet; - lblKeyB: TLabel; - lblKeyA: TLabel; - chkNewCardKeysHex: TCheckBox; - btnFormatCardKeys: TButton; - lblSectorFormatted: TLabel; - txtSectorForrmatted: TEdit; - btnFormatReaderKey: TButton; - chkNewReaderKeyHex: TCheckBox; - lblKeyIndex: TLabel; - txtKeyIndex: TEdit; - pnlNewCardKeys: TPanel; - pnlNewReaderKey: TPanel; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - txtLinearWrite: TRichEdit; - txtLinearRead: TRichEdit; - txtCardSerial: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnReaderUISignalClick(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnFormatCardKeysClick(Sender: TObject); - - procedure chkNewCardKeysHexClick(Sender: TObject); - procedure chkNewReaderKeyHexClick(Sender: TObject); - procedure btnFormatReaderKeyClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - private - boFunctionStart, - boReaderStart : Boolean; - function GetFunctStart: Boolean; - procedure SetFunctStart(const Value: Boolean); - function GetReaderStart: Boolean; - procedure SetReaderStart(const Value: Boolean); - - private - boCONN :Boolean; - ERROR_CODE:array[0..200] of string; - - procedure CreateKey(key_height,key_width,key_left,key_top:Byte;key_name:string;bKeyTag:byte;pnlContainer:TPanel); - procedure OnMyKeyPress(Sender:TObject;var Key:Char); - procedure OnMyKeyExit(Sender:TObject); - procedure ConvertDecHex(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel); - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - function DecHexConversion(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel):TKeyArray; - function AuthMode:byte; - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - public - - end; -const - - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_LOCKED = 118; - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT='You must enter a number between 0 and 255 !'; - - NEW_CARD_KEY_A = 'txtNewCardKeyA'; - NEW_CARD_KEY_B = 'txtNewCardKeyB'; - NEW_READER_KEY = 'txtNewReaderKey'; - - - - -var - frmuFrSimple: TfrmuFrSimple; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimple.CreateKey(key_height, key_width, key_left,key_top: Byte; key_name: string;bKeyTag:byte; pnlContainer:TPanel); -var - br :byte; - edit_key:array[0..6] of TEdit; -begin - for br:=0 to MAX_KEY_INDEX do - begin - edit_key[br] :=TEdit.Create(self); - with edit_key[br] do - begin - Height :=key_height; - Width :=key_width; - Left :=key_left+(key_width*br+2); - Top :=key_top; - Font.Name :='Verdana'; - Font.Style :=[fsBold]; - Font.Size :=8; - MaxLength :=3; - Text :='255'; - Tag :=bKeyTag; - ReadOnly :=false; - name :=key_name+IntToStr(br); - OnKeyPress :=OnMyKeyPress; - OnExit :=OnMyKeyExit; - CharCase :=ecUpperCase; - Parent :=pnlContainer; - end; - end; - -end; - -procedure TfrmuFrSimple.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimple.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - - - CreateKey(24,30,3,3,NEW_CARD_KEY_A,1, pnlNewCardKeys); - CreateKey(24,30,3,23,NEW_CARD_KEY_B,2,pnlNewCardKeys); - CreateKey(24,30,3,8,NEW_READER_KEY,3,pnlNewReaderKey); - boCONN:=false; -end; - -procedure TfrmuFrSimple.btnReaderUISignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wReadBytes :Word; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; - i:integer; - s:string; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr Then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - On Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - txtLinearRead.Clear; - New(PData); - wReadBytes := 0; - wLinearAddress := StrToInt(Trim(txtLRLinearAddress.Text)); - wDataLength := StrToInt(Trim(txtLRDataLength.Text)); - bAuthMode := AuthMode(); - bKeyIndex := StrToInt(txtKeyIndex.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - iFResult := LinearRead(PData,wLinearAddress,wDataLength,wReadBytes,bAuthMode,bKeyIndex); - - if iFResult = DL_OK then - begin - for I := 0 to length(baReadData)-1 do s:=s+chr(baReadDAta[i]); - - //txtLinearRead.Text :=String(baReadData); - txtLinearRead.Text := s; - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult) - end - else - begin - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; - - -end; - -procedure TfrmuFrSimple.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - PData :PByte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOk],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOk],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PData); - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - wLinearAddress:=StrToInt(Trim(txtLWLinearAddress.Text)); - wDataLength :=StrToInt(Trim(txtLWDataLength.Text)); - PData :=PByte(txtLinearWrite.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; -end; - - - -procedure TfrmuFrSimple.btnFormatCardKeysClick(Sender: TObject); -var - PKeyA:PByte; - PKeyB:PByte; - KeyA:TKeyArray; - KeyB:TKeyArray; - bSectorsFormatted:Byte; - bBlockAccessBits, - bTrailerAccessBits, - bTrailerBits9 :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - bytes_ret:word; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - try - New(PKeyA); - New(PKeyB); - - KeyA:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - KeyB:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); - - PKeyA:=PByte(@KeyA); - PKeyB:=PByte(@KeyB); - bBlockAccessBits :=0; - bTrailerAccessBits :=1; - bTrailerBits9 :=45; - bSectorsFormatted :=0; - - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - - - iFResult:=LinearFormatCard(PKeyA,bBlockAccessBits,bTrailerAccessBits,bTrailerBits9,PKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are not formatted successfully !',mtError,[mbOK],0); - end; - except - on EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - finally - PKeyA:=nil; - PKeyB:=nil; - Dispose(PKeyA); - Dispose(PKeyB); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.chkNewCardKeysHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); -end; - -procedure TfrmuFrSimple.OnMyKeyPress(Sender: TObject; var Key: Char); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - try - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) then - begin - TB.MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else - begin - TB.MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; - except - on EConvertError do - end; -end; - - - -function TfrmuFrSimple.AuthMode: byte; -begin - if rbAUTH1A.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - -function TfrmuFrSimple.DecHexConversion(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel): TKeyArray; -var - baKeyArray:TKeyArray; - bCounter:byte; -begin - for bCounter:=0 to MAX_KEY_INDEX do - begin - if chkCheckBox.Checked then - begin - baKeyArray[bCounter]:=StrToInt(HexDisplayPrefix+(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text))); - end - else - begin - baKeyArray[bCounter]:=StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text)); - end; - end; - Result:=baKeyArray; - end; - - - - -procedure TfrmuFrSimple.ConvertDecHex(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel); -var - bBr:byte; -begin - try - for bBr:=0 to MAX_KEY_INDEX do - begin - if Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)=EmptyStr then - Continue - else - begin - if chkCheckBox.Checked then - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToHex(StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)),2); - end - else - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToStr(StrToInt(HexDisplayPrefix+Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text))); - end; - end; - end; - except - on EConvertError do - Exit; - end; -end; - -procedure TfrmuFrSimple.chkNewReaderKeyHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); -end; - -procedure TfrmuFrSimple.btnFormatReaderKeyClick(Sender: TObject); -var - PReaderKey:PByte; - baReaderKey:TKeyArray; - iFResult:DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PReaderKey); - PReaderKey:=@baReaderKey; - baReaderKey:=DecHexConversion(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); - iFResult:=ReaderKeyWrite(PReaderKey,key_index); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is not formatted successfully !',mtError,[mbOK],0); - end; - - finally - PReaderKey:=nil; - Dispose(PReaderKey); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.OnMyKeyExit(Sender: TObject); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) or (Trim(TB.Text)=EmptyStr) Then Exit; - if StrToInt(Trim(TB.Text))>255 then - begin - MessageDlg(APPROPRIATE_FORMAT,mtError,[mbOK],0); - TB.Undo(); - TB.SetFocus(); - Exit; - end; -end; - - - - -procedure TfrmuFrSimple.MainLoop; -var - iRResult, - iCResult :LongInt; - iReaderType, - iReaderSerial, - iCardSerial:LongInt; - bCardType, - bDLCardType, - bCardUIDSize, - bBr :Byte; - baCardUID:array[0..9] of Byte; - sBuffer :String; - -begin - sBuffer:=''; - SetReaderStart(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - SetStatusBar(stbReader,iRResult); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult) - end - else - begin - boCONN:=false; - ReaderClose(); - SetStatusBar(stbReader,iRResult); - end; - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=DL_NTAG_216 then - btnFormatCardKeys.Enabled:=false - else - btnFormatCardKeys.Enabled:=true; - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType .Text:='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial .Text:='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - txtCardSerial .Clear; - txtCardType .Clear; - txtCardUIDSize.Clear; - btnFormatCardKeys.Enabled:=true; - SetStatusBar(stbCard,iCResult); - end; - end; - SetReaderStart(false); - -end; - -function TfrmuFrSimple.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -procedure TfrmuFrSimple.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimple.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrSimple.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - -procedure TfrmuFrSimple.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -procedure TfrmuFrSimple.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop(); -end; - -procedure TfrmuFrSimple.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(txtLinearWrite.Text)); -end; - -end. diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.~ddp b/old_move_to_branch/uFCoderSimple_XE/uFSimple.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimple_XE/uFSimple.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.~dfm b/old_move_to_branch/uFCoderSimple_XE/uFSimple.~dfm deleted file mode 100644 index 1114e157e903e92412124159ef7f1e5bd1b0a2c0..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFSimple.~dfm +++ /dev/null @@ -1,755 +0,0 @@ -object frmuFrSimple: TfrmuFrSimple - Left = 424 - Top = 15 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simple ' - ClientHeight = 636 - ClientWidth = 516 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMain - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlReader: TPanel - Left = 0 - Top = 0 - Width = 516 - Height = 182 - Align = alTop - Caption = ' ' - TabOrder = 0 - object lblReaderType: TLabel - Left = 27 - Top = 24 - Width = 73 - Height = 13 - Caption = 'Reader Type' - end - object lblReaderSerial: TLabel - Left = 27 - Top = 48 - Width = 78 - Height = 13 - Caption = 'Reader Serial' - end - object lblCardType: TLabel - Left = 273 - Top = 24 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardSerial: TLabel - Left = 273 - Top = 48 - Width = 65 - Height = 13 - Caption = 'Card Serial' - end - object Bevel1: TBevel - Left = 27 - Top = 80 - Width = 477 - Height = 6 - end - object lblLightMode: TLabel - Left = 47 - Top = 104 - Width = 61 - Height = 13 - Caption = 'Light Mode' - end - object lblSoundMode: TLabel - Left = 47 - Top = 128 - Width = 70 - Height = 13 - Caption = 'Sound Mode' - end - object lblCardUIDSize: TLabel - Left = 405 - Top = 24 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object stbReader: TStatusBar - Left = 1 - Top = 160 - Width = 514 - Height = 21 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtReaderType: TEdit - Left = 118 - Top = 22 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 1 - end - object txtReaderSerial: TEdit - Left = 118 - Top = 46 - Width = 100 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object txtCardType: TEdit - Left = 343 - Top = 22 - Width = 34 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - end - object cboLightMode: TComboBox - Left = 138 - Top = 99 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 4 - Text = 'None' - Items.Strings = ( - 'None' - 'Long Green' - 'LongRed' - 'Alternation' - 'Flash') - end - object cboSoundMode: TComboBox - Left = 138 - Top = 123 - Width = 115 - Height = 21 - Ctl3D = False - ItemHeight = 13 - ItemIndex = 0 - ParentCtl3D = False - TabOrder = 5 - Text = 'None' - Items.Strings = ( - 'None' - 'Short' - 'Long' - 'Double Short' - 'Tripple Short' - 'Tripplet Melody') - end - object btnReaderUISignal: TButton - Left = 304 - Top = 99 - Width = 173 - Height = 45 - Cursor = crHandPoint - Caption = 'READER UI SIGNAL' - TabOrder = 6 - OnClick = btnReaderUISignalClick - end - object txtCardUIDSize: TEdit - Left = 465 - Top = 22 - Width = 34 - Height = 19 - Hint = 'Card UID Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = False - TabOrder = 7 - end - object txtCardSerial: TEdit - Left = 344 - Top = 46 - Width = 156 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 8 - end - end - object pnlFormattCard: TPanel - Left = 0 - Top = 213 - Width = 516 - Height = 132 - Align = alTop - BorderStyle = bsSingle - Caption = ' ' - Ctl3D = False - ParentCtl3D = False - TabOrder = 1 - object pgNewCardReaderKeys: TPageControl - Left = 24 - Top = 8 - Width = 449 - Height = 113 - ActivePage = tabNewCardKeys - TabOrder = 0 - object tabNewCardKeys: TTabSheet - Caption = 'New Card Keys' - object lblKeyB: TLabel - Left = 24 - Top = 33 - Width = 34 - Height = 13 - Caption = 'Key B' - end - object lblKeyA: TLabel - Left = 24 - Top = 10 - Width = 34 - Height = 13 - Caption = 'Key A' - end - object lblSectorFormatted: TLabel - Left = 273 - Top = 61 - Width = 99 - Height = 13 - Alignment = taCenter - Caption = 'Sector Formatted' - end - object chkNewCardKeysHex: TCheckBox - Left = 72 - Top = 59 - Width = 65 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 0 - OnClick = chkNewCardKeysHexClick - end - object btnFormatCardKeys: TButton - Left = 271 - Top = 4 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnFormatCardKeysClick - end - object txtSectorForrmatted: TEdit - Left = 400 - Top = 53 - Width = 33 - Height = 24 - Color = clSilver - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - object pnlNewCardKeys: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 53 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - object tabNewRaedarKey: TTabSheet - Caption = 'New Reader Key' - ImageIndex = 1 - object lblKeyIndex: TLabel - Left = 163 - Top = 56 - Width = 59 - Height = 13 - Caption = 'Key Index' - end - object btnFormatReaderKey: TButton - Left = 271 - Top = 18 - Width = 162 - Height = 47 - Cursor = crHandPoint - Caption = 'FORMAT CARD KEYS' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnClick = btnFormatReaderKeyClick - end - object chkNewReaderKeyHex: TCheckBox - Left = 74 - Top = 51 - Width = 52 - Height = 25 - Cursor = crHandPoint - Caption = 'Hex' - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - OnClick = chkNewReaderKeyHexClick - end - object txtKeyIndex: TEdit - Left = 235 - Top = 51 - Width = 21 - Height = 29 - Enabled = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Verdana' - Font.Style = [fsBold] - MaxLength = 2 - ParentFont = False - ReadOnly = True - TabOrder = 2 - Text = '0' - end - object pnlNewReaderKey: TPanel - Left = 69 - Top = 8 - Width = 195 - Height = 41 - BevelOuter = bvNone - Caption = ' ' - TabOrder = 3 - end - end - end - end - object stbCard: TStatusBar - Left = 0 - Top = 617 - Width = 516 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 108 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pnlLinearRW: TPanel - Left = 0 - Top = 345 - Width = 516 - Height = 272 - Align = alClient - TabOrder = 3 - object pgLinearReadWrite: TPageControl - Left = 1 - Top = 1 - Width = 514 - Height = 251 - ActivePage = tabLinearRead - Align = alClient - TabOrder = 0 - object tabLinearRead: TTabSheet - Caption = 'Linear Read' - object Label1: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLRLinearAddress - end - object lblReadData: TLabel - Left = 7 - Top = 3 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLRDataLength - end - object lblReadBytes: TLabel - Left = 182 - Top = 186 - Width = 65 - Height = 13 - Caption = 'Read Bytes' - FocusControl = txtReadBytes - end - object txtLRLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLRDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearRead: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR READ' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearReadClick - end - object txtReadBytes: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 20 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearRead: TRichEdit - Left = 8 - Top = 20 - Width = 467 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - end - end - object tabLinearWrite: TTabSheet - Caption = 'Linear Write' - ImageIndex = 1 - object lblLWLinearAddress: TLabel - Left = 11 - Top = 173 - Width = 85 - Height = 13 - Caption = 'Linear Address' - FocusControl = txtLWLinearAddress - end - object lblWriteData: TLabel - Left = 6 - Top = 3 - Width = 61 - Height = 13 - Caption = 'Write Data' - end - object lblRWDataLength: TLabel - Left = 11 - Top = 196 - Width = 69 - Height = 13 - Caption = 'Data Length' - FocusControl = txtLWDataLength - end - object Label2: TLabel - Left = 182 - Top = 186 - Width = 77 - Height = 13 - Caption = 'Bytes Written' - FocusControl = txtBytesWritten - end - object txtLWLinearAddress: TEdit - Left = 112 - Top = 171 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 0 - Text = ' ' - end - object txtLWDataLength: TEdit - Left = 112 - Top = 194 - Width = 47 - Height = 19 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - TabOrder = 1 - end - object btnLinearWrite: TButton - Left = 336 - Top = 171 - Width = 141 - Height = 44 - Cursor = crHandPoint - Caption = 'LINEAR WRITE' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Verdana' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = btnLinearWriteClick - end - object txtBytesWritten: TEdit - Left = 269 - Top = 182 - Width = 41 - Height = 19 - Color = clSilver - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 3 - Text = ' ' - end - object txtLinearWrite: TRichEdit - Left = 8 - Top = 20 - Width = 466 - Height = 140 - BevelKind = bkFlat - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 4 - OnChange = txtLinearWriteChange - end - end - end - object stbFunction: TStatusBar - Left = 1 - Top = 252 - Width = 514 - Height = 19 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error:' - Width = 107 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - end - object pnlAuth: TPanel - Left = 0 - Top = 182 - Width = 516 - Height = 31 - Align = alTop - BevelOuter = bvLowered - Caption = ' ' - Ctl3D = True - ParentCtl3D = False - TabOrder = 4 - object rbAUTH1A: TRadioButton - Left = 103 - Top = 8 - Width = 74 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1A' - Checked = True - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - TabStop = True - end - object rbAUTH1B: TRadioButton - Left = 316 - Top = 8 - Width = 81 - Height = 17 - Cursor = crHandPoint - Caption = 'AUTH 1B' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 384 - Top = 488 - end - object mnuMain: TMainMenu - Left = 384 - Top = 528 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end -end diff --git a/old_move_to_branch/uFCoderSimple_XE/uFSimple.~pas b/old_move_to_branch/uFCoderSimple_XE/uFSimple.~pas deleted file mode 100644 index b16e8eee5d1abcee421124f1ef269e64ccee603e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimple_XE/uFSimple.~pas +++ /dev/null @@ -1,718 +0,0 @@ - - -unit uFSimple; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls,uFCoder1x, StdCtrls,Menus; -type - TKeyArray=array[0..5] of byte; -type - TfrmuFrSimple = class(TForm) - pnlReader: TPanel; - pnlFormattCard: TPanel; - stbCard: TStatusBar; - stbReader: TStatusBar; - pnlLinearRW: TPanel; - lblReaderType: TLabel; - txtReaderType: TEdit; - lblReaderSerial: TLabel; - txtReaderSerial: TEdit; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardSerial: TLabel; - Bevel1: TBevel; - lblLightMode: TLabel; - cboLightMode: TComboBox; - lblSoundMode: TLabel; - cboSoundMode: TComboBox; - btnReaderUISignal: TButton; - Timer: TTimer; - pgLinearReadWrite: TPageControl; - tabLinearRead: TTabSheet; - tabLinearWrite: TTabSheet; - Label1: TLabel; - lblReadData: TLabel; - txtLRLinearAddress: TEdit; - lblDataLength: TLabel; - txtLRDataLength: TEdit; - btnLinearRead: TButton; - lblLWLinearAddress: TLabel; - lblWriteData: TLabel; - txtLWLinearAddress: TEdit; - lblRWDataLength: TLabel; - txtLWDataLength: TEdit; - btnLinearWrite: TButton; - mnuMain: TMainMenu; - mnuExitItem: TMenuItem; - stbFunction: TStatusBar; - pnlAuth: TPanel; - rbAUTH1A: TRadioButton; - rbAUTH1B: TRadioButton; - lblReadBytes: TLabel; - txtReadBytes: TEdit; - Label2: TLabel; - txtBytesWritten: TEdit; - pgNewCardReaderKeys: TPageControl; - tabNewCardKeys: TTabSheet; - tabNewRaedarKey: TTabSheet; - lblKeyB: TLabel; - lblKeyA: TLabel; - chkNewCardKeysHex: TCheckBox; - btnFormatCardKeys: TButton; - lblSectorFormatted: TLabel; - txtSectorForrmatted: TEdit; - btnFormatReaderKey: TButton; - chkNewReaderKeyHex: TCheckBox; - lblKeyIndex: TLabel; - txtKeyIndex: TEdit; - pnlNewCardKeys: TPanel; - pnlNewReaderKey: TPanel; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - txtLinearWrite: TRichEdit; - txtLinearRead: TRichEdit; - txtCardSerial: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnReaderUISignalClick(Sender: TObject); - procedure btnLinearReadClick(Sender: TObject); - procedure btnLinearWriteClick(Sender: TObject); - procedure btnFormatCardKeysClick(Sender: TObject); - - procedure chkNewCardKeysHexClick(Sender: TObject); - procedure chkNewReaderKeyHexClick(Sender: TObject); - procedure btnFormatReaderKeyClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure txtLinearWriteChange(Sender: TObject); - private - boFunctionStart, - boReaderStart : Boolean; - function GetFunctStart: Boolean; - procedure SetFunctStart(const Value: Boolean); - function GetReaderStart: Boolean; - procedure SetReaderStart(const Value: Boolean); - - private - boCONN :Boolean; - ERROR_CODE:array[0..200] of string; - - procedure CreateKey(key_height,key_width,key_left,key_top:Byte;key_name:string;bKeyTag:byte;pnlContainer:TPanel); - procedure OnMyKeyPress(Sender:TObject;var Key:Char); - procedure OnMyKeyExit(Sender:TObject); - procedure ConvertDecHex(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel); - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - function DecHexConversion(chkCheckBox:TCheckBox;sKeyName:string;pnlContainer:TPanel):TKeyArray; - function AuthMode:byte; - property FunctionStart:Boolean read GetFunctStart write SetFunctStart; - property ReaderStart :Boolean read GetReaderStart write SetReaderStart; - public - - end; -const - - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FRES_OK_LIGHT = 4; - FRES_OK_SOUND = 0; //4 - KEY_LOCKED = 118; - KEY_INDEX = 0; - MAX_KEY_INDEX = 5; - - CONVERT_ERROR ='You must enter a number between 0 and 255 or 0 and FF hexadecimal !'; - APPROPRIATE_FORMAT='You must enter a number between 0 and 255 !'; - - NEW_CARD_KEY_A = 'txtNewCardKeyA'; - NEW_CARD_KEY_B = 'txtNewCardKeyB'; - NEW_READER_KEY = 'txtNewReaderKey'; - - - - -var - frmuFrSimple: TfrmuFrSimple; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimple.CreateKey(key_height, key_width, key_left,key_top: Byte; key_name: string;bKeyTag:byte; pnlContainer:TPanel); -var - br :byte; - edit_key:array[0..6] of TEdit; -begin - for br:=0 to MAX_KEY_INDEX do - begin - edit_key[br] :=TEdit.Create(self); - with edit_key[br] do - begin - Height :=key_height; - Width :=key_width; - Left :=key_left+(key_width*br+2); - Top :=key_top; - Font.Name :='Verdana'; - Font.Style :=[fsBold]; - Font.Size :=8; - MaxLength :=3; - Text :='255'; - Tag :=bKeyTag; - ReadOnly :=false; - name :=key_name+IntToStr(br); - OnKeyPress :=OnMyKeyPress; - OnExit :=OnMyKeyExit; - CharCase :=ecUpperCase; - Parent :=pnlContainer; - end; - end; - -end; - -procedure TfrmuFrSimple.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimple.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - - - CreateKey(24,30,3,3,NEW_CARD_KEY_A,1, pnlNewCardKeys); - CreateKey(24,30,3,23,NEW_CARD_KEY_B,2,pnlNewCardKeys); - CreateKey(24,30,3,8,NEW_READER_KEY,3,pnlNewReaderKey); - boCONN:=false; -end; - -procedure TfrmuFrSimple.btnReaderUISignalClick(Sender: TObject); -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - ReaderUISignal(cboLightMode.ItemIndex,cboSoundMode.ItemIndex); - finally - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.btnLinearReadClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wReadBytes :Word; - bAuthMode, - bKeyIndex :Byte; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - try - if Trim(txtLRLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOK],0); - txtLRLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLRDataLength.Text)=EmptyStr Then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLRDataLength.SetFocus; - Exit; - end; - Except - On Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - txtLinearRead.Clear; - New(PData); - wReadBytes := 0; - wLinearAddress := StrToInt(Trim(txtLRLinearAddress.Text)); - wDataLength := StrToInt(Trim(txtLRDataLength.Text)); - bAuthMode := AuthMode(); - bKeyIndex := StrToInt(txtKeyIndex.Text); - SetLength(baReadData,wDataLength); - PData :=PByte(@baReadData[0]); - iFResult := LinearRead(PData,wLinearAddress,wDataLength,wReadBytes,bAuthMode,bKeyIndex); - - if iFResult = DL_OK then - begin - txtLinearRead.Text :=String(baReadData); - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult) - end - else - begin - txtReadBytes.Text := IntToStr(wReadBytes); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; - - -end; - -procedure TfrmuFrSimple.btnLinearWriteClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :Word; - PData :PByte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; -begin - - try - if Trim(txtLinearWrite.Text)=EmptyStr then - begin - MessageDlg('You must enter any data !',mtWarning,[mbOk],0); - txtLinearWrite.SetFocus; - Exit; - end; - if Trim(txtLWLinearAddress.Text)=EmptyStr then - begin - MessageDlg('You must enter the LINEAR ADDRESS !',mtWarning,[mbOk],0); - txtLWLinearAddress.SetFocus; - Exit; - end; - if Trim(txtLWDataLength.Text)=EmptyStr then - begin - MessageDlg('You must enter the DATA LENGTH !',mtWarning,[mbOK],0); - txtLWDataLength.SetFocus; - Exit; - end; - Except - on Exception:EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PData); - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - wLinearAddress:=StrToInt(Trim(txtLWLinearAddress.Text)); - wDataLength :=StrToInt(Trim(txtLWDataLength.Text)); - PData :=PByte(txtLinearWrite.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - end - else - begin - txtBytesWritten.Text:=IntToStr(wBytesWritten); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunctStart(false); - end; -end; - - - -procedure TfrmuFrSimple.btnFormatCardKeysClick(Sender: TObject); -var - PKeyA:PByte; - PKeyB:PByte; - KeyA:TKeyArray; - KeyB:TKeyArray; - bSectorsFormatted:Byte; - bBlockAccessBits, - bTrailerAccessBits, - bTrailerBits9 :Byte; - bAuthMode, - bKeyIndex :Byte; - iFResult :DL_STATUS; - bytes_ret:word; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - try - New(PKeyA); - New(PKeyB); - - KeyA:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - KeyB:=DecHexConversion(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); - - PKeyA:=PByte(@KeyA); - PKeyB:=PByte(@KeyB); - bBlockAccessBits :=0; - bTrailerAccessBits :=1; - bTrailerBits9 :=45; - bSectorsFormatted :=0; - - bAuthMode :=AuthMode(); - bKeyIndex :=StrToInt(txtKeyIndex.Text); - - - iFResult:=LinearFormatCard(PKeyA,bBlockAccessBits,bTrailerAccessBits,bTrailerBits9,PKeyB, - bSectorsFormatted,bAuthMode,bKeyIndex); - if iFResult=DL_OK then - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - txtSectorForrmatted.Text:=IntToStr(bSectorsFormatted); - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Card keys are not formatted successfully !',mtError,[mbOK],0); - end; - except - on EConvertError do - MessageDlg(CONVERT_ERROR,mtError,[mbOK],0); - end; - finally - PKeyA:=nil; - PKeyB:=nil; - Dispose(PKeyA); - Dispose(PKeyB); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.chkNewCardKeysHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_A,pnlNewCardKeys); - ConvertDecHex(chkNewCardKeysHex,NEW_CARD_KEY_B,pnlNewCardKeys); -end; - -procedure TfrmuFrSimple.OnMyKeyPress(Sender: TObject; var Key: Char); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - try - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) then - begin - TB.MaxLength:=2; - if (Key in['0'..'9']) or (Key in['a'..'f']) or (ord(Key)=8) then Exit else Key:=#0; - end - else - begin - TB.MaxLength:=3; - if (Key in['0'..'9']) or (ord(Key)=8) then Exit else Key:=#0; - end; - except - on EConvertError do - end; -end; - - - -function TfrmuFrSimple.AuthMode: byte; -begin - if rbAUTH1A.Checked then - Result:=MIFARE_AUTHENT1A - else - Result:=MIFARE_AUTHENT1B; -end; - -function TfrmuFrSimple.DecHexConversion(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel): TKeyArray; -var - baKeyArray:TKeyArray; - bCounter:byte; -begin - for bCounter:=0 to MAX_KEY_INDEX do - begin - if chkCheckBox.Checked then - begin - baKeyArray[bCounter]:=StrToInt(HexDisplayPrefix+(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text))); - end - else - begin - baKeyArray[bCounter]:=StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bCounter))).Text)); - end; - end; - Result:=baKeyArray; - end; - - - - -procedure TfrmuFrSimple.ConvertDecHex(chkCheckBox: TCheckBox;sKeyName: string; pnlContainer: TPanel); -var - bBr:byte; -begin - try - for bBr:=0 to MAX_KEY_INDEX do - begin - if Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)=EmptyStr then - Continue - else - begin - if chkCheckBox.Checked then - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToHex(StrToInt(Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text)),2); - end - else - begin - TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text:= - IntToStr(StrToInt(HexDisplayPrefix+Trim(TEdit(pnlContainer.FindChildControl(sKeyName+IntToStr(bBr))).Text))); - end; - end; - end; - except - on EConvertError do - Exit; - end; -end; - -procedure TfrmuFrSimple.chkNewReaderKeyHexClick(Sender: TObject); -begin - ConvertDecHex(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); -end; - -procedure TfrmuFrSimple.btnFormatReaderKeyClick(Sender: TObject); -var - PReaderKey:PByte; - baReaderKey:TKeyArray; - iFResult:DL_STATUS; -begin - if FunctionStart or ReaderStart then Exit; - try - SetFunctStart(true); - New(PReaderKey); - PReaderKey:=@baReaderKey; - baReaderKey:=DecHexConversion(chkNewReaderKeyHex,NEW_READER_KEY,pnlNewReaderKey); - iFResult:=ReaderKeyWrite(PReaderKey,key_index); - if iFResult=DL_OK then - begin - ReaderUISignal(FRES_OK_LIGHT,FRES_OK_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is formatted successfully !',mtInformation,[mbOK],0); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunction,iFResult); - MessageDlg('Reader key is not formatted successfully !',mtError,[mbOK],0); - end; - - finally - PReaderKey:=nil; - Dispose(PReaderKey); - SetFunctStart(false); - end; -end; - -procedure TfrmuFrSimple.OnMyKeyExit(Sender: TObject); -var - TB:TEdit; -begin - TB:=Sender as TEdit; - if ((chkNewCardKeysHex.Checked) and (TB.Tag=1)) or ((chkNewCardKeysHex.Checked)and (TB.Tag=2)) - or - ((chkNewReaderKeyHex.Checked) and (TB.Tag=3)) or (Trim(TB.Text)=EmptyStr) Then Exit; - if StrToInt(Trim(TB.Text))>255 then - begin - MessageDlg(APPROPRIATE_FORMAT,mtError,[mbOK],0); - TB.Undo(); - TB.SetFocus(); - Exit; - end; -end; - - - - -procedure TfrmuFrSimple.MainLoop; -var - iRResult, - iCResult :LongInt; - iReaderType, - iReaderSerial, - iCardSerial:LongInt; - bCardType, - bDLCardType, - bCardUIDSize, - bBr :Byte; - baCardUID:array[0..9] of Byte; - sBuffer :String; - -begin - sBuffer:=''; - SetReaderStart(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbReader.Panels[0].Text:='CONNECTED'; - end - else - begin - stbReader.Panels[0].Text:='NOT CONNECTED'; - SetStatusBar(stbReader,iRResult); - txtReaderType .Clear; - txtReaderSerial.Clear; - txtCardType .Clear; - txtCardSerial .Clear; - txtCardUIDSize .Clear; - cboLightMode.ItemIndex:=0; - cboSoundMode.ItemIndex:=0; - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - txtReaderType.Text:='$'+IntToHex(iReaderType,8); - SetStatusBar(stbReader,iRResult) - end - else - begin - boCONN:=false; - ReaderClose(); - SetStatusBar(stbReader,iRResult); - end; - iRResult:=GetReaderSerialNumber(iReaderSerial); - if iRResult=DL_OK then - txtReaderSerial.Text:='$'+IntToHex(iReaderSerial,8); - - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - if bDLCardType<=uFCoder1x.DL_NTAG_216 then - btnFormatCardKeys.Enabled:=false - else - btnFormatCardKeys.Enabled:=true; - GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - for bBr:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer+IntToHex(baCardUID[bBr],2); - end; - txtCardType .Text:='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardSerial .Text:='$'+sBuffer; - SetStatusBar(stbCard,iCResult); - end - else - begin - txtCardSerial .Clear; - txtCardType .Clear; - txtCardUIDSize.Clear; - btnFormatCardKeys.Enabled:=true; - SetStatusBar(stbCard,iCResult); - end; - end; - SetReaderStart(false); - -end; - -function TfrmuFrSimple.GetFunctStart: Boolean; -begin - Result:=boFunctionStart; -end; - -procedure TfrmuFrSimple.SetFunctStart(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimple.GetReaderStart: Boolean; -begin - Result:=boReaderStart; -end; - -procedure TfrmuFrSimple.SetReaderStart(const Value: Boolean); -begin - boReaderStart:=Value; -end; - -procedure TfrmuFrSimple.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - StatusBar.Panels[1].Text:=HexDisplayPrefix+IntToHex(Result,2); - StatusBar.Panels[2].Text:=ERROR_CODE[Result]; -end; - -procedure TfrmuFrSimple.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop(); -end; - -procedure TfrmuFrSimple.txtLinearWriteChange(Sender: TObject); -begin - txtLWDataLength.Text:=IntToStr(Length(txtLinearWrite.Text)); -end; - -end. diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFCoder-x86.dll b/old_move_to_branch/uFCoderSimplest_D7/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFCoder_coff.lib b/old_move_to_branch/uFCoderSimplest_D7/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFCoder_omf.lib b/old_move_to_branch/uFCoderSimplest_D7/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.dcu b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.dcu deleted file mode 100644 index a2933e484394ee8ce5474ec0eedeb06d3b987ec8..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.ddp b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.dfm b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.dfm deleted file mode 100644 index 65a0b3c72831bd7a51ce79b366d27a04bb4bb40d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.dfm +++ /dev/null @@ -1,291 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 489 - Top = 116 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest ' - ClientHeight = 478 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblWriteData: TLabel - Left = 18 - Top = 109 - Width = 61 - Height = 13 - Caption = 'Write Data' - FocusControl = txtWriteData - end - object lblReadData: TLabel - Left = 283 - Top = 109 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblCardType: TLabel - Left = 16 - Top = 28 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 158 - Top = 28 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 16 - Top = 51 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object stbConnected: TStatusBar - Left = 0 - Top = 455 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object btnFormattingCard: TButton - Left = 288 - Top = 24 - Width = 233 - Height = 44 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - object txtWriteData: TMemo - Left = 17 - Top = 130 - Width = 257 - Height = 185 - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 2 - end - object btnWriteData: TButton - Left = 19 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnWriteDataClick - end - object txtReadData: TMemo - Left = 281 - Top = 130 - Width = 257 - Height = 185 - Color = clSilver - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - object btnReadData: TButton - Left = 282 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = btnReadDataClick - end - object pbBar: TProgressBar - Left = 0 - Top = 392 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 6 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 432 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 409 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtCardType: TEdit - Left = 96 - Top = 24 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 216 - Top = 24 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 10 - end - object txtCardUID: TEdit - Left = 96 - Top = 48 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - object mnuMeni: TMainMenu - Left = 408 - Top = 80 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 440 - Top = 80 - end - object XPManifest1: TXPManifest - Left = 376 - Top = 80 - end -end diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.pas b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.pas deleted file mode 100644 index 2c436917c7314dc958f29f072c78d421fb6b584e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.pas +++ /dev/null @@ -1,463 +0,0 @@ - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - btnFormattingCard: TButton; - txtWriteData: TMemo; - lblWriteData: TLabel; - btnWriteData: TButton; - XPManifest1: TXPManifest; - lblReadData: TLabel; - txtReadData: TMemo; - btnReadData: TButton; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - lblCardType: TLabel; - lblCardUIDSize: TLabel; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FOK_LIGHT = 4; - FOK_SOUND = 0; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - New(PData); - PData :=@baFormat; - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max :=iMaxBlocks; - end; - - if (bDLCardType = byte(DL_MIFARE_ULTRALIGHT)) or (bDLCardType =byte(DL_MIFARE_ULTRALIGHT_C)) - or (bDLCardType = byte(DL_NTAG_203)) then - begin - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - end; - end; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - pbBar.Visible:=false; - end; - end; -end; - - - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PByte(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(baReadData); - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PByte; - iFResult :DL_STATUS; -begin - if (Trim(txtWriteData.Text))=EmptyStr then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength :=Length(txtWriteData.Text)-2; - PData :=PByte(txtWriteData.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array[0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - (*btnFormattingCard.Enabled:=bDLCardType>$0A;*) - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - byte(DL_MIFARE_ULTRALIGHT) : Result:=Round(TOTAL_BYTES_ULTRALIGHT/4); - byte(DL_MIFARE_ULTRALIGHT_C) : Result:=Round(TOTAL_BYTES_ULTRALIGHT_C/4); - byte(DL_NTAG_203) : Result:=Round(TOTAL_BYTES_NTAG203/4); - byte(DL_MIFARE_CLASSIC_1K) : Result:=(MAX_SECTORS_1K *4); - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : Result:=((MAX_SECTORS_1K*2)*4)+((MAX_SECTORS_1K-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - byte(DL_NTAG_203) : iMaxBytes:=MAX_BYTES_NTAG203; - - byte(DL_MIFARE_ULTRALIGHT) : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - byte(DL_MIFARE_ULTRALIGHT_C): iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - byte(DL_MIFARE_CLASSIC_1K) : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~ddp b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~dfm b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~dfm deleted file mode 100644 index 06cd03c29251ed4640198e1853b88eccfd500d10..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~dfm +++ /dev/null @@ -1,291 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 489 - Top = 116 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest ' - ClientHeight = 478 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblWriteData: TLabel - Left = 18 - Top = 109 - Width = 61 - Height = 13 - Caption = 'Write Data' - FocusControl = txtWriteData - end - object lblReadData: TLabel - Left = 283 - Top = 109 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblCardType: TLabel - Left = 16 - Top = 28 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 158 - Top = 28 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 16 - Top = 51 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object stbConnected: TStatusBar - Left = 0 - Top = 455 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object btnFormattingCard: TButton - Left = 288 - Top = 24 - Width = 233 - Height = 44 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - object txtWriteData: TMemo - Left = 17 - Top = 130 - Width = 257 - Height = 185 - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 2 - end - object btnWriteData: TButton - Left = 19 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnWriteDataClick - end - object txtReadData: TMemo - Left = 281 - Top = 130 - Width = 257 - Height = 185 - Color = clSilver - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - object btnReadData: TButton - Left = 282 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = btnReadDataClick - end - object pbBar: TProgressBar - Left = 0 - Top = 392 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 6 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 432 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 409 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtCardType: TEdit - Left = 96 - Top = 24 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 216 - Top = 24 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 10 - end - object txtCardUID: TEdit - Left = 96 - Top = 48 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - object mnuMeni: TMainMenu - Left = 408 - Top = 80 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 440 - Top = 80 - end - object XPManifest1: TXPManifest - Left = 376 - Top = 80 - end -end diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~pas b/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~pas deleted file mode 100644 index b821db32fa150ae3418e48bd47e32ea42d2eb71f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFSimplest.~pas +++ /dev/null @@ -1,463 +0,0 @@ - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder1x, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - btnFormattingCard: TButton; - txtWriteData: TMemo; - lblWriteData: TLabel; - btnWriteData: TButton; - XPManifest1: TXPManifest; - lblReadData: TLabel; - txtReadData: TMemo; - btnReadData: TButton; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - lblCardType: TLabel; - lblCardUIDSize: TLabel; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FOK_LIGHT = 4; - FOK_SOUND = 0; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - New(PData); - PData :=@baFormat; - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max :=iMaxBlocks; - end; - - if (bDLCardType = byte(DL_MIFARE_ULTRALIGHT)) or (bDLCardType =byte(DL_MIFARE_ULTRALIGHT_C)) - or (bDLCardType = byte(DL_NTAG_203)) then - begin - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - end; - end; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - pbBar.Visible:=false; - end; - end; -end; - - - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PByte(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(baReadData); - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PByte; - iFResult :DL_STATUS; -begin - if (Trim(txtWriteData.Text))=EmptyStr then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength :=Length(txtWriteData.Text)-2; - PData :=PByte(txtWriteData.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array[0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - (*btnFormattingCard.Enabled:=bDLCardType>$0A;*) - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - byte(DL_MIFARE_ULTRALIGHT) : Result:=Round(TOTAL_BYTES_ULTRALIGHT/4); - byte(DL_MIFARE_ULTRALIGHT_C) : Result:=Round(TOTAL_BYTES_ULTRALIGHT_C/4); - byte(DL_NTAG_203) : Result:=Round(TOTAL_BYTES_NTAG203/4); - byte(DL_MIFARE_CLASSIC_1K) : Result:=(MAX_SECTORS_1K *4); - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : Result:=((MAX_SECTORS_1K*2)*4)+((MAX_SECTORS_1K-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - byte(DL_NTAG_203) : iMaxBytes:=MAX_BYTES_NTAG203; - - byte(DL_MIFARE_ULTRALIGHT) : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - byte(DL_MIFARE_ULTRALIGHT_C): iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - byte(DL_MIFARE_CLASSIC_1K) : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.cfg b/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.dof b/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.dof deleted file mode 100644 index 191f948bdf1f291e132bef3101c066e1fda5ec2b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Simplest version.Support for 4k and NTAG cards -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName=uFCoder Simplest -ProductVersion=2.1.0.0 -Comments= diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.dpr b/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.dpr deleted file mode 100644 index cf69298b46f58886a087f5d2ef3376a620ea5280..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.dpr +++ /dev/null @@ -1,14 +0,0 @@ -program uFrSimplest; - -uses - Forms, - uFSimplest in 'uFSimplest.pas' {frmuFrSimplest}, - uFCoder in '..\uFCoderSimple_D7\uFCoder.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TfrmuFrSimplest, frmuFrSimplest); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.exe b/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.exe deleted file mode 100644 index 45651c5c5a603feb2df900fc8d1be5b8c929ef67..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.res b/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.res deleted file mode 100644 index 382a244c9cf3598c14f47b5c17f6dea3859a96b9..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.~dpr b/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.~dpr deleted file mode 100644 index 5f241be2f1baad68739c74df71f9237ea43a5d2f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_D7/uFrSimplest.~dpr +++ /dev/null @@ -1,14 +0,0 @@ -program uFrSimplest; - -uses - Forms, - uFSimplest in 'uFSimplest.pas' {frmuFrSimplest}, - uFCoder1x in 'uFCoder1x.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TfrmuFrSimplest, frmuFrSimplest); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder-x86.dll b/old_move_to_branch/uFCoderSimplest_XE/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder-x86_64.dll b/old_move_to_branch/uFCoderSimplest_XE/uFCoder-x86_64.dll deleted file mode 100644 index dac4290609d32257ca8a0caf4418d0ab8dcddd26..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFCoder-x86_64.dll and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder.dcu b/old_move_to_branch/uFCoderSimplest_XE/uFCoder.dcu deleted file mode 100644 index 17cb6bc799333d4ab3207bbe3b561d350ff612ab..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder.pas b/old_move_to_branch/uFCoderSimplest_XE/uFCoder.pas deleted file mode 100644 index e9779aa0c444f685fcd0434dad88c572d4b29e78..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFCoder.pas +++ /dev/null @@ -1,101 +0,0 @@ -unit uFCoder; - -interface - - Type - TDLCardType = ( - DL_MIFARE_ULTRALIGHT = $01, - DL_MIFARE_ULTRALIGHT_EV1_11 = $02, - DL_MIFARE_ULTRALIGHT_EV1_21 = $03, - DL_MIFARE_ULTRALIGHT_C = $04, - DL_NTAG_203 = $05, - DL_NTAG_210 = $06, - DL_NTAG_212 = $07, - DL_NTAG_213 = $08, - DL_NTAG_215 = $09, - DL_NTAG_216 = $0A, - DL_MIFARE_MINI = $20, - DL_MIFARE_CLASSIC_1K = $21, - DL_MIFARE_CLASSIC_4K = $22, - DL_MIFARE_PLUS_S_2K = $23, - DL_MIFARE_PLUS_S_4K = $24, - DL_MIFARE_PLUS_X_2K = $25, - DL_MIFARE_PLUS_X_4K = $26, - DL_MIFARE_DESFIRE = $27, - DL_MIFARE_DESFIRE_EV1_2K = $28, - DL_MIFARE_DESFIRE_EV1_4K = $29, - DL_MIFARE_DESFIRE_EV1_8K = $2A - ); - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -const - DLL_NAME='uFCoder-x86.dll'; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - TOTAL_BYTES_NTAG203 = 168; - TOTAL_BYTES_ULTRALIGHT_C = 168; - TOTAL_BYTES_ULTRALIGHT = 64; -const - MAX_BLOCK = 15; - FORMAT_SIGN = $00;//$FF - KEY_INDEX = 0; - - - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder_coff-x86_64.lib b/old_move_to_branch/uFCoderSimplest_XE/uFCoder_coff-x86_64.lib deleted file mode 100644 index cb2f101bab717bf1fe4a597c5aa2c8c66b5aea13..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFCoder_coff-x86_64.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder_coff.lib b/old_move_to_branch/uFCoderSimplest_XE/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFCoder_omf.lib b/old_move_to_branch/uFCoderSimplest_XE/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.dcu b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.dcu deleted file mode 100644 index d2a2ac9a8526687a875ae1281cb1128b33ffd4e5..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.dcu and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.ddp b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.dfm b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.dfm deleted file mode 100644 index 65a0b3c72831bd7a51ce79b366d27a04bb4bb40d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.dfm +++ /dev/null @@ -1,291 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 489 - Top = 116 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest ' - ClientHeight = 478 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblWriteData: TLabel - Left = 18 - Top = 109 - Width = 61 - Height = 13 - Caption = 'Write Data' - FocusControl = txtWriteData - end - object lblReadData: TLabel - Left = 283 - Top = 109 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblCardType: TLabel - Left = 16 - Top = 28 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 158 - Top = 28 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 16 - Top = 51 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object stbConnected: TStatusBar - Left = 0 - Top = 455 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object btnFormattingCard: TButton - Left = 288 - Top = 24 - Width = 233 - Height = 44 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - object txtWriteData: TMemo - Left = 17 - Top = 130 - Width = 257 - Height = 185 - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 2 - end - object btnWriteData: TButton - Left = 19 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnWriteDataClick - end - object txtReadData: TMemo - Left = 281 - Top = 130 - Width = 257 - Height = 185 - Color = clSilver - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - object btnReadData: TButton - Left = 282 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = btnReadDataClick - end - object pbBar: TProgressBar - Left = 0 - Top = 392 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 6 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 432 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 409 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtCardType: TEdit - Left = 96 - Top = 24 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 216 - Top = 24 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 10 - end - object txtCardUID: TEdit - Left = 96 - Top = 48 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - object mnuMeni: TMainMenu - Left = 408 - Top = 80 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 440 - Top = 80 - end - object XPManifest1: TXPManifest - Left = 376 - Top = 80 - end -end diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.pas b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.pas deleted file mode 100644 index 6e502840e47a8596d5a9e87e46b08ebe072019cb..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.pas +++ /dev/null @@ -1,466 +0,0 @@ - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - btnFormattingCard: TButton; - txtWriteData: TMemo; - lblWriteData: TLabel; - btnWriteData: TButton; - XPManifest1: TXPManifest; - lblReadData: TLabel; - txtReadData: TMemo; - btnReadData: TButton; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - lblCardType: TLabel; - lblCardUIDSize: TLabel; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FOK_LIGHT = 4; - FOK_SOUND = 0; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - New(PData); - PData :=@baFormat; - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max :=iMaxBlocks; - end; - - if (bDLCardType = byte(DL_MIFARE_ULTRALIGHT)) or (bDLCardType =byte(DL_MIFARE_ULTRALIGHT_C)) - or (bDLCardType = byte(DL_NTAG_203)) then - begin - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - end; - end; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - pbBar.Visible:=false; - end; - end; -end; - - - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; - i: integer; - s: string; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PByte(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - for i := 0 to length(baReadData)-1 do s:=s+chr(baReadData[i]); - txtReadData.Text:=s; - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PByte; - iFResult :DL_STATUS; -begin - if (Trim(txtWriteData.Text))=EmptyStr then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength :=Length(txtWriteData.Text)-2; - PData :=PByte(txtWriteData.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array[0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - (*btnFormattingCard.Enabled:=bDLCardType>$0A;*) - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - byte(DL_MIFARE_ULTRALIGHT) : Result:=Round(TOTAL_BYTES_ULTRALIGHT/4); - byte(DL_MIFARE_ULTRALIGHT_C) : Result:=Round(TOTAL_BYTES_ULTRALIGHT_C/4); - byte(DL_NTAG_203) : Result:=Round(TOTAL_BYTES_NTAG203/4); - byte(DL_MIFARE_CLASSIC_1K) : Result:=(MAX_SECTORS_1K *4); - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : Result:=((MAX_SECTORS_1K*2)*4)+((MAX_SECTORS_1K-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - byte(DL_NTAG_203) : iMaxBytes:=MAX_BYTES_NTAG203; - - byte(DL_MIFARE_ULTRALIGHT) : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - byte(DL_MIFARE_ULTRALIGHT_C): iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - byte(DL_MIFARE_CLASSIC_1K) : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~ddp b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~dfm b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~dfm deleted file mode 100644 index 06cd03c29251ed4640198e1853b88eccfd500d10..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~dfm +++ /dev/null @@ -1,291 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 489 - Top = 116 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest ' - ClientHeight = 478 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lblWriteData: TLabel - Left = 18 - Top = 109 - Width = 61 - Height = 13 - Caption = 'Write Data' - FocusControl = txtWriteData - end - object lblReadData: TLabel - Left = 283 - Top = 109 - Width = 60 - Height = 13 - Caption = 'Read Data' - end - object lblCardType: TLabel - Left = 16 - Top = 28 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 158 - Top = 28 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 16 - Top = 51 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object stbConnected: TStatusBar - Left = 0 - Top = 455 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object btnFormattingCard: TButton - Left = 288 - Top = 24 - Width = 233 - Height = 44 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - object txtWriteData: TMemo - Left = 17 - Top = 130 - Width = 257 - Height = 185 - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 2 - end - object btnWriteData: TButton - Left = 19 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = btnWriteDataClick - end - object txtReadData: TMemo - Left = 281 - Top = 130 - Width = 257 - Height = 185 - Color = clSilver - Ctl3D = False - Lines.Strings = ( - '') - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 4 - end - object btnReadData: TButton - Left = 282 - Top = 330 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = btnReadDataClick - end - object pbBar: TProgressBar - Left = 0 - Top = 392 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 6 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 432 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 409 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object txtCardType: TEdit - Left = 96 - Top = 24 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 9 - end - object txtCardUIDSize: TEdit - Left = 216 - Top = 24 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 10 - end - object txtCardUID: TEdit - Left = 96 - Top = 48 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 11 - end - object mnuMeni: TMainMenu - Left = 408 - Top = 80 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 440 - Top = 80 - end - object XPManifest1: TXPManifest - Left = 376 - Top = 80 - end -end diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~pas b/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~pas deleted file mode 100644 index b821db32fa150ae3418e48bd47e32ea42d2eb71f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFSimplest.~pas +++ /dev/null @@ -1,463 +0,0 @@ - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder1x, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - btnFormattingCard: TButton; - txtWriteData: TMemo; - lblWriteData: TLabel; - btnWriteData: TButton; - XPManifest1: TXPManifest; - lblReadData: TLabel; - txtReadData: TMemo; - btnReadData: TButton; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - lblCardType: TLabel; - lblCardUIDSize: TLabel; - txtCardType: TEdit; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; - FERR_SOUND = 0; //2 - FOK_LIGHT = 4; - FOK_SOUND = 0; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - New(PData); - PData :=@baFormat; - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max :=iMaxBlocks; - end; - - if (bDLCardType = byte(DL_MIFARE_ULTRALIGHT)) or (bDLCardType =byte(DL_MIFARE_ULTRALIGHT_C)) - or (bDLCardType = byte(DL_NTAG_203)) then - begin - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - end; - end; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - pbBar.Visible:=false; - end; - end; -end; - - - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PByte; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PByte(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(baReadData); - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PByte; - iFResult :DL_STATUS; -begin - if (Trim(txtWriteData.Text))=EmptyStr then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength :=Length(txtWriteData.Text)-2; - PData :=PByte(txtWriteData.Text); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array[0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - (*btnFormattingCard.Enabled:=bDLCardType>$0A;*) - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - byte(DL_MIFARE_ULTRALIGHT) : Result:=Round(TOTAL_BYTES_ULTRALIGHT/4); - byte(DL_MIFARE_ULTRALIGHT_C) : Result:=Round(TOTAL_BYTES_ULTRALIGHT_C/4); - byte(DL_NTAG_203) : Result:=Round(TOTAL_BYTES_NTAG203/4); - byte(DL_MIFARE_CLASSIC_1K) : Result:=(MAX_SECTORS_1K *4); - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : Result:=((MAX_SECTORS_1K*2)*4)+((MAX_SECTORS_1K-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - byte(DL_NTAG_203) : iMaxBytes:=MAX_BYTES_NTAG203; - - byte(DL_MIFARE_ULTRALIGHT) : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - byte(DL_MIFARE_ULTRALIGHT_C): iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - byte(DL_MIFARE_CLASSIC_1K) : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - byte(DL_MIFARE_CLASSIC_4K), - byte(DL_MIFARE_PLUS_S_4K) : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; -end; - - - - -end. diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.cfg b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.cfg deleted file mode 100644 index 4c2816a88c0fdcf7fb34319873552bfae5076013..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dof b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dof deleted file mode 100644 index 191f948bdf1f291e132bef3101c066e1fda5ec2b..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Simplest version.Support for 4k and NTAG cards -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName=uFCoder Simplest -ProductVersion=2.1.0.0 -Comments= diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dpr b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dpr deleted file mode 100644 index a55fadba964c7086d9f1a5e1e9ffc5f7f33c3c10..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dpr +++ /dev/null @@ -1,14 +0,0 @@ -program uFrSimplest; - -uses - Forms, - uFSimplest in 'uFSimplest.pas' {frmuFrSimplest}, - uFCoder in 'uFCoder.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TfrmuFrSimplest, frmuFrSimplest); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dproj b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dproj deleted file mode 100644 index 8784d132eb17c8bc79f4715ddd6e25aecb4ac643..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dproj +++ /dev/null @@ -1,470 +0,0 @@ - - - {7903037C-F83E-4B4D-8295-832242C761F7} - uFrSimplest.dpr - True - Debug - 1 - Application - VCL - 16.1 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - 2074 - false - 1 - 2 - 00400000 - Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) - true - uFrSimplest - false - CompanyName=D-Logic;FileDescription=Simplest version.Support for 4k and NTAG cards;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=uFCoder Simplest;ProductVersion=2.1.0.0;Comments= - vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;$(DCC_UsePackage) - false - false - 1 - true - - - 1033 - $(BDS)\bin\default_app.manifest - System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - uFrSimplest_Icon.ico - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - true - - - uFrSimplest_Icon.ico - - - RELEASE;$(DCC_Define) - 0 - false - 0 - - - true - DEBUG;$(DCC_Define) - false - - - 1 - $(BDS)\bin\delphi_PROJECTICON.ico - 1033 - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - - - - MainSource - - -
frmuFrSimplest
-
- - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - - - - - uFrSimplest.dpr - - - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - True - False - - - - - uFrSimplest.exe - true - - - - - 1 - .dylib - - - 0 - .bpl - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - - - 1 - - - 1 - - - - - Contents - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - res\drawable-normal - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - - - ../ - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - Contents\MacOS - 1 - - - 1 - - - 0 - - - - - Contents\MacOS - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - ../ - 1 - - - - - Contents\MacOS - 1 - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - 1 - - - 1 - - - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - 1 - - - - - 1 - - - 1 - - - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 0 - - - Contents\MacOS - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 0 - - - 0 - - - 0 - - - Contents\MacOS - 0 - - - 0 - - - - - 1 - - - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - 1 - - - - - - - - - - - 12 - - - - -
diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dproj.local b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dproj.local deleted file mode 100644 index a674e156e6c7213c84368c3f5763a898fdd96257..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.dproj.local +++ /dev/null @@ -1,6 +0,0 @@ - - - - 2015.04.04 00:03:33.000.253,=E:\uFCoderSimplest_XE\uFCoder.pas - - diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.exe b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.exe deleted file mode 100644 index b49bd5427355e7ecff10c764d5081eb568a166de..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.exe and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.identcache b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.identcache deleted file mode 100644 index 782c9bdcf5d5ba75f05694463a7401e2c2471999..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.identcache and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.res b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.res deleted file mode 100644 index d6cf6329cd078224d25f1d767092617dce629de1..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.res and /dev/null differ diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.~dpr b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.~dpr deleted file mode 100644 index 5f241be2f1baad68739c74df71f9237ea43a5d2f..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest.~dpr +++ /dev/null @@ -1,14 +0,0 @@ -program uFrSimplest; - -uses - Forms, - uFSimplest in 'uFSimplest.pas' {frmuFrSimplest}, - uFCoder1x in 'uFCoder1x.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TfrmuFrSimplest, frmuFrSimplest); - Application.Run; -end. diff --git a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest_Icon.ico b/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest_Icon.ico deleted file mode 100644 index cfd8992a5b8ff4b89478d89e93ae9205bb8125ef..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFCoderSimplest_XE/uFrSimplest_Icon.ico and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.dcu b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.dcu deleted file mode 100644 index 73deaa817920a9718f02570b623b72312dad5566..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.dcu and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.dll b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.dll deleted file mode 100644 index dae3b829b21b5e409b1ed936e76aa24d99e96ddf..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.dll and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.~pas b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.~pas deleted file mode 100644 index 5490a6eab962fcfb996c234e39058d8966f07c9c..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/----uFCoder1x.~pas +++ /dev/null @@ -1,109 +0,0 @@ -unit ufCoder1x; -interface - -const - MIFARE_CLASSIC_1k = $08; -const - MF1ICS50 = $08; -const - SLE66R35 = $88; -const - MIFARE_CLASSIC_4k = $18; -const - MF1ICS70 = $18; -const - MIFARE_CLASSIC_MINI = $09; -const - MF1ICS20 = $09; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - MAX_BLOCK = 15; - FORMAT_SIGN = $FF; - KEY_INDEX = 0; - - - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PByte; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external 'uFCoder1x.dll'; -function ReaderClose; external 'uFCoder1x.dll'; -function ReaderUISignal; external 'uFCoder1x.dll'; -function GetReaderType; external 'uFCoder1x.dll'; -function GetCardIdEx; external 'uFCoder1x.dll'; -function LinearRead; external 'uFCoder1x.dll'; -function LinearWrite; external 'uFCoder1x.dll'; -function BlockWrite; external 'uFCoder1x.dll'; -function GetDlogicCardType; external 'uFCoder1x.dll'; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder-x86.dll b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder-x86.dll deleted file mode 100644 index 9cfd3557545a2f76eef924dfb23b28ea473a9a42..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder-x86.dll and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder-x86_64.dll b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder-x86_64.dll deleted file mode 100644 index dac4290609d32257ca8a0caf4418d0ab8dcddd26..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder-x86_64.dll and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder.dcu b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder.dcu deleted file mode 100644 index 3b33a0978f1f8089c189974400ecf7ad62981fc9..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder.dcu and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder.pas b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder.pas deleted file mode 100644 index 1eef5a5bd75d7b02d68b23a83bdbaea0c11f19ac..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder.pas +++ /dev/null @@ -1,109 +0,0 @@ -unit uFCoder; -interface - -const - MIFARE_CLASSIC_1k = $08; -const - MF1ICS50 = $08; -const - SLE66R35 = $88; -const - MIFARE_CLASSIC_4k = $18; -const - MF1ICS70 = $18; -const - MIFARE_CLASSIC_MINI = $09; -const - MF1ICS20 = $09; - -//DLOGIC CARD TYPE -const DL_MIFARE_ULTRALIGHT = $01; -const DL_MIFARE_ULTRALIGHT_EV1_11 = $02; -const DL_MIFARE_ULTRALIGHT_EV1_21 = $03; -const DL_MIFARE_ULTRALIGHT_C = $04; -const DL_NTAG_203 = $05; -const DL_NTAG_210 = $06; -const DL_NTAG_212 = $07; -const DL_NTAG_213 = $08; -const DL_NTAG_215 = $09; -const DL_NTAG_216 = $0A; - -const DL_MIFARE_MINI = $20; -const DL_MIFARE_CLASSIC_1K = $21; -const DL_MIFARE_CLASSIC_4K = $22; -const DL_MIFARE_PLUS_S_2K = $23; -const DL_MIFARE_PLUS_S_4K = $24; -const DL_MIFARE_PLUS_X_2K = $25; -const DL_MIFARE_PLUS_X_4K = $26; -const DL_MIFARE_DESFIRE = $27; -const DL_MIFARE_DESFIRE_EV1_2K = $28; -const DL_MIFARE_DESFIRE_EV1_4K = $29; -const DL_MIFARE_DESFIRE_EV1_8K = $2A; - - -const - MIFARE_AUTHENT1A = $60; - MIFARE_AUTHENT1B = $61; - DL_OK = 0; -type - DL_STATUS = LongInt; - -//--- sectors and max bytes --- -const - MAX_SECTORS_1k = 16; - MAX_SECTORS_4k = 40; - MAX_BYTES_NTAG203 = 144; - MAX_BYTES_ULTRALIGHT = 48; - MAX_BYTES_ULTRALIGHT_C = 144; - MAX_BYTES_CLASSIC_1K = 752; - MAX_BYTES_CLASSIC_4k = 3440; - -const - MAX_BLOCK = 15; - FORMAT_SIGN = $FF; - KEY_INDEX = 0; - DLL_NAME = 'uFCoder-x86.dll'; - // fro x64 use "uFCoder-x86_64.dll" - -function ReaderOpen: DL_STATUS stdcall; -function ReaderClose: DL_STATUS stdcall; -function ReaderUISignal(light_signal_mode: Byte;beep_signal_mode: Byte): DL_STATUS stdcall; -function GetReaderType(var lpulReaderType: LongInt): DL_STATUS stdcall; - - -function GetCardIdEx(var bCardType:Byte; - var bCardUID :Byte; - var bCardUIDSize :Byte):DL_STATUS stdcall; -function LinearRead(aucData:PAnsiChar; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesReturned: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; -function LinearWrite(const aucData:PAnsiChar; - usLinearAddress: Word; - usDataLength: Word; - var lpusBytesWritten: Word; - ucKeyMode: Byte; - ucReaderKeyIndex: Byte): DL_STATUS stdcall; - -function BlockWrite(const data : Pointer; - bBlockAddress: Byte; - bAuthMode : Byte; - bKeyIndex : Byte): DL_STATUS stdcall; - -function GetDlogicCardType(var pCardType:Byte):DL_STATUS stdcall; - -implementation - -function ReaderOpen; external DLL_NAME; -function ReaderClose; external DLL_NAME; -function ReaderUISignal; external DLL_NAME; -function GetReaderType; external DLL_NAME; -function GetCardIdEx; external DLL_NAME; -function LinearRead; external DLL_NAME; -function LinearWrite; external DLL_NAME; -function BlockWrite; external DLL_NAME; -function GetDlogicCardType; external DLL_NAME; - -end. \ No newline at end of file diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_coff-x86_64.lib b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_coff-x86_64.lib deleted file mode 100644 index cb2f101bab717bf1fe4a597c5aa2c8c66b5aea13..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_coff-x86_64.lib and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_coff.lib b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_coff.lib deleted file mode 100644 index a19ca838a13f2d8c2d119af07b0f3d669bc709ae..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_coff.lib and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_omf.lib b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_omf.lib deleted file mode 100644 index 9e6fdd316db9d4c106b9b8e16093f6ac79813d76..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFCoder_omf.lib and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.dcu b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.dcu deleted file mode 100644 index 7674ff2a087112753f6372148e8e453352373d32..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.dcu and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.ddp b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.ddp and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.dfm b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.dfm deleted file mode 100644 index 2a5f23256e3ae0071b3fdfaec076060ae56e5d89..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.dfm +++ /dev/null @@ -1,319 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 435 - Top = 110 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest V2.1 D-Logic 2013 - 2015' - ClientHeight = 485 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnActivate = FormActivate - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object stbConnected: TStatusBar - Left = 0 - Top = 462 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pbBar: TProgressBar - Left = 0 - Top = 406 - Width = 554 - Height = 10 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 1 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 439 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 416 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object GroupBox1: TGroupBox - Left = 10 - Top = 0 - Width = 256 - Height = 80 - TabOrder = 4 - object lblCardType: TLabel - Left = 8 - Top = 20 - Width = 59 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 150 - Top = 20 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 8 - Top = 43 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object txtCardType: TEdit - Left = 88 - Top = 16 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtCardUIDSize: TEdit - Left = 208 - Top = 16 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 1 - end - object txtCardUID: TEdit - Left = 88 - Top = 40 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - end - object GroupBox2: TGroupBox - Left = 272 - Top = 0 - Width = 256 - Height = 80 - TabOrder = 5 - object CBZero: TCheckBox - Left = 7 - Top = 30 - Width = 92 - Height = 17 - Caption = 'Fill with $00' - TabOrder = 0 - end - object btnFormattingCard: TButton - Left = 103 - Top = 20 - Width = 141 - Height = 40 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - end - object GroupBox3: TGroupBox - Left = 10 - Top = 80 - Width = 256 - Height = 320 - Caption = ' Write Data ' - TabOrder = 6 - object CBOverwrite: TCheckBox - Left = 8 - Top = 16 - Width = 233 - Height = 17 - Caption = 'Overwrite previous content' - TabOrder = 0 - end - object txtWriteData: TMemo - Left = 5 - Top = 38 - Width = 242 - Height = 224 - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 1 - end - object btnWriteData: TButton - Left = 7 - Top = 273 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnWriteDataClick - end - end - object GroupBox4: TGroupBox - Left = 272 - Top = 80 - Width = 256 - Height = 320 - Caption = ' Read Data ' - TabOrder = 7 - object txtReadData: TMemo - Left = 5 - Top = 38 - Width = 242 - Height = 224 - Color = clSilver - Ctl3D = False - OEMConvert = True - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 0 - end - object btnReadData: TButton - Left = 7 - Top = 273 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnReadDataClick - end - end - object mnuMeni: TMainMenu - Left = 528 - Top = 32 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 528 - Top = 72 - end - object XPManifest1: TXPManifest - Left = 528 - end -end diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.pas b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.pas deleted file mode 100644 index a1d344ecfd682930969f463a290b037ba0c74577..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.pas +++ /dev/null @@ -1,500 +0,0 @@ -(******************************************************************************** - - Program : uFr Simplest - File : uFSimplest.pas - Description : Main program.Support for 4k - Author : D-Logic - Development enviroment : Borland Delphi 7.0 or higher ; compiled with XE2 - Revisions : - Version : 2.1.0.0 - -**********************************************************************************) - - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - XPManifest1: TXPManifest; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - GroupBox1: TGroupBox; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - GroupBox2: TGroupBox; - CBZero: TCheckBox; - btnFormattingCard: TButton; - GroupBox3: TGroupBox; - CBOverwrite: TCheckBox; - txtWriteData: TMemo; - btnWriteData: TButton; - GroupBox4: TGroupBox; - txtReadData: TMemo; - btnReadData: TButton; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - procedure FormActivate(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - procedure ReadData; - procedure WriteData; - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of AnsiString; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; //2 - FERR_SOUND = 2; //2 - FOK_LIGHT = 4; //4 - FOK_SOUND = 4; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - if CBZero.Checked - then - FillChar(baFormat,SizeOf(baFormat),$00) - else - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - - New(PData); - PData:=@baFormat; - - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max:=iMaxBlocks; - step:=1; - end; - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - // ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - // ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - pbBar.Visible:=false; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - end; - end; - ReadData(); -end; - -Procedure TfrmuFrSimplest.ReadData; -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PAnsichar; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PAnsiChar(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(Pdata); - //ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - - end - else - begin - // ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - - end; - -end; - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -begin - ReadData; -end; - -procedure TfrmuFrSimplest.WriteData; -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PAnsiChar; - tmpbyte:Pbyte; - iFResult :DL_STATUS; - i:integer; - tmpstr:AnsiString; - -begin - if Length(Trim(txtWriteData.Text))=0 then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - tmpstr:=''; - tmpstr:=trim(txtWriteData.Text); - if CBOverwrite.Checked then - begin - for i:=length(tmpstr)+1 to maxbytes(bdlCardType) - do tmpstr:=tmpstr+#0; - - end; - - - - - - SetFunct(true); - // New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength:=length(tmpstr); - PData :=PAnsiChar(tmpstr); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - //ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - - - end - else - begin - // ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; - ReadData(); - -end; - - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -begin - WriteData; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array [0..9] of Byte; - sBuffer :AnsiString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - btnFormattingCard.Enabled:=bDLCardType>$0A; - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - DL_MIFARE_CLASSIC_1k : Result:=(MAX_SECTORS_1k *4); - DL_MIFARE_CLASSIC_4k, - DL_MIFARE_PLUS_S_4K : Result:=((MAX_SECTORS_1k*2)*4)+((MAX_SECTORS_1k-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - Result:=0; - case bCardType of - DL_NTAG_203 : iMaxBytes:=MAX_BYTES_NTAG203; - - DL_MIFARE_ULTRALIGHT : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - DL_MIFARE_ULTRALIGHT_C: iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - DL_MIFARE_CLASSIC_1K : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - DL_MIFARE_CLASSIC_4K, - DL_MIFARE_PLUS_S_4K : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; - -end; - - - - -procedure TfrmuFrSimplest.FormActivate(Sender: TObject); -begin -btnReadData.SetFocus; -end; - -end. diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~ddp b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~ddp deleted file mode 100644 index 4370276c196a7fa73d6f8917622cba1c4e033dee..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~ddp and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~dfm b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~dfm deleted file mode 100644 index 5ba63ce55bc8aa060bb2a8b965ff14c92fa0ae2a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~dfm +++ /dev/null @@ -1,317 +0,0 @@ -object frmuFrSimplest: TfrmuFrSimplest - Left = 435 - Top = 110 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'uFr Simplest V2.0 D-Logic 2013' - ClientHeight = 495 - ClientWidth = 554 - Color = clBtnFace - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - KeyPreview = True - Menu = mnuMeni - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object stbConnected: TStatusBar - Left = 0 - Top = 472 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object pbBar: TProgressBar - Left = 0 - Top = 409 - Width = 554 - Height = 17 - Align = alBottom - ParentShowHint = False - Smooth = True - ShowHint = True - TabOrder = 1 - Visible = False - end - object stbCardStatus: TStatusBar - Left = 0 - Top = 449 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'CARD STATUS' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object stbFunctionError: TStatusBar - Left = 0 - Top = 426 - Width = 554 - Height = 23 - Font.Charset = ANSI_CHARSET - Font.Color = clBtnText - Font.Height = -11 - Font.Name = 'Verdana' - Font.Style = [] - Panels = < - item - Alignment = taCenter - Text = 'Function Error' - Width = 110 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Width = 50 - end> - UseSystemFont = False - end - object GroupBox1: TGroupBox - Left = 10 - Top = 0 - Width = 256 - Height = 80 - TabOrder = 4 - object lblCardType: TLabel - Left = 8 - Top = 20 - Width = 60 - Height = 13 - Caption = 'Card Type' - end - object lblCardUIDSize: TLabel - Left = 150 - Top = 20 - Width = 50 - Height = 13 - Caption = 'UID Size' - end - object lblCardUID: TLabel - Left = 8 - Top = 43 - Width = 54 - Height = 13 - Caption = 'Card UID' - end - object txtCardType: TEdit - Left = 88 - Top = 16 - Width = 41 - Height = 20 - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 0 - end - object txtCardUIDSize: TEdit - Left = 208 - Top = 16 - Width = 41 - Height = 20 - Hint = 'Card UIS Size' - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ParentShowHint = False - ReadOnly = True - ShowHint = True - TabOrder = 1 - end - object txtCardUID: TEdit - Left = 88 - Top = 40 - Width = 161 - Height = 20 - BevelOuter = bvRaised - Ctl3D = False - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentCtl3D = False - ParentFont = False - ReadOnly = True - TabOrder = 2 - end - end - object GroupBox2: TGroupBox - Left = 272 - Top = 0 - Width = 256 - Height = 80 - TabOrder = 5 - object CBZero: TCheckBox - Left = 7 - Top = 30 - Width = 92 - Height = 17 - Caption = 'Fill with $00' - TabOrder = 0 - end - object btnFormattingCard: TButton - Left = 103 - Top = 20 - Width = 141 - Height = 40 - Cursor = crHandPoint - Caption = 'FORMAT CARD' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnFormattingCardClick - end - end - object GroupBox3: TGroupBox - Left = 10 - Top = 80 - Width = 256 - Height = 320 - Caption = ' Write Data ' - TabOrder = 6 - object CBOverwrite: TCheckBox - Left = 8 - Top = 16 - Width = 233 - Height = 17 - Caption = 'Overwrite previous content' - TabOrder = 0 - end - object txtWriteData: TMemo - Left = 5 - Top = 38 - Width = 242 - Height = 224 - Ctl3D = False - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 1 - end - object btnWriteData: TButton - Left = 7 - Top = 273 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'WRITE DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnWriteDataClick - end - end - object GroupBox4: TGroupBox - Left = 272 - Top = 80 - Width = 256 - Height = 320 - Caption = ' Read Data ' - TabOrder = 7 - object txtReadData: TMemo - Left = 5 - Top = 38 - Width = 242 - Height = 224 - Color = clSilver - Ctl3D = False - ParentCtl3D = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 0 - end - object btnReadData: TButton - Left = 7 - Top = 273 - Width = 238 - Height = 40 - Cursor = crHandPoint - Caption = 'READ DATA' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Verdana' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = btnReadDataClick - end - end - object mnuMeni: TMainMenu - Left = 528 - Top = 32 - object mnuExitItem: TMenuItem - Caption = 'Exit' - OnClick = mnuExitItemClick - end - end - object Timer: TTimer - Interval = 500 - OnTimer = TimerTimer - Left = 528 - Top = 72 - end - object XPManifest1: TXPManifest - Left = 528 - end -end diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~pas b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~pas deleted file mode 100644 index 8e1471a7bdb1a2e782fa7cc43a6446a17a44083d..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFSimplest.~pas +++ /dev/null @@ -1,488 +0,0 @@ -(******************************************************************************** - - Program : uFr Simplest - File : uFSimplest.pas - Description : Main program.Support for 4k - Author : D-Logic - Development enviroment : Borland Delphi 7.0 - Revisions : - Version : 2.0.0.0 - -**********************************************************************************) - - -unit uFSimplest; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, ComCtrls,uFCoder1x, StdCtrls, XPMan; - -type - TfrmuFrSimplest = class(TForm) - stbConnected: TStatusBar; - mnuMeni: TMainMenu; - Timer: TTimer; - mnuExitItem: TMenuItem; - XPManifest1: TXPManifest; - pbBar: TProgressBar; - stbCardStatus: TStatusBar; - stbFunctionError: TStatusBar; - GroupBox1: TGroupBox; - lblCardType: TLabel; - txtCardType: TEdit; - lblCardUIDSize: TLabel; - txtCardUIDSize: TEdit; - lblCardUID: TLabel; - txtCardUID: TEdit; - GroupBox2: TGroupBox; - CBZero: TCheckBox; - btnFormattingCard: TButton; - GroupBox3: TGroupBox; - CBOverwrite: TCheckBox; - txtWriteData: TMemo; - btnWriteData: TButton; - GroupBox4: TGroupBox; - txtReadData: TMemo; - btnReadData: TButton; - procedure mnuExitItemClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure btnFormattingCardClick(Sender: TObject); - procedure btnReadDataClick(Sender: TObject); - procedure btnWriteDataClick(Sender: TObject); - procedure TimerTimer(Sender: TObject); - private - function GetFunct: Boolean; - procedure SetFunct(const Value: Boolean); - function GetLoop: Boolean; - procedure SetLoop(const Value: Boolean); - procedure ReadData; - procedure WriteData; - - private - bDLCardType : Byte; - boCONN:Boolean; - ERROR_CODE:array[0..180] of String; - boFunctionStart : Boolean; - boLoopStart : Boolean; - procedure MainLoop(); - procedure SetStatusBar(StatusBar:TStatusBar;Result:integer); - property FunctionStart : Boolean read GetFunct write SetFunct; - property LoopStart : Boolean read GetLoop write SetLoop; - function MaxBlocks(bCardType:Byte):integer; - function MaxBytes(bCardType:Byte):integer; - public - - end; -const - FERR_LIGHT = 2; //2 - FERR_SOUND = 2; //2 - FOK_LIGHT = 4; //4 - FOK_SOUND = 4; //4 - -var - frmuFrSimplest: TfrmuFrSimplest; - -implementation - -{$R *.dfm} - -procedure TfrmuFrSimplest.mnuExitItemClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmuFrSimplest.FormCreate(Sender: TObject); -begin - ERROR_CODE[$00]:='DL_OK '; - ERROR_CODE[$01]:='COMMUNICATION_ERROR '; - ERROR_CODE[$02]:='CHKSUM_ERROR '; - ERROR_CODE[$03]:='READING_ERROR '; - ERROR_CODE[$04]:='WRITING_ERROR '; - ERROR_CODE[$05]:='BUFFER_OVERFLOW '; - ERROR_CODE[$06]:='MAX_ADDRESS_EXCEEDED '; - ERROR_CODE[$07]:='MAX_KEY_INDEX_EXCEEDED '; - ERROR_CODE[$08]:='NO_CARD '; - ERROR_CODE[$09]:='COMMAND_NOT_SUPPORTED '; - ERROR_CODE[$0A]:='FORBIDEN_DIRECT_WRITE_IN_SECTOR_TRAILER '; - ERROR_CODE[$0B]:='ADDRESSED_BLOCK_IS_NOT_SECTOR_TRAILER '; - ERROR_CODE[$0C]:='WRONG_ADDRESS_MODE '; - ERROR_CODE[$0D]:='WRONG_ACCESS_BITS_VALUES '; - ERROR_CODE[$0E]:='AUTH_ERROR '; - ERROR_CODE[$0F]:='PARAMETERS_ERROR '; - ERROR_CODE[$10]:='MAX_SIZE_EXCEEDED '; - ERROR_CODE[$11]:='UNSUPPORTED_CARD_TYPE '; - - ERROR_CODE[$50]:='COMMUNICATION_BREAK '; - ERROR_CODE[$51]:='NO_MEMORY_ERROR '; - ERROR_CODE[$52]:='CAN_NOT_OPEN_READER '; - ERROR_CODE[$53]:='READER_NOT_SUPPORTED '; - ERROR_CODE[$54]:='READER_OPENING_ERROR '; - ERROR_CODE[$55]:='READER_PORT_NOT_OPENED '; - ERROR_CODE[$56]:='CANT_CLOSE_READER_PORT '; - - ERROR_CODE[$70]:='WRITE_VERIFICATION_ERROR '; - ERROR_CODE[$71]:='BUFFER_SIZE_EXCEEDED '; - ERROR_CODE[$72]:='VALUE_BLOCK_INVALID '; - ERROR_CODE[$73]:='VALUE_BLOCK_ADDR_INVALID '; - ERROR_CODE[$74]:='VALUE_BLOCK_MANIPULATION_ERROR '; - ERROR_CODE[$75]:='WRONG_UI_MODE'; - ERROR_CODE[$76]:='KEYS_LOCKED'; - ERROR_CODE[$77]:='KEYS_UNLOCKED'; - ERROR_CODE[$78]:='WRONG_PASSWORD'; - ERROR_CODE[$79]:='CAN_NOT_LOCK_DEVICE'; - ERROR_CODE[$7A]:='CAN_NOT_UNLOCK_DEVICE'; - ERROR_CODE[$7B]:='DEVICE_EEPROM_BUSY'; - ERROR_CODE[$7C]:='RTC_SET_ERROR'; - - ERROR_CODE[$A0]:='FT_STATUS_ERROR_1'; - ERROR_CODE[$A1]:='FT_STATUS_ERROR_2'; - ERROR_CODE[$A2]:='FT_STATUS_ERROR_3'; - ERROR_CODE[$A3]:='FT_STATUS_ERROR_4'; - ERROR_CODE[$A4]:='FT_STATUS_ERROR_5'; - ERROR_CODE[$A5]:='FT_STATUS_ERROR_6'; - ERROR_CODE[$A6]:='FT_STATUS_ERROR_7'; - ERROR_CODE[$A7]:='FT_STATUS_ERROR_8'; - ERROR_CODE[$A8]:='FT_STATUS_ERROR_9'; - boCONN:=false; -end; - -procedure TfrmuFrSimplest.btnFormattingCardClick(Sender: TObject); -var - PData :PByte; - iFResult :DL_STATUS; - siBlockCount, - siBISCount :integer; - bSectorCounter, - bBISCounter :Byte; - iMaxBlocks :integer; - baFormat:array[0..15] of byte; -begin - siBlockCount := 0; - siBISCount := 0; - bBISCounter := 3; - if FunctionStart or LoopStart then Exit - else - begin - try - SetFunct(true); - if CBZero.Checked - then - FillChar(baFormat,SizeOf(baFormat),$00) - else - FillChar(baFormat,SizeOf(baFormat),FORMAT_SIGN); - - New(PData); - PData:=@baFormat; - - iMaxBlocks:=MaxBlocks(bDLCardType); - with pbBar do begin - Visible:=true; - Max:=iMaxBlocks; - step:=1; - end; - while(siBlockCount=31) and (siBlockCount mod 16 =0) then - begin - Inc(bSectorCounter); - bBISCounter:=15; - end - else - Inc(bSectorCounter); - end; - if iFResult=DL_OK then - begin - // ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - // ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - pbBar.Visible:=false; - finally - SetFunct(false); - PData:=nil; - Dispose(PData); - end; - end; - ReadData(); -end; - -Procedure TfrmuFrSimplest.ReadData; -var - wLinearAddress, - wDataLength, - wBytesRet :word; - PData :PAnsichar; - baReadData :array of Byte; - iFResult :DL_STATUS; -begin - if FunctionStart or LoopStart then Exit; - try - SetFunct(true); - txtReadData.Clear; - New(PData); - wLinearAddress :=0; - wBytesRet :=0; - wDataLength :=MaxBytes(bDLCardType); - SetLength(baReadData,wDataLength+1); - PData :=PAnsiChar(@baReadData[0]); - iFResult:=LinearRead(PData,wLinearAddress,wDataLength,wBytesRet,MIFARE_AUTHENT1A,KEY_INDEX); - - if iFResult=DL_OK then - begin - txtReadData.Text:=AnsiString(baReadData); - //ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - // ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - - end; - -end; - -procedure TfrmuFrSimplest.btnReadDataClick(Sender: TObject); -begin - ReadData; -end; - -procedure TfrmuFrSimplest.WriteData; -var - wLinearAddress, - wDataLength, - wBytesWritten :word; - PData :PAnsiChar; - tmpbyte:Pbyte; - iFResult :DL_STATUS; - i:integer; - tmpstr:string; - -begin - if Length(Trim(txtWriteData.Text))=0 then - begin - MessageDlg('You must enter any value !',mtError,[mbOK],0); - txtWriteData.SetFocus; - Exit; - end; - - if FunctionStart or LoopStart then Exit; - try - tmpstr:=''; - tmpstr:=trim(txtWriteData.Text); - if CBOverwrite.Checked then - begin - for i:=length(tmpstr)+1 to maxbytes(bdlCardType) - do tmpstr:=tmpstr+#0; - - end; - - - - - - SetFunct(true); - New(PData); - wLinearAddress :=0; - wBytesWritten :=0; - wDataLength:=length(tmpstr); - PData :=PAnsiChar(tmpstr); - - iFResult:=LinearWrite(PData,wLinearAddress,wDataLength,wBytesWritten,MIFARE_AUTHENT1A,KEY_INDEX); - if iFResult=DL_OK then - begin - //ReaderUISignal(FOK_LIGHT,FOK_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end - else - begin - // ReaderUISignal(FERR_LIGHT,FERR_SOUND); - SetStatusBar(stbFunctionError,iFResult); - end; - finally - PData:=nil; - Dispose(PData); - SetFunct(false); - end; - ReadData(); - -end; - - -procedure TfrmuFrSimplest.btnWriteDataClick(Sender: TObject); -begin - WriteData; -end; - - - -procedure TfrmuFrSimplest.SetStatusBar(StatusBar: TStatusBar;Result: integer); -begin - with StatusBar do - begin - Panels[1].Text:=HexDisplayPrefix + IntToHex(Result,2); - Panels[2].Text:=ERROR_CODE[Result]; - end; -end; - -function TfrmuFrSimplest.GetFunct: Boolean; -begin - Result:= boFunctionStart; -end; - -procedure TfrmuFrSimplest.SetFunct(const Value: Boolean); -begin - boFunctionStart:=Value; -end; - -function TfrmuFrSimplest.GetLoop: Boolean; -begin - Result:=boLoopStart; -end; - -procedure TfrmuFrSimplest.SetLoop(const Value: Boolean); -begin - boLoopStart:=Value; -end; - -procedure TfrmuFrSimplest.MainLoop; -var - iReaderType, - iRResult, - iCResult, - iCardSerial :Longint; - bCardUIDSize, - bCount, - bCardType :Byte; - baCardUID :array [0..9] of Byte; - sBuffer :ShortString; -begin - sBuffer:=''; - SetLoop(true); - if not boCONN then - begin - iRResult:=ReaderOpen(); - if iRResult=DL_OK then - begin - boCONN:=true; - stbConnected.Panels[0].Text:='CONNECTED'; - SetStatusBar(stbConnected,iRResult); - end - else - begin - stbConnected.Panels[0].Text:='NOT CONNECTED'; - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - - if boCONN then - begin - iRResult:=GetReaderType(iReaderType); - if iRResult=DL_OK then - begin - iCResult:=GetDlogicCardType(bDLCardType); - if iCResult=DL_OK then - begin - btnFormattingCard.Enabled:=bDLCardType>$0A; - iCResult := GetCardIdEx(bCardType,baCardUID[0],bCardUIDSize); - if iCResult = DL_OK then - begin - for bCount:=0 to bCardUIDSize-1 do - begin - sBuffer:=sBuffer + IntToHex(baCardUID[bCount],2); - end; - end; - - txtCardType.Text :='$'+IntToHex(bDLCardType,2); - txtCardUIDSize.Text:='$'+IntToHex(bCardUIDSize,2); - txtCardUID.Text :='$'+sBuffer; - SetStatusBar(stbCardStatus,iCResult); - end - else - begin - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - btnFormattingCard.Enabled:=true; - SetStatusBar(stbCardStatus,iCResult); - end; - end - else - begin - boCONN:=false; - ReaderClose(); - txtCardType .Clear; - txtCardUIDSize .Clear; - txtCardUID .Clear; - SetStatusBar(stbConnected,iRResult); - end; - end; - SetLoop(false); -end; - -function TfrmuFrSimplest.MaxBlocks(bCardType:Byte): integer; -begin - case bCardType of - DL_MIFARE_CLASSIC_1k : Result:=(MAX_SECTORS_1k *4); - DL_MIFARE_CLASSIC_4k, - DL_MIFARE_PLUS_S_4K : Result:=((MAX_SECTORS_1k*2)*4)+((MAX_SECTORS_1k-8)*16) ; - end; - -end; - -procedure TfrmuFrSimplest.TimerTimer(Sender: TObject); -begin - if not FunctionStart then - MainLoop; -end; - -function TfrmuFrSimplest.MaxBytes(bCardType:Byte): integer; -var - iMaxBytes:integer; -begin - case bCardType of - DL_NTAG_203 : iMaxBytes:=MAX_BYTES_NTAG203; - - DL_MIFARE_ULTRALIGHT : iMaxBytes:=MAX_BYTES_ULTRALIGHT; - - DL_MIFARE_ULTRALIGHT_C: iMaxBytes:=MAX_BYTES_ULTRALIGHT_C; - - DL_MIFARE_CLASSIC_1K : iMaxBytes:=MAX_BYTES_CLASSIC_1K; - - DL_MIFARE_CLASSIC_4K, - DL_MIFARE_PLUS_S_4K : iMaxBytes:=MAX_BYTES_CLASSIC_4k; - end; - Result:=iMaxBytes; - -end; - - - - -end. diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.cfg b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.cfg deleted file mode 100644 index 9d13f677c7ffb752574e419b1e68b1b13915734e..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Projects\Bpl" --LN"c:\program files\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dof b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dof deleted file mode 100644 index 5d7f795bf21d923d0a6c211d00f63de5dff67776..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2074 -CodePage=1250 -[Version Info Keys] -CompanyName=D-Logic -FileDescription=Simplest version.Support for 4k -FileVersion=2.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName=uFr Simplest -ProductVersion=2.0.0.0 -Comments= diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dpr b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dpr deleted file mode 100644 index a55fadba964c7086d9f1a5e1e9ffc5f7f33c3c10..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dpr +++ /dev/null @@ -1,14 +0,0 @@ -program uFrSimplest; - -uses - Forms, - uFSimplest in 'uFSimplest.pas' {frmuFrSimplest}, - uFCoder in 'uFCoder.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TfrmuFrSimplest, frmuFrSimplest); - Application.Run; -end. diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dproj b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dproj deleted file mode 100644 index 962079a2c7e31d8c0afc79aa058dfc003c172c40..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dproj +++ /dev/null @@ -1,139 +0,0 @@ - - - {C4E06466-76B3-4B04-AB65-0A7B71B6B21B} - uFrSimplest.dpr - True - Debug - 1 - Application - VCL - 16.1 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - uFrSimplest - 00400000 - vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;$(DCC_UsePackage) - CompanyName=D-Logic;FileDescription=Simplest version.Support for 4k;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=uFr Simplest;ProductVersion=2.0.0.0;Comments= - Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) - 2 - true - 1 - false - true - false - 2074 - false - false - - - true - uFrSimplest_Icon.ico - System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - 1033 - $(BDS)\bin\default_app.manifest - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - - - uFrSimplest_Icon.ico - - - false - 0 - 0 - RELEASE;$(DCC_Define) - - - DEBUG;$(DCC_Define) - false - true - - - - MainSource - - -
frmuFrSimplest
-
- - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - - - - - uFrSimplest.dpr - - - True - False - 2 - 0 - 0 - 0 - False - False - False - False - False - 2074 - 1250 - - - D-Logic - Simplest version.Support for 4k - 2.0.0.0 - - - - - uFr Simplest - 2.0.0.0 - - - - - True - False - - - 12 - - - -
diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dproj.local b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dproj.local deleted file mode 100644 index 2702d1a4f9f4c7781d685c1bf542414b6643693a..0000000000000000000000000000000000000000 --- a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.dproj.local +++ /dev/null @@ -1,8 +0,0 @@ - - - - 2014.01.05 22:31:25.000.296,C:\Documents and Settings\admin\Desktop\uFr Simplest_2.1\uFrSimplest.dproj=C:\Documents and Settings\admin\Desktop\uFr Simplest_2.1\uFrSimplest.dproj - 2014.01.05 22:42:15.000.375,C:\Documents and Settings\admin\Desktop\uFr Simplest_2.1_DelphiXE2\uFrSimplest.dproj=C:\Documents and Settings\admin\Desktop\uFr Simplest_2.1_DelphiXE2\uFrSimplest.dproj - 2015.04.03 13:50:57.000.040,D:\d-logic\svn_repo\sw_open\ufr\delphi\examples\trunk\uFr Simplest_2.1_DelphiXE2\uFCoder.pas=D:\d-logic\svn_repo\sw_open\ufr\delphi\examples\trunk\uFr Simplest_2.1_DelphiXE2\uFCoder1x.pas - - diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.exe b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.exe deleted file mode 100644 index 68739630419f04560e43210f8c5aa580758876ba..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.exe and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.identcache b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.identcache deleted file mode 100644 index 4d398d718cbfe9c8ca102240be85aad4fa86a8e3..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.identcache and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.res b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.res deleted file mode 100644 index a9269af0472d5f8bdade77470187fc2f28ccf1fb..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest.res and /dev/null differ diff --git a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest_Icon.ico b/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest_Icon.ico deleted file mode 100644 index 0636da621d5214e296e1fd9d5d959bcb95439e09..0000000000000000000000000000000000000000 Binary files a/old_move_to_branch/uFr Simplest_2.1_DelphiXE/uFrSimplest_Icon.ico and /dev/null differ diff --git a/uFCoderAdvanced/ufr-lib b/uFCoderAdvanced/ufr-lib new file mode 160000 index 0000000000000000000000000000000000000000..c82e5f879bc3efb15f8fd5a884f9cec4b8ed9a82 --- /dev/null +++ b/uFCoderAdvanced/ufr-lib @@ -0,0 +1 @@ +Subproject commit c82e5f879bc3efb15f8fd5a884f9cec4b8ed9a82