Program pro výpočet zkratových poměrů v elektrizační soustavě

Size: px
Start display at page:

Download "Program pro výpočet zkratových poměrů v elektrizační soustavě"

Transcription

1 Program pro výpočet zkratových poměrů v elektrizační soustavě Příloha A zdrojový kód Oto Bucholcer

2 unit Unit1;...4 procedure UpdateVypis_Vysledky;...11 procedure TThreadCalculate.syncShowMessage;...11 function SlozkovyNaSkutecny(S : array of TComplex): TArrayOfComplex;...12 function fcnline1(start, Finish: TPoint): TArrayOfTPoint;...12 function fcnline2(start, Finish: TPoint): TArrayOfTPoint;...13 function K2S(KartezCenterInScreen: TPoint; KartezXY: TPoint): TPoint; overload;...13 function S2K(KartezCenterInScreen: TPoint; ScreenXY: TPoint): TPoint; overload;...13 function K2S(KartezXY:TPoint): TPoint; overload;...13 function S2K(ScreenXY:TPoint): TPoint; overload;...13 procedure CopyVariables(Source, Dest: TElComponent);...13 function Rotate90CCW(Bitmap: TBitmap): TBitmap;...14 procedure RotateImageByCenter(var Source : TElComponent; uhel : integer);...14 procedure ReDrawLine(ecLine: TElComponent);...16 procedure ReDrawActiveElComponentLines;...17 procedure TForm1.ReDrawLines;...17 procedure TForm1.Delete1Click(Ser: TObject);...19 procedure CompressFile(FileName: string);...21 procedure DeCompressFile(FileName: string);...22 procedure TForm1.SaveObjectsToFile(FileName: string; ObjList: TObjectList);...22 procedure TForm1.Saveschemeas1Click(Ser: TObject);...34 procedure TForm1.ScrollBox2Proc(var Message: TMessage);...34 procedure TForm1.ShowObjectImpedances1Click(Ser: TObject);...34 procedure TForm1.LoadObjectsFromFile(FileName: string; ObjList: TObjectList);...34 procedure TForm1.Rotate1Click(Ser: TObject);...43 function KeyboardHookProc(Code: Integer; wparam: Word; lparam: LongInt) : LongInt;...43 function TMyDragObject.GetDragImages: TDragImageList;...44 procedure TForm1.About1Click(Ser: TObject);...44 procedure TForm1.ApplicationEvents1Message(var Msg: tagmsg; var Handled: Boolean);...44 procedure TForm1.BringUzelToFront;...46 procedure TForm1.DrawElComponentFrame(Ser: TObject);...46 procedure TForm1.edtTransf2pNameChange(Ser: TObject);...47 procedure TForm1.edtTransf2pU1Change(Ser: TObject);...47 procedure TForm1.edtTransf2pU1KeyPress(Ser: TObject; var Key: Char);...47 procedure TForm1.Exit1Click(Ser: TObject);...48 procedure TForm1.OnMenuStartDrag(Ser: TObject; var DragObject: TDragObject);...48 procedure TForm1.OnWorkingAreaStartDrag(Ser: TObject; var DragObject: TDragObject);...48 procedure TForm1.Options1Click(Ser: TObject);...49 procedure TForm1.btnLogClick(Ser: TObject);...49 procedure TForm1.ToolButton1Click(Ser: TObject);...50 procedure TForm1.btnCopyToClipboardClick(Ser: TObject);...50 procedure TForm1.ToolButtonClick(Ser: TObject);...50 procedure TForm1.UpdateTabSheet;...50 procedure TForm1.btnOpenClick(Ser: TObject);...53 procedure TForm1.btnSaveClick(Ser: TObject);...53 procedure TForm1.btnSoustavaSaveClick(Ser: TObject);...54 procedure TForm1.btnVedeniSaveClick(Ser: TObject);...54 procedure TForm1.btnVedeniSave_2Click(Ser: TObject);...54 procedure TForm1.btnSoustavaSave_2Click(Ser: TObject);...55 procedure TForm1.ChangeLanguage(FileName: string);...56 procedure SetProperty(Component: TComponent; Prop, value: string);...56 function HasProperty(Component: TComponent; prop: string):boolean;...56 procedure TForm1.cmbTransf2pEnd1Change(Ser: TObject);...57 procedure TForm1.cmbTransf2pEnd1_2Change(Ser: TObject);...57 procedure TForm1.cmbTransf2pEnd2Change(Ser: TObject);...57 procedure TForm1.cmbTransf2pEnd2_2Change(Ser: TObject);...57 procedure TForm1.cmbTransf3pEnd1Change(Ser: TObject);...57 procedure TForm1.cmbTransf3pEnd1_2Change(Ser: TObject);...58 procedure TForm1.cmbTransf3pEnd2Change(Ser: TObject);...58 procedure TForm1.cmbTransf3pEnd2_2Change(Ser: TObject);...58 procedure TForm1.cmbTransf3pEnd3Change(Ser: TObject);...58

3 procedure TForm1.cmbTransf3pEnd3_2Change(Ser: TObject);...58 procedure TForm1.btnTransf2pSaveClick(Ser: TObject);...58 procedure TForm1.btnTransf2pSave_2Click(Ser: TObject);...59 procedure TForm1.btnTransf3pSaveClick(Ser: TObject);...60 procedure TForm1.btnTransf3pSave_2Click(Ser: TObject);...61 procedure TForm1.btnUzelSaveClick(Ser: TObject);...62 procedure TForm1.btnUzelSave_2Click(Ser: TObject);...63 procedure TForm1.btnMotorSaveClick(Ser: TObject);...63 procedure TForm1.btnMotorSave_2Click(Ser: TObject);...63 procedure TForm1.btnNewClick(Ser: TObject);...64 procedure TForm1.WAClick(Ser: TObject);...64 procedure TForm1.WAMouseMove(Ser: TObject; Shift: TShiftState; X, Y: Integer);...65 procedure TForm1.OnWorkingAreaDragOver(Ser: TObject; Source: TObject; X: Integer; Y: Integer; State: TDragState; var Accept: Boolean);...65 procedure TForm1.OnElComponentClick(Ser: TObject);...71 procedure TForm1.OnElComponentEndDrag(Drop: boolean);...72 procedure TForm1.OnElComponentMouseDown(Ser: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);..72 procedure TForm1.OnEndClick(Ser: TObject);...73 procedure TForm1.FormCloseQuery(Ser: TObject; var CanClose: Boolean);...76 procedure TForm1.FormCreate(Ser: TObject);...76 procedure TForm1.FormDestroy(Ser: TObject);...79 procedure TForm1.grpTransf3pZ1_IIIClick(Ser: TObject);...79 procedure TForm1.OnEndComponentMouseLeave(Ser: TObject);...79 procedure TForm1.OnEndComponentMouseEnter(Ser: TObject);...79 function GetNearestUzly(ElComponent: TElComponent): TArrayElComponent;...79 function GetUzlyZkratu_Z1(MistoZkratu: TElComponent): TArrayElComponent;...82 function GetUzlyZkratu_Z0(aUzlyZkratu, azdrojez0 : TArrayElComponent): TArrayElComponent;...87 function CreateZ1Matrix(aUzlyZkratu : TArrayElComponent): TComplexMatrix;...92 function CreateZ0Matrix(aUzlyZkratu : TArrayElComponent): TComplexMatrix;...96 procedure UzlovaExplozeZ0_1(aUzly: TArrayElComponent);...96 procedure UzlovaExplozeZ0_2(aUzly: TArrayElComponent); function GetUzelIndex(Uzel: TElComponent; auzly: TArrayElComponent): integer; function TForm1.CalculateNetwork(MistoZkratu: TElComponent): integer; procedure TForm1.btnGraphClick(Ser: TObject); procedure TThreadCalculate.Execute; unit El; procedure TBaseElComponent.DefineProperties(Filer: TFiler); function TBaseElComponent.GetOrigCenter: TPoint; procedure TBaseElComponent.ReadPoint(Reader: TReader); procedure TBaseElComponent.SetOrigCenter(const Value: TPoint); procedure TBaseElComponent.WritePoint(Writer: TWriter); unit Graph; function K2S(KartezCenterInScreen: TPoint; KartezXY: TPoint): TPoint; overload; function S2K(KartezCenterInScreen: TPoint; ScreenXY: TPoint): TPoint; overload; function K2S(KartezXY:TPoint): TPoint; overload; function S2K(ScreenXY:TPoint): TPoint; overload; procedure FillComplexArray(index: integer; Z : array of TComplex); procedure FillComplexNameArray(index: integer; Name : array of string); procedure TfrmGraph.FormPaint(Ser: TObject); unit Options; procedure TfrmOptions.SaveOptions; procedure TfrmOptions.FormCreate(Ser: TObject); procedure TfrmOptions.LoadOptions; procedure TfrmOptions.Button1Click(Ser: TObject); unit wrapper_cinverse; procedure InvMatrix(A : TComplexMatrix; N : Integer);

4 4 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, Contnrs, RTTIunit, ComCtrls, AppEvnts, Math, Menus, ImgList, ToolWin, IniFiles, ActnMan, ActnCtrls, StdStyleActnCtrls, ZLib, About, Progress, MathComplex, wrapper_cinverse, TypInfo, PsAPI, El, Graph, Vysledky, Clipbrd; const ainifiles : array[0..6] of string = ('Transformator_2p.ini', 'Transformator_3p.ini', 'Vedeni.ini', 'Soustava.ini', 'Motor.ini', 'Uzel.ini', 'Uzel_02.ini'); alanginifiles : array[0..2] of string = ('English.ini', 'Czech.ini', 'Slovak.ini'); type TMyDragObject = class(tdragcontrolobject) protected function GetDragImages: TDragImageList; override; type TForm1 = class(tform) ScrollBox1: TScrollBox; Splitter1: TSplitter; Label1: TLabel; PageControl: TPageControl; tabtransf2p: TTabSheet; tabtransf3p: TTabSheet; Splitter2: TSplitter; ApplicationEvents1: TApplicationEvents; ToolBar1: TToolBar; ImageList1: TImageList; MainMenu1: TMainMenu; File1: TMenuItem; Exit1: TMenuItem; ToolButton: TToolButton; btnopen: TToolButton; btnsave: TToolButton; ElComponentPopUp: TPopupMenu; Rotate1: TMenuItem; ScrollBox2: TScrollBox; WA: TPaintBox; Image2: TImage; cmbtransf2pend1: TComboBox; cmbtransf2pend2: TComboBox; edttransf2pu1: TLabeledEdit; edttransf2pu2: TLabeledEdit; grptransf2pz1: TGroupBox; edttransf2pz1_re: TLabeledEdit; edttransf2pz1_im: TLabeledEdit; Delete1: TMenuItem; cmbtransf3pend1: TComboBox; cmbtransf3pend3: TComboBox; edttransf3pu1: TLabeledEdit; edttransf3pu3: TLabeledEdit; cmbtransf3pend2: TComboBox; edttransf3pu2: TLabeledEdit; tabvedeni: TTabSheet;

5 Image4: TImage; edtvedeniu1: TLabeledEdit; edtvedeniu2: TLabeledEdit; grpvedeniz1: TGroupBox; edtvedeniz1_re: TLabeledEdit; edtvedeniz1_im: TLabeledEdit; tabsoustava: TTabSheet; Image5: TImage; edtsoustavau: TLabeledEdit; grpsoustavaz1: TGroupBox; edtsoustavaz1_re: TLabeledEdit; edtsoustavaz1_im: TLabeledEdit; LinePopUp: TPopupMenu; Delete2: TMenuItem; OpenDialog: TOpenDialog; SaveDialog: TSaveDialog; btnnew: TToolButton; ToolButton5: TToolButton; About1: TMenuItem; Open1: TMenuItem; Save1: TMenuItem; N1: TMenuItem; Newscheme1: TMenuItem; ImageList2: TImageList; grptransf2pz2: TGroupBox; edttransf2pz2_re: TLabeledEdit; edttransf2pz2_im: TLabeledEdit; grptransf2pz0: TGroupBox; edttransf2pz0_re: TLabeledEdit; edttransf2pz0_im: TLabeledEdit; grpvedeniz2: TGroupBox; edtvedeniz2_re: TLabeledEdit; edtvedeniz2_im: TLabeledEdit; GroupBox1: TGroupBox; edtvedeniz0_re: TLabeledEdit; edtvedeniz0_im: TLabeledEdit; GroupBox2: TGroupBox; edtsoustavaz2_re: TLabeledEdit; edtsoustavaz2_im: TLabeledEdit; GroupBox3: TGroupBox; edtsoustavaz0_re: TLabeledEdit; edtsoustavaz0_im: TLabeledEdit; PageControl1: TPageControl; TabSheet1: TTabSheet; grptransf3pz1_i: TGroupBox; edttransf3pz1_i_re: TLabeledEdit; edttransf3pz1_i_im: TLabeledEdit; grptransf3pz1_ii: TGroupBox; edttransf3pz1_ii_re: TLabeledEdit; edttransf3pz1_ii_im: TLabeledEdit; grptransf3pz1_iii: TGroupBox; edttransf3pz1_iii_re: TLabeledEdit; edttransf3pz1_iii_im: TLabeledEdit; TabSheet2: TTabSheet; grptransf3pz2_i: TGroupBox; edttransf3pz2_i_re: TLabeledEdit; edttransf3pz2_i_im: TLabeledEdit; grptransf3pz2_ii: TGroupBox; edttransf3pz2_ii_re: TLabeledEdit; edttransf3pz2_ii_im: TLabeledEdit; grptransf3pz2_iii: TGroupBox; edttransf3pz2_iii_re: TLabeledEdit; edttransf3pz2_iii_im: TLabeledEdit; 5

6 TabSheet3: TTabSheet; grptransf3pz0_i: TGroupBox; edttransf3pz0_i_re: TLabeledEdit; edttransf3pz0_i_im: TLabeledEdit; grptransf3pz0_ii: TGroupBox; edttransf3pz0_ii_re: TLabeledEdit; edttransf3pz0_ii_im: TLabeledEdit; grptransf3pz0_iii: TGroupBox; edttransf3pz0_iii_re: TLabeledEdit; edttransf3pz0_iii_im: TLabeledEdit; btnplay_stop: TToolButton; ToolButton2: TToolButton; Saveschemeas1: TMenuItem; edttransf2pname: TLabeledEdit; btntransf2psave: TButton; TabSheet4: TTabSheet; Image6: TImage; edtmotoru: TLabeledEdit; GroupBox4: TGroupBox; edtmotorz1_re: TLabeledEdit; edtmotorz1_im: TLabeledEdit; GroupBox5: TGroupBox; edtmotorz2_re: TLabeledEdit; edtmotorz2_im: TLabeledEdit; GroupBox6: TGroupBox; edtmotorz0_re: TLabeledEdit; edtmotorz0_im: TLabeledEdit; edttransf3pname: TLabeledEdit; edtvedeniname: TLabeledEdit; edtsoustavaname: TLabeledEdit; Image7: TImage; edtmotorname: TLabeledEdit; TabSheet5: TTabSheet; edtuzelname: TLabeledEdit; btntransf3psave: TButton; btnvedenisave: TButton; btnsoustavasave: TButton; btnmotorsave: TButton; btnuzelsave: TButton; ScrollBox3: TScrollBox; ScrollBox4: TScrollBox; ScrollBox5: TScrollBox; ScrollBox6: TScrollBox; ScrollBox7: TScrollBox; ScrollBox8: TScrollBox; Image3: TImage; edtuzelu: TLabeledEdit; ToolButton1: TToolButton; btnlog: TToolButton; grptransf2pu1zn: TGroupBox; edttransf2pu1zn_re: TLabeledEdit; edttransf2pu1zn_im: TLabeledEdit; grptransf2pu2zn: TGroupBox; edttransf2pu2zn_re: TLabeledEdit; edttransf2pu2zn_im: TLabeledEdit; grptransf3pu1zn: TGroupBox; edttransf3pu1zn_re: TLabeledEdit; edttransf3pu1zn_im: TLabeledEdit; grptransf3pu2zn: TGroupBox; edttransf3pu2zn_re: TLabeledEdit; edttransf3pu2zn_im: TLabeledEdit; grptransf3pu3zn: TGroupBox; edttransf3pu3zn_re: TLabeledEdit; 6

7 edttransf3pu3zn_im: TLabeledEdit; btngraph: TToolButton; tabtransf2p_2: TTabSheet; ScrollBox9: TScrollBox; Image1: TImage; btntransf2psave_2: TButton; cmbtransf2pend1_2: TComboBox; cmbtransf2pend2_2: TComboBox; edttransf2pname_2: TLabeledEdit; edttransf2pu1_2: TLabeledEdit; edttransf2pu2_2: TLabeledEdit; edttransf2puk_2: TLabeledEdit; edttransf2pdpk_2: TLabeledEdit; edttransf2psn_2: TLabeledEdit; edttransf2prt0perrt_2: TLabeledEdit; edttransf2pxt0perxt_2: TLabeledEdit; grptransf2pu1zn_2: TGroupBox; edttransf2pu1zn_re_2: TLabeledEdit; edttransf2pu1zn_im_2: TLabeledEdit; grptransf2pu2zn_2: TGroupBox; edttransf2pu2zn_re_2: TLabeledEdit; edttransf2pu2zn_im_2: TLabeledEdit; tabtransf3p_2: TTabSheet; ScrollBox10: TScrollBox; Image8: TImage; btntransf3psave_2: TButton; PageControl2: TPageControl; TabSheet6: TTabSheet; TabSheet7: TTabSheet; TabSheet8: TTabSheet; edttransf3pname_2: TLabeledEdit; cmbtransf3pend1_2: TComboBox; cmbtransf3pend3_2: TComboBox; edttransf3pu1_2: TLabeledEdit; edttransf3pu3_2: TLabeledEdit; edttransf3pu2_2: TLabeledEdit; cmbtransf3pend2_2: TComboBox; grptransf3pu1zn_2: TGroupBox; edttransf3pu1zn_re_2: TLabeledEdit; edttransf3pu1zn_im_2: TLabeledEdit; grptransf3pu2zn_2: TGroupBox; edttransf3pu2zn_re_2: TLabeledEdit; edttransf3pu2zn_im_2: TLabeledEdit; grptransf3pu3zn_2: TGroupBox; edttransf3pu3zn_re_2: TLabeledEdit; edttransf3pu3zn_im_2: TLabeledEdit; edttransf3pukab_2: TLabeledEdit; edttransf3pdpkab_2: TLabeledEdit; edttransf3psnab_2: TLabeledEdit; edttransf3pukac_2: TLabeledEdit; edttransf3pdpkac_2: TLabeledEdit; edttransf3psnac_2: TLabeledEdit; edttransf3pukbc_2: TLabeledEdit; edttransf3pdpkbc_2: TLabeledEdit; edttransf3psnbc_2: TLabeledEdit; tabvedeni_2: TTabSheet; ScrollBox11: TScrollBox; Image9: TImage; edtvedeniname_2: TLabeledEdit; btnvedenisave_2: TButton; edtvedenil_2: TLabeledEdit; edtvedenirl0perrl_2: TLabeledEdit; edtvedenixl0perxl_2: TLabeledEdit; 7

8 GroupBox7: TGroupBox; edtvedenizlk_re_2: TLabeledEdit; edtvedenizlk_im_2: TLabeledEdit; tabsoustava_2: TTabSheet; ScrollBox12: TScrollBox; Image10: TImage; edtsoustavaname_2: TLabeledEdit; btnsoustavasave_2: TButton; edtsoustavau_2: TLabeledEdit; edtsoustavask3_2: TLabeledEdit; edtsoustavask1_2: TLabeledEdit; edtsoustavarqperxq_2: TLabeledEdit; tabmotor_2: TTabSheet; ScrollBox13: TScrollBox; Image11: TImage; edtmotoru_2: TLabeledEdit; edtmotorname_2: TLabeledEdit; btnmotorsave_2: TButton; edtmotorp_2: TLabeledEdit; edtmotoriz_2: TLabeledEdit; edtmotorcosfi_2: TLabeledEdit; edtmotorn_2: TLabeledEdit; edtmotorrmperxm_2: TLabeledEdit; tabuzel_2: TTabSheet; ScrollBox14: TScrollBox; btnuzelsave_2: TButton; edtuzelname_2: TLabeledEdit; edtuzelu_2: TLabeledEdit; Options2: TMenuItem; Edit1: TMenuItem; ShowObjectImpedances1: TMenuItem; btncopytoclipboard: TToolButton; procedure FormCreate(Ser: TObject); procedure OnMenuStartDrag(Ser: TObject; var DragObject: TDragObject); procedure OnWorkingAreaStartDrag(Ser: TObject; var DragObject: TDragObject); procedure OnWorkingAreaDragOver(Ser, Source: TObject; X, Y: Integer;State: TDragState; var Accept: Boolean); procedure OnWorkingAreaDragDrop(Ser, Source: TObject; X, Y: Integer); procedure OnElComponentEndDrag(Drop: boolean); procedure OnElComponentClick(Ser: TObject); procedure OnEndClick(Ser: TObject); procedure OnElComponentMouseDown(Ser: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure OnElComponentMouseMove(Ser: TObject; Shift: TShiftState; X, Y: Integer); procedure OnElComponentMouseUp(Ser: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure DrawElComponentFrame(Ser: TObject); procedure FormDestroy(Ser: TObject); procedure WAClick(Ser: TObject); procedure ApplicationEvents1Message(var Msg: tagmsg; var Handled: Boolean); procedure OnEndComponentMouseEnter(Ser: TObject); procedure OnEndComponentMouseLeave(Ser: TObject); procedure ToolButtonClick(Ser: TObject); procedure btnvedenisaveclick(ser: TObject); procedure WAMouseMove(Ser: TObject; Shift: TShiftState; X, Y: Integer); procedure ReDrawLines; procedure Rotate1Click(Ser: TObject); procedure Delete1Click(Ser: TObject); procedure BringUzelToFront; procedure btnopenclick(ser: TObject); procedure btnsaveclick(ser: TObject); procedure LoadObjectsFromFile(FileName: string; ObjList: TObjectList); 8

9 9 procedure SaveObjectsToFile(FileName: string; ObjList: TObjectList); procedure btnnewclick(ser: TObject); procedure About1Click(Ser: TObject); procedure edttransf2pu1keypress(ser: TObject; var Key: Char); procedure edttransf2pu1change(ser: TObject); procedure Saveschemeas1Click(Ser: TObject); procedure btntransf2psaveclick(ser: TObject); procedure edttransf2pnamechange(ser: TObject); procedure FormCloseQuery(Ser: TObject; var CanClose: Boolean); procedure UpdateTabSheet; procedure btntransf3psaveclick(ser: TObject); procedure btnsoustavasaveclick(ser: TObject); procedure btnmotorsaveclick(ser: TObject); procedure btnuzelsaveclick(ser: TObject); procedure Image7Click(Ser: TObject); procedure Options1Click(Ser: TObject); procedure ChangeLanguage(FileName: string); function CalculateNetwork(MistoZkratu: TElComponent): integer; procedure btnplay_stopclick(ser: TObject); procedure ScrollBox2Proc(var Message: TMessage); procedure grptransf3pz1_iiiclick(ser: TObject); procedure btnlogclick(ser: TObject); procedure cmbtransf2pend1change(ser: TObject); procedure cmbtransf2pend2change(ser: TObject); procedure cmbtransf3pend1change(ser: TObject); procedure cmbtransf3pend2change(ser: TObject); procedure cmbtransf3pend3change(ser: TObject); procedure btngraphclick(ser: TObject); procedure btntransf2psave_2click(ser: TObject); procedure btntransf3psave_2click(ser: TObject); procedure btnvedenisave_2click(ser: TObject); procedure btnsoustavasave_2click(ser: TObject); procedure btnmotorsave_2click(ser: TObject); procedure btnuzelsave_2click(ser: TObject); procedure cmbtransf2pend1_2change(ser: TObject); procedure cmbtransf2pend2_2change(ser: TObject); procedure cmbtransf3pend1_2change(ser: TObject); procedure cmbtransf3pend2_2change(ser: TObject); procedure cmbtransf3pend3_2change(ser: TObject); procedure Exit1Click(Ser: TObject); procedure ShowObjectImpedances1Click(Ser: TObject); procedure ToolButton1Click(Ser: TObject); procedure btncopytoclipboardclick(ser: TObject); private { Private declarations } public { Public declarations } var // pactiveelcomponent : ^TElComponent; Form1: TForm1; KBHook: HHook; amessages : array of string; function KeyboardHookProc(Code: Integer; wparam: Word; lparam: LongInt): LongInt; stdcall; implementation {$R *.dfm} uses Options, Vypis, SyncObjs;

10 10 const MaxPixelCount = 65536; ElComponentMouseStep = 200; type TRGBArray prgbarray = ARRAY[0..MaxPixelCount-1] OF TRGBTriple; = ^TRGBArray; type TObjektyVToku = record ElComponent : TObject; PocetEndu, PocetVyvodu : integer; apouziteendy_vyvody : array of TObject; Hotov : boolean; // kdyz probehne prohledani vsech u/vyvodu, aby nedoslo k opetovnemu prohledavani. type TThreadCalculate = class(tthread) private msg : string; Thread_kk1, Thread_kk0 : integer; protected procedure Execute; override; procedure syncshowmessage; procedure syncvcl; type TArrayElComponent = array of TElComponent; TArrayOfComplex = array of TComplex; type TElComponentProperties = record DoMistaZkratu : boolean; Prevod : exted; var ghlp : integer; oldx : integer = 0; oldy : integer = 0; Transformator : TElComponent; DragedImage : TImageList; DragedBMP : TBitmap; CursorPosInClientOnDragStart : TPoint; StartDragFromMenu : boolean; LoadingFile : boolean = false; EndClicked : boolean = false; ElComponentList, MenuElComponentList : TObjectList; DragedElComponent, ActiveElComponent, hlpelcomponent : TElComponent; ActiveEnd1, ActiveEnd2 : TMyEnd; // ihlp : integer = 0; ScrollStep : integer = 10; KartezCenterInScreen, OrigXY : TPoint; ConnectorTool : boolean = false; ElComponentCounter : integer = 1; fcnmakepolyline : function(start, Finish: TPoint): TArrayOfTPoint; sfcnmakepolyline : string; Ini : TIniFile; SpotXY : TPoint; gs : string; SaveFileName : string = ''; f : double; // ainifiles : array[0..0] of string = ('Transformator_2p.ini');

11 11 mz1, mz2, mz0 : TComplexMatrix; ThreadCalculate : TThreadCalculate; IsCalculation : boolean; aelcompprop : array of TElComponentProperties; ScrollBox2_Horz_Position : integer; ScrollBox2_Vert_Position : integer; OldScrollBox2Proc : TWndMethod; byfirst : boolean = true; bchoosestartpoint, bchooseendpoint : boolean; auzlyzkratu_z1, auzlyzkratu_z0 : TArrayElComponent; aua, aub, auc, ai1, ai2, ai0, aia, aib, aic : array of TComplex; au1, au2, au0 : array of array of TComplex; my1, my0 : TComplexMatrix; aobjektyvevyvodu_z1 : array of array of TElComponent; aobjektyvevyvodu_z0 : array of array of TElComponent; ishowobjectimpedances : integer = 6; Ik1, Ik3, Ik2, Ik2z, Robl_1f, Robl_2f, Robl_2fz, Robl_3f : double; Vypis_Vysledky_kk1, Vypis_Vysledky_kk0 : integer; CopyP1, CopyP2 : TPoint; ErrorCode : integer = 0; procedure UpdateVypis_Vysledky; if ErrorCode = 1 then ShowMessage(aMessages[6]); exit; frmvypis.novyvypocet; frmvypis.newtext(#13#10 + '--- uzly zkratoveho obvodu (1) ---'); frmvypis.uzlyzkratu(auzlyzkratu_z1); WriteMatrix('mZ1', mz1, Length(mZ1), frmvypis.richedit); WriteMatrix('mZ0', mz0, Length(mZ0), frmvypis.richedit); WriteComplex('Z1', mz1[vypis_vysledky_kk1, Vypis_Vysledky_kk1], frmvypis.richedit); WriteComplex('Z0', mz0[vypis_vysledky_kk0, Vypis_Vysledky_kk0], frmvypis.richedit); frmvysledky.newtext('z1 = ' + Complex2Str(mZ1[Vypis_Vysledky_kk1, Vypis_Vysledky_kk1]) + ' ohm'); frmvysledky.newtext('z0 = ' + Complex2Str(mZ0[Vypis_Vysledky_kk0, Vypis_Vysledky_kk0]) + ' ohm'); frmvysledky.newtext(#13#10); frmvypis.richedit.lines.add('ik3 = ' + FloatToStr(Ik3)); // frmvysledky.newtext('ik3 = ' + FloatToStr(Ik3)); frmvysledky.newtext('ik3 = ' + FloatToStr(RoundTo(Ik3, -4)) + ' A'); frmvypis.richedit.lines.add('ik2 = ' + FloatToStr(Ik2)); // frmvysledky.newtext('ik2 = ' + FloatToStr(Ik2)); frmvysledky.newtext('ik2 = ' + FloatToStr(RoundTo(Ik2, -4)) + ' A'); frmvypis.richedit.lines.add('ik2z = ' + FloatToStr(Ik2z)); frmvysledky.newtext('ik2z = ' + FloatToStr(RoundTo(Ik2z, -4)) + ' A'); frmvypis.richedit.lines.add('ik1 = ' + FloatToStr(Ik1)); frmvysledky.newtext('ik1 = ' + FloatToStr(RoundTo(Ik1, -4)) + ' A'); frmvysledky.showmodal; procedure TThreadCalculate.syncShowMessage; Susp

12 12 ShowMessage(msg); Resume; procedure TThreadCalculate.syncVCL; frmvypis.novyvypocet; frmvypis.newtext(#13#10 + '--- uzly zkratoveho obvodu (1) ---'); frmvypis.uzlyzkratu(auzlyzkratu_z1); WriteMatrix('mZ1', mz1, Length(mZ1), frmvypis.richedit); WriteMatrix('mZ0', mz0, Length(mZ0), frmvypis.richedit); WriteComplex('Z1', mz1[thread_kk1, Thread_kk1], frmvypis.richedit); WriteComplex('Z0', mz0[thread_kk0, Thread_kk0], frmvypis.richedit); frmvysledky.newtext('z1 = ' + Complex2Str(mZ1[Thread_kk1, Thread_kk1])); frmvysledky.newtext('z0 = ' + Complex2Str(mZ0[Thread_kk0, Thread_kk0])); frmvysledky.newtext(#13#10); frmvypis.richedit.lines.add('ik3 = ' + FloatToStr(Ik3)); frmvysledky.newtext('ik3 = ' + FloatToStr(Ik3)); frmvypis.richedit.lines.add('ik2 = ' + FloatToStr(Ik2)); frmvysledky.newtext('ik2 = ' + FloatToStr(Ik2)); // frmvypis.richedit.lines.add('ik2z = ' + FloatToStr(Ik2z)); // frmvysledky.newtext('ik2z = ' + FloatToStr(Ik2z)); // tady to pak odkomentuj, az budes umet spocit Ik2z frmvypis.richedit.lines.add('ik1 = ' + FloatToStr(Ik1)); frmvysledky.newtext('ik1 = ' + FloatToStr(Ik1)); frmvysledky.showmodal; function SlozkovyNaSkutecny(S : array of TComplex): TArrayOfComplex; var a, a2, chlp, chlp2, chlp3 : TComplex; acomp : TArrayOfComplex; a := MakeComplex(-0.5, sqrt(3)/2); a2 := MakeComplex(-0.5, -sqrt(3)/2); chlp := S[0]; chlp2 := S[1]; chlp3 := S[2]; SetLength(aComp, 3); acomp[0] := AddComplex([S[0], S[1], S[2]]); acomp[1] := AddComplex([S[0], MulComplex(a2, S[1]), MulComplex(a, S[2])]); acomp[2] := AddComplex([S[0], MulComplex(a, S[1]), MulComplex(a2, S[2])]); result := TArrayOfComplex(aComp); exit; ShowMessage(Complex2Str(chlp)); ShowMessage(Complex2Str(chlp2)); ShowMessage(Complex2Str(chlp3)); function fcnline1(start, Finish: TPoint): TArrayOfTPoint; SetLength(result, 3); result[0] := Point(Start.X, Start.Y); result[1] := Point(Finish.X, Start.Y); result[2] := Point(Finish.X, Finish.Y);

13 13 function fcnline2(start, Finish: TPoint): TArrayOfTPoint; SetLength(result, 3); result[0] := Point(Start.X, Start.Y); result[1] := Point(Start.X, Finish.Y); result[2] := Point(Finish.X, Finish.Y); function K2S(KartezCenterInScreen: TPoint; KartezXY: TPoint): TPoint; overload; result.x := Round((KartezCenterInScreen.X) + KartezXY.X); result.y := Round((KartezCenterInScreen.Y) - KartezXY.Y); function S2K(KartezCenterInScreen: TPoint; ScreenXY: TPoint): TPoint; overload; result.x := ScreenXY.X - KartezCenterInScreen.X; result.y := KartezCenterInScreen.Y - ScreenXY.Y; function K2S(KartezXY:TPoint): TPoint; overload; K2S := K2S(KartezCenterInScreen, KartezXY); function S2K(ScreenXY:TPoint): TPoint; overload; S2K := S2K(KartezCenterInScreen, ScreenXY); procedure CopyVariables(Source, Dest: TElComponent); var n : integer; hlppoint : TPoint; // CopyObject(Source, Dest); // hlppoint := Source.OrigCenter; SetLength(Dest.aEnd, Length(Source.aEnd)); for n := 0 to Length(Dest.aEnd) - 1 do Dest.aEnd[n] := TMyEnd.Create(nil); CopyObject(Source.aEnd[n], Dest.aEnd[n]); Dest.aEnd[n].LineEnds := TObjectList.Create; // Dest.aEnd[n].NadrazenyObject := Source.aEnd[n].NadrazenyObject; SetLength(Dest.aLinePart, Length(Source.aLinePart)); for n := 0 to Length(Dest.aLinePart) - 1 do Dest.aLinePart[n] := TLinePart.Create(nil); CopyObject(Source.aLinePart[n], Dest.aLinePart[n]); Dest.aLinePart[n].NadrazenyObject := Source.aLinePart[n].NadrazenyObject; hlppoint := Dest.OrigCenter; // Dest.angle := Source.angle; // Dest.OrigWidth := Source.OrigWidth;

14 14 // Dest.OrigHeight := Source.OrigHeight; Dest.OrigCenter := Source.OrigCenter; // Dest.OrigLeft := Source.Left; // Dest.OrigTop := Source.Top; // Dest.dx := Source.dx; // Dest.dy := Source.dy; exit; ShowMessage(IntToStr(hlpPoint.X)); function Rotate90CCW(Bitmap: TBitmap): TBitmap; var i : integer; j : integer; rowin : prgbarray; result := TBitmap.Create; result.width := Bitmap.Height; result.height := Bitmap.Width; result.pixelformat := Bitmap.PixelFormat; for j := 0 to Bitmap.Height - 1 do rowin := Bitmap.ScanLine[j]; for i := 0 to Bitmap.Width - 1 do prgbarray(result.scanline[bitmap.width - i - 1])[j] := rowin[i] procedure RotateImageByCenter(var Source : TElComponent; uhel : integer); var n : integer; Dest, elhlp : TElComponent; NewLeft, NewTop, NewWidth, NewHeight, MaxY, MaxX, ihlp, ihlp2: integer; K : TPoint; Roh : array of TPoint; angle, modul : exted; if Source.Tag = ecline then exit; KartezCenterInScreen := Point(Source.OrigWidth div 2, Source.OrigHeight div 2); SetLength(Roh, 4); // Roh[0] := S2K(Point(0, Source.OrigHeight div 2)); Roh[0] := S2K(Point(0, Source.OrigHeight)); Roh[1] := S2K(Point(0, 0)); Roh[2] := S2K(Point(Source.OrigWidth, 0)); Roh[3] := S2K(Point(Source.OrigWidth, Source.OrigHeight)); for n := 0 to Length(Roh) - 1 do modul := sqrt(sqr(roh[n].x)+sqr(roh[n].y)); angle := arctan2(roh[n].y, Roh[n].X) + (uhel+source.angle)*pi/180; Roh[n].X := Round(modul*cos(angle)); Roh[n].Y := Round(modul*sin(angle)); MaxX := 0; MaxY := 0; for n := 0 to Length(Roh) - 1 do if Roh[n].X >= MaxX then MaxX := Roh[n].X; if Roh[n].Y >= MaxY then MaxY := Roh[n].Y; NewWidth := 2*MaxX;

15 15 NewHeight := 2*MaxY; NewLeft := K2S(Point(-MaxX, MaxY)).X; NewTop := K2S(Point(-MaxX, MaxY)).Y; Source.dx := NewLeft; Source.dy := NewTop; Dest := TElComponent.Create(nil); Dest.Width := NewWidth; Dest.Height := NewHeight; Dest.Picture.Bitmap.Width := NewWidth; Dest.Picture.Bitmap.Height := NewHeight; if LoadingFile then elhlp := TElComponent.Create(nil); elhlp.picture.bitmap := Source.Picture.Bitmap; ihlp2 := uhel+source.angle + 360; repeat ihlp2 := ihlp2-360; ihlp := ihlp2 div 90; until (ihlp-4 <= 0); if ihlp = 0 then ; if ihlp = 1 then elhlp.picture.bitmap := Rotate90CCW(elHlp.Picture.Bitmap); if ihlp = 2 then elhlp.picture.bitmap := Rotate90CCW(elHlp.Picture.Bitmap); elhlp.picture.bitmap := Rotate90CCW(elHlp.Picture.Bitmap); if ihlp = 3 then elhlp.picture.bitmap := Rotate90CCW(elHlp.Picture.Bitmap); elhlp.picture.bitmap := Rotate90CCW(elHlp.Picture.Bitmap); Dest.Picture.Bitmap := Rotate90CCW(Source.Picture.Bitmap); // otoc o 90 stupnu // otoc o 90 stupnu // otoc o 90 stupnu // otoc o 90 stupnu // otoc o 90 stupnu // otoc o 90 stupnu elhlp.picture.bitmap := Rotate90CCW(elHlp.Picture.Bitmap); // otoc o 90 stupnu Dest.Picture.Bitmap := elhlp.picture.bitmap; elhlp.free; Dest.Picture.Bitmap := Rotate90CCW(Source.Picture.Bitmap); // otoc o 90 stupnu for n := 0 to Length(Source.aEnd) - 1 do KartezCenterInScreen := Point(Source.Left + (Source.Width div 2), Source.Top + (Source.Height div 2)); K := S2K(Point(Source.aEnd[n].Left + (Source.aEnd[n].Width div 2), Source.aEnd[n].Top + (Source.aEnd[n].Height div 2))); modul := sqrt(sqr(k.x)+sqr(k.y)); angle := arctan2(k.y, K.X) + (uhel)*pi/180; K.X := Round(modul*cos(angle)); K.Y := Round(modul*sin(angle)); ihlp := K2S(K).X; ihlp2 := K2S(K).Y; Source.aEnd[n].Left := K2S(K).X - (Source.aEnd[n].Width div 2); Source.aEnd[n].Top := K2S(K).Y - (Source.aEnd[n].Height div 2); if Length(Source.aTrafoLine) > 0 then Source.aTrafoLine[n].aEnd[0].Left := Source.aEnd[n].Left; Source.aTrafoLine[n].aEnd[0].Top := Source.aEnd[n].Top; Source.Picture.Bitmap := Dest.Picture.Bitmap;

16 16 Source.Width := Dest.Picture.Bitmap.Width; neobsahuje rozmer bitmapy Source.Height := Dest.Picture.Bitmap.Height; neobsahuje rozmer bitmapy Source.angle := Source.angle + uhel; Source.Left := Source.OrigLeft + NewLeft; Source.Top := Source.OrigTop + NewTop; Dest.Free; // musi to bejt, protoze Source.Width // musi to bejt, protoze Source.Width exit; ShowMessage(IntToStr(ihlp+ihlp2)); procedure ReDrawLine(ecLine: TElComponent); var m, k, okraj : integer; polyline : TArrayOfTPoint; for m := 0 to Length(ecLine.aEnd) - 2 do polyline := ecline.fcnmakepolyline(point(telcomponent(ecline.aend[m].lineend).left + TElComponent(ecLine.aEnd[m].LineEnd).Width div 2, TElComponent(ecLine.aEnd[m].LineEnd).Top + TElComponent(ecLine.aEnd[m].LineEnd).Height div 2), Point(TElComponent(ecLine.aEnd[m+1].LineEnd).Left + TElComponent(ecLine.aEnd[m+1].LineEnd).Width div 2, TElComponent(ecLine.aEnd[m+1].LineEnd).Top + TElComponent(ecLine.aEnd[m+1].LineEnd).Height div 2)); for k := 0 to 1 do ecline.alinepart[k].canvas.pen.width := 1; okraj := (ecline.alinepart[k].canvas.pen.width div 2) + 4; if polyline[k].x = polyline[k+1].x then ecline.alinepart[k].left := polyline[k].x - okraj; if polyline[k].y < polyline[k+1].y then ecline.alinepart[k].top := polyline[k].y ecline.alinepart[k].top := polyline[k+1].y; ecline.alinepart[k].width := 2*okraj; ecline.alinepart[k].height := Abs(polyline[k].Y - polyline[k+1].y); ecline.alinepart[k].picture.bitmap.width := ecline.alinepart[k].width; ecline.alinepart[k].picture.bitmap.height := ecline.alinepart[k].height; ecline.alinepart[k].canvas.brush.color := clwhite; ecline.alinepart[k].canvas.brush.style := bssolid; ecline.alinepart[k].canvas.fillrect(ecline.alinepart[k].boundsrect); ecline.alinepart[k].canvas.pen.color := clblack; ecline.alinepart[k].canvas.moveto(ecline.alinepart[k].width div 2, 0); ecline.alinepart[k].canvas.lineto(ecline.alinepart[k].width div 2, ecline.alinepart[k].height); if polyline[k].y = polyline[k+1].y then if polyline[k].x < polyline[k+1].x then ecline.alinepart[k].left := polyline[k].x ecline.alinepart[k].left := polyline[k+1].x; ecline.alinepart[k].top := polyline[k].y - okraj; ecline.alinepart[k].width := Abs(polyline[k].X - polyline[k+1].x); ecline.alinepart[k].height := 2*okraj; ecline.alinepart[k].picture.bitmap.width := ecline.alinepart[k].width; ecline.alinepart[k].picture.bitmap.height := ecline.alinepart[k].height; ecline.alinepart[k].canvas.brush.color := clwhite; ecline.alinepart[k].canvas.brush.style := bssolid; ecline.alinepart[k].canvas.fillrect(ecline.alinepart[k].boundsrect); ecline.alinepart[k].canvas.pen.color := clblack;

17 17 ecline.alinepart[k].canvas.moveto(0, ecline.alinepart[k].height div 2); ecline.alinepart[k].canvas.lineto(ecline.alinepart[k].width, ecline.alinepart[k].height div 2); procedure ReDrawActiveElComponentLines; var n, m : integer; elhlp : TElComponent; if not Assigned(ActiveElComponent) or (ActiveElComponent.Tag = ecline) then exit; if ActiveElComponent.Tag = ecuzel then for n := ActiveElComponent.aEnd[0].LineEnds.Count - 1 downto 0 do elhlp := TElComponent(TMyEnd(ActiveElComponent.aEnd[0].LineEnds[n]).NadrazenyObject); // elhlp = ecline ReDrawLine(elHlp); for n := 0 to Length(ActiveElComponent.aEnd) - 1 do if not (ActiveElComponent.aEnd[n].LineEnd = nil) then elhlp := TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject); // elhlp = ecline ReDrawLine(elHlp); procedure TForm1.ReDrawLines; var n, m, k, okraj, ihlp :integer; polyline : TArrayOfTPoint; hlpend : TMyEnd; p1, p2 : TPoint; hlpel : TElComponent; for n := 0 to ElComponentList.Count - 1 do if not (TElComponent(ElComponentList.Items[n]).Tag = ecline) then continue; for m := 0 to Length(TElComponent(ElComponentList.Items[n]).aEnd) - 2 do WA.Refresh; WA.Canvas.Pen.Width := 2; WA.Canvas.Pen.Color := clblack; if not (TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd = nil) then hlpend := TMyEnd(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd); hlpel := TElComponent(ElComponentList.Items[n]); ihlp := TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Left; p1 := Point(TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Left + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Width div 2, TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Top + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Height div 2);

18 18 p2 := Point(TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Left + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Width div 2, TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Top + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Height div 2); polyline := TElComponent(ElComponentList.Items[n]).fcnMakePolyline(Point(TElComponent(TElComponent( ElComponentList.Items[n]).aEnd[m].LineEnd).Left + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Width div 2, TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Top + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m].LineEnd).Height div 2), Point(TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Left + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Width div 2, TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Top + TElComponent(TElComponent(ElComponentList.Items[n]).aEnd[m+1].LineEnd).Height div 2)); for k := 0 to 1 do TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Pen.Width := 1; okraj := (TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Pen.Width div 2) + 4; if polyline[k].x = polyline[k+1].x then TElComponent(ElComponentList.Items[n]).aLinePart[k].Left := polyline[k].x - okraj; if polyline[k].y < polyline[k+1].y then TElComponent(ElComponentList.Items[n]).aLinePart[k].Top := polyline[k].y TElComponent(ElComponentList.Items[n]).aLinePart[k].Top := polyline[k+1].y; TElComponent(ElComponentList.Items[n]).aLinePart[k].Width := 2*okraj; TElComponent(ElComponentList.Items[n]).aLinePart[k].Height := Abs(polyline[k].Y - polyline[k+1].y); TElComponent(ElComponentList.Items[n]).aLinePart[k].Picture.Bitmap.Width := TElComponent(ElComponentList.Items[n]).aLinePart[k].Width; TElComponent(ElComponentList.Items[n]).aLinePart[k].Picture.Bitmap.Height := TElComponent(ElComponentList.Items[n]).aLinePart[k].Height; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Brush.Color := clwhite; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Brush.Style := bssolid; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.FillRect(TElComponent(ElComp onentlist.items[n]).alinepart[k].boundsrect); TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Pen.Color := clblack; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.MoveTo(TElComponent(ElCompon entlist.items[n]).alinepart[k].width div 2, 0); TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.LineTo(TElComponent(ElCompon entlist.items[n]).alinepart[k].width div 2, TElComponent(ElComponentList.Items[n]).aLinePart[k].Height); if polyline[k].y = polyline[k+1].y then if polyline[k].x < polyline[k+1].x then TElComponent(ElComponentList.Items[n]).aLinePart[k].Left := polyline[k].x TElComponent(ElComponentList.Items[n]).aLinePart[k].Left := polyline[k+1].x; TElComponent(ElComponentList.Items[n]).aLinePart[k].Top := polyline[k].y - okraj; TElComponent(ElComponentList.Items[n]).aLinePart[k].Width := Abs(polyline[k].X - polyline[k+1].x); TElComponent(ElComponentList.Items[n]).aLinePart[k].Height := 2*okraj;

19 19 TElComponent(ElComponentList.Items[n]).aLinePart[k].Picture.Bitmap.Width := TElComponent(ElComponentList.Items[n]).aLinePart[k].Width; TElComponent(ElComponentList.Items[n]).aLinePart[k].Picture.Bitmap.Height := TElComponent(ElComponentList.Items[n]).aLinePart[k].Height; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Brush.Color := clwhite; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Brush.Style := bssolid; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.FillRect(TElComponent(ElComp onentlist.items[n]).alinepart[k].boundsrect); TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.Pen.Color := clblack; TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.MoveTo(0, TElComponent(ElComponentList.Items[n]).aLinePart[k].Height div 2); TElComponent(ElComponentList.Items[n]).aLinePart[k].Canvas.LineTo(TElComponent(ElCompon entlist.items[n]).alinepart[k].width, TElComponent(ElComponentList.Items[n]).aLinePart[k].Height div 2); exit; ShowMessage(hlpEnd.Name); ShowMessage(IntToStr(ihlp)); ShowMessage(IntToStr(p1.X)); ShowMessage(IntToStr(p2.X)); ShowMessage(hlpEl.Name); procedure TForm1.Delete1Click(Ser: TObject); var n, m, hlp : integer; elhlp : TElComponent; hlplist : TObjectList; LinePart : TLinePart; hlpobj : TObject; if Assigned(ActiveElComponent) then if ActiveElComponent.Tag = ecline then for n := 0 to Length(ActiveElComponent.aEnd) - 1 do if TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject).Tag = ecuzel then hlpobj := TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject).aEnd[0].LineEnd s.extract(activeelcomponent.aend[n]); TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject).aEnd[0].LineEnd scount := TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject).aEnd[0].LineEnd s.count; // if Length(TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject).aTrafoLi ne) > 0 then if TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject).Tag = ectransformator_3p_line then TMyEnd(ActiveElComponent.aEnd[n].LineEnd).Full := false;

20 20 TMyEnd(ActiveElComponent.aEnd[n].LineEnd).LineEnd := nil; TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).TotalNadrazenyObject).aEnd[TMyEn d(activeelcomponent.aend[n].lineend).poradi].full := false; TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).TotalNadrazenyObject).aEnd[TMyEn d(activeelcomponent.aend[n].lineend).poradi].lineend := nil; TMyEnd(ActiveElComponent.aEnd[n].LineEnd).Full := false; TMyEnd(ActiveElComponent.aEnd[n].LineEnd).LineEnd := nil; ActiveElComponent.aEnd[n].Free; for n := 0 to Length(ActiveElComponent.aLinePart) - 1 do LinePart := ActiveElComponent.aLinePart[n]; ActiveElComponent.aLinePart[n].Free; ActiveElComponent.aLinePart[n] := nil; ActiveElComponent.lblElCompName.Free; hlp := ElComponentList.Remove(ActiveElComponent); ActiveElComponent := nil; Form1.WA.Refresh; if ActiveElComponent.Tag = ecuzel then for n := ActiveElComponent.aEnd[0].LineEnds.Count - 1 downto 0 do elhlp := TElComponent(TMyEnd(ActiveElComponent.aEnd[0].LineEnds[n]).NadrazenyObject); // elhlp = ecline for m := 0 to Length(elHlp.aEnd) - 1 do if TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).Tag = ecuzel then TMyEnd(elHlp.aEnd[m].LineEnd).LineEnds.Extract(TMyEnd(elHlp.aEnd[m])); if TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).Tag = ectransformator_3p_line then TMyEnd(elHlp.aEnd[m].LineEnd).Full := false; TMyEnd(elHlp.aEnd[m].LineEnd).LineEnd := nil; TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).TotalNadrazenyObject).aEnd[TMyEnd(elHlp.aEnd [m].lineend).poradi].full := false; TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).TotalNadrazenyObject).aEnd[TMyEnd(elHlp.aEnd [m].lineend).poradi].lineend := nil; TMyEnd(elHlp.aEnd[m].LineEnd).Full := false; TMyEnd(elHlp.aEnd[m].LineEnd).LineEnd := nil; for m := 0 to Length(elHlp.aLinePart) - 1 do elhlp.alinepart[m].free; ElComponentList.Remove(elHlp); ActiveElComponent.aEnd[0].LineEnds.Free; ActiveElComponent.aEnd[0].Free; ActiveElComponent.lblElCompName.Free; ElComponentList.Remove(ActiveElComponent); ActiveElComponent := nil; Form1.WA.Refresh;

21 21 for n := 0 to Length(ActiveElComponent.aEnd) - 1 do if not (ActiveElComponent.aEnd[n].LineEnd = nil) then elhlp := TElComponent(TMyEnd(ActiveElComponent.aEnd[n].LineEnd).NadrazenyObject); // elhlp = ecline for m := 0 to Length(elHlp.aEnd) - 1 do if TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).Tag = ecuzel then TMyEnd(elHlp.aEnd[m].LineEnd).LineEnds.Extract(TMyEnd(elHlp.aEnd[m])); TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).aEnd[0].LineEndsCount := TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).aEnd[0].LineEnds.Count; if Length(TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).aTrafoLine) > 0 then TMyEnd(elHlp.aEnd[m].LineEnd).Full := false; TMyEnd(elHlp.aEnd[m].LineEnd).LineEnd := nil; TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).aEnd[TMyEnd(elHlp.aEnd[m].L ineend).poradi].full := false; TElComponent(TMyEnd(elHlp.aEnd[m].LineEnd).NadrazenyObject).aEnd[TMyEnd(elHlp.aEnd[m].L ineend).poradi].lineend := nil; TMyEnd(elHlp.aEnd[m].LineEnd).Full := false; TMyEnd(elHlp.aEnd[m].LineEnd).LineEnd := nil; for m := 0 to Length(elHlp.aLinePart) - 1 do elhlp.alinepart[m].free; ElComponentList.Remove(elHlp); ActiveElComponent.aEnd[n].Free; ActiveElComponent.aEnd[n].Free; ActiveElComponent.lblElCompName.Free; ElComponentList.Remove(ActiveElComponent); ActiveElComponent := nil; Form1.WA.Refresh; PageControl.ActivePageIndex := -1; exit; ShowMessage(LinePart.Name); ShowMessage(TMyEnd(hlpobj).Name); procedure CompressFile(FileName: string); var CompressStream : TCompressionStream; instream, outstream : TMemoryStream; instream := TMemoryStream.Create; outstream := TMemoryStream.Create; gs := ExtractFileDir(Application.ExeName)+'\'+ChangeFileExt(ExtractFileName(FileName), '.ini');

22 22 instream.loadfromfile(extractfiledir(application.exename)+'\'+changefileext(extractfile Name(FileName), '.ini')); CompressStream := TCompressionStream.Create(clMax, outstream); CompressStream.CopyFrom(inStream, instream.size); CompressStream.Free; outstream.savetofile(filename); // ssf = shortie scheme file instream.free; outstream.free; procedure DeCompressFile(FileName: string); const BufferSize = 4096; var DecompressStream : TDecompressionStream; instream : TMemoryStream; outstream : TFileStream; Buffer : array[0..buffersize-1] of Byte; Count : integer; instream := TMemoryStream.Create; gs := ExtractFileDir(Application.ExeName)+'\'+ChangeFileExt(ExtractFileName(FileName),'.ini') ; outstream := TFileStream.Create(ExtractFileDir(Application.ExeName)+'\'+ChangeFileExt(ExtractFileNam e(filename),'.ini'), fmcreate); instream.loadfromfile(filename); DecompressStream := TDecompressionStream.Create(inStream); while True do Count := DecompressStream.Read(Buffer, BufferSize); if Count <> 0 then outstream.writebuffer(buffer, Count) Break; DecompressStream.Free; instream.free; outstream.free; procedure TForm1.SaveObjectsToFile(FileName: string; ObjList: TObjectList); var n, m, k, l, HorizontalPosition, VerticalPosition : integer; stream : TMemoryStream; strlist : TStringList; Memo : TMemo; s : string; achar : array of char; ch : char; Ini : TIniFile; NewObjList : TObjectList; hlpgraphic, graphic : TGraphic; picture : TPicture; elcomp, hlpelcomp : TElComponent; my : TMyEnd; bitmap : TBitmap; hlppoint : TPoint;

23 23 DeleteFile(FileName); SetProgress('Saving objects...', 0); HorizontalPosition := ScrollBox2.HorzScrollBar.Position; VerticalPosition := ScrollBox2.VertScrollBar.Position; ScrollBox2.HorzScrollBar.Position := 0; ScrollBox2.VertScrollBar.Position := 0; for n := 0 to ObjList.Count - 1 do TElComponent(ObjList[n]).OrigLeft := TElComponent(ObjList[n]).Left - TElComponent(ObjList[n]).dx; TElComponent(ObjList[n]).OrigTop := TElComponent(ObjList[n]).Top - TElComponent(ObjList[n]).dy; graphic := TGraphic.Create; picture := TPicture.Create; bitmap := TBitmap.Create; stream := TMemoryStream.Create; gs := ExtractFileDir(Application.ExeName)+'\'+ChangeFileExt(ExtractFileName(FileName), '.ini'); Ini := TIniFile.Create(ExtractFileDir(Application.ExeName)+'\'+ChangeFileExt(ExtractFileName(F ilename), '.ini')); Ini.WriteInteger('General', 'NumberOfObjects', ObjList.Count); Ini.WriteInteger('General', 'ElComponentCounter', ElComponentCounter); for n := 0 to ObjList.Count - 1 do hlppoint := TElComponent(ObjList[n]).OrigCenter; ghlp := TElComponent(ObjList[n]).aLinePartCount; picture.assign(telcomponent(objlist.items[n]).picture); TElComponent(ObjList.Items[n]).Picture := nil; stream.position := 0; stream.writecomponent(telcomponent(objlist.items[n])); stream.position := 0; Ini.WriteBinaryStream('Objects', 'ElComponent[' + IntToStr(n) + ']', stream); TElComponent(ObjList.Items[n]).Picture.Assign(picture); if TElComponent(ObjList.Items[n]).lblElCompName = nil then Ini.WriteString('Objects', 'ElComponent[' + IntToStr(n) + '].lblelcompname', 'nil') stream.position := 0; stream.writecomponent(telcomponent(telcomponent(objlist.items[n]).lblelcompname)); stream.position := 0; Ini.WriteBinaryStream('Objects', 'ElComponent[' + IntToStr(n) + '].lblelcompname', stream); for m := 0 to Length(TElComponent(ObjList.Items[n]).aZ1) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].az1[' + IntToStr(m) + '].Re', TElComponent(ObjList.Items[n]).aZ1[m].Re); Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].az1[' + IntToStr(m) + '].Im', TElComponent(ObjList.Items[n]).aZ1[m].Im); for m := 0 to Length(TElComponent(ObjList.Items[n]).aZ2) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].az2[' + IntToStr(m) + '].Re', TElComponent(ObjList.Items[n]).aZ2[m].Re);

24 24 Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].az2[' + IntToStr(m) + '].Im', TElComponent(ObjList.Items[n]).aZ2[m].Im); for m := 0 to Length(TElComponent(ObjList.Items[n]).aZ0) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].az0[' + IntToStr(m) + '].Re', TElComponent(ObjList.Items[n]).aZ0[m].Re); Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].az0[' + IntToStr(m) + '].Im', TElComponent(ObjList.Items[n]).aZ0[m].Im); for m := 0 to Length(TElComponent(ObjList.Items[n]).aZn) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].azn[' + IntToStr(m) + '].Re', TElComponent(ObjList.Items[n]).aZn[m].Re); Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].azn[' + IntToStr(m) + '].Im', TElComponent(ObjList.Items[n]).aZn[m].Im); for m := 0 to Length(TElComponent(ObjList.Items[n]).aFormZn) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].aformzn[' + IntToStr(m) + '].Re', TElComponent(ObjList.Items[n]).aFormZn[m].Re); Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].aformzn[' + IntToStr(m) + '].Im', TElComponent(ObjList.Items[n]).aFormZn[m].Im); for m := 0 to Length(TElComponent(ObjList.Items[n]).aZLk) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].azlk[' + IntToStr(m) + '].Re', TElComponent(ObjList.Items[n]).aZLk[m].Re); Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].azlk[' + IntToStr(m) + '].Im', TElComponent(ObjList.Items[n]).aZLk[m].Im); for m := 0 to Length(TElComponent(ObjList.Items[n]).aU) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].au[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).aU[m]); for m := 0 to Length(TElComponent(ObjList.Items[n]).auk) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].auk[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).auk[m]); for m := 0 to Length(TElComponent(ObjList.Items[n]).aSn) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].asn[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).aSn[m]); for m := 0 to Length(TElComponent(ObjList.Items[n]).adPk) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].adpk[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).adPk[m]); for m := 0 to Length(TElComponent(ObjList.Items[n]).aR0perR) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].ar0perr[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).aR0perR[m]); for m := 0 to Length(TElComponent(ObjList.Items[n]).aX0perX) - 1 do Ini.WriteFloat('Objects', 'ElComponent[' + IntToStr(n) + '].ax0perx[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).aX0perX[m]); for m := 0 to Length(TElComponent(ObjList.Items[n]).aZapojeniVinuti) - 1 do Ini.WriteInteger('Objects', 'ElComponent[' + IntToStr(n) + '].azapojenivinuti[' + IntToStr(m) + ']', TElComponent(ObjList.Items[n]).aZapojeniVinuti[m]); if not(telcomponent(objlist.items[n]).nadrazenyobject = nil) then picture.assign(telcomponent(telcomponent(objlist.items[n]).nadrazenyobject).picture); TElComponent(TElComponent(ObjList.Items[n]).NadrazenyObject).Picture := nil; stream.position := 0;

LAMPIRAN Listing Program

LAMPIRAN Listing Program LAMPIRAN Listing Program unit umain; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls, ExtCtrls, ExtDlgs, DCPcrypt2, DCPrc4, DCPsha1,

More information

Source code for simulations: 1 of 11

Source code for simulations: 1 of 11 The following is the source code for the simulations reported in Clinchy, Haydon and Smith (Pattern process: what does patch occupancy really tell us about metapopulation dynamics). unit Main; interface

More information

Image. uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls ;

Image. uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls ; B 71 11 Image Image Image Image 11.1 11.1.1 Amida AmidaU.pas AmidaP.dpr 11.1.2 Form Name FormAmida Caption Position poscreencenter HorzScrollBar.Visible False VertScrollBar.Visible False 11.1.3 11.2 Image

More information

2. Design and Development

2. Design and Development Postage Calculator 1. The task Design and implement a program for employees of a travel agency who send out documents to the UK and EU only; the program will calculate the cost of postage. Each envelope

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2018 MARKING GUIDELINES MARKS: 150 These marking guidelines consist of 21 pages. Information Technology/P1 2 DBE/Feb. Mar. 2018

More information

unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, CPort, LPComponent, SLCommonGen, SLSignalGen, Menus, SLComponentCollection, LPDrawLayers,

More information

APPLICATION NOTE: KONSTANTER LSP32K Interface Protocol

APPLICATION NOTE: KONSTANTER LSP32K Interface Protocol APPLICATION NOTE: KONSTANTER LSP32K Interface Protocol 1 Interface Type At the DB9 connector the LSP32K Power Supply device offers a serial data interface with TTL logic level for remote control and readout

More information

LAMPIRAN A: LIST PROGRAM

LAMPIRAN A: LIST PROGRAM LAMPIRAN A: LIST PROGRAM Form Login unit ULogin; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, IBQuery, IBDatabase, IBCustomDataSet, IBTable,

More information

uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, ImgList, StdCtrls, Buttons, MPlayer;

uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, ImgList, StdCtrls, Buttons, MPlayer; unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, ImgList, StdCtrls, Buttons, MPlayer; type TForm1 = class(tform) Cenario: TImage;

More information

GRADE 12 SEPTEMBER 2012 INFORMATION TECHNOLOGY P1 MEMORANDUM

GRADE 12 SEPTEMBER 2012 INFORMATION TECHNOLOGY P1 MEMORANDUM Province of the EASTERN CAPE EDUCATION NATIONAL SENIOR CERTIFICATE GRADE 12 SEPTEMBER 2012 INFORMATION TECHNOLOGY P1 MEMORANDUM MARKS: 120 This memorandum consists of 11 pages. 2 INFORMATION TECHNOLOGY

More information

LAMPIRAN A LISTING PROGRAM

LAMPIRAN A LISTING PROGRAM LAMPIRAN LAMPIRAN A LISTING PROGRAM //Program Utama unit umain; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, Menus, ExtCtrls, StdCtrls, Lucifer,VisSem,

More information

Delphi Generics.Collections

Delphi Generics.Collections Delphi Generics.Collections Copyright(C) 2008 Embarcadero Technologies, Inc. All Rights Reserved. Delphi Generics.Collections Table of Contents Generics.Collections.TCollectionNotification 1 Generics.Collections.TCollectionNotifyEvent

More information

Introduction to the DLL for the USB Interface Board K8061

Introduction to the DLL for the USB Interface Board K8061 K8061.DLL 1 Introduction to the DLL for the USB Interface Board K8061 The K8061 interface board has 8 digital input channels and 8 digital output channels. In addition, there are 8 analogue inputs, 8 analogue

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 NOVEMBER 2017 MARKING GUIDELINES MARKS: 150 These marking guidelines consist of 26 pages. Information Technology/P1 2 DBE/November 2017 GENERAL

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2017 MEMORANDUM MARKS: 150 This memorandum consists of 29 pages. Information Technology/P1 2 DBE/Feb. Mar. 2017 GENERAL INFORMATION:

More information

Использование ассиметричных алгоритмов криптографического преобразования информации в приложениях Windows

Использование ассиметричных алгоритмов криптографического преобразования информации в приложениях Windows Государственное образовательное учреждение высшего профессионального образования «Петербургский государственный университет путей сообщения» Кафедра «Информационные и вычислительные системы» Лабораторная

More information

Kada se pokrene forma da bude plave boje. Dugme Crtaj krugove da iscrtava slučajan broj N krugova istog poluprečnika r (1/4 visine forme) čiji su

Kada se pokrene forma da bude plave boje. Dugme Crtaj krugove da iscrtava slučajan broj N krugova istog poluprečnika r (1/4 visine forme) čiji su Kada se pokrene forma da bude plave boje. Dugme Crtaj krugove da iscrtava slučajan broj N krugova istog poluprečnika r (1/4 visine forme) čiji su centri na neiscrtanom krugu poluprečnika r. Dugme Boji

More information

(1) Trump (1) Trump (2) (1) Trump ExampleU ExampleP (2) Caption. TrumpU (2) Caption. (3) Image FormTrump. Top 0 Left 0.

(1) Trump (1) Trump (2) (1) Trump ExampleU ExampleP (2) Caption. TrumpU (2) Caption. (3) Image FormTrump. Top 0 Left 0. B 114 18 (1) 18.1 52 54 Trump http://www.ss.u-tokai.ac.jp/~ooya/jugyou/joronb/trumpbmp.exe (1) (2) Trump 18.2 (1) Trump ExampleU ExampleP (2) Name Caption FormMain 18.3 (1) TrumpU (2) Name Caption FormTrump

More information

CiDess.dproj 07/05/ :36:24

CiDess.dproj 07/05/ :36:24 CiDess.dproj 07/05/2011 19:36:24 Page 1 sur 4 1: library CiDess; 2: 3: uses 4: Windows, 5: Messages, 6: Classes, 7: Dialogs, 8: Forms, 9: SysUtils, 10: Inifiles, 11: UParamCiDess1 in 'UParamCiDess1.pas'

More information

GRADE/GRAAD 11 NOVEMBER 2013 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM

GRADE/GRAAD 11 NOVEMBER 2013 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM NATIONAL SENIOR CERTIFICATE NASIONALE SENIOR SERTIFIKAAT GRADE/GRAAD 11 NOVEMBER 2013 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM MARKS/PUNTE: 150 This memorandum consists of 6 pages.

More information

Graphics Programming with GDI and Fonts

Graphics Programming with GDI and Fonts Graphics Programming with GDI and Fonts CHAPTER 8 IN THIS CHAPTER Delphi s Representation of Pictures: TImage 276 Saving Images 278 Using the TCanvas Properties 280 Using the TCanvas Methods 301 Coordinate

More information

Windows. mine sweeper Jirai JiraiU.pas JiraiP.dpr. Form Name FormJirai Caption Position podesktopcenter 16.3

Windows. mine sweeper Jirai JiraiU.pas JiraiP.dpr. Form Name FormJirai Caption Position podesktopcenter 16.3 B 103 16 Windows mine sweeper 16.1 n 16.2 Jirai JiraiU.pas JiraiP.dpr Form Name FormJirai Caption Position podesktopcenter 16.3 3 B 104 16.3.1 RadioGroup Algn altop Name RadioGroupSize Caption Columns

More information

Adventures in Messaging

Adventures in Messaging Adventures in Messaging CHAPTER 3 IN THIS CHAPTER What Is a Message? 130 Types of Messages 131 How the Windows Message System Works 132 Delphi s Message System 133 Handling Messages 134 Sending Your Own

More information

UJIAN AKHIR SEMESTER TEKNIK INFORMATIKA SEKOLAH TINGGI TEKNOLOGI DUTA BANGSA

UJIAN AKHIR SEMESTER TEKNIK INFORMATIKA SEKOLAH TINGGI TEKNOLOGI DUTA BANGSA UJIAN AKHIR SEMESTER TEKNIK INFORMATIKA SEKOLAH TINGGI TEKNOLOGI DUTA BANGSA Dosen Pembimbing : Dedi W ST,. MM Nama : Elly Sunandy NIM : 13158279 Pemrograman Terstruktur Membuat program dengan Delphi 7

More information

LAMPIRAN. uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, XPMan, ExtCtrls, jpeg;

LAMPIRAN. uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, XPMan, ExtCtrls, jpeg; LAMPIRAN Lampiran A. Listing Program 1. Unit Utama unit UnUtama; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, XPMan, ExtCtrls, jpeg; type Tfrmutama

More information

UNIT Files. Procedure/Functionand Other Declarations (CONST, TYPE, VAR) can be stored under different Object Pascal Files (Library).

UNIT Files. Procedure/Functionand Other Declarations (CONST, TYPE, VAR) can be stored under different Object Pascal Files (Library). Basics of Language UNIT Files Basics of Language UNIT Files UNIT Files Procedure/Functionand Other Declarations (CONST, TYPE, VAR) can be stored under different Object Pascal Files (Library). You can reduce

More information

GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM

GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM Province of the EASTERN CAPE EDUCATION NATIONAL SENIOR CERTIFICATE GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM MARKS/PUNTE: 120 This memorandum consists of 10 pages.

More information

LAMPIRAN A: DDL DATABASE

LAMPIRAN A: DDL DATABASE LAMPIRAN A: DDL DATABASE MySQL-Front 5.1 (Build 2.7) Host: localhost Database: mobil ------------------------------------------------------ Server version 5.0.41-community-nt USE `mobil`; Source for table

More information

LAMPIRAN A. Foto Alat

LAMPIRAN A. Foto Alat LAMPIRAN A Foto Alat A-1 A-2 Rangkaian Skematik PCB Sistem Monitoring Infus A-3 LAMPIRAN B Program pada Mikrokontroller AVR Atmega16...B-1 Program pada Borlan Delhpi 7.0...B-9 PROGRAM UTAMA /*****************************************************

More information

MesuInstru.dproj 07/05/ :53:24

MesuInstru.dproj 07/05/ :53:24 MesuInstru.dproj 07/05/2011 19:53:24 Page 1 sur 3 1: library MesuInstru; 2: 3: uses 4: Windows, 5: Messages, 6: Classes, 7: Dialogs, 8: Forms, 9: SysUtils, 10: UInstrument in 'UInstrument.pas'; 11: 12:

More information

DelphiScript Keywords

DelphiScript Keywords DelphiScript Keywords Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 This reference covers the DelphiScript keywords used for the Scripting System in Altium Designer. The scripting

More information

Quick Reference Guide

Quick Reference Guide SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Pascal language This reference guide

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2014 MEMORANDUM MARKS: 150 This memorandum consists of 28 pages. Information Technology/P1 2 DBE/November 2014 GENERAL INFORMATION:

More information

Delphi by Design. One-Step ActiveX - Part 2

Delphi by Design. One-Step ActiveX - Part 2 Delphi by Design Introduction Past Articles Source Code One-Step ActiveX - Part 2 by Ray Konopka April/May 1998, Vol. 9, No. 1 -- Download Source Code: Click Here It takes only one step to make a working

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2015 MEMORANDUM MARKS: 150 This memorandum consists of 32 pages. Information Technology/P1 2 DBE/Feb. Mar. 2015 GENERAL INFORMATION:

More information

Listing Program Tugas Akhir (TugasAkhir.dpr)

Listing Program Tugas Akhir (TugasAkhir.dpr) L1 Listing Program Tugas Akhir (TugasAkhir.dpr) program TugasAkhir; uses Forms, udb in 'udb.pas' {dmta: TDataModule}, ufungsi in 'ufungsi.pas', uutama in 'uutama.pas' {futama}, ulogin in 'ulogin.pas' {flogin},

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 NOVEMBER 2016 MEMORANDUM MARKS: 150 This memorandum consists of 32 pages. Information Technology/P1 2 DBE/November 2016 GENERAL INFORMATION:

More information

www.openwire.org www.mitov.com Copyright Boian Mitov 2004-2014 Index Installation... 3 Where is InstrumentLab?... 3 Creating classifier application... 3 Using the TSLCRealBuffer in C++ Builder and Visual

More information

Mathematical Modeling in Delphi

Mathematical Modeling in Delphi Mathematical Modeling in Delphi Andreï V. Serghienko Yaroslavl P.G. Demidov State University Yaroslavl, Russia The literature on Delphi [1] numbers many manuals. However among them there are few books,

More information

THREE. Multiple windows

THREE. Multiple windows THREE Multiple windows Often in a Windows application it is convenient to have more than one window in use. This provides a natural way of breaking down a large and complex project into a number of simpler

More information

LAMPIRAN A. Listing Program. Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6

LAMPIRAN A. Listing Program. Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6 A Listing Program Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6 LISTING PROGRAM BORLAND DELPHI 7.0 Inisialisasi ==========================================================

More information

The System API Server Processes Reference includes the following sections and content:

The System API Server Processes Reference includes the following sections and content: System API Server Processes Old Content - visit altium.com/documentation Modified by Admin on Sep 13, 2017 Parent page: Technical Reference - System API System API: Server Processes and Routines The System

More information

Printing in Delphi 5 IN THIS CHAPTER CHAPTER. The TPrinter Object 420. TPrinter.Canvas 421. Simple Printing 422. Printing a Form 425

Printing in Delphi 5 IN THIS CHAPTER CHAPTER. The TPrinter Object 420. TPrinter.Canvas 421. Simple Printing 422. Printing a Form 425 Printing in Delphi 5 CHAPTER 10 IN THIS CHAPTER The TPrinter Object 420 TPrinter.Canvas 421 Simple Printing 422 Printing a Form 425 Advanced Printing 425 Miscellaneous Printing Tasks 450 Obtaining Printer

More information

Cross-Platform Development with Delphi 10.2 & FireMonkey. for Windows, Mac OS X (macos) & Linux. Harry Stahl

Cross-Platform Development with Delphi 10.2 & FireMonkey. for Windows, Mac OS X (macos) & Linux. Harry Stahl Cross-Platform Development with Delphi 10.2 & FireMonkey for Windows, Mac OS X (macos) & Linux Harry Stahl Author: Harry Stahl Publisher: Harry Stahl City: Bonn, Germany Copyright (2017), All rights reserved

More information

MesuTher.dproj 07/05/ :56:44

MesuTher.dproj 07/05/ :56:44 MesuTher.dproj 07/05/2011 19:56:44 Page 1 sur 1 1: library MesuTher; 2: 3: uses 4: Windows, 5: Messages, 6: Classes, 7: Dialogs, 8: Forms, 9: SysUtils, 10: UTherElec in 'UTherElec.pas'; 11: 12: {$R MesuTher.res}

More information

Interdisciplinary relations in teaching of programming

Interdisciplinary relations in teaching of programming Interdisciplinary relations in teaching of programming VLADIMÍR JEHLIČKA Department of Informatics Faculty of Education University of Hradec Králové Rokitanského 62, 500 03 Hradec Králové 3 CZECH REPUBLIC

More information

function SortArray(Const VaiArrayOfInteger: TArrayOfInteger; Const

function SortArray(Const VaiArrayOfInteger: TArrayOfInteger; Const unit specials; interface Uses Declarations; function SortArray(Const VaiArrayOfInteger: TArrayOfInteger; Const VadArrayO fdouble: TArrayOfDouble): TArrayOfInteger; procedure VarAdd(Var VdVarValue: Double;

More information

Writing Delphi Custom Components

Writing Delphi Custom Components Writing Delphi Custom Components CHAPTER 21 IN THIS CHAPTER Component Building Basics 930 Sample Components 958 TddgButtonEdit Container Components 976 Component Packages 987 Add-In Packages 998 Summary

More information

The scripting system handles two types of components: Visual and Non-visual components.

The scripting system handles two types of components: Visual and Non-visual components. Forms and Components Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 Parent page: DelphiScript Overview of Graphical Components The scripting system handles two types of components:

More information

&'()*+,-./0&(1& $ :;

&'()*+,-./0&(1& $ :; &'()*+,-./0&(1& $234567859:; raek@etteam.com %!"# $%# &#$ ' (!) * %#+,-./0$1"# 22(3 45416 (! 57 5 71 " *7 *7 ( 89:9-,- 8;:< 16 *! =)5> 7# &$%# 45?"16 * @! (! 5 *) 8,:A;B9- C;D.E

More information

maxbox /09/ :44:02

maxbox /09/ :44:02 1: ///////////////////////////////////////////////////// 2: How to get a SHA256 or SHA256D for Blockchains 3: 4: maxbox Starter 54 - MS Cryptographic Service Provider 5: 6: As you may know a SHA (Secure

More information

LAMPIRAN 1 TATA CARA PENGGUNAAN SOFTWARE ALGORITMA GENETIKA

LAMPIRAN 1 TATA CARA PENGGUNAAN SOFTWARE ALGORITMA GENETIKA LAMPIRAN 1 TATA CARA PENGGUNAAN SOFTWARE ALGORITMA GENETIKA Langkah-langkah penggunaan Software Algoritma Genetika Job Shop : 1. Buka program Algoritma Genetika Job Shop 2. Masukkan data-data yang dibutuhkan

More information

Delphi XE2. evelopment. Delphi XE2 ios Development 2 nd edition, 1 st May 2012

Delphi XE2. evelopment. Delphi XE2 ios Development 2 nd edition, 1 st May 2012 Delphi XE2 evelopment Delphi XE2 ios Development 2 nd edition, 1 st May 2012 Author: Bob Swart (aka Dr.Bob) Bob Swart Training & Consultancy (ebob42) Table of Contents 1. Configuring Delphi XE2 for ios

More information

TMS FNC Object Inspector

TMS FNC Object Inspector TMS FNC Object Inspector September 2018 Copyright 2018 by tmssoftware.com bvba Web: http://www.tmssoftware.com Email: info@tmssoftware.com 1 Index Getting Started... 3 Availability... 3 Hierarchy... 4

More information

JScript Reference. Contents

JScript Reference. Contents JScript Reference Contents Exploring the JScript Language JScript Example Altium Designer and Borland Delphi Run Time Libraries Server Processes JScript Source Files PRJSCR, JS and DFM files About JScript

More information

MesuAmp.dproj 07/05/ :50:26

MesuAmp.dproj 07/05/ :50:26 MesuAmp.dproj 07/05/2011 19:50:26 Page 1 sur 3 1: library MesuAmp; 2: 3: uses 4: Windows, 5: Messages, 6: Classes, 7: Dialogs, 8: Forms, 9: SysUtils, 10: UAmpElec in 'UAmpElec.pas'; 11: 12: {$R MesuAmp.res}

More information

Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at:

Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at: maxbox Starter 2 Start with OO Programming 1.1 First Step Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at: http://www.softwareschule.ch/download/maxbox_starter.pdf

More information

A method is a procedure that is always associated with an object and defines the behavior of that object.

A method is a procedure that is always associated with an object and defines the behavior of that object. Using Form Components Old Content - visit altium.com/documentation Modified by Rob Evans on 15-Feb-2017 Parent page: VBScript Using Components in VBScript Forms Although Forms and Components are based

More information

12.2 Mixing HLA and MASM/Gas Code in the Same Program In-Line (MASM/Gas) Assembly Code in Your HLA Programs

12.2 Mixing HLA and MASM/Gas Code in the Same Program In-Line (MASM/Gas) Assembly Code in Your HLA Programs 12.1 Chapter Overview Most assembly language code doesn t appear in a stand-alone assembly language program. Instead, most assembly code is actually part of a library package that programs written in a

More information

Start with Operating System Programming

Start with Operating System Programming maxbox Starter 8 Start with Operating System Programming 1.1 Admin your System Today we spend another time in programming with your operating system (called OS) and the API. An API (Application Programming

More information

DELPHI FOR ELECTRONIC ENGINEERS. Part 2 Programming a calculator COURSE

DELPHI FOR ELECTRONIC ENGINEERS. Part 2 Programming a calculator COURSE COURSE DELPHI FOR ELECTRONIC ENGINEERS Part 2 Programming a calculator Herman Bulle with thanks to Anton Vogelaar In the first instalment of this series, we introduced the Delphi programming environment

More information

Parsing Delphi mode, Include Assertion Code, Use Ansi Strings. Code Checks: I/O, Range, Overflow, Stack

Parsing Delphi mode, Include Assertion Code, Use Ansi Strings. Code Checks: I/O, Range, Overflow, Stack Programming Block C Steps to Construct a GUI Application in Lazarus (1) http://www.win.tue.nl/ wstomv/2ip0/ Lecture 12 Tom Verhoeff Technische Universiteit Eindhoven Faculteit Wiskunde en Informatica Software

More information

Research on the Application of Interactive Electronic Whiteboard in Network Teaching

Research on the Application of Interactive Electronic Whiteboard in Network Teaching Available online at www.sciencedirect.com Procedia Environmental Sciences 12 (2012 ) 1151 1156 2011 International Conference on Environmental Science and Engineering (ICESE 2011) Research on the Application

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2014 MARKS: 150 TIME: 3 hours This question paper consists of 22 pages. Information Technology/P1 2 DBE/November 2014 NSC INSTRUCTIONS

More information

In Delphi script, when values are assigned to variables, the colon-equal operator is used; :=

In Delphi script, when values are assigned to variables, the colon-equal operator is used; := Statements and Operators Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 Parent page: DelphiScript DelphiScript Statements A statement in DelphiScript is considered as simple when

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

LAMPIRAN A RANGKAIAN SKEMATIK PERANGKAT KERAS

LAMPIRAN A RANGKAIAN SKEMATIK PERANGKAT KERAS LAMPIRAN A RANGKAIAN SKEMATIK PERANGKAT KERAS Instrumentation Amplifier, G=749 +9V 3 5 8 6 1 AD620AN 30K 22K HPF, G=31 HPF, G=2.05-23 5 +9V +9V 1K 8 1K 8 2 2 6 6 3 3 8.2 nf 1 8.2nF 1 5 OP07 5 OP07 220K

More information

Object Pascal Language Guide

Object Pascal Language Guide Object Pascal Language Guide Borland Object Pascal Borland Software Corporation 100 Enterprise Way, Scotts Valley, CA 95066-3249 www.borland.com Borland Software Corporation may have patents and/or pending

More information

DMX-Dongle II Win16, Win32 & Dos Developer s Guide

DMX-Dongle II Win16, Win32 & Dos Developer s Guide DMX-Dongle II Win16, Win32 & Dos Developer s Guide Artistic Licence (UK) Ltd. Manual Revision V1.8 Firmware Revision 17, 20 2 C O N T E N T S Introduction...5 DongleSetErrorFlag... 12 Quick Start...5 DongleGetErrorFlag...

More information

Delphi XML-Beispiel-Code

Delphi XML-Beispiel-Code XML-Beispiel-Code program DomCreate; uses Forms, CreateForm in 'CreateForm.pas' {Form1}; {$R *.RES} Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run;. CreateForm.pas unit

More information

Quick Reference Guide

Quick Reference Guide SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Basic language This reference guide

More information

Easy to understand and comprehensible. Easy to modify. Simple to test. Uncomplicated reuse. And works correctly (Kent Beck's suggestion).

Easy to understand and comprehensible. Easy to modify. Simple to test. Uncomplicated reuse. And works correctly (Kent Beck's suggestion). maxbox Starter 24 Start with Clean Code 1.1 From Archimedes to PI Today we dive into Clean Code and Refactoring. Robert C. Martin offers in the first chapter of his book 'Clean Code' several definitions

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science Department Lecture 3: C# language basics Lecture Contents 2 C# basics Conditions Loops Methods Arrays Dr. Amal Khalifa, Spr 2015 3 Conditions and

More information

Chapter 2: Using Data

Chapter 2: Using Data Chapter 2: Using Data TRUE/FALSE 1. A variable can hold more than one value at a time. F PTS: 1 REF: 52 2. The legal integer values are -2 31 through 2 31-1. These are the highest and lowest values that

More information

As you already know the tool is split up into the toolbar across the top, the editor or code part in the centre and the output window at the bottom.

As you already know the tool is split up into the toolbar across the top, the editor or code part in the centre and the output window at the bottom. maxbox Starter 7 Start with Game Programming 1.1 Play a Game Today we spend another time in programming with the internet (called social network) and multi user games. But in this primer I just introduce

More information

judul : dump mysql with delphi - opensource

judul : dump mysql with delphi - opensource judul : dump mysql with delphi - opensource header : hmm...ini sebenernya dah pernah tak tanyain dalam thread tapi lom ada jawaban yang memuaskan, aq coba ekplor terus dan akhirnya 3 bulan yang lalu bisa

More information

The Mechanics of Charged Particles

The Mechanics of Charged Particles The Mechanics of Charged Particles Original 15/07/2005 Updated 19/05/2008 Posted on ViXra 21/04/2013 The following notes are an attempt to simply and understand how charged particles work in terms of waves

More information

Function: function procedures and sub procedures share the same characteristics, with

Function: function procedures and sub procedures share the same characteristics, with Function: function procedures and sub procedures share the same characteristics, with one important difference- function procedures return a value (e.g., give a value back) to the caller, whereas sub procedures

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

C Programming Language (Chapter 2 of K&R) Variables and Constants

C Programming Language (Chapter 2 of K&R) Variables and Constants C Programming Language (Chapter 2 of K&R) Types, Operators and Expressions Variables and Constants Basic objects manipulated by programs Declare before use: type var1, var2, int x, y, _X, x11, buffer;

More information

Modbus Server. ARSoft International

Modbus Server. ARSoft International Modbus Server ARSoft International Description The ModBus server allows: The cyclic or acyclique interrogation of equipments connected to the serial comport COM1 to COM10. Up to 115200 Bauds. The communication

More information

Preview from Notesale.co.uk Page 2 of 79

Preview from Notesale.co.uk Page 2 of 79 COMPUTER PROGRAMMING TUTORIAL by tutorialspoint.com Page 2 of 79 tutorialspoint.com i CHAPTER 3 Programming - Environment Though Environment Setup is not an element of any Programming Language, it is the

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 NOVEMBER 2015 MEMORANDUM MARKS: 150 This memorandum consists of 32 pages. Information Technology/P1 2 DBE/November 2015 GENERAL INFORMATION:

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Part 1 The first steps

Part 1 The first steps course DELPHI FOR ELECTRONIC ENGINEERS Part 1 The first steps Detlef Overbeek & Anton Vogelaar This article is the first part in a series about programming in Delphi, which concentrates on the practical

More information

NEAR EAST UNIVERSI FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCES DEPARTMENT OF COMPUTER INFORMATION SYSTEMS

NEAR EAST UNIVERSI FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCES DEPARTMENT OF COMPUTER INFORMATION SYSTEMS NEAR EAST UNIVERSI FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCES DEPARTMENT OF COMPUTER INFORMATION SYSTEMS 2007/2008 FALL TERM CIS 200 (Graduation Project) Film&Music Center Automation System Submitted

More information

Pierce Ch. 3, 8, 11, 15. Type Systems

Pierce Ch. 3, 8, 11, 15. Type Systems Pierce Ch. 3, 8, 11, 15 Type Systems Goals Define the simple language of expressions A small subset of Lisp, with minor modifications Define the type system of this language Mathematical definition using

More information

A Note on Using the CHomP C++ Library Interface

A Note on Using the CHomP C++ Library Interface A Note on Using the CHomP C++ Library Interface Pawe l Pilarczyk August 9, 2007 Abstract This note provides some very basic information on how to use the C++ interface to a few functions available in the

More information

CHAPTER 1.2 INTRODUCTION TO C++ PROGRAMMING. Dr. Shady Yehia Elmashad

CHAPTER 1.2 INTRODUCTION TO C++ PROGRAMMING. Dr. Shady Yehia Elmashad CHAPTER 1.2 INTRODUCTION TO C++ PROGRAMMING Dr. Shady Yehia Elmashad Outline 1. Introduction to C++ Programming 2. Comment 3. Variables and Constants 4. Basic C++ Data Types 5. Simple Program: Printing

More information

What's New in RAD Studio 10.3 Rio

What's New in RAD Studio 10.3 Rio What's New in RAD Studio 10.3 Rio The RAD Studio 10.3 Rio release contains the following new and improved features. Delphi Language Inline Variable Declaration The Delphi language in 10.3 has a fairly

More information

Compiladores Prof. Bruno Lopes Lista 1

Compiladores Prof. Bruno Lopes Lista 1 1. Coteje as etapas do processo de compilação. 2. Seja a seguinte BNF da linguagem Pascal. Compiladores 2016.2 Prof. Bruno Lopes Lista 1 program ::= program identifier ; uses declaration ; block. uses

More information

WPViewPDF V3. WPViewPDF Version 4 Copyright (C) WPCubed GmbH

WPViewPDF V3. WPViewPDF Version 4 Copyright (C) WPCubed GmbH WPViewPDF V3 WPViewPDF Version 4 Copyright (C) 2004-2016 WPCubed GmbH I WPViewPDF V4 Contents Foreword Topic 1 Introduction 0 1 1 WPViewPDF... Standard 4 2 WPViewPDF... PLUS 4 Topic 2 Installation 5 1

More information

var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin ListBox1.Items.LoadFromFile('d:\brojevi.

var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin ListBox1.Items.LoadFromFile('d:\brojevi. 1 PANEL komponenta kontejnerska, slična GropBox. Roditeljska komponenta za komp. postavljene na nju. Zajedno se pomeraju. Caption svojstvo za naziv; Alighment pomera svojstvo Caption levo i desno; Align

More information

Annex A (Informative) Collected syntax The nonterminal symbols pointer-type, program, signed-number, simple-type, special-symbol, and structured-type

Annex A (Informative) Collected syntax The nonterminal symbols pointer-type, program, signed-number, simple-type, special-symbol, and structured-type Pascal ISO 7185:1990 This online copy of the unextended Pascal standard is provided only as an aid to standardization. In the case of dierences between this online version and the printed version, the

More information

12.2 Mixing HLA and MASM/Gas Code in the Same Program In-Line (MASM/Gas) Assembly Code in Your HLA Programs

12.2 Mixing HLA and MASM/Gas Code in the Same Program In-Line (MASM/Gas) Assembly Code in Your HLA Programs Mixed Language Programming Mixed Language Programming Chapter Twelve 12.1 Chapter Overview Most assembly language code doesn t appear in a stand-alone assembly language program. Instead, most assembly

More information

In this article we will see how the OmniThreadLibrary can be used to split a simple image processing kernel across multiple threads.

In this article we will see how the OmniThreadLibrary can be used to split a simple image processing kernel across multiple threads. In a previous article named " Easy multi-thread programming Delphi ", the AsyncCalls library was used to process multiple images at the same time. However, the processing of every single image was still

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 2 : C# Language Basics Lecture Contents 2 The C# language First program Variables and constants Input/output Expressions and casting

More information

Table of Contents Foreword Introduction About the book About the author Contact information Chapter 1: What is FireMonkey?

Table of Contents Foreword Introduction About the book About the author Contact information Chapter 1: What is FireMonkey? Table of Contents Foreword... Page 10 Introduction... Page 11 About the book... Page 11 About the author... Page 11 Contact information... Page 11 Chapter 1: What is FireMonkey?... Page 12 Chapter 2: How

More information

SENIOR CERTIFICATE EXAMINATION

SENIOR CERTIFICATE EXAMINATION SENIOR CERTIFICATE EXAMINATION INFORMATION TECHNOLOGY P1 2015 MARKS: 150 TIME: 3 hours This question paper consists of 23 pages. Information Technology/P1 2 DBE/2015 SCE INSTRUCTIONS AND INFORMATION 1.

More information

The following topics are covered in this reference:

The following topics are covered in this reference: JScript Reference Summary The following topics are covered in this reference: Exploring the JScript Language This reference manual JScript Source Files describes the JScript About JScript Examples scripting

More information