|
From: <cod...@go...> - 2008-10-07 14:48:08
|
Author: M0...@gm...
Date: Tue Oct 7 07:42:40 2008
New Revision: 215
Modified:
branches/iVL/DevLog
branches/iVL/FrmUserAdd.class
branches/iVL/FrmUserAdd.form
branches/iVL/MdlUsrAdd.module
Log:
- User Add window is designed
Modified: branches/iVL/DevLog
==============================================================================
--- branches/iVL/DevLog (original)
+++ branches/iVL/DevLog Tue Oct 7 07:42:40 2008
@@ -1 +1 @@
-- Begin development in the user add section
\ No newline at end of file
+- User Add window is designed
\ No newline at end of file
Modified: branches/iVL/FrmUserAdd.class
==============================================================================
--- branches/iVL/FrmUserAdd.class (original)
+++ branches/iVL/FrmUserAdd.class Tue Oct 7 07:42:40 2008
@@ -24,6 +24,8 @@
WITH ME
.tlBanner.Text = "<h3>" & ("Create User Accounts") & "</h3>"
END WITH
+ WAIT 1
+ MdlUsrAdd.DISPLAY_USER_GROUP_OPTIONS()
END
@@ -95,18 +97,27 @@
.tlExp.Move(4, .hrSep.top + .hrSep.Height + 12, .hrSep.Width)
.TextLabel2.Move(4, .tlExp.top + .tlExp.Height + 8,
MdlObjSizer.get_object_width(.TextLabel2.text) * 2)
.tbUsername.Move(.TextLabel2.Left + .TextLabel2.Width +
4, .TextLabel2.top, .TextLabel2.Width * 1.75)
+
iboxleft = .tbUsername.Left
iboxwidth = .tbUsername.Width
- .TextLabel3.Move(4, .TextLabel2.top + .TextLabel2.Height +
4, .TextLabel2.Width)
+ .tlRealName.Move(4, .TextLabel2.top + .TextLabel2.Height +
2, .TextLabel2.Width)
+ .tbRealname.Move(iboxleft, .tlRealName.top, iboxwidth)
+ .TextLabel3.Move(4, .tlRealName.top + .tlRealName.Height +
2, .TextLabel2.Width)
.tbPasswd1.Move(iboxleft, .TextLabel3.top, iboxwidth)
- .TextLabel4.Move(4, .TextLabel3.top + .TextLabel3.height +
4, .TextLabel2.Width)
+ .TextLabel4.Move(4, .TextLabel3.top + .TextLabel3.height +
2, .TextLabel2.Width)
.tbPasswd2.Move(iboxleft, .TextLabel4.top, iboxwidth)
- .tlUserID.Move(4, .TextLabel4.top + .TextLabel4.Height +
4, .TextLabel2.Width)
+ .tlUserID.Move(4, .TextLabel4.top + .TextLabel4.Height +
2, .TextLabel2.Width)
.cbUserID.Move(iboxleft, .tlUserID.top, iboxwidth * 0.45)
.tbUsrID.Move(.cbUserID.Left + .cbUserID.Width + 4, .cbUserID.top,
iboxwidth - (.cbUserID.Width + 4))
- .bUsePic.Move(4, .tbUsrID.top + .tbUsrID.Height + 4,
MdlObjSizer.get_object_width(.bUsePic.Text) + 36)
+ .bUsePic.Move(4, .tbUsrID.top + .tbUsrID.Height + 8,
MdlObjSizer.get_object_width(.bUsePic.Text) + 36)
.tbPicPath.Move(4, .bUsePic.top + .bUsePic.Height +
2, .TextLabel2.Width + iboxwidth + 8)
+ '.tbPicPath.Move(4, .bUsePic.top + .bUsePic.height +
2, .tlBanner.Width - (.btBrowse.Width + 4))
.btBrowse.Move(.tbPicPath.Left + .tbPicPath.Width + 4, .tbPicPath.top,
MdlObjSizer.get_object_width(.btBrowse.text) + 36)
+ .fGroupSel.Move(4, .tbPicPath.top + .tbPicPath.Height + 4, .ClientW -
(.fGroupSel.Left * 2), .ClientH - (.fGroupSel.top + .Button1.Height
+ .Button1.height))
+ .Button1.Move(4, .fGroupSel.top + .fGroupSel.Height + 8,
MdlObjSizer.get_object_width(.Button1.Text) + 36)
+ .btClrFrm.Move(.Button1.Left + .Button1.Width + 4, .Button1.top,
MdlObjSizer.get_object_width(.btClrFrm.text) + 36)
+ '.pbUsrPic.Move(.tbUsername.Left + (.tbUsername.Width +
2), .tbUsername.top)
+ .pbUsrPic.Move(.btBrowse.Left + .btBrowse.Width, tbUsername.top)
@@ -157,5 +168,36 @@
PUBLIC SUB Form_Menu()
MdlUsrAdd.DISPLAY_USER_GROUP_OPTIONS()
+
+END
+
+PUBLIC SUB btBrowse_Click()
+'ClsGlobal.sTargetMnt = "/"
+ 'IF Dialog.OpenFile() THEN RETURN
+ Dialog.Title = ("Select picture for user Login")
+ Dialog.path = ClsGlobal.sTargetMnt &/ "usr" &/ "share" &/ "apps"
&/ "kdm" &/ "pics" &/ "users"
+ Dialog.Filter = ["*.png", "Picture Files", "*.jpg", "JPEG Graphics"]
+ IF Dialog.OpenFile() THEN RETURN
+ tbPicPath.text = Replace(Dialog.path, ClsGlobal.sSourceMnt, "")
+ ME.pbUsrPic.Picture = Picture[Dialog.Path]
+
+' END IF
+
+END
+
+PUBLIC SUB btClrFrm_Click()
+DIM cb AS CheckBox
+
+ WITH ME
+ .tbPasswd1.Clear
+ .tbPasswd2.Clear
+ .tbRealname.Clear
+ .tbPicPath.Clear
+ .tbUsername.Clear
+ END WITH
+ FOR EACH cb IN MdlUsrAdd.objGrps
+ cb.Delete
+ NEXT
+ MdlUsrAdd.DISPLAY_USER_GROUP_OPTIONS
END
Modified: branches/iVL/FrmUserAdd.form
==============================================================================
--- branches/iVL/FrmUserAdd.form (original)
+++ branches/iVL/FrmUserAdd.form Tue Oct 7 07:42:40 2008
@@ -4,22 +4,16 @@
MoveScaled(0,0,76,67)
Text = ("")
{ tlExp TextLabel
- MoveScaled(3,12,55,8)
+ MoveScaled(1,9,55,8)
Text = ("Choose a unique name for each user. Enter the password for
twice for accuracy. You can make as many users as you want, and when you
are finished click next to continue.")
}
{ tbUsername TextBox
- MoveScaled(23,20,15,3)
+ MoveScaled(16,18,15,3)
Text = ("")
}
- { TextLabel2 TextLabel
- MoveScaled(2,21,12,3)
- Text = ("Username")
- Alignment = Align.Normal
- }
- { TextLabel3 TextLabel
- MoveScaled(2,24,16,3)
- Text = ("Enter Password")
- Alignment = Align.Normal
+ { tbRealname TextBox
+ MoveScaled(17,21,15,3)
+ Text = ("")
}
{ tbPasswd1 TextBox
MoveScaled(16,24,16,3)
@@ -31,29 +25,8 @@
Text = ("")
Password = True
}
- { TextLabel4 TextLabel
- MoveScaled(2,27,14,3)
- Text = ("ReEnter Password")
- Alignment = Align.Normal
- }
- { Button1 Button
- MoveScaled(1,63,14,1)
- Text = ("Create User")
- }
- { tlBanner TextLabel
- MoveScaled(1,2,55,4)
- Text = ("")
- }
- { hrSep Separator
- MoveScaled(30,8,12,1)
- }
- { tlUserID TextLabel
- MoveScaled(2,31,12,3)
- Text = ("User ID")
- Alignment = Align.Normal
- }
{ cbUserID ComboBox
- MoveScaled(16,31,16,2)
+ MoveScaled(16,31,16,3)
Text = ("")
ReadOnly = True
List = [("Auto"), ("Manual")]
@@ -81,5 +54,51 @@
{ fGroupSel Frame
MoveScaled(2,44,69,17)
Text = ("User Rights Management")
+ }
+ { Button1 Button
+ MoveScaled(1,63,14,3)
+ Text = ("Create User")
+ Picture = Picture["icon:/16/add"]
+ }
+ { btClrFrm Button
+ MoveScaled(17,63,12,3)
+ Text = ("Clear Form")
+ Picture = Picture["icon:/16/clear"]
+ }
+ { TextLabel2 TextLabel
+ MoveScaled(2,18,12,3)
+ Text = ("Username")
+ Alignment = Align.Normal
+ }
+ { TextLabel3 TextLabel
+ MoveScaled(2,24,16,3)
+ Text = ("Enter Password")
+ Alignment = Align.Normal
+ }
+ { TextLabel4 TextLabel
+ MoveScaled(2,27,14,3)
+ Text = ("ReEnter Password")
+ Alignment = Align.Normal
+ }
+ { tlBanner TextLabel
+ MoveScaled(1,2,55,4)
+ Text = ("")
+ }
+ { hrSep Separator
+ MoveScaled(30,8,12,1)
+ }
+ { tlUserID TextLabel
+ MoveScaled(2,31,12,3)
+ Text = ("User ID")
+ Alignment = Align.BottomLeft
+ }
+ { pbUsrPic PictureBox
+ MoveScaled(58,21,8,8)
+ Stretch = True
+ }
+ { tlRealName TextLabel
+ MoveScaled(2,21,12,3)
+ Text = ("Real Name")
+ Alignment = Align.Normal
}
}
Modified: branches/iVL/MdlUsrAdd.module
==============================================================================
--- branches/iVL/MdlUsrAdd.module (original)
+++ branches/iVL/MdlUsrAdd.module Tue Oct 7 07:42:40 2008
@@ -22,45 +22,66 @@
DIM i AS Integer
DIM sLabel, sComment, sToolTip AS String
DIM cb AS CheckBox
-DIM x, y AS Integer
+DIM x, y, htotal AS Integer
+DIM bdefval AS Boolean
objGrps = NEW Object[]
sGrpArr = Split(sGrpList, ",")
+
+y = 24
+x = 4
FOR i = 0 TO sGrpArr.Count - 1
sLabel = Trim(sGrpArr[i])
SELECT CASE sLabel
CASE "cdrom"
sComment = ("This user can access CD/DVD devices")
+ bdefval = TRUE
CASE "floppy"
sComment = ("This user can access floppy disks")
+ bdefval = TRUE
CASE "lp"
sComment = ("This user is allowed to print")
+ bdefval = TRUE
CASE "scanner"
sComment = ("This user can access scanner devices")
+ bdefval = TRUE
CASE "audio"
sComment = ("This user is allowed to change audio settings")
+ bdefval = TRUE
CASE "video"
sComment = ("This user is allowed to change video settings")
+ bdefval = TRUE
CASE "game"
sComment = ("This user is allowed to play restricted games")
+ bdefval = TRUE
CASE "adm"
sComment = ("Restricted administrator (backup)")
+ bdefval = FALSE
CASE "sys"
sComment = ("This user is a system administrator")
+ bdefval = FALSE
CASE "wheel"
sComment = ("Elite user")
+ bdefval = FALSE
END SELECT
- x = 4
- y = 12
+ 'x = 4
+ IF htotal > FrmUserAdd.width THEN
+ x = 4
+ y = y + 24
+ htotal = x
+ END IF
+ 'y = 12
cb = NEW CheckBox(FrmUserAdd.fGroupSel)
WITH cb
.text = sLabel
- .Value = FALSE
- .Height = 18
+ .Value = bdefval
+ .Height = 21
.Width = MdlObjSizer.get_object_width(.text) + 24
.Move(x, y)
.ToolTip = sComment
- y = y + 4
+ 'y = y + cb.Height
+ x = x + 100
+ htotal = htotal + x
END WITH
objGrps.Add(cb)
'y = y + cb.Height + 4
|