t;.Color:=clWindow;;TForm1.Button25Click(Sender: TObject); OpenDialog1.Execute then:=OpenDialog1.FileName; .Lines.LoadFromFile (EditFile) ;. Caption:= My Word - + ExtractFileName (EditFile) ;;; TForm1.Button12Click (Sender: TObject); SaveDialog1.Execute then.Lines.SaveToFile (EditFile);// запис на пряму в файлMemo1.Modified then Memo1.Modified:=false ;; TForm1.Button24Click (Sender: TObject); SaveDialog1.Execute then//запис у файл + діалогових вікон:=SaveDialog1.FileName; .Lines.SaveToFile ( EditFile) ;. Caption:= My Word - + ExtractFileName (EditFile); Memo1.Modified then Memo1.Modified:=false ;;; TForm1.Button15Click (Sender: TObject); FontDialog1.Execute then Memo1.Font: =FontDialog1.Font ;; TForm1.Button16Click (Sender: TObject); ColorDialog1.Execute then Memo1.Font.Color:=ColorDialog1.Color ;; TForm1.Button23Click (Sender: TObject); ColorDialog1.Execute then Memo1.Color:=ColorDialog1.Color ;; TForm1.Button17Click (Sender: TObject) ;: System.TextFile;: integer; PrintDialog1.Execute then (Stroka); (Stroka) ;. Canvas.Font:=Memo1.Font; i:=0 to Memo1. Lines.Count - 1 do (Stroka, Memo1.Lines [i]) ;. CloseFile (Stroka) ;;; TForm1.Button13Click (Sender: TObject); OpenPictureDialog1.Execute then.Picture.LoadFromFile (OpenPictureDialog1.FileName) ;; TForm1.Button14Click (Sender: TObject); SavePictureDialog1.Execute then.Picture.SaveToFile (SavePictureDialog1.FileName) ;; TForm1.Button20Click (Sender: TObject) ;. Execute ;; TForm1.Button18Click (Sender: TObject) ;. Execute ;; TForm1.Button19Click (Sender: TObject) ;. Execute ;; TForm1.FormCreate (Sender: TObject);:= Noname.txt raquo ;;. Caption:= My Word - + ExtractFileName (EditFile) ;; TForm1. ReplaceDialog1Replace (Sender: TObject); 10;//метка.HideSelection:=true;
://меткаpos (ReplaceDialog1.FindText, Memo1.Text) lt; gt; 0 then.SelStart:=pos (ReplaceDialog1.FindText, Memo1.Text) - 1;.SelLength:=Length(ReplaceDialog1.FindText);.SelText:=ReplaceDialog1.ReplaceText;10;;.HideSelection:=false;;TForm1.FindDialog1Find(Sender: TObject);
{begin
//шукається перша поява строкіpos (FindDialog1.FindText, Memo1.Text) lt; gt; 0 then.HideSelection:=false; .SelStart:=pos (FindDialog1.FindText, Memo1.Text) -1; .SelLength:=Length (FindDialog1.FindText); ( String + FindDialog1.FindText + not found! , mtConfirmation, [mbYes], 0);}, P, FT: PChar ;: Word; Sender as TFindDialog do (FT, Length (FindText) + 1); (FT, FindText);:=Memo1.GetTextLen + 1; (Buff, BuffLen) ;. GetTextBuf (Buff, BuffLen);:=Buff + Memo1.SelStart + Memo1.SelLength;:=StrPos (P, FT); P=nil then MessageBeep (0) .SelStart:=P - Buff; .SelLength:=Length (FindText) ;; (FT, Length (FindText) + 1); (Buff, BuffLen) ;;; TForm1.ReplaceDialog1Find (Sender: TObject); Sender as TReplaceDialog doTrue doMemo1.SelText lt; gt; FindText thenFind (Sender); Memo1.SelLength=0 then Break; .SelText:=ReplaceText; not (frReplaceAll in Options) then Break ;;; TForm1.Button26Click (Sender: TObject) ;;; TForm1.FormClose (Sender: TObject; var Action: TCloseAction); Memo1.Modified thenMessageDlg ( File + ExtractFileName (EditFile) + changed + # 10 # 13 Confirm Exit? ,, [mbYes, mbNo], 0)=mrYesAction: =caFreeAction:=caNone ;;.
А.2 Лістінг форми авторізації корістувачаRegistr ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls, IniFiles;=class (TForm): TGroupBox ;: TLabel ;: TLabel;:TEdit ;: TEdit ;: TButton ;: TButton ;: TButton ;: TButton; FormCreate (Sender: TObject); FormDestroy (Sender: TObject); btn1Click (Sender: TObject); btn2Click (Sender: TObject); btn3Click (Sender: TObject); btn4Click (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm4;, Password: string;// текстові змінні, i, Item: integer;// кількість зарегестрірованних: TIniFile;// змінна типу TIniFileTextRedactor;
{$ R * .dfm} Crypt (Str: string; Key: integer): string; i: Integer; i:=1 to Length (str) do [i]:=chr (ord (str [i]) xor Key) ;;:=Str ;; TForm4.FormCreate (Sender: TObject);
//створення змінної:=TIniFile.Create (ExtractFilePath (ParamStr (0)) + Data.ini );
//читання логіна:=INI.ReadString ( General , Login , Default );
//читання пароля:=INI.ReadString(laquo;Generalraquo;,laquo;Passraquo;,laquo;Defaultraquo;);;TForm4.FormDestroy(Sender: TObject);
// видаляємо переменную.Free ;; TForm4.btn1Click (Sender: TObject);
//якщо хоч одне поле нерівно того що потрібно ти виходимо (edtLogin.text lt; gt; Login) or (edtPass.Text lt; gt; Password) then halt;
//перша форма Hide.Hide;
//другому показиваем.Show ;; TForm4.btn2Click (Sender: TObject) ;. Text:=InputBox ( Заміна пароля , Введіть новий парольraquo;,edtPass.text);:=edtPass.text;.WriteString(laqu...