EditorFormUnit;
, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, Buttons, StdCtrls, ExtCtrls, ComCtrls, tdb_lib, askdialogunit;
= class (TForm): TStatusBar;: TPanel;: TEdit;: TComboBox;: TPanel;: TPanel;: TLabel;: TLabel;: TMemo;: TImage;: TImage; cancelbutClick (Sender: TObject); FormKeyPress (Sender: TObject; var Key: Char); MemoChange (Sender: TObject); FormCloseQuery (Sender: TObject; var CanClose: Boolean); FormShow (Sender: TObject); MemoEnter (Sender: TObject); MemoExit ( Sender: TObject); e1Enter (Sender: TObject); e1Exit (Sender: TObject); im1Click (Sender: TObject); im1MouseEnter (Sender: TObject); im1MouseLeave (Sender: TObject); im1MouseDown (Sender: TObject; Button: TMouseButton; : TShiftState; X, Y: Integer); im1MouseUp (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer); Im2Click (Sender: TObject); Im2MouseEnter (Sender: TObject); Im2MouseLeave (Sender: TObject) ; Im2MouseUp (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer); Im2MouseDown (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer);
{Private declarations} _ID: longint; _cbindex: longint; _catID: longint; _editMode: boolean; _filename: string; _recName: string; _isEntered: boolean; _recfilename: string; _NeedToSave: boolean; _isBlocked: boolean; _cl3dLight: TColor; _clCream: TColor; run (recID: longint = -1; m_index: longint = -1; m_name: string =''; filename: string =''); FillCombobox; FillMemo; OnSave; StatusText: string ; OnChange; OnExit: boolean; ApplyNormColorsOverRGB;;
: TRecEditorForm;
MainFormUnit, MyLib;
{$ R *. dfm} TRecEditorForm.run (recID: longint = -1; m_index: longint = -1; m_name: string =''; filename: string ='');: TStrings ;: string;: longint; _isBlocked: = false;. Clear;. Clear; _recfilename: = filename; _id: = recID; _cbindex: = m_index; (m_ID = -1) then_editMode: = false_editMode: = true; length (filename )> 0 then: = mylib.GetFileNameFromFilePath (filename);: = RevFindChar ('.', sDefName); n> 0 then: = copy (sDefName, 1, n-1);. text: = sDefName; not m_editMode then
: = TStringList.Create; (x, MainForm.m_RecDBFilename, 3);: = mylib.GetTextByTemplate (x, 'Рецепт');. text: = sDefname; _recName: = e1.Text; . Free; _recName: = m_name;. Text: = m_name;;;; (@ self);; length (filename) <1 then_NeedToSave: = false_NeedToSave: = true;;;;
TRecEditorForm.cancelbutClick (Sender: TObject);;;
TRecEditorForm.e1Enter (Sender: TObject);. Color: = m_clCream;;
TRecEditorForm.e1Exit (Sender: TObject);
. Color: = m_cl3DLight;;
TRecEditorForm.FillCombobox;: tdb;, rn, m_CID: longint; _Name: string;. Clear;. InitializeLocal;. OpenDatabase (MainFor...