diff --git a/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dpr b/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dpr index 2f1a7e0..91af004 100644 --- a/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dpr +++ b/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dpr @@ -6,10 +6,10 @@ uses uMain in 'uMain.pas' {FormMain}, uTextConvertRoutines in '..\BukvoezhkaDesktop\uTextConvertRoutines.pas', uTextConverter in '..\BukvoezhkaDesktop\uTextConverter.pas', - uStringsHelper in '..\BukvoezhkaDesktop\uStringsHelper.pas', - uFixedASCIIdecorator in '..\BukvoezhkaDesktop\uFixedASCIIdecorator.pas', - uFixedASCIIartFonts in '..\BukvoezhkaDesktop\uFixedASCIIartFonts.pas', - uCharacterSets in '..\BukvoezhkaDesktop\uCharacterSets.pas', + uStringListTypesConverter in '..\BukvoezhkaDesktop\uStringListTypesConverter.pas', + uFixedASCIIartMaker in '..\BukvoezhkaDesktop\uFixedASCIIartMaker.pas', + uConstASCIIartFonts in '..\BukvoezhkaDesktop\uConstASCIIartFonts.pas', + uConstCharArrays in '..\BukvoezhkaDesktop\uConstCharArrays.pas', uAbout in 'uAbout.pas' {FormAbout}; {$R *.res} diff --git a/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dproj b/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dproj index ea5e0fc..2c066c4 100644 --- a/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dproj +++ b/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.dproj @@ -6,7 +6,7 @@ BukvoezhkaCrossplatform.dpr True Release - OSX32 + Win64 95 Application @@ -291,10 +291,10 @@ - - - - + + + +
FormAbout
fmx @@ -325,15 +325,15 @@ - - - BukvoezhkaCrossplatform.exe + + + BukvoezhkaCrossplatform.icns true - + - BukvoezhkaCrossplatform + Info.plist true @@ -368,9 +368,9 @@ true - + - BukvoezhkaCrossplatform.icns + BukvoezhkaCrossplatform true @@ -385,13 +385,13 @@ true - - - Info.plist + + + BukvoezhkaCrossplatform.exe true - + BukvoezhkaCrossplatform true diff --git a/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.res b/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.res index 36f26e2..106d836 100644 Binary files a/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.res and b/BukvoezhkaCrossplatform/BukvoezhkaCrossplatform.res differ diff --git a/BukvoezhkaCrossplatform/uMain.fmx b/BukvoezhkaCrossplatform/uMain.fmx index aebd26d..7654bff 100644 --- a/BukvoezhkaCrossplatform/uMain.fmx +++ b/BukvoezhkaCrossplatform/uMain.fmx @@ -913,6 +913,7 @@ object FormMain: TFormMain TabOrder = 1 TextSettings.Font.Family = 'Lucida Console' TextSettings.Font.Size = 16.000000000000000000 + TextSettings.WordWrap = True StyledSettings = [Style, FontColor] end object MemoOutput: TMemo @@ -924,6 +925,7 @@ object FormMain: TFormMain TabOrder = 2 TextSettings.Font.Family = 'Lucida Console' TextSettings.Font.Size = 16.000000000000000000 + TextSettings.WordWrap = True StyledSettings = [Style, FontColor] end object SplitterInOut: TSplitter diff --git a/BukvoezhkaCrossplatform/uMain.pas b/BukvoezhkaCrossplatform/uMain.pas index bdd75e1..1da59ce 100644 --- a/BukvoezhkaCrossplatform/uMain.pas +++ b/BukvoezhkaCrossplatform/uMain.pas @@ -79,8 +79,8 @@ TFormMain = class(TForm) procedure ViewFontNameChange(Sender: TObject); procedure ViewFontSizeChange(Sender: TObject); private - ReplaceMethodItemIndex: integer; - ViewFontItemIndex: integer; + FReplaceMethodItemIndex: integer; + FViewFontItemIndex: integer; public { Public declarations } end; @@ -92,19 +92,19 @@ implementation {$R *.fmx} -uses uTextConverter, uFixedASCIIdecorator, uAbout; +uses uTextConverter, uFixedASCIIartMaker, uAbout; procedure TFormMain.ReplaceMethodItemIndexChange(Sender: TObject); begin - ReplaceMethodItemIndex := (Sender as TRadioButton).Tag; + FReplaceMethodItemIndex := (Sender as TRadioButton).Tag; ButtonGoClick(Sender); end; procedure TFormMain.ViewFontNameChange(Sender: TObject); // οεπεδελΰςό νΰ δθνΰμθχερκθι οξθρκ οξ ςεγσ ViewFontItemIndex σ δξχεπνθυ κξμ-β GroupBoxViewFontName begin - ViewFontItemIndex := (Sender as TRadioButton).Tag; - case ViewFontItemIndex of + FViewFontItemIndex := (Sender as TRadioButton).Tag; + case FViewFontItemIndex of 0: begin MemoInput.TextSettings.Font.Family := RadioButtonVFTahoma.Text; @@ -176,9 +176,9 @@ procedure TFormMain.TextDecorate(Sender: TObject); end; procedure TFormMain.ButtonSymbolsReplaceClick(Sender: TObject); - procedure GoTransform(TransformMethod: integer); + procedure TextConvert(ConvertMethod: integer); begin - case TransformMethod of + case ConvertMethod of 0: MemoOutput.Text := TTextConverter.MakeASCII(MemoInput.Text); 1: @@ -216,15 +216,15 @@ procedure TFormMain.ButtonSymbolsReplaceClick(Sender: TObject); MemoOutput.WordWrap := True; // MemoOutput.ScrollBars := ssVertical; // - GoTransform(ReplaceMethodItemIndex); + TextConvert(FReplaceMethodItemIndex); MemoOutput.SelectAll; MemoOutput.CopyToClipboard; end; procedure TFormMain.FormCreate(Sender: TObject); begin - ReplaceMethodItemIndex := 6; - ViewFontItemIndex := 2; + FReplaceMethodItemIndex := 6; + FViewFontItemIndex := 2; end; procedure TFormMain.ButtonAboutClick(Sender: TObject); diff --git a/BukvoezhkaDesktop/BukvoezhkaDesktop.dpr b/BukvoezhkaDesktop/BukvoezhkaDesktop.dpr index 71549fb..5bf9335 100644 --- a/BukvoezhkaDesktop/BukvoezhkaDesktop.dpr +++ b/BukvoezhkaDesktop/BukvoezhkaDesktop.dpr @@ -2,15 +2,15 @@ uses Forms, - uMain in 'uMain.pas' {FormMain}, + uFormMain in 'uFormMain.pas' {FormMain}, uTextConvertRoutines in 'uTextConvertRoutines.pas', - uCharacterSets in 'uCharacterSets.pas', + uConstCharArrays in 'uConstCharArrays.pas', uTextConverter in 'uTextConverter.pas', - uAbout in 'uAbout.pas' {FormAbout}, - uStringsHelper in 'uStringsHelper.pas', - uASCIIdecorator in 'uASCIIdecorator.pas', - uFixedASCIIartFonts in 'uFixedASCIIartFonts.pas', - uFixedASCIIdecorator in 'uFixedASCIIdecorator.pas'; + uFormAbout in 'uFormAbout.pas' {FormAbout}, + uStringListTypesConverter in 'uStringListTypesConverter.pas', + uASCIIartMaker in 'uASCIIartMaker.pas', + uConstASCIIartFonts in 'uConstASCIIartFonts.pas', + uFixedASCIIartMaker in 'uFixedASCIIartMaker.pas'; {$R *.res} diff --git a/BukvoezhkaDesktop/BukvoezhkaDesktop.dproj b/BukvoezhkaDesktop/BukvoezhkaDesktop.dproj index 5bf946e..bbbce55 100644 --- a/BukvoezhkaDesktop/BukvoezhkaDesktop.dproj +++ b/BukvoezhkaDesktop/BukvoezhkaDesktop.dproj @@ -114,27 +114,27 @@ 1033 true true - 33 - CompanyName=;FileDescription=;FileVersion=1.2.0.33;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.2;Comments=;LastCompiledTime=2015.03.22 02:46:35 + 38 + CompanyName=;FileDescription=;FileVersion=1.2.0.38;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.2;Comments=;LastCompiledTime=2015.03.25 11:43:35 MainSource - +
FormMain
- + - +
FormAbout
dfm
- - - - + + + + Cfg_2 @@ -233,6 +233,18 @@
+ + + .\ + true + + + + + BukvoezhkaDesktop.exe + true + + 1 diff --git a/BukvoezhkaDesktop/BukvoezhkaDesktop.res b/BukvoezhkaDesktop/BukvoezhkaDesktop.res index 9d9e041..74ab685 100644 Binary files a/BukvoezhkaDesktop/BukvoezhkaDesktop.res and b/BukvoezhkaDesktop/BukvoezhkaDesktop.res differ diff --git a/BukvoezhkaDesktop/uASCIIdecorator.pas b/BukvoezhkaDesktop/uASCIIartMaker.pas similarity index 90% rename from BukvoezhkaDesktop/uASCIIdecorator.pas rename to BukvoezhkaDesktop/uASCIIartMaker.pas index 23f3365..89e3fb9 100644 --- a/BukvoezhkaDesktop/uASCIIdecorator.pas +++ b/BukvoezhkaDesktop/uASCIIartMaker.pas @@ -1,4 +1,4 @@ -ο»Ώunit uASCIIdecorator; +ο»Ώunit uASCIIartMaker; // Автор ΠΎΡ€ΠΈΠ³ΠΈΠ½Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΠ° прСобразования ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠΈ Π² тСкст - fabiin // (2003, http://codes-sources.commentcamarche.net/source/12384-ascii-t-petit-soft-d-ascii-art) @@ -8,16 +8,16 @@ interface uses Windows, Graphics, Classes; type - TDen = record // Ρ‚ΠΈΠΏ символа ΠΏΠΎ Ρ†Π²Π΅Ρ‚ΠΎΠ²ΠΎΠΌΡƒ Ρ‚ΠΎΠ½Ρƒ - Car: Char; // символ - D: integer; // Ρ‚ΠΎΠ½ + TCharDensity = record // Ρ‚ΠΈΠΏ символа ΠΏΠΎ Ρ†Π²Π΅Ρ‚ΠΎΠ²ΠΎΠΌΡƒ Ρ‚ΠΎΠ½Ρƒ + FChar: Char; // символ + FDensity: integer; // Ρ‚ΠΎΠ½ end; type - TASCIIdecorator = class(TComponent) + TASCIIartMaker = class(TComponent) private var - Densite: array of TDen; // Массив символов со значСниями ΠΈΡ… яркости + Densite: array of TCharDensity; // Массив символов со значСниями ΠΈΡ… яркости procedure QuickSort(iLo, iHi: integer); function MakeASCIIfromBitmap(SrcBitmap: TBitmap; DonorFont: string = 'Lucida Console'; contrast: integer = 255; zoom: integer = 0; IsNegative: boolean = false; @@ -33,21 +33,21 @@ implementation uses SysUtils; -procedure TASCIIdecorator.QuickSort(iLo, iHi: integer); +procedure TASCIIartMaker.QuickSort(iLo, iHi: integer); var Lo, Hi: integer; Mid: single; - T: TDen; + T: TCharDensity; begin Lo := iLo; Hi := iHi; if (Hi + Lo) <= 0 then exit; - Mid := Densite[(Hi + Lo) div 2].D; + Mid := Densite[(Hi + Lo) div 2].FDensity; repeat - while Densite[Lo].D < Mid do + while Densite[Lo].FDensity < Mid do Inc(Lo); - while Densite[Hi].D > Mid do + while Densite[Hi].FDensity > Mid do Dec(Hi); if Lo <= Hi then begin @@ -66,7 +66,7 @@ procedure TASCIIdecorator.QuickSort(iLo, iHi: integer); // if Terminated then Exit; end; -function TASCIIdecorator.MakeASCIIfromBitmap(SrcBitmap: TBitmap; +function TASCIIartMaker.MakeASCIIfromBitmap(SrcBitmap: TBitmap; DonorFont: string = 'Lucida Console'; contrast: integer = 255; zoom: integer = 0; IsNegative: boolean = false; CharacterSet: Byte = 0): string; @@ -144,8 +144,8 @@ function TASCIIdecorator.MakeASCIIfromBitmap(SrcBitmap: TBitmap; // БоставляСм массив символов for c := low(Densite) to high(Densite) do begin - Densite[c - low(Densite)].Car := charactersArr[c]; // записываСм символ Π² массив "ΡˆΡ€ΠΈΡ„Ρ‚Π°" - Densite[c - low(Densite)].D := 0; + Densite[c - low(Densite)].FChar := charactersArr[c]; // записываСм символ Π² массив "ΡˆΡ€ΠΈΡ„Ρ‚Π°" + Densite[c - low(Densite)].FDensity := 0; // рисуСм символ TmpB.Canvas.Rectangle(0, 0, TmpB.Width, TmpB.Height); TmpB.Canvas.TextOut(0, 0, charactersArr[c]); @@ -155,7 +155,7 @@ function TASCIIdecorator.MakeASCIIfromBitmap(SrcBitmap: TBitmap; for b := 1 to 20 do begin if TmpB.Canvas.Pixels[a, b] = clwhite then - Densite[c - low(Densite)].D := Densite[c - low(Densite)].D + 1; + Densite[c - low(Densite)].FDensity := Densite[c - low(Densite)].FDensity + 1; end; end; end; @@ -250,7 +250,7 @@ function TASCIIdecorator.MakeASCIIfromBitmap(SrcBitmap: TBitmap; // Π’Ρ‹Ρ‡ΠΈΡΠ»ΠΈΡ‚ΡŒ ΠΊΠΎΠ½Π΅Ρ‡Π½ΡƒΡŽ ΠΏΠ»ΠΎΡ‚Π½ΠΎΡΡ‚ΡŒ (ΠΎΡ‚Π½ΠΎΡˆΠ΅Π½ΠΈΠ΅ 255 ΠΊ 95) MoyCol := round(MoyCol * ((Length(Densite) - 1) / 255)); - TmpStr := TmpStr + Densite[MoyCol].Car; // Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠΉ символ (?) + TmpStr := TmpStr + Densite[MoyCol].FChar; // Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠΉ символ (?) Inc(a, 8); end; @@ -262,7 +262,7 @@ function TASCIIdecorator.MakeASCIIfromBitmap(SrcBitmap: TBitmap; Result := TmpStr; end; -function TASCIIdecorator.MakeASCIIfromText(SrcText: string; DonorFont: string = 'Lucida Console'; +function TASCIIartMaker.MakeASCIIfromText(SrcText: string; DonorFont: string = 'Lucida Console'; contrast: integer = 255; zoom: integer = 0; IsNegative: boolean = false; CharacterSet: Byte = 0; RenderFontSize: integer = 100): string; var diff --git a/BukvoezhkaDesktop/uFixedASCIIartFonts.pas b/BukvoezhkaDesktop/uConstASCIIartFonts.pas similarity index 99% rename from BukvoezhkaDesktop/uFixedASCIIartFonts.pas rename to BukvoezhkaDesktop/uConstASCIIartFonts.pas index 4efbbc3..3b03cd3 100644 --- a/BukvoezhkaDesktop/uFixedASCIIartFonts.pas +++ b/BukvoezhkaDesktop/uConstASCIIartFonts.pas @@ -1,8 +1,8 @@ -ο»Ώunit uFixedASCIIartFonts; +ο»Ώunit uConstASCIIartFonts; interface -uses uCharacterSets; +uses uConstCharArrays; var C_First_Font_RU: ArrArrStr = diff --git a/BukvoezhkaDesktop/uCharacterSets.pas b/BukvoezhkaDesktop/uConstCharArrays.pas similarity index 99% rename from BukvoezhkaDesktop/uCharacterSets.pas rename to BukvoezhkaDesktop/uConstCharArrays.pas index f10890a..d04500e 100644 --- a/BukvoezhkaDesktop/uCharacterSets.pas +++ b/BukvoezhkaDesktop/uConstCharArrays.pas @@ -1,4 +1,4 @@ -ο»Ώunit uCharacterSets; +ο»Ώunit uConstCharArrays; interface diff --git a/BukvoezhkaDesktop/uFixedASCIIdecorator.pas b/BukvoezhkaDesktop/uFixedASCIIartMaker.pas similarity index 98% rename from BukvoezhkaDesktop/uFixedASCIIdecorator.pas rename to BukvoezhkaDesktop/uFixedASCIIartMaker.pas index 1136f9f..a4cf914 100644 --- a/BukvoezhkaDesktop/uFixedASCIIdecorator.pas +++ b/BukvoezhkaDesktop/uFixedASCIIartMaker.pas @@ -1,8 +1,8 @@ -ο»Ώunit uFixedASCIIdecorator; +ο»Ώunit uFixedASCIIartMaker; interface -uses uCharacterSets; +uses uConstCharArrays; type TFixedASCIIdecorator = class @@ -16,7 +16,7 @@ TFixedASCIIdecorator = class implementation -uses System.RegularExpressions, uFixedASCIIartFonts; +uses System.RegularExpressions, uConstASCIIartFonts; class function TFixedASCIIdecorator.MakeFixedASCIIfromText(InputTxt: string; SrcSet, DestASCIIFontSet: ArrArrStr): string; diff --git a/BukvoezhkaDesktop/uAbout.dfm b/BukvoezhkaDesktop/uFormAbout.dfm similarity index 99% rename from BukvoezhkaDesktop/uAbout.dfm rename to BukvoezhkaDesktop/uFormAbout.dfm index 2aed0ec..0ef33c6 100644 --- a/BukvoezhkaDesktop/uAbout.dfm +++ b/BukvoezhkaDesktop/uFormAbout.dfm @@ -77,6 +77,5 @@ object FormAbout: TFormAbout ParentFont = False ReadOnly = True TabOrder = 1 - ExplicitTop = 71 end end diff --git a/BukvoezhkaDesktop/uAbout.pas b/BukvoezhkaDesktop/uFormAbout.pas similarity index 95% rename from BukvoezhkaDesktop/uAbout.pas rename to BukvoezhkaDesktop/uFormAbout.pas index 0a46dfb..19aecc2 100644 --- a/BukvoezhkaDesktop/uAbout.pas +++ b/BukvoezhkaDesktop/uFormAbout.pas @@ -1,4 +1,4 @@ -ο»Ώunit uAbout; +ο»Ώunit uFormAbout; interface diff --git a/BukvoezhkaDesktop/uMain.dfm b/BukvoezhkaDesktop/uFormMain.dfm similarity index 98% rename from BukvoezhkaDesktop/uMain.dfm rename to BukvoezhkaDesktop/uFormMain.dfm index 90cf31b..1f27385 100644 --- a/BukvoezhkaDesktop/uMain.dfm +++ b/BukvoezhkaDesktop/uFormMain.dfm @@ -82,7 +82,6 @@ object FormMain: TFormMain ParentFont = False ScrollBars = ssVertical TabOrder = 0 - ExplicitTop = 2 end end end @@ -145,6 +144,10 @@ object FormMain: TFormMain object TabSheetTextDecorate: TTabSheet Caption = #1054#1092#1086#1088#1084#1083#1077#1085#1080#1077' '#1090#1077#1082#1089#1090#1072 ImageIndex = 1 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object GroupBoxUnderline: TGroupBox AlignWithMargins = True Left = 3 @@ -175,7 +178,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 0 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end object ButtonUnderline3: TButton Tag = 5 @@ -198,7 +201,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 1 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end object ButtonUnderline1: TButton Tag = 3 @@ -221,7 +224,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 2 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end end object GroupBoxStrikethrough: TGroupBox @@ -254,7 +257,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 0 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end object ButtonStrikethrough2: TButton Tag = 2 @@ -277,7 +280,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 1 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end end object GroupBoxDoubleU: TGroupBox @@ -310,7 +313,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 0 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end object ButtonDoubleU2: TButton Tag = 7 @@ -333,7 +336,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 1 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end end object GroupBoxOverline: TGroupBox @@ -366,7 +369,7 @@ object FormMain: TFormMain ParentFont = False TabOrder = 0 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end object ButtonOverline2: TButton Tag = 9 @@ -389,13 +392,17 @@ object FormMain: TFormMain ParentFont = False TabOrder = 1 WordWrap = True - OnClick = Transform + OnClick = MemoAddNoise end end end object TabSheetGenericASCIIart: TTabSheet Caption = #1043#1077#1085#1077#1088#1072#1094#1080#1103' ASCII art-'#1096#1088#1080#1092#1090#1072 ImageIndex = 2 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object GroupBoxSourceFont: TGroupBox AlignWithMargins = True Left = 3 @@ -545,6 +552,10 @@ object FormMain: TFormMain object TabSheetFixedASCIIart: TTabSheet Caption = #1060#1080#1082#1089#1080#1088#1086#1074#1072#1085#1085#1099#1081' ASCII art-'#1096#1088#1080#1092#1090 ImageIndex = 3 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object GroupBoxFixedFontSettings: TGroupBox AlignWithMargins = True Left = 3 @@ -573,7 +584,7 @@ object FormMain: TFormMain ItemIndex = 0 TabOrder = 0 Text = '1st font' - OnChange = ButtonFixedGraphicFontClick + OnChange = ButtonFixedASCIIartClick Items.Strings = ( '1st font' '2ch tools font') @@ -585,7 +596,7 @@ object FormMain: TFormMain Height = 17 Caption = #1048#1085#1074#1077#1088#1090#1080#1088#1086#1074#1072#1090#1100' '#1094#1074#1077#1090#1072 TabOrder = 1 - OnClick = ButtonFixedGraphicFontClick + OnClick = ButtonFixedASCIIartClick end end end @@ -734,7 +745,7 @@ object FormMain: TFormMain Layout = blGlyphTop ParentFont = False TabOrder = 0 - OnClick = AnyButtonGoClick + OnClick = ButtonGoClick end object BitBtnClear: TBitBtn AlignWithMargins = True diff --git a/BukvoezhkaDesktop/uMain.pas b/BukvoezhkaDesktop/uFormMain.pas similarity index 89% rename from BukvoezhkaDesktop/uMain.pas rename to BukvoezhkaDesktop/uFormMain.pas index 8bb058f..a51da18 100644 --- a/BukvoezhkaDesktop/uMain.pas +++ b/BukvoezhkaDesktop/uFormMain.pas @@ -1,4 +1,4 @@ -ο»Ώunit uMain; +ο»Ώunit uFormMain; interface @@ -60,13 +60,13 @@ TFormMain = class(TForm) BitBtnAbout: TBitBtn; procedure ButtonClearClick(Sender: TObject); procedure ButtonSymbolsReplaceClick(Sender: TObject); - procedure AnyButtonGoClick(Sender: TObject); + procedure ButtonGoClick(Sender: TObject); procedure RadioGroupFontClick(Sender: TObject); procedure ComboBoxFontSizeChange(Sender: TObject); - procedure Transform(Sender: TObject); + procedure MemoAddNoise(Sender: TObject); procedure ButtonAboutClick(Sender: TObject); procedure ButtonASCIIartClick(Sender: TObject); - procedure ButtonFixedGraphicFontClick(Sender: TObject); + procedure ButtonFixedASCIIartClick(Sender: TObject); private // public @@ -78,28 +78,28 @@ TFormMain = class(TForm) implementation -uses uTextConverter, uASCIIdecorator, uFixedASCIIdecorator, uAbout; +uses uTextConverter, uASCIIartMaker, uFixedASCIIartMaker, uFormAbout; {$R *.dfm} procedure TFormMain.ButtonASCIIartClick(Sender: TObject); var - ASCIIdecorator: TASCIIdecorator; + ASCIIartMaker: TASCIIartMaker; begin - ASCIIdecorator := TASCIIdecorator.Create(nil); + ASCIIartMaker := TASCIIartMaker.Create(nil); // MemoOutput.WordWrap := False; MemoOutput.ScrollBars := ssBoth; RadioGroupFont.ItemIndex := 2; RadioGroupFontClick(RadioGroupFont); // - MemoOutput.Text := ASCIIdecorator.MakeASCIIfromText(MemoInput.Text, + MemoOutput.Text := ASCIIartMaker.MakeASCIIfromText(MemoInput.Text, ComboBoxASFontName.Items[ComboBoxASFontName.ItemIndex], 255, StrToInt(ComboBoxASZoom.Items[ComboBoxASZoom.ItemIndex]), CheckBoxASNegative.Checked, ComboBoxASCharacterSet.ItemIndex, StrToInt(ComboBoxASFontSize.Items[ComboBoxASFontSize.ItemIndex])); // - FreeAndNil(ASCIIdecorator); + FreeAndNil(ASCIIartMaker); // MemoOutput.SelectAll; MemoOutput.CopyToClipboard; @@ -116,7 +116,7 @@ procedure TFormMain.ButtonClearClick(Sender: TObject); FormMain.MemoOutput.Text := ''; end; -procedure TFormMain.ButtonFixedGraphicFontClick(Sender: TObject); +procedure TFormMain.ButtonFixedASCIIartClick(Sender: TObject); begin MemoOutput.WordWrap := False; MemoOutput.ScrollBars := ssBoth; @@ -135,9 +135,9 @@ procedure TFormMain.ButtonFixedGraphicFontClick(Sender: TObject); end; procedure TFormMain.ButtonSymbolsReplaceClick(Sender: TObject); - procedure GoTransform(TransformMethod: Integer); + procedure TextConvert(ConvertMethod: Integer); begin - case TransformMethod of + case ConvertMethod of 0: MemoOutput.Text := TTextConverter.MakeASCII(MemoInput.Text); 1: @@ -175,12 +175,12 @@ procedure TFormMain.ButtonSymbolsReplaceClick(Sender: TObject); MemoOutput.WordWrap := True; MemoOutput.ScrollBars := ssVertical; // - GoTransform(RadioGroupMethod.ItemIndex); + TextConvert(RadioGroupMethod.ItemIndex); MemoOutput.SelectAll; MemoOutput.CopyToClipboard; end; -procedure TFormMain.AnyButtonGoClick(Sender: TObject); +procedure TFormMain.ButtonGoClick(Sender: TObject); begin case PageControlMain.ActivePageIndex of 0: @@ -188,7 +188,7 @@ procedure TFormMain.AnyButtonGoClick(Sender: TObject); 2: ButtonASCIIartClick(Sender); 3: - ButtonFixedGraphicFontClick(Sender); + ButtonFixedASCIIartClick(Sender); end; end; @@ -204,7 +204,7 @@ procedure TFormMain.RadioGroupFontClick(Sender: TObject); MemoOutput.Font.Name := RadioGroupFont.Items[RadioGroupFont.ItemIndex]; end; -procedure TFormMain.Transform(Sender: TObject); +procedure TFormMain.MemoAddNoise(Sender: TObject); begin MemoOutput.WordWrap := True; MemoOutput.ScrollBars := ssVertical; diff --git a/BukvoezhkaDesktop/uStringsHelper.pas b/BukvoezhkaDesktop/uStringListTypesConverter.pas similarity index 98% rename from BukvoezhkaDesktop/uStringsHelper.pas rename to BukvoezhkaDesktop/uStringListTypesConverter.pas index bdabce0..2f2b928 100644 --- a/BukvoezhkaDesktop/uStringsHelper.pas +++ b/BukvoezhkaDesktop/uStringListTypesConverter.pas @@ -1,4 +1,4 @@ -ο»Ώunit uStringsHelper; +ο»Ώunit uStringListTypesConverter; interface diff --git a/BukvoezhkaDesktop/uTextConvertRoutines.pas b/BukvoezhkaDesktop/uTextConvertRoutines.pas index 0fcab65..bdfe026 100644 --- a/BukvoezhkaDesktop/uTextConvertRoutines.pas +++ b/BukvoezhkaDesktop/uTextConvertRoutines.pas @@ -2,7 +2,7 @@ interface -uses uCharacterSets; +uses uConstCharArrays; const ModeRandom: Byte = 0; diff --git a/BukvoezhkaDesktop/uTextConverter.pas b/BukvoezhkaDesktop/uTextConverter.pas index 2903dd1..5739827 100644 --- a/BukvoezhkaDesktop/uTextConverter.pas +++ b/BukvoezhkaDesktop/uTextConverter.pas @@ -33,7 +33,7 @@ TTextConverter = class implementation -uses uTextConvertRoutines, uCharacterSets; +uses uTextConvertRoutines, uConstCharArrays; class function TTextConverter.Decode(Src: string): string; begin diff --git a/BukvoezhkaMobile/BukvoezhkaMobile.dpr b/BukvoezhkaMobile/BukvoezhkaMobile.dpr index 6d0c24b..ff41330 100644 --- a/BukvoezhkaMobile/BukvoezhkaMobile.dpr +++ b/BukvoezhkaMobile/BukvoezhkaMobile.dpr @@ -5,7 +5,7 @@ uses FMX.Forms, uMain in 'uMain.pas' {FormMain}, uTextConvertRoutines in '..\BukvoezhkaDesktop\uTextConvertRoutines.pas', - uCharacterSets in '..\BukvoezhkaDesktop\uCharacterSets.pas', + uConstCharArrays in '..\BukvoezhkaDesktop\uConstCharArrays.pas', uTextConverter in '..\BukvoezhkaDesktop\uTextConverter.pas'; {$R *.res} diff --git a/BukvoezhkaMobile/BukvoezhkaMobile.dproj b/BukvoezhkaMobile/BukvoezhkaMobile.dproj index 41f4ce6..af83fec 100644 --- a/BukvoezhkaMobile/BukvoezhkaMobile.dproj +++ b/BukvoezhkaMobile/BukvoezhkaMobile.dproj @@ -6,7 +6,7 @@ BukvoezhkaMobile.dpr True Release - OSX32 + Win64 95 Application @@ -83,6 +83,12 @@ true true + + true + Cfg_2 + true + true + true true @@ -274,6 +280,10 @@ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=4;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;FileVersion=1.0.0.4;LastCompiledTime=16.11.2014 2:37:35 ico\bkvXlarge.png + + 2 + CompanyName=;FileDescription=;FileVersion=1.0.0.2;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;LastCompiledTime=2015.03.25 11:45:05 + MainSource @@ -283,7 +293,7 @@ fmx
- + Cfg_2 @@ -369,20 +379,20 @@ true - + - libBukvoezhkaMobile.so true - + - splash_image.png + libBukvoezhkaMobile.so true - + + splash_image.png true diff --git a/BukvoezhkaMobile/BukvoezhkaMobile.res b/BukvoezhkaMobile/BukvoezhkaMobile.res index 36f26e2..dde1c9c 100644 Binary files a/BukvoezhkaMobile/BukvoezhkaMobile.res and b/BukvoezhkaMobile/BukvoezhkaMobile.res differ diff --git a/BukvoezhkaMobile/uMain.NmXhdpiPh.fmx b/BukvoezhkaMobile/uMain.NmXhdpiPh.fmx index a6860b7..c34e66c 100644 --- a/BukvoezhkaMobile/uMain.NmXhdpiPh.fmx +++ b/BukvoezhkaMobile/uMain.NmXhdpiPh.fmx @@ -6,25 +6,11 @@ inherited FormMain_NmXhdpiPh: TFormMain_NmXhdpiPh Size.Width = 400.000000000000000000 Size.Height = 615.000000000000000000 inherited MainLayout1: TLayout - Size.Width = 50.000000000000000000 - Size.Height = 50.000000000000000000 inherited EditInput: TEdit - Position.Y = 18.000000000000000000 - Size.Width = 50.000000000000000000 - end - inherited MemoOutput: TMemo - Size.Width = 50.000000000000000000 - Size.Height = 0.000000000000000000 + Position.Y = 448.000000000000000000 end inherited PanelControl: TPanel - Position.Y = -22.000000000000000000 - Size.Width = 50.000000000000000000 - inherited ComboBoxMethod: TComboBox - Size.Width = 0.000000000000000000 - end - inherited ButtonGo: TButton - Position.X = 10.000000000000000000 - end + Position.Y = 408.000000000000000000 end end end diff --git a/BukvoezhkaMobile/uMain.SmXhdpiPh.fmx b/BukvoezhkaMobile/uMain.SmXhdpiPh.fmx index cea3f47..89a2821 100644 --- a/BukvoezhkaMobile/uMain.SmXhdpiPh.fmx +++ b/BukvoezhkaMobile/uMain.SmXhdpiPh.fmx @@ -6,25 +6,11 @@ inherited FormMain_SmXhdpiPh: TFormMain_SmXhdpiPh Size.Width = 250.000000000000000000 Size.Height = 375.000000000000000000 inherited MainLayout1: TLayout - Size.Width = 50.000000000000000000 - Size.Height = 50.000000000000000000 inherited EditInput: TEdit - Position.Y = 18.000000000000000000 - Size.Width = 50.000000000000000000 - end - inherited MemoOutput: TMemo - Size.Width = 50.000000000000000000 - Size.Height = 0.000000000000000000 + Position.Y = 448.000000000000000000 end inherited PanelControl: TPanel - Position.Y = -22.000000000000000000 - Size.Width = 50.000000000000000000 - inherited ComboBoxMethod: TComboBox - Size.Width = 0.000000000000000000 - end - inherited ButtonGo: TButton - Position.X = 10.000000000000000000 - end + Position.Y = 408.000000000000000000 end end end diff --git a/BukvoezhkaMobile/uMain.Windows.fmx b/BukvoezhkaMobile/uMain.Windows.fmx index c3d0dae..9a2f7c9 100644 --- a/BukvoezhkaMobile/uMain.Windows.fmx +++ b/BukvoezhkaMobile/uMain.Windows.fmx @@ -2,25 +2,11 @@ inherited FormMain_Windows: TFormMain_Windows DesignerMasterStyle = 3 inherited VertScrollBox1: TVertScrollBox inherited MainLayout1: TLayout - Size.Width = 50.000000000000000000 - Size.Height = 50.000000000000000000 inherited EditInput: TEdit - Position.Y = 18.000000000000000000 - Size.Width = 50.000000000000000000 - end - inherited MemoOutput: TMemo - Size.Width = 50.000000000000000000 - Size.Height = 0.000000000000000000 + Position.Y = 448.000000000000000000 end inherited PanelControl: TPanel - Position.Y = -22.000000000000000000 - Size.Width = 50.000000000000000000 - inherited ComboBoxMethod: TComboBox - Size.Width = 0.000000000000000000 - end - inherited ButtonGo: TButton - Position.X = 10.000000000000000000 - end + Position.Y = 408.000000000000000000 end end end diff --git a/BukvoezhkaMobile/uMain.pas b/BukvoezhkaMobile/uMain.pas index b393415..77fa9c3 100644 --- a/BukvoezhkaMobile/uMain.pas +++ b/BukvoezhkaMobile/uMain.pas @@ -55,9 +55,9 @@ procedure TFormMain.ButtonClearClick(Sender: TObject); end; procedure TFormMain.ButtonGoClick(Sender: TObject); - procedure Transform(TransformMethod: Integer); + procedure TextConvert(ConvertMethod: Integer); begin - case TransformMethod of + case ConvertMethod of 0: MemoOutput.Text := TTextConverter.MakeASCII(EditInput.Text); 1: @@ -92,7 +92,7 @@ procedure TFormMain.ButtonGoClick(Sender: TObject); end; begin - Transform(ComboBoxMethod.ItemIndex); + TextConvert(ComboBoxMethod.ItemIndex); MemoOutput.SelectAll; MemoOutput.CopyToClipboard; end;