unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, SHDocVw, sSkinManager, StdCtrls, sButton, ComCtrls,
  sTreeView, Menus, shellAPI, sStatusBar, ExtCtrls, sSkinProvider,
  sToolBar, ToolWin, acCoolBar, sEdit;

type
  TForm1 = class(TForm)
    WebBrowser1: TWebBrowser;
    MainMenu1: TMainMenu;
    N2: TMenuItem;
    Timer1: TTimer;
    N8: TMenuItem;
    N12: TMenuItem;
    N13: TMenuItem;
    N17: TMenuItem;
    N1: TMenuItem;
    sTreeView1: TsTreeView;
    sStatusBar1: TsStatusBar;
    sSkinManager1: TsSkinManager;
    sSkinProvider1: TsSkinProvider;
    N3: TMenuItem;
    N4: TMenuItem;
    N5: TMenuItem;
    N6: TMenuItem;
    procedure FormCreate(Sender: TObject);
    procedure sTreeView1Change(Sender: TObject; Node: TTreeNode);
    procedure N4Click(Sender: TObject);
    procedure N5Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure N13Click(Sender: TObject);
    procedure N12Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
 //   procedure N10Click(Sender: TObject);
    procedure WebBrowser1BeforeNavigate(Sender: TObject;
      const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
      Headers: OleVariant; var Cancel: WordBool);
    procedure N9Click(Sender: TObject);
  //  procedure iughyugyu1Click(Sender: TObject);
    procedure N1Click(Sender: TObject);


    procedure N6Click(Sender: TObject);
    procedure N3Click(Sender: TObject);
    procedure N8Click(Sender: TObject);
        //  procedure sSkinProvider1SkinItem(Item: TComponent;
      //var CanBeAdded: Boolean; var SkinSection: String);
//    procedure N2Click(Sender: TObject);
  private
     { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  s: String;
  q:integer;
  ToggleURL:string;
implementation

uses Unit2, Unit3, Unit4, Unit5, Unit6;

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Navigate(ExtractFilePath(ParamStr(0))+'txt\main.htm');
end;

procedure TForm1.sTreeView1Change(Sender: TObject; Node: TTreeNode);
begin
s:=ExtractFilePath(Application.ExeName);
case sTreeView1.Selected.AbsoluteIndex of

0: WebBrowser1.Navigate(s+'txt\main.htm');
2: WebBrowser1.Navigate(ExtractFilePath(ParamStr(0))+'txt\1.1.htm');
3: WebBrowser1.Navigate(s+'txt\1.2.htm');
4: WebBrowser1.Navigate(s+'txt\1.3.htm');
5: WebBrowser1.Navigate(s+'txt\1.4.htm');

//7: WebBrowser1.Navigate(ExtractFilePath(ParamStr(0))+'txt\pr1.htm');
8: WebBrowser1.Navigate(s+'txt\2.1.1.htm');
9: WebBrowser1.Navigate(s+'txt\2.1.2.htm');
10: WebBrowser1.Navigate(s+'txt\2.1.3.htm');
11: WebBrowser1.Navigate(s+'txt\2.1.4.htm');
12: WebBrowser1.Navigate(s+'txt\2.1.5.htm');
13: WebBrowser1.Navigate(s+'txt\2.1.6.htm');
14: WebBrowser1.Navigate(s+'txt\2.1.7.htm');
//15: WebBrowser1.Navigate(s+'txt\pr9.htm');
16: WebBrowser1.Navigate(s+'txt\2.2.1.htm');
17: WebBrowser1.Navigate(s+'txt\2.2.2.htm');
18: WebBrowser1.Navigate(s+'txt\2.2.3.htm');
//19: WebBrowser1.Navigate(s+'txt\st2.htm');
20: WebBrowser1.Navigate(s+'txt\2.3.1.htm');
21: WebBrowser1.Navigate(s+'txt\2.3.2.htm');
//22: WebBrowser1.Navigate(s+'txt\st5.htm');
23: WebBrowser1.Navigate(s+'txt\2.4.1.htm');
//24: WebBrowser1.Navigate(s+'txt\st7.htm');
25: WebBrowser1.Navigate(s+'txt\2.5.1.htm');
//26: WebBrowser1.Navigate(s+'txt\st9.htm');
27: WebBrowser1.Navigate(s+'txt\ar.htm');
28: WebBrowser1.Navigate(s+'txt\dini.htm');
29: WebBrowser1.Navigate(s+'txt\liter.htm');



end;
end;

procedure TForm1.N4Click(Sender: TObject);
begin
ShellExecute(handle,'open','Present\1.pps',nil,nil,SW_RESTORE);
end;

procedure TForm1.N5Click(Sender: TObject);
begin
ShellExecute(handle,'open','Present\2.pps',nil,nil,SW_RESTORE);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
sStatusBar1.Panels[0].Text:= TimeToStr(now);
sStatusBar1.Panels[1].Text:= DateToStr(now);
end;



{procedure TForm1.N3Click(Sender: TObject);
begin
 WebBrowser1.Navigate(ExtractFilePath(ParamStr(0))+'txt\html-gloss.htm');
end;}

procedure TForm1.N13Click(Sender: TObject);
begin
close;
end;

procedure TForm1.N12Click(Sender: TObject);
begin
shellexecute(form1.Handle,'open',pansichar(extractfilepath(paramstr(0))+'test\tester.exe'),nil,nil,0);
end;


procedure TForm1.FormShow(Sender: TObject);
begin
Form2.Show;
end;

//procedure TForm1.N10Click(Sender: TObject);
//begin
//form3.show;
//end;


procedure TForm1.WebBrowser1BeforeNavigate(Sender: TObject;
  const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
  Headers: OleVariant; var Cancel: WordBool);
begin
toggleurl:=url;
end;

procedure TForm1.N9Click(Sender: TObject);
begin
form5.show;
end;

procedure TForm1.N1Click(Sender: TObject);
begin
//shellexecute(form1.Handle,'open',pansichar(extractfilepath(paramstr(0))+'gloss\tester.exe'),nil,nil,0);
form6.show;

end;

procedure TForm1.N6Click(Sender: TObject);
begin
ShellExecute(handle,'open','video\1.avi',nil,nil,SW_RESTORE);
end;

procedure TForm1.N3Click(Sender: TObject);
begin
form3.show;
end;

procedure TForm1.N8Click(Sender: TObject);
begin
form5.Show;
end;

end.
