EHM uchun dasturni identifikatsiya qiluvchi materiallar dastlabki matni
(Dastur kodi)
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, dxRibbonSkins, dxSkinsCore, dxSkinsDefaultPainters,
dxRibbonCustomizationForm, dxBar, cxClasses, dxRibbon, Vcl.ExtCtrls,
System.ImageList, Vcl.ImgList, cxImageList, dxSkinBlack, dxSkinBlue,
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013White, dxSkinOffice2016Colorful, dxSkinOffice2016Dark,
dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
dxSkinTheAsphaltWorld, dxSkinTheBezier, dxSkinValentine,
dxSkinVisualStudio2013Blue, dxSkinVisualStudio2013Dark,
3
dxSkinVisualStudio2013Light, dxSkinVS2010, dxSkinWhiteprint,
dxSkinXmas2008Blue, Vcl.OleCtrls, dxGDIPlusClasses,
Vcl.ComCtrls, cxContainer, cxEdit, cxTreeView,ShellAPI,ComObj, cxStyles,
cxCustomData, cxFilter, cxData, cxDataStorage, cxNavigator,
cxDataControllerConditionalFormattingRulesManagerDialog, Data.DB, cxDBData,
cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, Data.Win.ADODB, Vcl.StdCtrls;
type
TForm1 = class(TForm)
dxRibbon1Tab1: TdxRibbonTab;
dxRibbon1: TdxRibbon;
dxBarManager1: TdxBarManager;
dxBarManager1Bar1: TdxBar;
dxBarLargeButton1: TdxBarLargeButton;
cxImageList1: TcxImageList;
dxBarSubItem1: TdxBarSubItem;
dxBarSubItem2: TdxBarSubItem;
dxBarManager1Bar4: TdxBar;
dxBarLargeButton5: TdxBarLargeButton;
dxBarLargeButton6: TdxBarLargeButton;
cxImageList2: TcxImageList;
dxBarLargeButton2: TdxBarLargeButton;
cxImageList3: TcxImageList;
dxBarManager1Bar2: TdxBar;
4
dxBarLargeButton7: TdxBarLargeButton;
dxBarLargeButton3: TdxBarLargeButton;
dxBarButton1: TdxBarButton;
dxBarLargeButton4: TdxBarLargeButton;
Panel1: TPanel;
Image1: TImage;
Panel2: TPanel;
Panel3: TPanel;
cxTreeView2: TcxTreeView;
Panel4: TPanel;
cxTreeView3: TcxTreeView;
Panel5: TPanel;
cxTreeView4: TcxTreeView;
cxTreeView5: TcxTreeView;
cxTreeView1: TcxTreeView;
dxBarLargeButton8: TdxBarLargeButton;
cxTreeView6: TcxTreeView;
dxBarButton2: TdxBarButton;
dxBarLargeButton9: TdxBarLargeButton;
Memo1: TMemo;
dxBarLargeButton10: TdxBarLargeButton;
cxTreeView7: TcxTreeView;
dxBarButton3: TdxBarButton;
dxBarLargeButton11: TdxBarLargeButton;
procedure dxBarLargeButton1Click(Sender: TObject);
5
procedure cxTreeView1DblClick(Sender: TObject);
// procedure dxBarLargeButton6Click(Sender: TObject);
procedure dxBarLargeButton5Click(Sender: TObject);
procedure cxTreeView2DblClick(Sender: TObject);
// procedure dxBarLargeButton2Click(Sender: TObject);
procedure cxTreeView3DblClick(Sender: TObject);
procedure dxBarLargeButton7Click(Sender: TObject);
//procedure cxTreeView4Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cxTreeView4DblClick(Sender: TObject);
procedure cxTreeView5Click(Sender: TObject);
procedure cxTreeView1Click(Sender: TObject);
procedure dxBarLargeButton4Click(Sender: TObject);
procedure cxTreeView6Click(Sender: TObject);
procedure dxBarLargeButton8Click(Sender: TObject);
procedure dxBarLargeButton9Click(Sender: TObject);
// procedure dxBarLargeButton10Click(Sender: TObject);
procedure cxTreeView7Click(Sender: TObject);
procedure dxBarLargeButton11Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
6
var
Form1: TForm1;
implementation
{$R *.dfm}
uses Unit2, Unit3, Unit4;
procedure TForm1.cxTreeView1Click(Sender: TObject);
begin
case cxTreeView1.Selected.SelectedIndex of
0: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Taqdimot\1\index.html');
1: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Taqdimot\2\index.html');
2: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Taqdimot\3\index.html');
3: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Taqdimot\4\index.html');
4: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Taqdimot\5\index.html');
5: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Taqdimot\6\index.html');
end;
form4.ShowModal;
end;
procedure TForm1.cxTreeView1DblClick(Sender: TObject);
7
//var
//q:AnsiString;
// W: WideString;
// P: PWideChar;
begin
//case cxTreeView1.Selected.SelectedIndex of
//1: q:=GetCurrentDir+'\maruza\Lecture 1-2.pptx';
//2: q:=GetCurrentDir+'\maruza\Lecture 3.pptx';
//3: q:=GetCurrentDir+'\maruza\Lecture 4.pptx';
//4: q:=GetCurrentDir+'\maruza\Lecture 5.pptx';
//5: q:=GetCurrentDir+'\maruza\Lecture 6.pptx';
//6: q:=GetCurrentDir+'\maruza\Lecture 7.pptx';
//7: q:=GetCurrentDir+'\maruza\Lecture 8.pptx';
//8: q:=GetCurrentDir+'\maruza\Lecture 9.pptx';
//9: q:=GetCurrentDir+'\maruza\Lecture 10.pptx';
//10: q:=GetCurrentDir+'\maruza\Lecture 11.pptx';
//11: q:=GetCurrentDir+'\maruza\Lecture 12.pptx';
//12: q:=GetCurrentDir+'\maruza\Lecture 13.pptx';
//13: q:=GetCurrentDir+'\maruza\Lecture 14.pptx';
//14: q:=GetCurrentDir+'\maruza\Lecture 15.pptx';
//15: q:=GetCurrentDir+'\maruza\PHP yordamida MySQLni boshqarish.ppt';
//16: q:=GetCurrentDir+'\maruza\scadaUz.pptx';
8
//17: q:=GetCurrentDir+'\maruza\sql.pptx';
//18: q:=GetCurrentDir+'\maruza\Объектга_йўналтирилган_тестлаш_18.pptx';
end;
//W := q;
//P := PWideChar(W);
//ShowMessage(q);
//ShellExecute(Handle,
// 'open', P, nil, nil, SW_SHOWNORMAL);
//Form1.ShowModal;
//end;
procedure TForm1.cxTreeView2DblClick(Sender: TObject);
var
q:AnsiString;
W: WideString;
P: PWideChar;
begin
case cxTreeView2.Selected.SelectedIndex of
9
1: q:=GetCurrentDir+'\video\video.mp4';
end;
W := q;
P := PWideChar(W);
//ShowMessage(q);
ShellExecute(Handle,
'open', P, nil, nil, SW_SHOWNORMAL);
end;
procedure TForm1.cxTreeView3DblClick(Sender: TObject);
var
q:AnsiString;
W: WideString;
P: PWideChar;
begin
case cxTreeView3.Selected.SelectedIndex of
//a:=GetCurrentDir+'\Maruza\Маъруза 1.docx' :
10
//ShellExecute (Form1.Handle, nil, PChar (a), nil, nil, SW_RESTORE);
1: q:=GetCurrentDir+'\tajriba\1-Tajriba ishi.docx';
2: q:=GetCurrentDir+'\tajriba\2-Tajriba ishi.docx';
3: q:=GetCurrentDir+'\tajriba\3-Tajriba ishi.docx';
4: q:=GetCurrentDir+'\tajriba\4-Tajriba ishi.docx';
5: q:=GetCurrentDir+'\tajriba\5-Tajriba ishi.docx';
6: q:=GetCurrentDir+'\tajriba\6-Tajriba ishi.docx';
7: q:=GetCurrentDir+'\tajriba\7-Tajriba ishi.docx';
8: q:=GetCurrentDir+'\tajriba\8-Tajriba ishi.docx';
9: q:=GetCurrentDir+'\tajriba\9-Tajriba ishi.docx';
10: q:=GetCurrentDir+'\tajriba\Interfeysni loyihalash_tajriba_2019.docx';
end;
W := q;
P := PWideChar(W);
//ShowMessage(q);
ShellExecute(Handle,
'open', P, nil, nil, SW_SHOWNORMAL);
end;
11
procedure TForm1.cxTreeView4DblClick(Sender: TObject);
// var
// q:AnsiString;
// W: WideString;
// P: PWideChar;
begin
case cxTreeView4.Selected.SelectedIndex of
0: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\1\index.html');
1: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\2\index.html');
2: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\3\index.html');
3: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\4\index.html');
4: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\5\index.html');
5: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\6\index.html');
6: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\7\index.html');
7: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\8\index.html');
8: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\9\index.html');
9: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\10\index.html');
10: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\11\index.html');
11: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\12\index.html');
12: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\13\index.html');
13: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\14\index.html');
14: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\15\index.html');
12
15: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\16\index.html');
16: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\17\index.html');
17: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\18\index.html');
18: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\19\index.html');
19: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\20\index.html');
20: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\21\index.html');
21: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\22\index.html');
22: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\23\index.html');
23: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\24\index.html');
24: Form4.WebBrowser1.Navigate(GetCurrentDir + '\maruza\25\index.html');
end;
form4.ShowModal;
//2: q:=GetCurrentDir+'\test\test.exe';
end;
procedure TForm1.cxTreeView5Click(Sender: TObject);
begin
case cxTreeView5.Selected.SelectedIndex of
0: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\1\index.html');
1: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\2\index.html');
2: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\3\index.html');
13
3: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\4\index.html');
4: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\5\index.html');
5: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\6\index.html');
6: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\7\index.html');
end;
form4.ShowModal;
end;
procedure TForm1.cxTreeView6Click(Sender: TObject);
begin
case cxTreeView6.Selected.SelectedIndex of
0: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Adabiyot\1\index.html');
end;
form4.ShowModal;
end;
procedure TForm1.cxTreeView7Click(Sender: TObject);
begin
case cxTreeView7.Selected.SelectedIndex of
0: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\1\index.html');
1: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\2\index.html');
2: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\3\index.html');
3: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\4\index.html');
4: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\5\index.html');
5: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\6\index.html');
14
6: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\7\index.html');
7: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\8\index.html');
8: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\9\index.html');
9: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\10\index.html');
10: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\11\index.html');
11: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\12\index.html');
12: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\13\index.html');
13: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\14\index.html');
14: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Amaliy\15\index.html');
end;
form4.ShowModal;
end;
//procedure TForm1.cxTreeView5DblClick(Sender: TObject);
//
//begin
//case cxTreeView5.Selected.SelectedIndex of
//0: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\1\index.html');
//1: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\2\index.html');
//2: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\3\index.html');
//3: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\4\index.html');
//4: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\5\index.html');
//5: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\6\index.html');
//6: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\7\index.html');
15
//7: Form4.WebBrowser1.Navigate(GetCurrentDir + '\Labarotoriya\8\index.html');
//end;
//form4.ShowModal;
////2: q:=GetCurrentDir+'\test\test.exe';
//end;
//procedure TForm1.cxTreeView4DblClick(Sender: TObject);
//begin
//
//end;
//W := q;
//P := PWideChar(W);
//
////ShowMessage(q);
//
//ShellExecute(Handle,
// 'open', P, nil, nil, SW_SHOWNORMAL);
//end;
//procedure TForm1.dxBarLargeButton10Click(Sender: TObject);
//begin
//cxTreeView7.Visible:=true;
//cxTreeView1.Visible:=false;
16
//cxTreeView5.Visible:=false;
//cxTreeView6.Visible:=false;
////cxTreeView4.Visible:=false;
////panel4.Visible:=False;
////panel1.Visible:=False;
////panel2.Visible:=true;
////panel3.Visible:=False;
//panel5.Visible:=False;
//Memo1.Visible:=false;
//end;
procedure TForm1.dxBarLargeButton11Click(Sender: TObject);
begin
cxTreeView7.Visible:=true;
end;
procedure TForm1.dxBarLargeButton1Click(Sender: TObject);
begin
//form3.WebBrowser1.Navigate(GetCurrentDir + '\maruza\index.html');
//form3.Show;
//Panel2.Visible:=false;
//Panel3.Visible:=False;
//Panel4.Visible:=False;
//panel5.Visible:=False;
//cxTreeView4.Visible:=true;
17
cxTreeView1.Visible:=false;
cxTreeView5.Visible:=false;
panel5.Visible:=true;
Panel1.Visible:=false;
cxTreeView6.Visible:=false;
Memo1.Visible:=false;
cxTreeView7.Visible:=false;
end;
//procedure TForm1.dxBarLargeButton2Click(Sender: TObject);
//begin
//cxTreeView1.Visible:=false;
//cxTreeView5.Visible:=true;
//cxTreeView6.Visible:=false;
////cxTreeView4.Visible:=false;
////panel4.Visible:=False;
////panel1.Visible:=False;
////panel2.Visible:=true;
////panel3.Visible:=False;
//panel5.Visible:=False;
//Memo1.Visible:=false;
//cxTreeView7.Visible:=false;
18
//
//end;
procedure TForm1.dxBarLargeButton4Click(Sender: TObject);
begin
cxTreeView1.Visible:=true;
cxTreeView6.Visible:=false;
//cxTreeView4.Visible:=false;
panel4.Visible:=false;
panel1.Visible:=false;
panel2.Visible:=false;
panel3.Visible:=false;
panel5.Visible:=false;
Memo1.Visible:=false;
cxTreeView7.Visible:=false;
end;
procedure TForm1.dxBarLargeButton5Click(Sender: TObject);
//q:AnsiString;
//W: WideString;
//P: PWideChar;
begin
Form4.WebBrowser1.Navigate(GetCurrentDir + '\Test\index.html');
form4.ShowModal;
// Form2.ShowModal;
19
// Panel1.Visible:=true;
// cxTreeView5.Visible:=false;
// Panel5.Visible:=false;
//q:=GetCurrentDir+'\test\test.exe';
//W := q;
//P := PWideChar(W);
//ShowMessage(q);
//ShellExecute(Handle,
//'open', P, nil, nil, SW_SHOWNORMAL);
end;
//procedure TForm1.dxBarLargeButton6Click(Sender: TObject);
//begin
//cxTreeView2.Visible:=true;
//cxTreeView6.Visible:=false;
//cxTreeView5.Visible:=false;
//
////Form4.WebBrowser1.Navigate(GetCurrentDir + '\video\index.html');
////form4.ShowModal;
//panel3.Visible:=true;
//panel1.Visible:=False;
//panel2.Visible:=False;
//panel4.Visible:=False;
20
//panel5.Visible:=false;
//Memo1.Visible:=false;
//
//end;
procedure TForm1.dxBarLargeButton7Click(Sender: TObject);
begin
Form4.WebBrowser1.Navigate(GetCurrentDir + '\Glossariy\1\index.html');
form4.ShowModal;
//panel3.Visible:=False;
//panel1.Visible:=False;
//panel2.Visible:=False;
//panel4.Visible:=False;
//panel5.Visible:=true;
end;
procedure TForm1.dxBarLargeButton8Click(Sender: TObject);
begin
cxTreeView6.Visible:=true;
cxTreeView7.Visible:=false;
//cxTreeView4.Visible:=false;
panel4.Visible:=false;
panel1.Visible:=false;
panel2.Visible:=false;
panel3.Visible:=false;
21
panel5.Visible:=false;
Memo1.Visible:=false;
end;
procedure TForm1.dxBarLargeButton9Click(Sender: TObject);
begin
Memo1.Visible:=true;
cxTreeView2.Visible:=true;
cxTreeView6.Visible:=false;
cxTreeView5.Visible:=false;
cxTreeView7.Visible:=false;
panel3.Visible:=false;
panel1.Visible:=False;
panel2.Visible:=False;
panel4.Visible:=False;
panel5.Visible:=false;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
Panel1.Visible:=True;
panel3.Visible:=False;
panel2.Visible:=False;
22
panel4.Visible:=False;
panel5.Visible:=False;
end;
end.
Do'stlaringiz bilan baham: |