PERSONAl C# PUBLIC METHODS
cm()
=========
CONTAINING CLASS: pcs only.
USE: Handling Controls
COMMON INPUT: cs = Control's key name (example:"bt0")
COMMON OUTPUT: (i,j,k) based GUV's reset.
Additionally, after execution of modes "i" all (o) based
var's, all general use arrays and all var's used for control's
setup or installation are reset.
Also, after execution of mode "s", var's used to supply data
for each mode are reset.
REMARKS: (1) CONTROL KEY NAMES: You select one for each control you
install.
It should be made of:
The 2-char name of the control + a number in the range (0-89)
The 2-char names can be:
Button:bt
CheckBox:cb RadioButton:rb Label:lb TextField:tf
TextArea:ta RichTextBox:rt ComboBox:ch ls:ListBox pn:Panel
Menu:mn
See "Buttons Groups" and "Menu's" for more naming rules.
(2) THE SEUP METHOD:
In your setup() method you supply the setup
data
for each control then call cm("i") to install the control.
Your setup data may include default values which you like to
suggest on the user. The variables used to assign default values
to are the same update var's which are used to return latest update
of each control to your program See "Update variables".See mode
"i" for all setup data.
(3) UPDATE VAR's: Used
by PC# to send updates to your program.
a) cus:
Used for single item controls. For controls which generate
text like text fields, cus=the text. For "on/off" controls like
buttons, cus="1" or "0" indicating "on" or "off". Check boxes only
have a third state which is "indeterminate" represented by cus="i".
b) cui: Used for multiple item controls where user can select one
item only, like Radio Buttons and Combo Boxes. It stores the index
of selected item.
CUS[]: Used for multiple item
controls where user can selsect more
than one
item. Like Check Boxes and lists. Each row of array CUS[]
can be "0" or "1" and in case of a Check Box, it can also be "i".
(4) BUTTON GROUPS:
Your program can include upto 10 CheckBox groups
and upto 10 RadioButton groups. Each group can include upto 10
buttons. Names should be as follows:
2-chr object name + group number (1:8) + button number (1:9)
For example: rb05=Radio Button number 5 in group 0.
and: cb21=Check Box Button number 1 in group 2.
All buttons are installed individually, can be modified
and their update status checked individually. However, You can
also check the update status for a group at once by using wild
card character, for example: cs="rb2*";cm("gu"); will get
the update for RadioButton group number 2. The update value
returned in this case will be the index of selected RadioButton in
the group assigned to (cui) In case of a check box, the update
value returned will be CUS[] as discussed before.
MODES:
Control's Installation:
i: USE:Install a control. This call
should come from the method setup()
IN: cs=Control's key name.
ps=Containing Panel's key name. if not specified, control will be
directly installed on the form.
j,k=loc.(Center of control
relative to Center of Form)
i,o=width,height of the
control.
cls=foregroung-background combined color code
for the control.
fns=Control's font code.
cis=Label's text
CIS[]=Items' text for a multi-item
controls.
os=label alignment os=c/e/w/n/s/ne/nw/se/sw=Alignment
direction.
ims=bckground Image file name.
cts=tooltip text (appears when placing mouse curser at control)
cms=Context menu (appears when right clicking the control)
cas=Anchor=n/s/e/w
cds=Dock=n/s/e/w/f
f=fill in all directions.
id=Tab index (control scan
order when pushing TAB's
starting
by 0) if id=-1 control will be skipped.
ob=editability.
For tf,ta & rt: ob=true:Read only.
ib=Other boolean
value. For tf: ib=true:means password txt field.
For Panels:ib=true: means scrollable.
For Menu's ib=true:MainMenu ib=false:ContextMenu.
You need to state ib value for the root menu of each group only.
Additionally you may include (cus), (cui) and/or CUS[] to set
default return values (See Remark concerning "Update Var's" above.
REMARK: See
"Common Output" for var's which are reset befor return.
Controls' setup:
REMARK: See "Common Output" for var's which are reset befor return.
sB: USE: Set bounds
IN: j,k,i,o=horiz, vert location & width, height
sA: USE: Set anchor
IN: cas=one or more of: n/s/e/w (the 4 directions)
sD: USE: Set dock
IN: cds=one only of: n/s/e/w or cds="f": fill.
sC: USE: Set color
IN: cls=Background-Foreground compound code
sF: USE: Set font
IN: fns=Font
sc: USE: Set rich text current color IN: cls=color
sf:
USE: Set rich text current font IN: fns=Font
sg: USE: Set background image IN: ims=Image
file name or ims="b":use (bip)
st: USE: Set tool tip
IN: cts=tooltip text.
sn: USE: Set TAB order IN: id=TAB order
for the comp. id=-1: Skip it
sl: USE: Set component label IN: cis=Label text.
sL:
USE: Set Add to list for multi-item controls IN: CIS[]=Items to add.
sa: USE: Set label alignment
IN: os=c/e/w/n/s/ne/nw/se/sw.
su: USE: Set (Force) an update value
IN : For tf,ta: cus=Update String. For cb, rb: cus="1" or "0" meaning
that the button should be selected or deselected.
For ch, (single select)ls: cui=Order of item to be selected.
For (Multiple select)ls:CUS[]. Each row contains "1" or "0" to
select or deselect its corresponding item.
For
bt: Calling cm("su") clicks the button (no value to supply)
sb: USE: Set bool value IN: ib=value
Meaning depends on control type.
for tf's ib=true:
means pswrd tf. (char's replaced with "*"'s)
for ls's ib=true: means Multi-selection ListBox.
for pn's ib=true: means Auto-Scroll Panel.
se: USE: Set editability IN: ob=value. For tf',ta,rt
ob=true: Rd only txt
sE: USE: Enable/Disable a control IN: jb=true: means Enable control.
sx:
USE: Set focus.
Reading Control's data:
gu: USE: Get last update (See Remarks)
OUT: cus=Current status, cui=index selected, CUS[]=cus for all elements
ge: USE: Get component
editability OUT: ob=true: Read only. For (tf,ta,rt)
gx: USE: Get focus status. True if focusd
OUT:ob
Other Operations done on Controls:
O: USE: Returns a reference to the control
object whose keyname is
supplied. The name of
the reference var returned is the present
object
name for the control type. Example: if cs="bt0" was
supplied, (btp) will be made a reference to bt0's object.
IN: cs=control's key
name
t: USE: Activate / Deactivate tooltTip
IN: ob=true: Activate it.
Operations done on Form:
REMARK: Whenever Form is resized, the default graphical device bitmap
(bio) is
automatically scaled to match it in size.
ft: USE: Set Form's title.
IN: os=Title's text
fv: USE: Make form visible/invisible.
IN: ib. ib=true: make invisible
fe: USE: Eliminate Form. Console will then be used for input &
output.
fcb: USE: Set form's background color. IN: cls=Color code
fcf:
USE: Set form's foreground color. IN: cls=Color code
ff: USE:
Set form's font.
IN: fns=Font code
fi: USE: Draw form's Background Image. IN: ims=Image
file.
fa: USE: Turn AutoScroll feature on/off. IN: ib. ib=true: turn it on.
fam:
USE: Set AutoScroll margins. IN: j=Horiz margin, k=Vertical
fs:
USE: Resize form to specified size. IN: j=new width, k=new height
fsf: USE: Resize
form to fill the screen.
fwc: USE: Get ClientSize Width.
OUT: of=Width in pixels.
fhc USE: Get ClientSize Height.
OUT: of=Height in pixels.
fws: USE: Get max (full screen) Width.
OUT: of=Width in pixels.
fhs: USE: Get max (full screen) Height. OUT: of=Height
in pixels.
fmm: USE: Attach a main menu to form's top. IN: cms=MainMenu key name.
fmc:
USE: Show Context menu at a location on form.
IN: cms=ContextMenu key name, j,k=Coordinates to show at.
Displaying Dialogs:
d: USE: Display text in (os) into display
dialog. Also returns a code
into (os) indicating
which button user has clicked.
IN: os=text to display js=Dialog title.
oc=Dialog's icon. can be:
(none/x/?/!/i), oc='
': means use (none)
ks=Keys selection. Can be (o/oc/ari/ync/yn/ri)
Meanings: o=okey
oc=okey & cancel ari=abort,retry
& ignore ync=yes,no & cancel
yn=yes &
no ri=retry & ignore ks="" means use (o).
OUT: os, os=(o/c/a/r/i/y/n) Meaning: User has clicked the button:
(ok/cancel/abort/retry/ignore/yes/no)
dfo: USE: Display Microsoft's "Open File" dialog and
obtain the name of the
file user has selected.
OUT: os=File name.
dfs: USE: Display Microsoft's "Save File" dialog and
obtain the name of the
file user has selected.
OUT: os=File name.
dtc: USE: Display Microsoft's "Color Selection" dialog
and obtain a
reference to the selected Color object.
OUT: clp=Color object ref.
dtf: USE: Display Microsoft's "Font Selection" dialog
and obtain a
reference to the selected Font object.
OUT: fnp=Font object ref.
_______________________________________________________________
dm()
=========
CONTAINING CLASS: pcs and pasp.
USE: Default applet's constants setup
COMMON INPUT: ls = mode
COMMON OUTPUT: (i,j,k)
based GUV's reset.
REMARKS: (1) If you call this method at modes "hg" or "hb" from method
init() before executing [base.init();], the values you supply
override the original default values.
MODES:
hg: USE: Sets the highest number of elements
a general use array can
handle.
IN: o = highest number allowed. A value of (o=0) sets the
original default number of (100) back
hb: USE: Sets the highest number of elements
byte or char general use
arrays can handle.
IN: o = highest number allowed. A value of (o=0) sets the
original default number of (1000) back (see Remark 1)
ht: USE: Sets the highest number of threads
which can be created.
IN: o = highest expected number. A value of (o=0)
sets the
original default number of (10) back (see
Remark 1)
ti: USE: Sets the default text input device
from which user's
texetual input is read.
IN: os = device code. Default value: "s". Possible values are:
s = System screen (Consol)
t = Text Screen input.
File name = A file you create, containing all
input necessary for your program in sequence.
to: USE: Sets the default text output device
to which all texetual
output is sent, unless specified.
IN: os = device code. Default value: "s". Possible values
are:
s = System screen (Consol)
t = Text Screen (A RichTextBox) created and managed
by PC#)
File name = A file to write all textual output to. If it does not
exist, will be created. If it exists, will be erased first.
p: USE: Get one of the initial parameters
(Arg's)
REMARK: Param numbers start by 1. (i=0) returns program name.
IN: i=param. number.
OUT: os=Param. value.
pc: USE: Get initial parameters count
OUT: o=Count.
REMARK: Minimum count is 1 since program name is always available
as parameter number zero.
Operations done on Console:
REMARK: Console width is the max number of char's per line.
Console height is the max number of lines it can contain.
ccb: USE: Set Console's background color.
IN: cls=Color code
ccf: USE: Set Console's foreground color. IN: cls=Color code
cs:
USE: Resize Console to specified size. IN: j=new width, k=new height
csf: USE: Resize Console
to fill the screen.
cwc: USE: Get Console's Current Width.
OUT: o=Width.
chc USE: Get Console's Current Height. OUT: o=Height.
cws:
USE: Get max (full screen) Width. OUT: o=Width.
chs: USE: Get
max (full screen) Height. OUT: o=Height.
_____________________________________________________________________________
fm()
=========
CONTAINING CLASS: pcs and pasp.
USE: Filing
COMMON INPUT: is = mode fls = File actual
name.
COMMON OUTPUT: (i,j,k) based GUV's reset.
REMARKS: (1) When you open a Sequencial Access File (SAF) you supply
the
file actual name in (fls) & file keyname
like "sf0" in (fs)
When you do any other operation
on the file, you supply the
keyname only.
Method fm() will obtain (fls) and other
informations
regarding the files from its own archives.
(2) When you open a Random
Access File (RAF) you do the same except
that reference
name in this case must start with "rf", like "rf0",
"rf1"
and "rf8".
(3) Maximum number of files
allowed is 90 (total). However, you can
select keynames
in the range (sf0:sf89) for your SAF's and any
keynames
in the range (rf0:rf89) for your RAF's.
(4) The boolean value (dnb)
"operation done indicator" is used
in filing to indicate
that "end of file" has been reached. So, it
should
be checked immediately after any read operation. If
found to be (true), there will be no more data to read.
(5) Remember to double the
back slashes in file names. C# uses the '\'
to identify
some special characters. For this reason, it expects
you to supply "\\" to mean "\". For example if your file path
was "C:\x.txt", supply its name as (fls="c:\\x.txt;)
GENERAL OPERATIONS ON FILES:
============================
MODES:
.: USE: Return current folder name in (os)
OUT: os
A: USE: Obtains file attributes.
IN: fls
OUT: os = one char (file attributes)
The character could be:
'space' = File name does
not exist.
'd' = Found to be a directory.
'f' = Found to be a File.
M: USE: Makes(create) a new file/directory.
IN: fls = file/directory name ks=type ks="f": File ks="d": Directory
C:
USE: Copy one file to another. Not for folders.
IN: fls = Source file name
os=Destination file name.
REMARK: If dest. file or directory exists, will always
overwrite.
D: USE: Delete File or Directory.
IN: fls = file/directory name ks=type ks="f": File ks="d": Directory
L: USE: Get File List (Dir)
IN: fls = directory name followed with "\\"
ks="d": Get sub-directories only. ks="f" (default): Get files only
OUT:
OS[100] containing the list.
O: USE: Get File Stream Object for a file
IN : fs=File Keyname OUT:fsp=Present FileStream Object ref.
s: USE: Access file search & browsing
IN: fls=Name of file to be searched fs=ref name (like "sf5")
c5=Last char. read.Supply "c5=-1" in 1st statemnt only to open file
js=String to skip ks=String to stop reading immediately before
j=Number of (js)'s to skip. If (js="" & ks="")
it
means number of char's to skip.
OUT: os=String starting after last (js) and
ending before start of (ks)
REMARKS: (1) If ks="", os="". File pointer will
move to desired
position
only which is immediately after (js).
(2) If js="", os=String starting at file pointer and ending
before the start of (ks)
(3) If (js="" & ks=""),os="". File pointer moves by (j) char's
SEQUENCIAL ACCESS FILES (SAF's):
================================
MODES:
or: USE: Opens a file for read only.
IN: fls=file name fs=ref name (like "sf0")
OUT: dnb=true: File is
empty. EOF reached.
oa: USE: Opens a file for append.
IN/OUT: Same as "or".
ow: USE: Opens a file for Read/Write. IN/OUT:
Same as "or".
rl or r:USE: Reads text line.
OUT: os, dnb=true: last data on file
ra: USE: Read all file.
OUT: os, dnb=true: last data on file
rb: USE: Read one byte.
OUT: o,os, dnb=true: last data on file
w: USE: Write text word.
IN: os
wl: USE: Write text line. IN: os
wb:
USE: Write byte IN: o
c: USE: Closes an open file.
RANDOM ACCESS FILES (RAF's):
============================
REMARKS: (1) RAF's can be with/without a header. To open a file without a
header you set ib=true and enter record length in (rcl) before
opening it. Your data starts at record zero in this case.
(2) RAF's
with headers, contain all necessary information about how to
read their records and fields at record zero. You don't need to
supply record length except when you write the header. Your
data starts at record 1.
(3) To start a RAF with header, open it as "no
header RAF", write the
header information and
close it. From this point up, the file will
know
how to read itself automatically.
MODES:
o: USE: Opens a file for Read/Write. If
unavailable, will be created.
IN: fls=file name fs=ref name (like
"rf0") ib=true: Open as a no
header
file. rcl=Record length (necessary only when ib=true)
OUT: dnb=true: File
is empty. EOF reached.
r: USE: Reads data for one record.
IN: rci=Record number.
OUT: rcs=record data in a string form.
dnb=true: last data on file
OS[],OD[]=Field data
(for RAF's with headers only)
REMARK: If field no. x is a string, OS[x] contains
the data and OD[x]=0
If field
no. x is numeric, OD[x] contains the data and OS[x]=
contains the same data in a string form formatted according to
field specs.
rh: USE: Read header record.
OUT: rcl=Record Length OS[],OD[]=Field names and types.
w: USE: Write a record.
IN: rci=record number, rcs=record data (for RAF's without headers) or
OS[],OD[]=Field data (for RAF's with headers) See Remark at mode"r"
wh: USE: Write header data. File must be opened
as "no header RAF" to use
this mode.
IN: OS[] containing field names in orde, OD[] containing field type
codes in order.
REMARK: Here is how to find the field type code (od) for a field:
(1) If the field was numeric with (n) decimal digits, od=n/10
So, for an integer od=0 and for a 2 decimal digit number, od=0.2
(2) If the field was a string of (n) characters, od=n
So, for a field which can occupy a max space of 35 bytes, od=35
c: USE: Closes an open file.
_____________________________________________________________________________
gm()
=========
CONTAINING CLASS: pcs and pasp.
USE: Graphics
COMMON OUTPUT: (i,j,k) based GUV's, o, of, od, ob, ad are reset.
REMARKS: (1) At startup, all graphics are rendered to (bio), "the default
graphical device" which is a transparent bitmap object, equal to
the form in size. (bio) is automatically drawn to the form
whenever it receives new graphics unless you turn the
auto-display mode off. It is also drawn to the form automatically
when the form is minimized then restored.
(2) At any point of
your program, you can create a bitmap object and
set it to be your "graphical output device", replacing the
"default graphical output device".
From this point
up, any drawing you do will be done on the new
bitmap surface until you change setup back to the default.
(3) You may use either
cartisian or polar coordinates for defining
all
locations. All measurments are relative to Form,s center.
X values go up as objects move to the right. Y values go up as
objects move up. Angles are positive when rotations are in the
anti-clockwise direction.
Cartisian: (jf,kf) =
x,y values of object's center relative to
Form's center.
Polar: jf = radius kf = angle
between radius and the x-axis in
degrees (0:360)
kb = coordinate flag. kb=true means "polar".
(4) Shape objects are
actually a "GraphicsPath" object to which the
shape has been added. (gpp) is always a reference to the present
shape object.
MODES:
GENERAL:
d: USE: Display whatever is on the default
bitmap. You don't need to use
this mode unless
you have turned auto-display feature off
(see
next)
dn: USE: Turn on / Turn off auto-display (Toggles)
When auto-display is
turned off, you can display
whenever you want with gm("d") Also
you can turn
auto display back on by calling gm("dn") for the
second time. The reason you may need to turn auto-display off
is speeding up the execution of your program and prevention of
flickering during the formation of the drawing.
O: USE: Get references to all related
objects (See Pc# Reference)
e: USE: Erase Present Graphical Output
Device keeping it transparent.
ec: USE: Erase Present Graphical Output Device and paint it with
a single
color.
IN : cls=single color code.
GRAPHICAL SETUPS:
sps: USE: Create solid paint pen and brush objects.
IN : cls=Single color code. i=Pen/Brush width in pixels, default=1
OUT: Solid Pen and Brush created, refrenced to by spp & sbp
spl: USE: Create Linear Gradient paint brush object.
IN : cls=two color's code.
gpp=GraphicsPath object
containing the shape to be painted
ad=Angle in
degrees at which gradient runs accross shape
OUT: Linear Gradient Brush created,
refrenced to by lgp
spr: USE: Create Radial Gradient paint brush object.
IN : cls=two color's code.
gpp=GraphicsPath object
containing the shape to be painted
OUT: Radial Gradient Brush created, refrenced
to by rgp
spt: USE: Create Texture paint brush object.
IN : bip=Present Bitmap Image object.
OUT: Texture Brush created, refrenced
to by tbp
sdd: USE: Set the default display bitmap (bio) to
be the Graphical output
device.
sdb: USE: Set the present bitmap object (bip) to be
the Graphical output
device.
ss: USE: Set the Stroke. Defines how lines terminate,
how line joints
look like and the type of lines.
IN: string (sts) containing 3 char's as follows (default: sts="rrs"):
First char is the "End Cap Style Code" which can be:
b=butt s=square r=round
Second char is the "Join Style Code" which can be:
b=bevel m=miter r=round
Third char is the "Line Type Code" which can be:
s=solid d=dashed t=dotted b=both, dashed & dotted
sq: USE: Set graphics Quality. Defines how to
perform each of the
following 4 operations:
t=text rendering s=smoothing c=composting i=interpolation
Each operation can be done as:"Default", "low quality-high speed"
or "high quality-low speed".
IN: js (0:4 chars long)=Concatenation of
char's which represent the
operations
to be performed at low quality-high speed.
ks
(0:4 chars long)=Concatenation of char's which represent the
operations to be performed at high quality-low speed.
Operations which are not listed in either js or ks will be
performed at default quality.
EXAMPLE: js="c";ks="ti";gm("sq"); will cause "Compositing"
to be done
at low quality,
"Text rendering" & "Interpolation" to be done
at high quality and "Smoothing" to be done at default quality.
REMARK: All options
are automatically selected to be done at
high quality-low speed. So, you need to access this mode only
if you like to lower the quality of performing some operations.
stu: USE: Set unit's Affine Transform.
IN : jf,kf=Original location of object to be transformed
lf,of=New location relative to original location (not relative to center)
jd,kd=Horizontal, vertical scale factors
id,od=Horizontal, vertical shear factors
ad=Rotation angle in degrees. Rotation is around object's center.
ib,ob:If you want created Transform to concatenate with original (utp),
set either (ib=true) causing new transform to be applied first
or (ob=true) causing original transform to be applied first.
ib=ob=false cause new transform to replace original one.
OPERATING ON THE PRESENT GRAPHICS PATH OBJECT (gpp):
Creating new Shape (GraphicsPath) objects:
General parameters for creating all objects (unless specified):
IN: (jf,kf) = Center location relative to form's center.
(lf,of) = Object's width and height.
(id,od) = Shear factors (if desired)
ad =
Rotation angle (if desired)
REMARK: Adding 'd' to the end of the mode string means "draw object".
Addind 'f', means "draw and fill object".
OUT: gpp = Present
Graphics Path object reference.
ca: USE: Create new Arc object.
IN: jf,kf,lf,ofas expected and (jd,kd) = (Start angle, Arch angle)
cl: USE: Create new Line object.
IN: (jf,kf)=start point coordinates (lf,of)=end point coordinates
cr: USE: Create new Rectangle object.
IN: jf,kf,lf,of.
ce: USE: Create new Ellipse object.
IN: jf,kf,lf,of.
ct: USE: Create new Text object.
IN: (jf,kf) , fns = Font.
cp: USE: Create new Graphics Path object.
IN: JF[], KF[]=X,Y coordinates for all points relative to Path's center
j,k=Coordinates of Path's center relative to form's center
OF[] = Curvature of the connection between each 2 points. Zero
indicates a line. smaller value means more flat curve.
c=: USE: Create Equal sided object.
IN: (jf,kf) = Coordinates of containing circle's center
of = Containing circle's diameter.
lf = Number
of sides.
ci: USE: Get Image from file and draw it.
IN: fls=Image file name.
Transforming and rendering (gpp):
COMMON INPUT / OUTPUT: gpp: Present GraphicsPath object.
grd USE: Render-draw (gpp) as is to present graphical
output device.
grf USE: Render-fill (gpp) as is to present graphical output device.
gt
USE: Transform (gpp) applying present Unit Affine Transform (utp) and
make (gpp) the reference of the resulting object.
IN: utp: Present "Unit's Affine
Transform" object.
gtd USE: Do the same as in mode "gt" then draw the resulting (gpp)
IN: utp: Present "Unit's Affine Transform" object.
gtf USE: Do the same as in mode "gt" then draw-fill
the resulting (gpp)
IN: utp: Present "Unit's Affine Transform" object.
grs
USE: Render-fill (gpp) using 3D Special effects
IN: ks=Special Effect type.
ks="r": Reflection ks="d": Depth.
For (Reflection) only: cls=Single Color code.
of=Brightness factor (1:5) default:2.5
For (Depth) only:
cls="Brightest-Darkest" double color code
id=Depth in Pixels, ad=Shear angle.
Obtaining measurments for (gpp):
COMMON INPUT: gpp: Present GraphicsPath object.
COMMON OUTPUT:
os: The type "float" value returned. Note that we could not
use (of) instead since method gm() uses (of) for input.
gw USE: Return the width of the containing rectangle
of (gpp) in (os)
gh USE: Return the height of the containing rectangle of (gpp) in (os)
gx
USE: Return the x-value of the top left corner of the containing
rectangle of (gpp) relative to the output device's center.
gy USE: Return the y-value of the top
left corner of the containing
rectangle of (gpp) relative
to the output device's center.
Using (gpp) as Form's Clip Area:
gc Make the (gpp) Form's clip
area.
OPERATING ON THE PRESENT BITMAP OBJECT (bip):
Creating new (bip):
bn USE: Create a new Bitmap object and assign
its reference to (bip)
IN : lf,of=Width, Height
blf USE: Load
Image file and create (bip) from the resulting image object.
IN: fls: Image
file name
lf,of=Wanted size. lf=of=0 means full scale
Modifying (bip):
bb USE: Blur (bip) This operation is slow. Use
blur factors in the
range 1:5 only.
IN: k=Blur factor
Transforming and rendering (bip):
COMMON IN: bip: Present Bitmap object.
jf,kf: Desired (bip)'s center location relative to form's center.
br USE: Render (bip) to the graphical output
device as is.
brt USE: Render (bip) to the graphical output device while applying the
current Unit's AffineTransform (utp) to the object.
IN: utp: Present "Unit's
Affine Transform" object.
Saving (bip) into file:
COMMON IN: fls=File name.
bsb USE: Save (bip) into "bmp" file.
bse
USE: Save (bip) into "emf" file.
bsx USE: Save (bip) into "exif" file.
bsg USE: Save (bip) into
"gif" file.
bsi USE: Save (bip) into "icon" file.
bsj USE: Save (bip) into "jpeg" file.
bsm
USE: Save (bip) into "MemoryBmp" file.
bsp USE: Save (bip) into "png" file.
bst USE: Save (bip)
into "tiff" file.
bsw USE: Save (bip) into "wmf" file.
PRINTING:
pn USE: Initialize for a new document to be printed.
Obtaining Page measurments:
All measurments are in (1/100)th of an inch.
pgx USE: Get Left margin, assign it to (os)
OUT:os
pgy USE: Get Top margin, assign it to (os)
OUT:os
pgw USE: Get Margin Bounds' Width, assign it to (os)
OUT:os
pgh USE: Get Margin Bounds' Height, assign it to (os)
OUT:os
pgt USE: Get Total Line/Page, assign it to (os) IN:fns=Font Code OUT:os
Printer Setup:
psc USE: Set "Color"-"B/W" setup.
IN:ib=flag, ib=true means "in color"
psl USE: Set "Landscape" flag
IN:ib=true means "use Landscape"
psf USE: Set "Print to File" option. IN:ib=true means "Print to
file"
psn USE: Set Number of Copies. IN:o=number of copies
wanted.
pst USE: Set Collate option. IN:ib=true
means "Collate output"
psr USE: Set Page range.
IN:(j,k)=(From,To) page numbers
psp USE: Set Printer Name.
IN:os=Printer Name
psd USE: Set Document Name.
IN:os=Document Name
psm USE: Set Margins (in inches) IN:j,k,i,o=left, right,
top, bottom
psg USE: Use Show Page Setup dialog to allow user selection.
psi USE: Use Show Print
Information dialog to allow user selection.
Print:
prb USE: Print the present Bitmap object (bip)
IN : jf,kf=Location of (bip)'s center relative to paper's center
lf,of(optional)=size to scale to. Default:full size.
REMARK: jf,kf,lf,of are in (1/100)th
of an inch units.
prt USE: Print contents of Text Array OS[]
IN:OS[]=Text Array, oi=Number of text rows, fns=Font code
prf USE: Print a Text File.
IN: fls=Text File Name fns=font code
____________________________________________________________________________
n()
=========
CONTAINING CLASS: pcs and pasp.
USE: Networking
COMMON OUTPUT: (i,j,k) based GUV's reset.
MODES:
HTTP Protocol:
hg: USE: Sends query / receives data using HTTP
protocol, method "GET".
REMARK: (1) You may add a query string to (urs). To
do so, add "?" at
its end followed with "var1=data1&var2=data2&..."
(2) jb,kb are used to allow/disallow the option of eliminating
html and other tags around data in order to make data more
visible.
IN: urs=URL including query if necessary.
ib = Expected data type indicator. ib=false: text ib=true: binary
jb = true: Replace each pair of brackets (< >) & all enclosed
char's with one '|'
kb = true: Replace each pair of
braces ({ }) & all enclosed
char's with one '|'
OUT: os (if text), OY[] (if binary)
FTP Protocol:
COMMON INPUT: urs: FTP address which starts with "ftp://" and ends with
the
file or
directory which you like to operate on.
Example: urs="ftp://ftp.microsoft.com/developr/Readme.txt"
ids: Your User ID.
pss: Your Password.
fls: Name of the source local file in case you are uploading or
name of the destination local file in case you are
downloading.
COMMON OUTPUT: os: FTP status which shows operation success or failure.
fmd: USE: Makes (Creates) a new directory at a remote
FTP server.
fdd: USE: Deletes (Removes) a directory at a remote FTP server.
fdf:
USE: Deletes (Removes) a file at a remote FTP server.
fgf: USE: Gets (Downloads) a file from remote FTP
server.
fpf: USE: Puts (Uploads) a file to a remote FTP server.
E-Mailing:
ms: USE: Send an e-mail message.
IN : uhs=SMTP (Outgoing) Mail Server address
ids,pss=User
ID and password. If server does not authenticate
outgoing mail, make ids=pss="".
js=Sender e-mail
address ks=Recipient e-mail address
os=Message Subject OS[]=Message Body
ib=Attachment flag. ib=true means attach file (in fls)
fls=Name of attachment file (only if ib=true)
mc: USE: Check for new messages.
IN : uhs=POP,ids,pss = (Incoming) Mail Server,User ID and password.
OUT: os=List
of new messages.
mr: USE: Retrieve one e-mail message.
IN : uhs=POP,ids,pss = (Incoming) Mail Server,User ID and password.
i=Number of the message to be retrieved (Starts with 1)
OUT: os=The wanted message.
md: USE: Delete one e-mail message.
IN : uhs=POP,ids,pss = (Incoming) Mail Server,User ID and password.
i=Number of the message to be deleted.
Low Levet TCPIP Communication:
to: USE: Open a new connection with server.
IN : uhs=Host name upi=Port number
tr: USE: Read server's response.
OUT: os=Received data o=Number of bytes received.
tw: USE: Write (send) a message to server.
IN : os=Message to be sent.
tc: USE: Close Connection with server.
O: USE: Get references to all related
objects (See Pc# Reference)
_____________________________________________________________________________
om()
=========
CONTAINING CLASS: pcs and pasp.
USE: Operations done on (os)
COMMON INPUT: ls = mode
COMMON
OUTPUT:
MODES:
Converting the string in (os) to other types:
ti: USE: Convert Integer number in (os) to int.
IN: os
OUT: o
tf: USE: Convert number in (os) to float.
IN: os
OUT: of
td: USE: Convert number in (os) to double.
IN: os
OUT: od
tb: USE: Convert boolean value in (os) to boolean.
IN: os
OUT: ob
tr: USE: Convert number in (os) to short.
IN: os
OUT: or
tl: USE: Convert number in (os) to long.
IN: os
OUT: ol
to: USE: Convert number in (os) to object.
IN: os
OUT: oo
ty: USE: Convert number in (os) to byte.
IN: os
OUT: oy
ta: USE: Convert concatenated txt lines + \n's
in (os) to array.
IN: os
OUT: OS[]=Text Lines, oi=number of lines
Converting from other types to (os):
fi: USE: Make int number in (os) from int (o)
(Converts (o) to (os)).
IN: o
OUT: os
ff: USE: Make number in (os) from float (of)
IN: of
OUT: os
fd: USE: Make number in (os) from double (od).
It allows you to choose
the number of decimal
digits which the resulting string contains.
IN: od = number to be converted
kd: format code = (desired number of decimal digits)/10
OUT: os
fb: USE: Make value in (os) from boolean value
(ob)
IN: ob
OUT: os
fr: USE: Make number in (os) from short (or)
IN: or
OUT: os
fl: USE: Make number in (os) from long (ol)
IN: ol
OUT: os
fo: USE: Make string in (os) from object (oo)
IN: oo
OUT: os
fy: USE: Make number in (os) from byte (oy)
IN: oy
OUT: os
fa: USE: Make composite string in (os) from
string array OS[]
IN: OS[]
OUT: os
Other operations performed on (os) or OS[]:
c: USE: Cleans (os) It removes all
special characters then trims (os) at
both
sides. You may use (jb) and/or (kb) to eleminate part(s) of
this operation as described below.
IN: os, jb="keep leading spaces" flag. If
(true) will keep leading
spaces if (false) will trim
(os) on both sides.
kb="keep special characters" flag.
If (true) will trim (os) only
without removing special
characters.
OUT: os , i,j,k based GUV's cleared.
m: USE: Inserts string (js) into (os)
at character number (j)
IN: os, js, j
OUT: os
r: USE: Replaces sub-string (js) of (os) with string (ks)
IN: os, js, ks
OUT: os
s: USE: Puts each of the sub-strings of
(os) which are seperated with a
special
character (oc) into a seperate row of array OS[].
Sub-strings are cleaned and trimmed unless you specify (kb=true).
IN: os=Composite string, oc=seperation character
kb=sub-string
cleanup flag. If (true) substrings will be kept as is
without removing non-text characters or (leading & trailing) spaces.
OUT:
OS[]=sub-strings, each in seperate row, oi=number of sub-strings
u: USE: Convert characters of (os) to
upper-case IN/OUT: os
l: USE: Convert characters of (os) to
lower-case IN/OUT: os
hta: USE: Convert Hashtable's key's & values to
arrays
IN: HTC=Current Hashtable object
OUT: KS[]=Keys OS[]=values
hfa: USE: Make Hashtable from key's & value arrays
IN: KS[]=Keys OS[]=values OUT:
HTC=Current Hashtable object
_____________________________________________________________________________
sm()
=========
CONTAINING CLASS: pcs and pasp.
USE: System handling
COMMON INPUT: ls = mode
COMMON OUTPUT: (i,j,k)
based GUV's reset.
MODES:
ge: USE: Get the value of an environment variable.
IN:js=var name OUT:os
gE: USE: Get all environment names(keys) & values.OUT:KS[]=Keys
OS[]=val's
gp: USE: Get PC# Version.
OUT:os
gv: USE: Get C# Version.
OUT:os
go: USE: Get Operating System Version.
OUT:os
gd: USE: Get Usr Domain Name.
OUT:os
gc: USE: Get Computer Name.
OUT:os
gu: USE: Get Usr Name.
OUT:os
gs: USE: Get Stack Trace.
OUT:os
gl: USE: Get Logical Drives.
OUT:OS[]
Date & Time:
REMARK: All the data you are getting can be for current date and time
or
for any date and time you choose.
If you want them for current date and time, supply os="".
If you want them for
a specific date, supply os="mm/dd/yyyy".
If you want them for a specific date
and time supply
js="hh:mm:ss" in addition to (os)
dd: USE: Get date as mm/dd/yyyy
IN:os (See Remark) OUT:os
dt: USE: Get time as hh:mm AM/PM
IN:os (See Remark) OUT:os
dw: USE: Get Weekday as Monday
IN:os (See Remark) OUT:os
dm: USE: Get Month name as January
IN:os (See Remark) OUT:os
dl: USE: Get long format of date
IN:os (See Remark) OUT:os
Long format as: Monday, January 02, 2006
e: USE: Exit to Command mode.
IN: i=Optional exit code number
_____________________________________________________________________________
tm()
=========
CONTAINING CLASS: pcs (all modes) and pasp (modes "d,dl,s" only)
USE: Text handling
COMMON INPUT: ls = mode
COMMON OUTPUT:
REMARKS: (1) This method sends its output to the default text output
device (toa) Also, at mode "i" it receives its input from the
default text input device (tia). Device assignments of (tia & toa)
can be set or changed using method dm() at modes "to" and "ti"
respectvely.
(2) The default mode
for this method is "dl". So tm(); is the same
as tm("dl");
MODES:
i: If (tia="t") or (tia="f"):
USE: Display the value contained into (os) to user, then get the line
of text he/she enters into (os) also and jump to the block number
requested in (bli). See remarks
IN: os = String to display to user.
bli = block number to jump to.
OUT: os = Line of text entered by user.
REMARKS: Always follow tm("i") with (return;)
If (tia="s"): Everything
is done in same manner except that there will
be no jump to a new block and
you need not to follow tm("i") with a
(return;)
d: USE: Display the value contained into
(os) and keep cursor on same line
IN: os = String to display. See remarks.
dl: USE: Display the value contained into (os)
then move cursor to nxt line
IN: os = Line of text to display. See remark
(2).
c: USE: Clear screen (Applies to both
text screen and Console)
g: USE: Get text (Applies to text screen
only)
OUT: OS[]=Text lines oi=Number of lines
flt: USE: Load plain text file into text screen
IN:fls=File name
flu: USE: Load unicode plain text file into text screen IN:fls=File name
flr: