Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Menus, Vcl.StdCtrls,
- Vcl.Samples.Spin, Vcl.Grids, Vcl.ExtDlgs, Vcl.WinXCtrls;
- Type
- InputType = (FromConsole, FromFile);
- Worker = Record
- Name: String[15];
- DetailsOnMonday: Integer;
- DetailsOnTuesday: Integer;
- DetailsOnWednesday: Integer;
- DetailsOnThursday: Integer;
- DetailsOnFriday: Integer;
- DetailsOnSaturday: Integer;
- End;
- AoW = Array of Worker;
- type
- TMainForm = class(TForm)
- MainMenu1: TMainMenu;
- N1: TMenuItem;
- LabelOfWorkers: TLabel;
- SpinEditOfWorkers: TSpinEdit;
- N2: TMenuItem;
- N3: TMenuItem;
- N4: TMenuItem;
- N5: TMenuItem;
- N6: TMenuItem;
- N7: TMenuItem;
- FindDialog1: TFindDialog;
- MainStringGrid: TStringGrid;
- PopupMenu1: TPopupMenu;
- N8: TMenuItem;
- OpenDialog1: TOpenDialog;
- N9: TMenuItem;
- N10: TMenuItem;
- N11: TMenuItem;
- N12: TMenuItem;
- OpenDialog2: TOpenDialog;
- SaveDialog1: TSaveDialog;
- N13: TMenuItem;
- procedure N1Click(Sender: TObject);
- procedure FormActivate(Sender: TObject);
- procedure SpinEditOfWorkersChange(Sender: TObject);
- procedure FindDialog1Find(Sender: TObject);
- procedure N6Click(Sender: TObject);
- procedure N7Click(Sender: TObject);
- procedure MainStringGridMouseDown(Sender: TObject; Button: TMouseButton;
- Shift: TShiftState; X, Y: Integer);
- procedure N8Click(Sender: TObject);
- procedure N3Click(Sender: TObject);
- procedure N10Click(Sender: TObject);
- procedure N11Click(Sender: TObject);
- procedure N12Click(Sender: TObject);
- procedure N4Click(Sender: TObject);
- procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
- procedure SpinEditOfWorkersClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- MainForm: TMainForm;
- ACol, ARow: Integer;
- //GlobalBuf: Integer;
- GlobalCorrect: Boolean;
- implementation
- {$R *.dfm}
- uses
- Unit2;
- function IsMainStringGridCorrect(StringGrid: TStringGrid; SpinEdit: TSpinEdit):boolean;
- var
- I, J: Integer; //Проверка таблицы на корректность данных
- IsCorrect: Boolean;
- begin
- IsCorrect := True;
- I := 1;
- while ((I <= SpinEdit.Value) and (IsCorrect)) do
- begin
- J := 2;
- while ((J < 8) and (IsCorrect)) do
- Begin
- Try
- StrToInt(StringGrid.Cells[J, I])
- Except
- IsCorrect := False;
- End;
- Inc(J);
- End;
- Inc(I);
- end;
- IsMainStringGridCorrect := IsCorrect;
- end;
- procedure TMainForm.FindDialog1Find(Sender: TObject);
- var
- I, J, Sum: Integer;
- IsFound: Boolean;
- begin
- Sum := 0;
- IsFound := False;
- for I := 1 to SpinEditOfWorkers.Value do
- if MainStringGrid.Cells[1, i] = FindDialog1.FindText then
- begin
- for J := 2 to 7 do
- Sum := Sum + StrToInt(MainStringGrid.Cells[J, I]);
- IsFound := True;
- ShowMessage(FindDialog1.FindText + ' за шестидневную неделю в сумме сделал ' + IntToStr(Sum) + ' деталей');
- end;
- if not(IsFound) then
- ShowMessage(FindDialog1.FindText + ' не найден в списке!');
- end;
- procedure TMainForm.FormActivate(Sender: TObject);
- begin
- //MainStringGrid.Options := MainStringGrid.Options + [goRowSelect];
- MainStringGrid.Cells[0,1]:= '1';
- MainStringGrid.Cells[0,2]:= '2';
- MainStringGrid.Cells[0,0]:= '№ записи';
- MainStringGrid.Cells[1,0]:= 'Фамилия сборщика';
- MainStringGrid.Cells[2,0]:= 'Понедельник';
- MainStringGrid.Cells[3,0]:= 'Вторник';
- MainStringGrid.Cells[4,0]:= 'Среда';
- MainStringGrid.Cells[5,0]:= 'Четверг';
- MainStringGrid.Cells[6,0]:= 'Пятница';
- MainStringGrid.Cells[7,0]:= 'Суббота';
- SpinEditOfWorkers.Value := 1;
- //GlobalBuf := SpinEditOfWorkers.Value;
- N8.Enabled := False;
- end;
- procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
- var
- Choise: Integer;
- begin
- Choise := Messagedlg('Вы уверены, что хотите выйти?', mtinformation, [mbYes, mbNo], 0);
- case Choise of
- mrYes: CanClose:= True;
- mrNo: CanClose:= False;
- end;
- end;
- function VerifyFileCorOfChanging(var FileCor: TextFile): boolean;
- var
- I, CorIndex, Details: Integer;
- Name: AnsiString;
- IsCorrect: Boolean;
- RussianChars: set of ansichar; //ПРОВЕРКА НА ИЗМЕНИТЬ
- begin
- IsCorrect := True;
- Details := 0;
- Reset(FileCor);
- RussianChars := ['A'..'Я', 'a'..'я'];
- while not(EoF(FileCor)) do
- begin
- Try
- Readln(FileCor, CorIndex);
- Except
- IsCorrect := False;
- End;
- Readln(FileCor, Name);
- I := 1;
- while ((I <= Length(Name)) and (IsCorrect)) do
- begin
- if not(Name[I] in RussianChars) then
- IsCorrect := False;
- Inc(I)
- end;
- I := 1;
- while not(eoln(FileCor)) and IsCorrect do
- begin
- Try
- Read(FileCor, Details);
- Except
- IsCorrect := False;
- End;
- Inc(I)
- end;
- Readln(FileCor);
- end;
- CloseFile(FileCor);
- VerifyFileCorOfChanging := IsCorrect;
- end;
- procedure TMainForm.MainStringGridMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
- begin
- MainStringGrid.MouseToCell(X, Y, ACol, ARow); //Получаем индексы ячейки ACol и ARow
- end;
- procedure TMainForm.N10Click(Sender: TObject);
- var
- FileCor:TextFile;
- I, J, CorIndex: Integer;
- Name: AnsiString;
- ArofScore: array[1..6] of integer;
- begin
- //изменить через файл корректур
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- begin
- if OpenDialog2.Execute then
- begin
- AssignFile(FileCor, OpenDialog2.FileName);
- if VerifyFileCorOfChanging(FileCor) then
- begin
- Reset(FileCor);
- while not(EoF(FileCor)) do
- begin
- Readln(FileCor, CorIndex);
- Readln(FileCor, Name);
- I := 1;
- while not(eoln(FileCor)) do
- begin
- Read(FileCor, ArOfScore[I]);
- Inc(I)
- end;
- for I := 1 to SpinEditOfWorkers.Value do
- if I = CorIndex then
- begin
- MainStringGrid.Cells[1, I] := Name;
- for J := 2 to 7 do
- MainStringGrid.Cells[J, I] := IntToStr(ArOfScore[J-1]);
- end;
- Readln(FileCor);
- end;
- CloseFile(FileCor)
- end
- else
- ShowMessage('Проверьте содержимое файла!');
- end
- end
- else
- ShowMessage('Проверьте таблицу!');
- end;
- function VerifyFileCorOfAdding(var FileCor: TextFile): boolean;
- var
- I, Details: Integer;
- Name: AnsiString;
- IsCorrect: Boolean;
- RussianChars: set of ansichar; //ПРОВЕРКА НА ДОБАВИТЬ
- begin
- IsCorrect := True;
- Details := 0;
- Reset(FileCor);
- RussianChars := ['A'..'Я', 'a'..'я'];
- while not(EoF(FileCor)) do
- begin
- Readln(FileCor, Name);
- I := 1;
- while ((I <= Length(Name)) and (IsCorrect)) do
- begin
- if not(Name[I] in RussianChars) then
- IsCorrect := False;
- Inc(I)
- end;
- I := 1;
- while not(eoln(FileCor)) and IsCorrect do
- begin
- Try
- Read(FileCor, Details);
- Except
- IsCorrect := False;
- End;
- Inc(I)
- end;
- Readln(FileCor);
- end;
- CloseFile(FileCor);
- VerifyFileCorOfAdding := IsCorrect;
- end;
- procedure TMainForm.N11Click(Sender: TObject); //Добавление ячеек таблицы при помощи файла корректур
- var
- FileCor:TextFile;
- I, J: Integer;
- Name: AnsiString;
- ArofScore: array[1..6] of integer;
- begin
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- begin
- if OpenDialog2.Execute then
- begin
- AssignFile(FileCor, OpenDialog2.FileName);
- if VerifyFileCorOfAdding(FileCor) then
- begin
- Reset(FileCor);
- while not(EoF(FileCor)) do
- begin
- Readln(FileCor, Name);
- I := 1;
- while not(EoLn(FileCor)) do
- begin
- Read(FileCor, ArOfScore[I]);
- Inc(I)
- end;
- SpinEditOfWorkers.Value := SpinEditOfWorkers.Value + 1;
- MainStringGrid.Cells[1, SpinEditOfWorkers.Value] := Name;
- for J := 2 to 7 do
- MainStringGrid.Cells[J, SpinEditOfWorkers.Value] := IntToStr(ArOfScore[J-1]);
- Readln(FileCor);
- end;
- CloseFile(FileCor);
- end
- else
- ShowMessage('Проверьте содержимое файла!');
- end;
- end
- else
- ShowMessage('Проверьте таблицу');
- end;
- function VerifyFileCorOfDelete(var FileCor: TextFile; MaxValue: Integer): boolean;
- var
- I, DeleteIndex: Integer;
- Name: AnsiString;
- IsCorrect: Boolean; //Проверка файла корректур с данными для удаления ячеек
- begin
- IsCorrect := True;
- DeleteIndex := 0;
- I := 1;
- Reset(FileCor);
- while not(EoF(FileCor)) do
- begin
- Try
- Readln(FileCor, DeleteIndex);
- Except
- IsCorrect := False;
- End;
- if IsCorrect then
- if DeleteIndex > MaxValue then
- IsCorrect := False;
- Inc(I);
- end;
- CloseFile(FileCor);
- if I > MaxValue then
- IsCorrect := False;
- VerifyFileCorOfDelete := IsCorrect;
- end;
- procedure TMainForm.N12Click(Sender: TObject); //Удаление ячеек таблицы при помощи файла корректур
- var
- FileCor:TextFile;
- ARowF, I, Buf: Integer;
- IsCorrect: boolean;
- Records: AoW;
- begin
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- begin
- if OpenDialog2.Execute then
- begin
- AssignFile(FileCor, OpenDialog2.FileName);
- if VerifyFileCorOfDelete(FileCor, SpinEditOfWorkers.Value) then
- begin
- Reset(FileCor);
- SetLength(Records, SpinEditOfWorkers.Value-1);
- I := 1;
- Buf := 0;
- ARowF := 0;
- While not(EoF(FileCor)) do
- begin
- Readln(FileCor, ARowF);
- if Buf > 0 then
- Dec(ARowF);
- while (I < ARowF) do
- begin
- Records[I-1].Name := MainStringGrid.Cells[1, I];
- Records[I-1].DetailsOnMonday := StrToInt(MainStringGrid.Cells[2, I]);
- Records[I-1].DetailsOnTuesday := StrToInt(MainStringGrid.Cells[3, I]);
- Records[I-1].DetailsOnWednesday := StrToInt(MainStringGrid.Cells[4, I]);
- Records[I-1].DetailsOnThursday := StrToInt(MainStringGrid.Cells[5, I]);
- Records[I-1].DetailsOnFriday := StrToInt(MainStringGrid.Cells[6, I]);
- Records[I-1].DetailsOnSaturday := StrToInt(MainStringGrid.Cells[7, I]);
- Inc(I);
- end;
- I := ARowF + 1;
- while (I <= SpinEditOfWorkers.Value) do
- begin
- Records[I-2].Name := MainStringGrid.Cells[1, I];
- Records[I-2].DetailsOnMonday := StrToInt(MainStringGrid.Cells[2, I]);
- Records[I-2].DetailsOnTuesday := StrToInt(MainStringGrid.Cells[3, I]);
- Records[I-2].DetailsOnWednesday := StrToInt(MainStringGrid.Cells[4, I]);
- Records[I-2].DetailsOnThursday := StrToInt(MainStringGrid.Cells[5, I]);
- Records[I-2].DetailsOnFriday := StrToInt(MainStringGrid.Cells[6, I]);
- Records[I-2].DetailsOnSaturday := StrToInt(MainStringGrid.Cells[7, I]);
- Inc(I);
- end;
- for I := 1 to 7 do
- MainStringGrid.Cells[I, SpinEditOfWorkers.Value] := ' ';
- SpinEditOfWorkers.Value := SpinEditOfWorkers.Value - 1;
- for I := 1 to SpinEditOfWorkers.Value do
- begin
- MainStringGrid.Cells[1, I] := Records[I-1].Name;
- MainStringGrid.Cells[2, I] := IntToStr(Records[I-1].DetailsOnMonday);
- MainStringGrid.Cells[3, I] := IntToStr(Records[I-1].DetailsOnTuesday);
- MainStringGrid.Cells[4, I] := IntToStr(Records[I-1].DetailsOnWednesday);
- MainStringGrid.Cells[5, I] := IntToStr(Records[I-1].DetailsOnThursday);
- MainStringGrid.Cells[6, I] := IntToStr(Records[I-1].DetailsOnFriday);
- MainStringGrid.Cells[7, I] := IntToStr(Records[I-1].DetailsOnSaturday);
- end;
- Inc(Buf);
- end;
- CloseFile(FileCor);
- end
- else
- ShowMessage('Проверьте содержимое файла!');
- end;
- end
- else
- ShowMessage('Проверьте таблицу!');
- end;
- procedure TMainForm.N1Click(Sender: TObject);
- begin
- Form2.Show;
- end;
- procedure TMainForm.N3Click(Sender: TObject);
- var
- TypeFile: File of Worker;
- I, J: Integer;
- IsCorrect: boolean;
- Records: AoW;
- begin
- if OpenDialog1.Execute then
- begin
- for I := 1 to SpinEditOfWorkers.Value do
- for J := 1 to 7 do
- MainStringGrid.Cells[J, I] := '';
- AssignFile(TypeFile, OpenDialog1.FileName);
- Reset(TypeFile);
- SpinEditOfWorkers.Value := FileSize(TypeFile);
- for I := 1 to SpinEditOfWorkers.Value do
- MainStringGrid.Cells[0, I] := IntToStr(I);
- SetLength(Records, SpinEditOfWorkers.Value);
- I := 0;
- While not(EoF(TypeFile)) do
- Begin
- Read(TypeFile, Records[I]);
- Inc(I);
- End;
- for I := 1 to SpinEditOfWorkers.Value do
- begin
- MainStringGrid.Cells[1, I] := Records[I-1].Name;
- MainStringGrid.Cells[2, I] := IntToStr(Records[I-1].DetailsOnMonday);
- MainStringGrid.Cells[3, I] := IntToStr(Records[I-1].DetailsOnTuesday);
- MainStringGrid.Cells[4, I] := IntToStr(Records[I-1].DetailsOnWednesday);
- MainStringGrid.Cells[5, I] := IntToStr(Records[I-1].DetailsOnThursday);
- MainStringGrid.Cells[6, I] := IntToStr(Records[I-1].DetailsOnFriday);
- MainStringGrid.Cells[7, I] := IntToStr(Records[I-1].DetailsOnSaturday);
- end;
- CloseFile(typefile);
- end;
- end;
- procedure TMainForm.N4Click(Sender: TObject); //СОХРАНИТЬ
- var
- I: Integer;
- SaveTypeFile: File of Worker;
- SaveRecord: AoW;
- begin
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- begin
- if SaveDialog1.Execute then
- begin
- AssignFile(SaveTypeFile, SaveDialog1.FileName);
- Rewrite(SaveTypeFile);
- SetLength(SaveRecord, SpinEditOfWorkers.Value);
- for I := 1 to SpinEditOfWorkers.Value do
- begin
- SaveRecord[I-1].Name := MainStringGrid.Cells[1, I];
- SaveRecord[I-1].DetailsOnMonday := StrToInt(MainStringGrid.Cells[2, I]);
- SaveRecord[I-1].DetailsOnTuesday := StrToInt(MainStringGrid.Cells[3, I]);
- SaveRecord[I-1].DetailsOnWednesday := StrToInt(MainStringGrid.Cells[4, I]);
- SaveRecord[I-1].DetailsOnThursday := StrToInt(MainStringGrid.Cells[5, I]);
- SaveRecord[I-1].DetailsOnFriday := StrToInt(MainStringGrid.Cells[6, I]);
- SaveRecord[I-1].DetailsOnSaturday := StrToInt(MainStringGrid.Cells[7, I]);
- end;
- for I := 0 to SpinEditOfWorkers.Value-1 do
- Write(SaveTypeFile, SaveRecord[I]);
- CloseFile(SaveTypeFile);
- end;
- end
- else
- ShowMessage('Проверьте таблицу!');
- end;
- procedure TMainForm.N6Click(Sender: TObject);
- begin
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- FindDialog1.Execute()
- else
- ShowMessage('Проверьте таблицу!');
- end;
- procedure TMainForm.N7Click(Sender: TObject);
- var
- ArrayOfSumOfProducts: array of integer;
- BestWorkman, BestDay: AnsiString;
- I, J, Sum, MaxPerf, BestBuf: Integer;
- begin
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- begin
- SetLength(ArrayOfSumOfProducts, SpinEditOfWorkers.Value);
- MaxPerf := 0;
- BestBuf := 0;
- for I := 0 to SpinEditOfWorkers.Value-1 do //находит сумму всех деталей каждого рабочего
- begin
- Sum := 0;
- for J := 2 to 7 do
- begin
- Sum := Sum + StrToInt(MainStringGrid.Cells[J,I+1]);
- end;
- ArrayOfSumOfProducts[I] := Sum;
- end;
- for I := 0 to SpinEditOfWorkers.Value-1 do // ищет максимум деталей среди рабочих и день высшей производительности
- begin
- if ((ArrayOfSumOfProducts[I] > ArrayOfSumOfProducts[I-1]) and (ArrayOfSumOfProducts[I] > MaxPerf)) then
- begin
- MaxPerf := ArrayOfSumOfProducts[I];
- BestWorkman := MainStringGrid.Cells[1, I+1];
- for J := 2 to 6 do
- if ((StrToInt(MainStringGrid.Cells[J, I+1]) > StrToInt(MainStringGrid.Cells[J+1,I+1])) and (StrToInt(MainStringGrid.Cells[J, I+1]) > BestBuf)) then
- begin
- BestDay := MainStringGrid.Cells[J,0];
- BestBuf := StrToInt(MainStringGrid.Cells[J, I+1])
- end;
- end;
- end;
- if MaxPerf > 0 then
- ShowMessage(BestWorkman + ' собрал ' + IntToStr(MaxPerf) + ' деталей, что является лучшим показателем! День высшей производительности: ' + BestDay)
- else
- ShowMessage('Таких нет!');
- end
- else
- ShowMessage('Проверьте таблицу!');
- end;
- procedure TMainForm.N8Click(Sender: TObject);
- var
- Records: AoW;
- I: Integer;
- begin
- GlobalCorrect := False;
- if SpinEditOfWorkers.Value > 0 then
- begin
- if IsMainStringGridCorrect(MainStringGrid, SpinEditOfWorkers) then
- begin
- Setlength(Records, SpinEditOfWorkers.Value-1);
- I := 1;
- while (I < ARow) do
- begin
- Records[I-1].Name := MainStringGrid.Cells[1, I];
- Records[I-1].DetailsOnMonday := StrToInt(MainStringGrid.Cells[2, I]);
- Records[I-1].DetailsOnTuesday := StrToInt(MainStringGrid.Cells[3, I]);
- Records[I-1].DetailsOnWednesday := StrToInt(MainStringGrid.Cells[4, I]);
- Records[I-1].DetailsOnThursday := StrToInt(MainStringGrid.Cells[5, I]);
- Records[I-1].DetailsOnFriday := StrToInt(MainStringGrid.Cells[6, I]);
- Records[I-1].DetailsOnSaturday := StrToInt(MainStringGrid.Cells[7, I]);
- Inc(I);
- end;
- I := ARow + 1;
- while (I <= SpinEditOfWorkers.Value) do
- begin
- Records[I-2].Name := MainStringGrid.Cells[1, I];
- Records[I-2].DetailsOnMonday := StrToInt(MainStringGrid.Cells[2, I]);
- Records[I-2].DetailsOnTuesday := StrToInt(MainStringGrid.Cells[3, I]);
- Records[I-2].DetailsOnWednesday := StrToInt(MainStringGrid.Cells[4, I]);
- Records[I-2].DetailsOnThursday := StrToInt(MainStringGrid.Cells[5, I]);
- Records[I-2].DetailsOnFriday := StrToInt(MainStringGrid.Cells[6, I]);
- Records[I-2].DetailsOnSaturday := StrToInt(MainStringGrid.Cells[7, I]);
- Inc(I);
- end;
- for I := 1 to 7 do
- MainStringGrid.Cells[I, SpinEditOfWorkers.Value] := ' ';
- SpinEditOfWorkers.Value := SpinEditOfWorkers.Value - 1;
- for I := 1 to SpinEditOfWorkers.Value do
- begin
- MainStringGrid.Cells[1, I] := Records[I-1].Name;
- MainStringGrid.Cells[2, I] := IntToStr(Records[I-1].DetailsOnMonday);
- MainStringGrid.Cells[3, I] := IntToStr(Records[I-1].DetailsOnTuesday);
- MainStringGrid.Cells[4, I] := IntToStr(Records[I-1].DetailsOnWednesday);
- MainStringGrid.Cells[5, I] := IntToStr(Records[I-1].DetailsOnThursday);
- MainStringGrid.Cells[6, I] := IntToStr(Records[I-1].DetailsOnFriday);
- MainStringGrid.Cells[7, I] := IntToStr(Records[I-1].DetailsOnSaturday);
- end;
- end
- else
- ShowMessage('Проверьте таблицу!');
- end
- end;
- procedure TMainForm.SpinEditOfWorkersChange(Sender: TObject);
- var
- UserHigh, I, Buf: Integer;
- begin
- { if ((GlobalCorrect) and (SpinEditOfWorkers.Value < GlobalBuf)) then
- SpinEditOfWorkers.Value := GlobalBuf
- else
- GlobalBuf := SpinEditOfWorkers.Value; }
- UserHigh := 200;
- if ((SpinEditOfWorkers.Value > 0) and (SpinEditOfWorkers.Value < 23)) then
- begin
- MainStringGrid.Cells[0,SpinEditOfWorkers.Value]:= IntToStr(SpinEditOfWorkers.Value);
- MainStringGrid.Options := MainStringGrid.Options+[goEditing];
- MainStringGrid.RowCount := SpinEditOfWorkers.Value+1;
- MainStringGrid.Height := 36 * MainStringGrid.RowCount;
- if (MainStringGrid.Height + MainStringGrid.Top < UserHigh) then
- ClientHeight := UserHigh
- else
- ClientHeight := MainStringGrid.Height + MainStringGrid.Top + 10;
- end
- else
- MainStringGrid.Options := MainStringGrid.Options-[goEditing];
- if (SpinEditOfWorkers.Value > 1) then
- begin
- N6.Enabled := True;
- N7.Enabled := True;
- N8.Enabled := True;
- N12.Enabled := True
- end
- else
- begin
- N6.Enabled := False;
- N7.Enabled := False;
- N8.Enabled := False;
- N12.Enabled := False;
- end;
- end;
- procedure TMainForm.SpinEditOfWorkersClick(Sender: TObject);
- begin
- GlobalCorrect := True;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement