Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)

Модерирует : gyra, Maz

Widok (29-12-2008 12:26): лимит страниц. продолжаем здесь  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

chelobey

Junior Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору

 
Setup
AppName=Program
AppVerName=Program
AlwaysShowComponentsList=true
DefaultDirName={pf}\My Program
ComponentsListTVStyle=true
 
Components
Name: prog; Description: program; Types: var1; Flags: exclusive
Name: cfg1; Description: program+config 1; Types: var2; Flags: exclusive
 
Types
Name: var1; Description: program
Name: var2; Description: program+config; Flags: iscustom
 
Code
var
  Page1, Page2, Page3: TWizardPage;
  CheckListBox, CheckListBox2, CheckListBox3, CheckListBox4: TNewCheckListBox;
  Info: TNewStaticText;
 
procedure ItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);
var
  AbsIndex, AreaStr: String;
begin
  if Index = -1 then
  begin
    Info.Caption := 'Info';
    Info.Enabled := False;
  end else begin
    case Area of
    iaButton: AreaStr := 'Button';
    iaCheckmark: AreaStr := 'Checkmark';
    iaItem: AreaStr := 'Item';
    iaSubItem: AreaStr := 'SubItem';
    else AreaStr := 'Other';
    end;
    Info.Caption := 'AbsIndex: ' + IntToStr(Index) + #13 + 'Area: ' + AreaStr + #13
         + 'Captin: ' + CheckListBox.ItemCaption[Index] + #13 + 'SubCaption: '
         + CheckListBox.ItemSubItem[Index];
    Info.Enabled := True;
  end;
end;
 
procedure ButtonOnClick(Sender: TObject);
begin
  MsgBox('CheckListBox.ItemCount: ' + IntToStr(CheckListBox.ItemCount), mbInformation, MB_OK);
end;
 
procedure Button2OnClick(Sender: TObject);
begin
  MsgBox('CheckListBox.AbsItemIndex: ' + IntToStr(CheckListBox.AbsItemIndex), mbInformation, MB_OK);
end;
 
procedure Button3OnClick(Sender: TObject);
begin
  if CheckListBox.AbsItemIndex > -1 then
    CheckListBox.ItemExpanded[CheckListBox.AbsItemIndex] := not CheckListBox.ItemExpanded[CheckListBox.AbsItemIndex];
end;
 
procedure CheckListBox2_OnClickCheck(Sender: TObject);
begin
  case CheckListBox2.AbsItemIndex of
    1: CheckListBox.TreeViewStyle := CheckListBox2.Checked[1];
    2: CheckListBox.Showroot := CheckListBox2.Checked[2];
    3: CheckListBox.ItemHeightFixed := CheckListBox2.Checked[3];
    4: CheckListBox.HideSelection := CheckListBox2.Checked[4];
  end;
end;
 
procedure CheckListBox4_OnClickCheck(Sender: TObject);
begin
  case CheckListBox4.AbsItemIndex of
    1: CheckListBox.TreeViewStyle := CheckListBox4.Checked[1];
    2: CheckListBox.Showroot := CheckListBox4.Checked[2];
    3: CheckListBox.ItemHeightFixed := CheckListBox4.Checked[3];
    4: CheckListBox.HideSelection := CheckListBox4.Checked[4];
  end;
end;
 
procedure CreateTheWizardPages;
var
  Page: TWizardPage;
  Button: TButton;
  InfoPanel: TPanel;
  InfoCaption: TNewStaticText;
 
begin
  Page1:= CreateCustomPage(wpSelectComponents, 'TNewCheckListBox', 'page2')
  CheckListBox := TNewCheckListBox.Create(Page1);
  CheckListBox.Width := Page1.SurfaceWidth - ScaleX(115);
  CheckListBox.Height := Page1.SurfaceHeight - ScaleY(30);
  CheckListBox.Flat := True;
  CheckListBox.Parent := Page1.Surface;
  CheckListBox.AddCheckBox('CheckBox1', 'box1', 0, True, True, True, True, nil, True);
  CheckListBox.AddRadioButton('radiobutton1_1', 'type1', 1, True, True, nil, False);
  CheckListBox.AddRadioButton('radiobutton1_2', 'type2', 1, True, True, nil, False);
  CheckListBox.AddCheckBox('CheckBox2', 'box2', 0, True, True, True, True, nil, True);
  CheckListBox.AddRadioButton('radiobutton2_1', 'type1', 1, True, True, nil, False);
  CheckListBox.AddRadioButton('radiobutton2_2', 'type2', 1, True, True, nil, False);
  CheckListBox.AddGroup('group1', 'group', 0, nil, True);
  CheckListBox.AddRadioButton('radiobutton_g_1', 'type1', 1, True, True, nil, False);
  CheckListBox.AddRadioButton('radiobutton_g_2', 'type2', 1, False, True, nil, False);
  CheckListBox.OnItemMouseMove := @ItemMouseMove;
 
  CheckListBox2 := TNewCheckListBox.Create(Page1);
  CheckListBox2.Left := Page1.SurfaceWidth - ScaleX(110);
  CheckListBox2.Width := ScaleX(110);
  CheckListBox2.Height := ScaleY(80);
  CheckListBox2.Parent := Page1.Surface;
  CheckListBox2.BorderStyle := bsNone;
  CheckListBox2.ParentColor := True;
  CheckListBox2.ShowLines := False;
  CheckListBox2.WantTabs := True;
  CheckListBox2.AddGroup('Property', '', 1, nil, False);
  CheckListBox2.AddCheckBox('TreeViewStyle', '', 0, False, True, False, True, nil, True);
  CheckListBox2.AddCheckBox('Showroot', '', 0, True, True, False, True, nil, True);
  CheckListBox2.AddCheckBox('ItemHeightFixed', '', 0, False, True, False, True, nil, True);
  CheckListBox2.AddCheckBox('HideSelection', '', 0, True, True, False, True, nil, True);
  CheckListBox2.OnClickCheck := @CheckListBox2_OnClickCheck;
  CheckListBox2.ItemHeightFixed := True;
 
  InfoPanel := TPanel.Create(Page);
  InfoPanel.Parent := Page1.Surface;
  InfoPanel.Caption := '';
  InfoPanel.Top := ScaleY(90);
  InfoPanel.Left := Page1.SurfaceWidth - ScaleX(110);
  InfoPanel.Width := ScaleX(110);
  InfoPanel.Height := ScaleY(145);
  InfoPanel.BevelInner := bvRaised;
  InfoPanel.BevelOuter := bvLowered;
  InfoCaption := TNewStaticText.Create(Page);
  InfoCaption.Parent := Page1.Surface;
  InfoCaption.Caption := 'ÃèÊö';
  InfoCaption.Left := Page1.SurfaceWidth - ScaleX(105);
  InfoCaption.Top := InfoPanel.Top - ScaleY(5);
  InfoCaption.Font.Color := clActiveCaption;
   
end;
 
Procedure InitializeWizard();
var
  b: TBitmapImage;
  p: TPen;
 
begin
  CreateTheWizardPages;
   
end;
 
function ShouldSkipPage(PageID: Integer): Boolean;
begin
  Case PageID of
    Page1.ID,Page1.ID: Result:= not IsComponentSelected('cfg1');
  end;
end;
 

Всего записей: 78 | Зарегистр. 31-05-2007 | Отправлено: 01:05 21-12-2008
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)
Widok (29-12-2008 12:26): лимит страниц. продолжаем здесь


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru