minibits-cvs Mailing List for MiniBits
Status: Alpha
Brought to you by:
rmhw_uk
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(53) |
Sep
(29) |
Oct
|
Nov
|
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(186) |
Feb
(97) |
Mar
|
Apr
|
May
|
Jun
(242) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
|
From: Rob W. <rm...@us...> - 2004-11-23 16:39:03
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27770 Modified Files: Versions.txt PermissionAdminControl.cs FunctionPermission.cs frmPERDEL.cs frmPERADD.cs Log Message: UPEADD - PrincipalType not filled - Ref DA1071828 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.449 retrieving revision 1.450 diff -C2 -d -r1.449 -r1.450 *** Versions.txt 23 Nov 2004 15:53:52 -0000 1.449 --- Versions.txt 23 Nov 2004 16:38:51 -0000 1.450 *************** *** 447,449 **** 0.1.447 checkPermission - Add - Ref DA880937 0.1.448 PermissionAdminControl - Behaviour when adding - Ref DA1071810 ! 0.1.449 AuthenticatedPrincipal - Behaviour when adding permission - Ref DA1071814 \ No newline at end of file --- 447,450 ---- 0.1.447 checkPermission - Add - Ref DA880937 0.1.448 PermissionAdminControl - Behaviour when adding - Ref DA1071810 ! 0.1.449 AuthenticatedPrincipal - Behaviour when adding permission - Ref DA1071814 ! 0.1.450 UPEADD - PrincipalType not filled - Ref DA1071828 \ No newline at end of file Index: frmPERADD.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmPERADD.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** frmPERADD.cs 20 Jun 2004 21:53:41 -0000 1.7 --- frmPERADD.cs 23 Nov 2004 16:38:51 -0000 1.8 *************** *** 60,64 **** theControlData["Function"].ToString(), thePrincipal, theControlData["PermType"].ToString(), ! false); // Write to the db --- 60,65 ---- theControlData["Function"].ToString(), thePrincipal, theControlData["PermType"].ToString(), ! false, ! theControlData["PrincipalType"].ToString()); // Write to the db Index: PermissionAdminControl.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/PermissionAdminControl.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PermissionAdminControl.cs 23 Nov 2004 15:46:55 -0000 1.12 --- PermissionAdminControl.cs 23 Nov 2004 16:38:51 -0000 1.13 *************** *** 937,940 **** --- 937,941 ---- fields.Add(new DataField("Permitted","System.String")); fields.Add(new DataField("Function","System.String")); + fields.Add(new DataField("PrincipalType","System.String")); // Create a new data table *************** *** 962,965 **** --- 963,967 ---- theRow["Permitted"] = thePrincipal.Name; theRow["Function"] = thePermission.Function; + theRow["PrincipalType"] = thePermission.PrincipalType; // Add the row to the table Index: FunctionPermission.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/FunctionPermission.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FunctionPermission.cs 20 Jun 2004 21:53:41 -0000 1.4 --- FunctionPermission.cs 23 Nov 2004 16:38:51 -0000 1.5 *************** *** 14,17 **** --- 14,18 ---- private String type = null; private bool readOnly = false; + private String principalType = null; #endregion *************** *** 73,76 **** --- 74,88 ---- } } + public string PrincipalType + { + get + { + return principalType; + } + set + { + principalType = value; + } + } #endregion *************** *** 85,90 **** /// <param name="readOnly">Flag showing whether this is a read-only /// permission</param> public FunctionPermission(String id, String function, DBPrincipal principal, ! String type, bool readOnly) { this.function = function; --- 97,103 ---- /// <param name="readOnly">Flag showing whether this is a read-only /// permission</param> + /// <param name="principalType">User or group.</param> public FunctionPermission(String id, String function, DBPrincipal principal, ! String type, bool readOnly, String principalType) { this.function = function; *************** *** 93,96 **** --- 106,110 ---- this.readOnly = readOnly; this.id = id; + this.principalType = principalType; } *************** *** 103,108 **** /// <param name="type">Indicates whether this is an allow or deny /// permission.</param> public FunctionPermission(String function, DBPrincipal principal, ! String type) { this.id = id; --- 117,123 ---- /// <param name="type">Indicates whether this is an allow or deny /// permission.</param> + /// <param name="principalType">User or group.</param> public FunctionPermission(String function, DBPrincipal principal, ! String type, String principalType) { this.id = id; *************** *** 110,113 **** --- 125,129 ---- this.principal = principal; this.type = type; + this.principalType = principalType; } *************** *** 118,126 **** /// <param name="function">Name of the function</param> /// <param name="principal">Principal the permission applies to</param> ! public FunctionPermission(String function, DBPrincipal principal) { this.id = id; this.function = function; this.principal = principal; } } --- 134,144 ---- /// <param name="function">Name of the function</param> /// <param name="principal">Principal the permission applies to</param> ! /// <param name="principalType">User or group</param> ! public FunctionPermission(String function, DBPrincipal principal, String principalType) { this.id = id; this.function = function; this.principal = principal; + this.principalType = principalType; } } Index: frmPERDEL.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmPERDEL.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** frmPERDEL.cs 21 Jun 2004 22:24:45 -0000 1.8 --- frmPERDEL.cs 23 Nov 2004 16:38:51 -0000 1.9 *************** *** 62,66 **** FunctionPermission thePermission = new FunctionPermission( theControlData["Function"].ToString(), ! thePrincipal); // Write to the db --- 62,67 ---- FunctionPermission thePermission = new FunctionPermission( theControlData["Function"].ToString(), ! thePrincipal, ! theControlData["PrincipleType"].ToString()); // Write to the db |
From: Rob W. <rm...@us...> - 2004-11-23 15:54:05
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18137 Modified Files: Versions.txt AuthenticatedPrincipal.cs Log Message: AuthenticatedPrincipal - Behaviour when adding permission - Ref DA1071814 Index: AuthenticatedPrincipal.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/AuthenticatedPrincipal.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AuthenticatedPrincipal.cs 13 Jun 2004 16:12:17 -0000 1.3 --- AuthenticatedPrincipal.cs 23 Nov 2004 15:53:52 -0000 1.4 *************** *** 52,56 **** foreach(String theFunction in allowPermissions) { ! this.allowPermissions.Add(theFunction,null); } --- 52,59 ---- foreach(String theFunction in allowPermissions) { ! if (this.allowPermissions.Contains(theFunction) == false) ! { ! this.allowPermissions.Add(theFunction,null); ! } } *************** *** 58,62 **** foreach(String theFunction in denyPermissions) { ! this.denyPermissions.Add(theFunction,null); } } --- 61,68 ---- foreach(String theFunction in denyPermissions) { ! if (this.denyPermissions.Contains(theFunction) == false) ! { ! this.denyPermissions.Add(theFunction,null); ! } } } Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.448 retrieving revision 1.449 diff -C2 -d -r1.448 -r1.449 *** Versions.txt 23 Nov 2004 15:46:55 -0000 1.448 --- Versions.txt 23 Nov 2004 15:53:52 -0000 1.449 *************** *** 446,448 **** 0.1.446 frmMainMenu - Form list - Ref DA1071687 0.1.447 checkPermission - Add - Ref DA880937 ! 0.1.448 PermissionAdminControl - Behaviour when adding - Ref DA1071810 \ No newline at end of file --- 446,449 ---- 0.1.446 frmMainMenu - Form list - Ref DA1071687 0.1.447 checkPermission - Add - Ref DA880937 ! 0.1.448 PermissionAdminControl - Behaviour when adding - Ref DA1071810 ! 0.1.449 AuthenticatedPrincipal - Behaviour when adding permission - Ref DA1071814 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-11-23 15:47:06
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16469 Modified Files: Versions.txt PermissionAdminControl.cs Log Message: PermissionAdminControl - Behaviour when adding - Ref DA1071810 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.447 retrieving revision 1.448 diff -C2 -d -r1.447 -r1.448 *** Versions.txt 23 Nov 2004 15:18:16 -0000 1.447 --- Versions.txt 23 Nov 2004 15:46:55 -0000 1.448 *************** *** 445,447 **** 0.1.445 DataFieldArrayList - Add - Ref DA982554 0.1.446 frmMainMenu - Form list - Ref DA1071687 ! 0.1.447 checkPermission - Add - Ref DA880937 \ No newline at end of file --- 445,448 ---- 0.1.445 DataFieldArrayList - Add - Ref DA982554 0.1.446 frmMainMenu - Form list - Ref DA1071687 ! 0.1.447 checkPermission - Add - Ref DA880937 ! 0.1.448 PermissionAdminControl - Behaviour when adding - Ref DA1071810 \ No newline at end of file Index: PermissionAdminControl.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/PermissionAdminControl.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PermissionAdminControl.cs 22 Jun 2004 22:22:40 -0000 1.11 --- PermissionAdminControl.cs 23 Nov 2004 15:46:55 -0000 1.12 *************** *** 1130,1141 **** foreach(DBTablePermission thePerm in thePermissions) { ! // Set the permission ! if (user==true) ! { ! AdoxConnection.SetUserPermissions(thePerm); ! } ! else { ! AdoxConnection.SetGroupPermissions(thePerm); } } --- 1130,1145 ---- foreach(DBTablePermission thePerm in thePermissions) { ! // If the permission does not refer to a null table ! if (thePerm.Name.CompareTo("-") != 0) { ! // Set the permission ! if (user==true) ! { ! AdoxConnection.SetUserPermissions(thePerm); ! } ! else ! { ! AdoxConnection.SetGroupPermissions(thePerm); ! } } } |
From: Rob W. <rm...@us...> - 2004-11-23 15:18:31
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10945 Modified Files: Versions.txt Switchboard.cs frmMainMenu.cs FormFactory.cs Log Message: checkPermission - Add - Ref DA880937 Index: Switchboard.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/Switchboard.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Switchboard.cs 22 Jun 2004 18:35:36 -0000 1.12 --- Switchboard.cs 23 Nov 2004 15:18:17 -0000 1.13 *************** *** 74,77 **** --- 74,84 ---- } } + public PermissionControl UserPermissionControl + { + get + { + return this.thePermissionControl; + } + } #endregion Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.446 retrieving revision 1.447 diff -C2 -d -r1.446 -r1.447 *** Versions.txt 23 Nov 2004 14:32:36 -0000 1.446 --- Versions.txt 23 Nov 2004 15:18:16 -0000 1.447 *************** *** 444,446 **** 0.1.444 ControlsList - Add - Ref DA980338 0.1.445 DataFieldArrayList - Add - Ref DA982554 ! 0.1.446 frmMainMenu - Form list - Ref DA1071687 \ No newline at end of file --- 444,447 ---- 0.1.444 ControlsList - Add - Ref DA980338 0.1.445 DataFieldArrayList - Add - Ref DA982554 ! 0.1.446 frmMainMenu - Form list - Ref DA1071687 ! 0.1.447 checkPermission - Add - Ref DA880937 \ No newline at end of file Index: FormFactory.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/FormFactory.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** FormFactory.cs 24 Jun 2004 14:11:57 -0000 1.23 --- FormFactory.cs 23 Nov 2004 15:18:18 -0000 1.24 *************** *** 95,98 **** --- 95,99 ---- { this.VerifyFormName(formName); + } *************** *** 110,113 **** --- 111,120 ---- } + // Check the permissions + if (theSwitchboard.UserPermissionControl.CheckPermission(formName) == false) + { + throw new UserPermissionException(); + } + // Special cases switch (formName) Index: frmMainMenu.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmMainMenu.cs,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** frmMainMenu.cs 23 Nov 2004 14:31:41 -0000 1.35 --- frmMainMenu.cs 23 Nov 2004 15:18:17 -0000 1.36 *************** *** 547,551 **** theSwitchboard.CurrentFormFactory.GoToForm(cboForm.Text); } ! catch (FormNameInvalidException excep) { MessageBox.Show(excep.Message); --- 547,551 ---- theSwitchboard.CurrentFormFactory.GoToForm(cboForm.Text); } ! catch (Exception excep) { MessageBox.Show(excep.Message); *************** *** 579,583 **** theSwitchboard.CurrentFormFactory.GoToForm(cboForm.Text); } ! catch (FormNameInvalidException excep) { MessageBox.Show(excep.Message); --- 579,583 ---- theSwitchboard.CurrentFormFactory.GoToForm(cboForm.Text); } ! catch (Exception excep) { MessageBox.Show(excep.Message); |
From: Rob W. <rm...@us...> - 2004-11-23 14:35:17
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31133 Modified Files: frmGeneric.cs Log Message: DataFieldArrayList - Add - Ref DA982554 Index: frmGeneric.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmGeneric.cs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** frmGeneric.cs 26 Jun 2004 12:11:02 -0000 1.34 --- frmGeneric.cs 23 Nov 2004 14:35:07 -0000 1.35 *************** *** 40,44 **** /// List of fields to be read from/written to the db. /// </summary> ! protected internal ArrayList formFields = new ArrayList(); /// <summary> /// Control switchboard for the app. --- 40,45 ---- /// List of fields to be read from/written to the db. /// </summary> ! protected internal DataFieldArrayList formFields = new DataFieldArrayList(); ! /// <summary> /// Control switchboard for the app. |
From: Rob W. <rm...@us...> - 2004-11-23 14:34:58
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30980 Modified Files: MiniBits.csproj Log Message: DataFieldArrayList - Add - Ref DA982554 Index: MiniBits.csproj =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBits.csproj,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** MiniBits.csproj 26 Jun 2004 19:35:30 -0000 1.65 --- MiniBits.csproj 23 Nov 2004 14:34:44 -0000 1.66 *************** *** 201,204 **** --- 201,209 ---- /> <File + RelPath = "DataFieldArrayList.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "DataNotValidException.cs" SubType = "Code" *************** *** 451,459 **** /> <File - RelPath = "GenericBackground.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "GroupNotPresentException.cs" SubType = "Code" --- 456,459 ---- |
From: Rob W. <rm...@us...> - 2004-11-23 14:32:47
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30396 Modified Files: Versions.txt Log Message: frmMainMenu - Form list - Ref DA1071687 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.445 retrieving revision 1.446 diff -C2 -d -r1.445 -r1.446 *** Versions.txt 4 Jul 2004 15:45:46 -0000 1.445 --- Versions.txt 23 Nov 2004 14:32:36 -0000 1.446 *************** *** 443,445 **** 0.1.443 All Controls - Properties - Ref DA980380 0.1.444 ControlsList - Add - Ref DA980338 ! 0.1.445 DataFieldArrayList - Add - Ref DA982554 \ No newline at end of file --- 443,446 ---- 0.1.443 All Controls - Properties - Ref DA980380 0.1.444 ControlsList - Add - Ref DA980338 ! 0.1.445 DataFieldArrayList - Add - Ref DA982554 ! 0.1.446 frmMainMenu - Form list - Ref DA1071687 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-11-23 14:31:54
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30156 Modified Files: frmMainMenu.cs Log Message: frmMainMenu - Form list - Ref DA1071687 Index: frmMainMenu.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmMainMenu.cs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** frmMainMenu.cs 18 Jun 2004 16:30:26 -0000 1.34 --- frmMainMenu.cs 23 Nov 2004 14:31:41 -0000 1.35 *************** *** 7,10 **** --- 7,11 ---- using System; + using System.Data; using System.Drawing; using System.Collections; *************** *** 107,110 **** --- 108,117 ---- /// </summary> private Switchboard theSwitchboard; + + /// <summary> + /// Data table containing a list of functions present in the system, + /// with descriptions. + /// </summary> + private DataTable theFunctions; #endregion *************** *** 209,212 **** --- 216,220 ---- // cboForm // + /* this.cboForm.Items.AddRange(new object[] { "BOMADD", *************** *** 376,379 **** --- 384,388 ---- "WIPLST", "WIZARD"}); + */ this.cboForm.Location = new System.Drawing.Point(68, 40); this.cboForm.Name = "cboForm"; *************** *** 475,478 **** --- 484,515 ---- private void frmMainMenu_Load(object sender, System.EventArgs e) { + loadFunctionList(); + } + + /// <summary> + /// Loads a list of functions available from the database. + /// </summary> + private void loadFunctionList() + { + DataTable theData; + + DataField theDF = new DataField("Function","System.String"); + ArrayList dataFields = new ArrayList(); + dataFields.Add(theDF); + theDF = new DataField("Description", "System.String"); + dataFields.Add(theDF); + + theSwitchboard.DatabaseConnection.LoadTypedData + (dataFields,"tblFunction","","FunctionList"); + + theData = theSwitchboard.DatabaseConnection.GetTable + ("FunctionList"); + + int dataRowCount = theData.Rows.Count; + + for (int i = 0; i < dataRowCount; i++) + { + this.cboForm.Items.Add(theData.Rows[i][0]); + } } |
From: Rob W. <rm...@us...> - 2004-11-23 14:30:51
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29884 Modified Files: MBOptions.cs Log Message: Change to temporary string Index: MBOptions.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MBOptions.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MBOptions.cs 19 Feb 2004 01:06:54 -0000 1.1 --- MBOptions.cs 23 Nov 2004 14:30:31 -0000 1.2 *************** *** 50,54 **** private void setTempData() { ! databasePath = "F:\\MiniBits\\MiniBits.mdb"; workspacePath = "C:\\Program Files\\Common Files\\System\\SYSTEM.mdw"; } --- 50,54 ---- private void setTempData() { ! databasePath = "D:\\MiniBits\\MiniBits.mdb"; workspacePath = "C:\\Program Files\\Common Files\\System\\SYSTEM.mdw"; } |
From: Rob W. <rm...@us...> - 2004-07-04 15:46:33
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15383 Modified Files: Versions.txt Added Files: DataFieldArrayList.cs Log Message: DataFieldArrayList - Add - Ref DA982554 --- NEW FILE: DataFieldArrayList.cs --- using System; using System.Collections; namespace MiniBits.Data.Handlers { /// <summary> /// Class to encapsulate an ArrayList of DataField objects. /// </summary> public class DataFieldArrayList : ArrayList { /// <summary> /// Enumerator property. /// Allows an element of the list to be accessed /// </summary> public override object this[int index] { get { return base[index]; } set { try { base[index] = (DataField)value; } finally { } } } /// <summary> /// Constructor /// Calls the base constructor. /// </summary> public DataFieldArrayList() : base() { } /// <summary> /// Constructor. /// Creates a blank list. /// Adds all data fields to it. /// </summary> /// <param name="theCollection">Collection containing data fields to add. /// </param> public DataFieldArrayList(ICollection theCollection) : base() { this.AddRange(theCollection); } /// <summary> /// Constructor /// Creates a list with the specified size /// </summary> /// <param name="index">Size of the list to be created</param> public DataFieldArrayList(int index) : base(index) { } /// <summary> /// Adds an object, if it is a data field /// </summary> /// <param name="theItem">DataField (boxed as an object) to be added. /// </param> public new void Add(object theItem) { try { DataField theDF = (DataField) theItem; base.Add(theDF); } finally { } } /// <summary> /// Adds a collection of data fields, if each item is a data field /// </summary> /// <param name="theCollection">Collection of data fields.</param> public new void AddRange(ICollection theCollection) { // Add every data field to the list foreach (DataField theDataField in theCollection) { base.Add(theDataField); } } } } Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.444 retrieving revision 1.445 diff -C2 -d -r1.444 -r1.445 *** Versions.txt 26 Jun 2004 19:35:30 -0000 1.444 --- Versions.txt 4 Jul 2004 15:45:46 -0000 1.445 *************** *** 442,444 **** 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 0.1.443 All Controls - Properties - Ref DA980380 ! 0.1.444 ControlsList - Add - Ref DA980338 \ No newline at end of file --- 442,445 ---- 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 0.1.443 All Controls - Properties - Ref DA980380 ! 0.1.444 ControlsList - Add - Ref DA980338 ! 0.1.445 DataFieldArrayList - Add - Ref DA982554 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-07-04 15:45:33
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15186 Modified Files: ControlsList.cs Log Message: ControlsList - Add - Ref DA980338 Index: ControlsList.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/ControlsList.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ControlsList.cs 26 Jun 2004 19:37:18 -0000 1.2 --- ControlsList.cs 4 Jul 2004 15:44:17 -0000 1.3 *************** *** 297,305 **** if (theKeyTable.ContainsKey(dataField)) { ! return theKeyTable[dataField]; } else if (theControlsTable.ContainsKey(dataField)) { ! return theControlsTable[dataField]; } else --- 297,305 ---- if (theKeyTable.ContainsKey(dataField)) { ! return (IMiniBitsDataControl)theKeyTable[dataField]; } else if (theControlsTable.ContainsKey(dataField)) { ! return (IMiniBitsDataControl)theControlsTable[dataField]; } else |
From: Rob W. <rm...@us...> - 2004-06-26 19:37:28
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19411 Modified Files: ControlsList.cs Log Message: ControlsList - Add - Ref DA980338 Index: ControlsList.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/ControlsList.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ControlsList.cs 26 Jun 2004 19:36:24 -0000 1.1 --- ControlsList.cs 26 Jun 2004 19:37:18 -0000 1.2 *************** *** 272,275 **** --- 272,276 ---- } + /// <summary> /// Returns a flag indicating whether the item is held in the list. *************** *** 286,289 **** --- 287,315 ---- /// <summary> + /// Returns a control from the list + /// </summary> + /// <param name="dataField">Data field of the control to return. + /// </param> + /// <returns>Control identified by data field.</returns> + public IMiniBitsDataControl GetControl(String dataField) + { + // Check the key controls table + if (theKeyTable.ContainsKey(dataField)) + { + return theKeyTable[dataField]; + } + else if (theControlsTable.ContainsKey(dataField)) + { + return theControlsTable[dataField]; + } + else + { + throw new ArgumentOutOfRangeException( + "The list does not contain the control specified."); + } + } + + + /// <summary> /// Creates a new control from the given data /// </summary> |
From: Rob W. <rm...@us...> - 2004-06-26 19:36:34
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19263 Added Files: ControlsList.cs Log Message: ControlsList - Add - Ref DA980338 --- NEW FILE: ControlsList.cs --- using System; using System.Collections; using System.Windows.Forms; using MiniBits.Data.Handlers; using MiniBits.Data.Processors; namespace MiniBits.Forms.Controls { /// <summary> /// Wraps a list of controls (in ArrayList and Hashtable form) to simplify /// use. /// </summary> public class ControlsList { #region Declarations /// <summary> /// ArrayList of key field controls /// Must be identical in items to theKeyTable /// </summary> private ArrayList theKeyList = new ArrayList(); /// <summary> /// Hashtable of key field controls /// Must be identical in items to theKeyList /// </summary> private Hashtable theKeyTable = new Hashtable(); /// <summary> /// ArrayList of non-key controls. /// Must be identical in items to theControlsTable /// </summary> private ArrayList theControlsList = new ArrayList(); /// <summary> /// Hashtable of non-key controls. /// Must be identical in items to theControlsList /// </summary> private Hashtable theControlsTable = new Hashtable(); /// <summary> /// Position of the bottom of the last of all controls. /// </summary> private int lastControlBottom; /// <summary> /// Tab Index of the last of all controls. /// </summary> private int lastControlTabIndex; /// <summary> /// Position of the bottom of the last key control. /// </summary> private int lastKeyBottom; /// <summary> /// Tab index of the last key control. /// </summary> private int lastKeyTabIndex; /// <summary> /// First control to appear in the list. /// </summary> private IMiniBitsDataControl firstControl = null; #endregion #region Properties /// <summary> /// Number of items in the key list /// </summary> public int KeyCount { get { return theKeyList.Count; } } /// <summary> /// Number of items in the non-key list /// </summary> public int NonKeyCount { get { return theControlsList.Count; } } /// <summary> /// Number of items in both lists /// </summary> public int TotalCount { get { return (this.KeyCount + this.NonKeyCount); } } /// <summary> /// Position of the bottom of the last of all controls. /// </summary> public int LastControlBottom { get { return lastControlBottom; } set { lastControlBottom = value; } } /// <summary> /// Tab Index of the last of all controls. /// </summary> public int LastControlTabIndex { get { return lastControlTabIndex; } set { lastControlTabIndex = value; } } /// <summary> /// Position of the bottom of the last key control. /// </summary> public int LastKeyBottom { get { return lastKeyBottom; } set { lastKeyBottom = value; } } /// <summary> /// Tab index of the last key control. /// </summary> public int LastKeyTabIndex { get { return lastKeyTabIndex; } set { value = lastKeyTabIndex; } } /// <summary> /// First control to appear in the list. /// </summary> public IMiniBitsDataControl FirstControl { get { return firstControl; } } #endregion /// <summary> /// Constructor. /// Performs no action. /// </summary> public ControlsList() { } /// <summary> /// Constructor. /// Adds the initial items given in the list to the list and table /// </summary> /// <param name="initialItems">Initial items to be added to this data /// structure.</param> public ControlsList(ArrayList initialItems) { // For each valid control in the initial items list foreach(IMiniBitsDataControl theControl in initialItems) { // Add it to the ArrayList and Hashtable this.Add(theControl); } } /// <summary> /// Constructor. /// Adds the initial items given in the array to the list and table /// </summary> /// <param name="initialItems">Initial items to be added to this data /// structure.</param> public ControlsList(Control [] initialItems) { // For each valid control in the array, foreach(IMiniBitsDataControl theControl in initialItems) { // Add it to the ArrayList and Hashtable this.Add(theControl); } } /// <summary> /// Adds the given control to the list. /// </summary> /// <param name="theItem">Control to add to the list.</param> public void Add(IMiniBitsDataControl theItem) { // Add the item to the ArrayList and Hashtable if (theItem.Key) { theKeyList.Add(theItem); theKeyTable.Add(theItem.GetDataField(), theItem); } else { theControlsList.Add(theItem); theControlsTable.Add(theItem.GetDataField(),theItem); } } /// <summary> /// Creates and returns a control, and adds it to the list. /// </summary> /// <param name="theControlArgs">Arguments describing the control. /// </param> /// <param name="theSwitchboard">Main data switchboard for the app. /// </param> /// <returns>Control created.</returns> public IMiniBitsDataControl Add(ControlArgs theControlArgs, Form theCaller, Switchboard theSwitchboard) { // Make the control IMiniBitsDataControl theControl = MakeControl(theControlArgs, theCaller, theSwitchboard); // If the control is a visible control: if (theControl.Visible) { // If this is the first control, set a ref if (firstControl == null) { firstControl = theControl; } // Increment the list tab index lastControlTabIndex++; // Set the last control bottom Control theWindowsControl = (Control)theControl; lastControlBottom = theWindowsControl.Top + theWindowsControl.Height; } // Add the control to the list and table this.Add(theControl); // Return the created control return theControl; } /// <summary> /// Clears the list. /// </summary> public void Clear() { // Clear the ArrayList and Hashtable theControlsList.Clear(); theControlsTable.Clear(); } /// <summary> /// Returns a flag indicating whether the item is held in the list. /// </summary> /// <param name="dataField">Data field of the item to check for. /// </param> /// <returns>True if the item is present.</returns> public bool Contains(String dataField) { // Check the Hashtable return theControlsTable.ContainsKey(dataField); } /// <summary> /// Creates a new control from the given data /// </summary> /// <param name="theControlArgs">Control arguments</param> /// <param name="theSwitchboard">Main control switchboard for the /// app.</param> /// <returns></returns> private IMiniBitsDataControl MakeControl(ControlArgs theControlArgs, Form theCaller, Switchboard theSwitchboard) { // Create a new control object IMiniBitsDataControl theControl; // Get the control type ControlType control = theControlArgs.ControlType; // Work out the y position int yPos = 4 + this.lastControlBottom; theControlArgs.YPos = yPos; // If the control is not a null control, then return if (control == ControlType.eNull) { throw new ArgumentOutOfRangeException ("The control enum value was not a valid control type."); } // For all valid controls, make the control #region Add Controls // Add a check box else if (control == ControlType.eCheckBox) { theControl = new MiniBitsCheckBox(theControlArgs,theCaller, theSwitchboard); } // Add a combo box else if (control == ControlType.eComboBox) { theControl = new MiniBitsComboBox(theControlArgs,theCaller, theSwitchboard); } // Add a text box else if (control == ControlType.eTextBox) { theControl = new MiniBitsTextBox(theControlArgs,theCaller, theSwitchboard); } // Add an extended text box else if (control == ControlType.eEnlargedTextBox) { theControl = new MiniBitsTextBox(theControlArgs,theCaller, theSwitchboard); } // Add an autonumber ID else if (control == ControlType.eAutoNumID) { theControl = new MiniBitsAutoNumIDBox(theControlArgs,theCaller, theSwitchboard); } else if (control == ControlType.eFixedValue) { theControl = new MiniBitsFixedValue(theControlArgs,theCaller, theSwitchboard); } else if (control == ControlType.eHiddenValue) { theControl = new MiniBitsHiddenValue(theControlArgs,theCaller, theSwitchboard); } # endregion // If the control type is not a valid control, throw an exception else { throw new ArgumentOutOfRangeException ("The control enum value was not a valid control type."); } return theControl; } } } |
From: Rob W. <rm...@us...> - 2004-06-26 19:35:38
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19124 Modified Files: Versions.txt MiniBits.csproj Log Message: ControlsList - Add - Ref DA980338 Index: MiniBits.csproj =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBits.csproj,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** MiniBits.csproj 26 Jun 2004 09:40:13 -0000 1.64 --- MiniBits.csproj 26 Jun 2004 19:35:30 -0000 1.65 *************** *** 191,194 **** --- 191,199 ---- /> <File + RelPath = "ControlsList.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "DataField.cs" SubType = "Code" *************** *** 446,449 **** --- 451,459 ---- /> <File + RelPath = "GenericBackground.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "GroupNotPresentException.cs" SubType = "Code" Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.443 retrieving revision 1.444 diff -C2 -d -r1.443 -r1.444 *** Versions.txt 26 Jun 2004 19:26:00 -0000 1.443 --- Versions.txt 26 Jun 2004 19:35:30 -0000 1.444 *************** *** 441,443 **** 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 ! 0.1.443 All Controls - Properties - Ref DA980380 \ No newline at end of file --- 441,444 ---- 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 ! 0.1.443 All Controls - Properties - Ref DA980380 ! 0.1.444 ControlsList - Add - Ref DA980338 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 19:26:11
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17447 Modified Files: Versions.txt MiniBitsUserInputValue.cs MiniBitsUser.cs MiniBitsTextBox.cs MiniBitsHiddenValue.cs MiniBitsFixedValue.cs MiniBitsConfirmationControl.cs MiniBitsComboBox.cs MiniBitsCheckBox.cs MiniBitsCalculatedValue.cs MiniBitsAutoNumIDBox.cs MiniBitsAlphaNumericID.cs IMiniBitsDataControl.cs Log Message: All Controls - Properties - Ref DA980380 Index: MiniBitsHiddenValue.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsHiddenValue.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MiniBitsHiddenValue.cs 22 Jun 2004 14:13:02 -0000 1.4 --- MiniBitsHiddenValue.cs 26 Jun 2004 19:26:00 -0000 1.5 *************** *** 24,27 **** --- 24,47 ---- /// </summary> private String theValue; + private const bool visible = false; + private bool key; + #endregion + + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } #endregion *************** *** 39,42 **** --- 59,72 ---- { this.theControlArgs = theControlArgs; + + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsComboBox.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsComboBox.cs,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** MiniBitsComboBox.cs 24 Jun 2004 15:22:36 -0000 1.31 --- MiniBitsComboBox.cs 26 Jun 2004 19:26:00 -0000 1.32 *************** *** 41,46 **** --- 41,55 ---- private String secondField; private ControlArgs theControlArgs; + private bool key; #endregion + public bool Key + { + get + { + return key; + } + } + /// <summary> /// The constructor for the combo box. *************** *** 102,105 **** --- 111,123 ---- } + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsCalculatedValue.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsCalculatedValue.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MiniBitsCalculatedValue.cs 22 Jun 2004 14:13:29 -0000 1.11 --- MiniBitsCalculatedValue.cs 26 Jun 2004 19:26:00 -0000 1.12 *************** *** 27,30 **** --- 27,50 ---- private ArrayList controlDataFields; private ControlArgs theControlArgs; + private const bool visible = false; + private bool key; + #endregion + + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } #endregion *************** *** 54,57 **** --- 74,86 ---- controlDataFields = this.GetFields(); + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsUser.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsUser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MiniBitsUser.cs 22 Jun 2004 23:01:38 -0000 1.4 --- MiniBitsUser.cs 26 Jun 2004 19:26:00 -0000 1.5 *************** *** 23,26 **** --- 23,46 ---- /// </summary> private ControlArgs theControlArgs; + private const bool visible = false; + private bool key; + #endregion + + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } #endregion *************** *** 40,43 **** --- 60,73 ---- this.theSwitchboard = theSwitchboard; this.theControlArgs = theControlArgs; + + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsAlphaNumericID.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsAlphaNumericID.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MiniBitsAlphaNumericID.cs 22 Jun 2004 14:13:29 -0000 1.4 --- MiniBitsAlphaNumericID.cs 26 Jun 2004 19:26:00 -0000 1.5 *************** *** 28,31 **** --- 28,50 ---- private ControlType thisControlType; private IdFormat theFormat; + private const bool visible = false; + private bool key; + #endregion + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } #endregion *************** *** 55,59 **** // Set this control type thisControlType = ControlType.eAlphaNumericID; ! } --- 74,87 ---- // Set this control type thisControlType = ControlType.eAlphaNumericID; ! ! // Set the key flag ! if (theControlArgs.KeyControl.StartsWith("K")) ! { ! key = true; ! } ! else ! { ! key = false; ! } } Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.442 retrieving revision 1.443 diff -C2 -d -r1.442 -r1.443 *** Versions.txt 26 Jun 2004 16:13:38 -0000 1.442 --- Versions.txt 26 Jun 2004 19:26:00 -0000 1.443 *************** *** 440,442 **** 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 ! 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 \ No newline at end of file --- 440,443 ---- 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 ! 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 ! 0.1.443 All Controls - Properties - Ref DA980380 \ No newline at end of file Index: IMiniBitsDataControl.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/IMiniBitsDataControl.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** IMiniBitsDataControl.cs 20 Jun 2004 16:21:32 -0000 1.15 --- IMiniBitsDataControl.cs 26 Jun 2004 19:26:00 -0000 1.16 *************** *** 11,16 **** /// controls handling data. /// </summary> ! interface IMiniBitsDataControl { /// <summary> /// Called to return the control's data. --- 11,24 ---- /// controls handling data. /// </summary> ! public interface IMiniBitsDataControl { + bool Visible + { + get; + } + bool Key + { + get; + } /// <summary> /// Called to return the control's data. Index: MiniBitsConfirmationControl.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsConfirmationControl.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MiniBitsConfirmationControl.cs 23 Jun 2004 09:08:24 -0000 1.7 --- MiniBitsConfirmationControl.cs 26 Jun 2004 19:26:00 -0000 1.8 *************** *** 26,29 **** --- 26,31 ---- private Switchboard theSwitchboard; private ControlArgs theControlArgs; + private const bool visible = true; + private bool key; // Graphical elements *************** *** 34,37 **** --- 36,57 ---- #endregion + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } + #endregion + /// <summary> /// Display the control and initialise member fields *************** *** 63,66 **** --- 83,96 ---- this.thisControlType = ControlType.eConfirmControl; + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } + } Index: MiniBitsFixedValue.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsFixedValue.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MiniBitsFixedValue.cs 22 Jun 2004 14:13:02 -0000 1.4 --- MiniBitsFixedValue.cs 26 Jun 2004 19:26:00 -0000 1.5 *************** *** 24,27 **** --- 24,47 ---- /// </summary> private String theValue; + private const bool visible = false; + private bool key; + #endregion + + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } #endregion *************** *** 40,43 **** --- 60,73 ---- this.theControlArgs = theControlArgs; this.theValue = theControlArgs.Lookup; + + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsUserInputValue.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsUserInputValue.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MiniBitsUserInputValue.cs 22 Jun 2004 14:13:01 -0000 1.11 --- MiniBitsUserInputValue.cs 26 Jun 2004 19:26:00 -0000 1.12 *************** *** 33,36 **** --- 33,56 ---- private Form caller; private ControlType thisControlType; + private const bool visible = false; + private bool key; + #endregion + + + #region Properties + public bool Visible + { + get + { + return visible; + } + } + public bool Key + { + get + { + return key; + } + } #endregion *************** *** 57,60 **** --- 77,90 ---- // Set this control type thisControlType = ControlType.eAutoNumID; + + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsCheckBox.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsCheckBox.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MiniBitsCheckBox.cs 22 Jun 2004 14:13:29 -0000 1.18 --- MiniBitsCheckBox.cs 26 Jun 2004 19:26:00 -0000 1.19 *************** *** 37,42 **** --- 37,51 ---- private ControlArgs theControlArgs; private Switchboard theSwitchboard; + private bool key; #endregion + public bool Key + { + get + { + return key; + } + } + /// <summary> /// The MiniBitsCheckBox constructor. *************** *** 77,80 **** --- 86,98 ---- thisControlType = ControlType.eCheckBox; + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsTextBox.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsTextBox.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MiniBitsTextBox.cs 22 Jun 2004 14:13:01 -0000 1.17 --- MiniBitsTextBox.cs 26 Jun 2004 19:26:00 -0000 1.18 *************** *** 28,33 **** --- 28,42 ---- private ControlType thisControlType; private bool persistent; + private bool key; #endregion + public bool Key + { + get + { + return key; + } + } + /// <summary> /// The constructor for the text box. *************** *** 82,85 **** --- 91,103 ---- thisControlType = ControlType.eTextBox; + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } Index: MiniBitsAutoNumIDBox.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/MiniBitsAutoNumIDBox.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MiniBitsAutoNumIDBox.cs 22 Jun 2004 14:13:29 -0000 1.16 --- MiniBitsAutoNumIDBox.cs 26 Jun 2004 19:26:00 -0000 1.17 *************** *** 34,42 **** private ControlType thisControlType; private ControlArgs theControlArgs; #endregion #region Properties ! ! #endregion --- 34,57 ---- private ControlType thisControlType; private ControlArgs theControlArgs; + private const bool visible = false; + private bool key; #endregion + #region Properties ! public bool Visible ! { ! get ! { ! return visible; ! } ! } ! public bool Key ! { ! get ! { ! return key; ! } ! } #endregion *************** *** 65,68 **** --- 80,92 ---- thisControlType = ControlType.eAutoNumID; + // Set the key flag + if (theControlArgs.KeyControl.StartsWith("K")) + { + key = true; + } + else + { + key = false; + } } |
From: Rob W. <rm...@us...> - 2004-06-26 16:13:48
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14884 Modified Files: Versions.txt Log Message: tblFunction - Add data - FNCDTL - Ref DA979578 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.441 retrieving revision 1.442 diff -C2 -d -r1.441 -r1.442 *** Versions.txt 26 Jun 2004 16:12:28 -0000 1.441 --- Versions.txt 26 Jun 2004 16:13:38 -0000 1.442 *************** *** 439,441 **** 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 ! 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 \ No newline at end of file --- 439,442 ---- 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 ! 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 ! 0.1.442 tblFunction - Add data - FNCDTL - Ref DA979578 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 16:12:37
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14665 Modified Files: Versions.txt Log Message: tblForm - Add data - FNCDTL - Ref DA979569 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.440 retrieving revision 1.441 diff -C2 -d -r1.440 -r1.441 *** Versions.txt 26 Jun 2004 15:56:01 -0000 1.440 --- Versions.txt 26 Jun 2004 16:12:28 -0000 1.441 *************** *** 438,440 **** 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 ! 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 \ No newline at end of file --- 438,441 ---- 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 ! 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 ! 0.1.441 tblForm - Add data - FNCDTL - Ref DA979569 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 15:56:09
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11306 Modified Files: Versions.txt Log Message: tblFunction - Add data - USGDTL - Ref DA979575 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.439 retrieving revision 1.440 diff -C2 -d -r1.439 -r1.440 *** Versions.txt 26 Jun 2004 15:55:25 -0000 1.439 --- Versions.txt 26 Jun 2004 15:56:01 -0000 1.440 *************** *** 437,439 **** 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 ! 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 \ No newline at end of file --- 437,440 ---- 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 ! 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 ! 0.1.440 tblFunction - Add data - USGDTL - Ref DA979575 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 15:55:34
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11228 Modified Files: Versions.txt Log Message: tblForm - Add data - USGDTL - Ref DA979568 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.438 retrieving revision 1.439 diff -C2 -d -r1.438 -r1.439 *** Versions.txt 26 Jun 2004 14:59:51 -0000 1.438 --- Versions.txt 26 Jun 2004 15:55:25 -0000 1.439 *************** *** 436,438 **** 0.1.436 frmDTL - Grid - Ref DA980269 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 ! 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 \ No newline at end of file --- 436,439 ---- 0.1.436 frmDTL - Grid - Ref DA980269 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 ! 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 ! 0.1.439 tblForm - Add data - USGDTL - Ref DA979568 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 14:59:59
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1534 Modified Files: Versions.txt Log Message: tblFunction - Add data - USPDTL - Ref DA979577 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.437 retrieving revision 1.438 diff -C2 -d -r1.437 -r1.438 *** Versions.txt 26 Jun 2004 14:57:01 -0000 1.437 --- Versions.txt 26 Jun 2004 14:59:51 -0000 1.438 *************** *** 435,437 **** frmDTL - Display - Ref DA980255 0.1.436 frmDTL - Grid - Ref DA980269 ! 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 \ No newline at end of file --- 435,438 ---- frmDTL - Display - Ref DA980255 0.1.436 frmDTL - Grid - Ref DA980269 ! 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 ! 0.1.438 tblFunction - Add data - USPDTL - Ref DA979577 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 14:57:12
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1132 Modified Files: Versions.txt Log Message: tblForm - Add data - USPDTL - Ref DA979567 Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.436 retrieving revision 1.437 diff -C2 -d -r1.436 -r1.437 *** Versions.txt 26 Jun 2004 13:11:13 -0000 1.436 --- Versions.txt 26 Jun 2004 14:57:01 -0000 1.437 *************** *** 434,436 **** 0.1.435 frmDTL - Record display - Ref DA980213 frmDTL - Display - Ref DA980255 ! 0.1.436 frmDTL - Grid - Ref DA980269 \ No newline at end of file --- 434,437 ---- 0.1.435 frmDTL - Record display - Ref DA980213 frmDTL - Display - Ref DA980255 ! 0.1.436 frmDTL - Grid - Ref DA980269 ! 0.1.437 tblForm - Add data - USPDTL - Ref DA979567 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 13:11:21
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15868 Modified Files: Versions.txt frmDTL.cs Log Message: frmDTL - Grid - Ref DA980269 Index: frmDTL.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmDTL.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** frmDTL.cs 26 Jun 2004 12:27:31 -0000 1.9 --- frmDTL.cs 26 Jun 2004 13:11:13 -0000 1.10 *************** *** 39,42 **** --- 39,43 ---- private bool firstKeyControl = true; private ArrayList theFormLinks = new ArrayList(); + DataGridTableStyle theTableStyle = new DataGridTableStyle(); #endregion *************** *** 157,162 **** private void DisplayGridData() { - // Create a table style. - DataGridTableStyle theTableStyle = new DataGridTableStyle(); if (this.theGridFields.Count == 0) --- 158,161 ---- *************** *** 183,189 **** { // Add a column to the grid ! DataGridTextBoxColumn theColumn = new DataGridTextBoxColumn(); ! theColumn.MappingName = dataField; theColumn.HeaderText = caption; theTableStyle.GridColumnStyles.Add(theColumn); --- 182,189 ---- { // Add a column to the grid ! DataGridColumnStyle theColumn = new DataGridTextBoxColumn(); ! theColumn.Width = 75; theColumn.HeaderText = caption; + theColumn.MappingName = dataField; theTableStyle.GridColumnStyles.Add(theColumn); *************** *** 226,234 **** // Add the table style to the collection in the grid ! theTableStyle.MappingName = dataTableName; if (grdFormData.TableStyles.Contains(dataTableName) == false) { grdFormData.TableStyles.Add(theTableStyle); } // Set the data source and make the grid read-only --- 226,236 ---- // Add the table style to the collection in the grid ! theTableStyle.MappingName = theGridData.TableName; ! grdFormData.TableStyles.Clear(); if (grdFormData.TableStyles.Contains(dataTableName) == false) { grdFormData.TableStyles.Add(theTableStyle); } + grdFormData.ColumnHeadersVisible = true; // Set the data source and make the grid read-only Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.435 retrieving revision 1.436 diff -C2 -d -r1.435 -r1.436 *** Versions.txt 26 Jun 2004 12:27:31 -0000 1.435 --- Versions.txt 26 Jun 2004 13:11:13 -0000 1.436 *************** *** 433,435 **** 0.1.434 frmGeneric - GetDataItem - Ref DA980245 0.1.435 frmDTL - Record display - Ref DA980213 ! frmDTL - Display - Ref DA980255 \ No newline at end of file --- 433,436 ---- 0.1.434 frmGeneric - GetDataItem - Ref DA980245 0.1.435 frmDTL - Record display - Ref DA980213 ! frmDTL - Display - Ref DA980255 ! 0.1.436 frmDTL - Grid - Ref DA980269 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 12:27:39
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8903 Modified Files: Versions.txt frmDTL.cs Log Message: frmDTL - Record display - Ref DA980213 frmDTL - Display - Ref DA980255 Index: frmDTL.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmDTL.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** frmDTL.cs 18 Jun 2004 12:04:43 -0000 1.8 --- frmDTL.cs 26 Jun 2004 12:27:31 -0000 1.9 *************** *** 10,13 **** --- 10,14 ---- using MiniBits.Data.Processors; using MiniBits.Forms.Controls; + using MiniBits.Exceptions; namespace MiniBits.Forms.Generic *************** *** 36,40 **** private String gridFromTableName; private String gridDataTableName; ! #endregion --- 37,42 ---- private String gridFromTableName; private String gridDataTableName; ! private bool firstKeyControl = true; ! private ArrayList theFormLinks = new ArrayList(); #endregion *************** *** 157,190 **** // Create a table style. DataGridTableStyle theTableStyle = new DataGridTableStyle(); - - // Obtain control data and sort - DataRow[] controlDataRows = this.theGridFieldData.Select("FormName <> ''", - "TabIndex ASC", DataViewRowState.OriginalRows); ! // Display the controls ! foreach(DataRow theControl in controlDataRows) { ! // Get the data field, caption, type, control type and key. ! String dataField = theControl["FieldName"].ToString(); ! String caption = theControl["Caption"].ToString(); ! StringBuilder type = new StringBuilder("System."); ! type.Append(theControl["Type"].ToString()); ! ControlType control = (ControlType)theControl["ControlType"]; ! String key = theControl["KeyControl"].ToString(); ! String theLookup = theControl["Lookup"].ToString(); ! // If the control is a data control, ! if ((String)theControl["TableName"] != "-") { ! // Add a column to the grid ! DataGridTextBoxColumn theColumn = new DataGridTextBoxColumn(); ! theColumn.MappingName = dataField; ! theColumn.HeaderText = caption; ! theTableStyle.GridColumnStyles.Add(theColumn); ! // Add it to the list of data controls for which to retrieve data ! DataField theTypedDataField = new DataField(dataField,type.ToString()); ! this.theGridFields.Add(theTypedDataField); ! gridFromTableName = theControl["TableName"].ToString(); } } --- 159,196 ---- // Create a table style. DataGridTableStyle theTableStyle = new DataGridTableStyle(); ! if (this.theGridFields.Count == 0) { ! ! // Obtain control data and sort ! DataRow[] controlDataRows = this.theGridFieldData.Select("FormName <> ''", ! "TabIndex ASC", DataViewRowState.OriginalRows); ! // Display the controls ! foreach(DataRow theControl in controlDataRows) { ! // Get the data field, caption, type, control type and key. ! String dataField = theControl["FieldName"].ToString(); ! String caption = theControl["Caption"].ToString(); ! StringBuilder type = new StringBuilder("System."); ! type.Append(theControl["Type"].ToString()); ! ControlType control = (ControlType)theControl["ControlType"]; ! String key = theControl["KeyControl"].ToString(); ! String theLookup = theControl["Lookup"].ToString(); ! // If the control is a data control, ! if ((String)theControl["TableName"] != "-") ! { ! // Add a column to the grid ! DataGridTextBoxColumn theColumn = new DataGridTextBoxColumn(); ! theColumn.MappingName = dataField; ! theColumn.HeaderText = caption; ! theTableStyle.GridColumnStyles.Add(theColumn); ! ! // Add it to the list of data controls for which to retrieve data ! DataField theTypedDataField = new DataField(dataField,type.ToString()); ! this.theGridFields.Add(theTypedDataField); ! gridFromTableName = theControl["TableName"].ToString(); ! } } } *************** *** 198,206 **** gridDataTableName = tempSB.ToString(); // Load and retrieve the data try { theSwitchboard.DatabaseConnection.LoadTypedData ! (theGridFields,gridFromTableName,"",gridDataTableName); theGridData = theSwitchboard.DatabaseConnection.GetTable (gridDataTableName); --- 204,215 ---- gridDataTableName = tempSB.ToString(); + // Make WHERE condition + String whereCondition = this.MakeSubFormWhereCondition(); // Load and retrieve the data try { theSwitchboard.DatabaseConnection.LoadTypedData ! (theGridFields,gridFromTableName,whereCondition, ! gridDataTableName); theGridData = theSwitchboard.DatabaseConnection.GetTable (gridDataTableName); *************** *** 231,234 **** --- 240,278 ---- /// <summary> + /// Creates a where condition for the selection of sub-form data + /// </summary> + /// <returns>Where condition as a string.</returns> + private String MakeSubFormWhereCondition() + { + // Create a string builder to make the string + StringBuilder theWhereCondition = new StringBuilder("WHERE "); + + // Add each link item in turn to the string + foreach (DtlFormLink theLink in this.theFormLinks) + { + theWhereCondition.Append(theLink.SubFormField); + theWhereCondition.Append(" = '"); + String theLinkVal = this.GetDataItem(theLink.FormField); + theWhereCondition.Append(theLinkVal); + theWhereCondition.Append("' AND "); + } + + /* If any fields have been added, slice off the trailing AND and + * return. + * Otherwise throw an exception. + */ + if (theWhereCondition.Length > 6) + { + theWhereCondition.Remove(theWhereCondition.Length-5,4); + return theWhereCondition.ToString(); + } + else + { + throw new ArgumentException( + "The form field link failed."); + } + } + + /// <summary> /// Alters the layout of the form to display the non-key fields of the /// key record. *************** *** 288,295 **** theControl.TextChanged += new EventHandler(this.keyControl_Changed); ! // Get the grid field data ! key = key.Remove(0,2); ! theGridFieldData = this.GetControlData(key); } --- 332,362 ---- theControl.TextChanged += new EventHandler(this.keyControl_Changed); ! // Get the positions of the hyphen and full stop in the key data ! int hyphenPos = key.IndexOf("-"); ! int fullStopPos = key.IndexOf("."); ! ! // If this is the first key control on the form, ! if (firstKeyControl) ! { ! // Use the key to look up the sub-form data ! String theSubForm = key.Substring(hyphenPos+1, ! fullStopPos-hyphenPos-1); ! theGridFieldData = this.GetControlData(theSubForm); ! ! /* Set the first flag to show that the next control is not ! * first ! */ ! firstKeyControl = false; ! } ! ! // Get the control data field. ! IMiniBitsDataControl theDC = (IMiniBitsDataControl) theControl; ! String theControlDataField = theDC.GetDataField(); + // Add a new data link for this field + this.theFormLinks.Add(new DtlFormLink + (theControlDataField, + key.Substring(fullStopPos+1,key.Length-fullStopPos-1))); + } *************** *** 300,304 **** /// <param name="sender">Initiator of the event.</param> /// <param name="e">Standard event arguments.</param> ! protected internal void keyControl_Changed(object sender, System.EventArgs e) { this.SizeForInitialUse(); --- 367,372 ---- /// <param name="sender">Initiator of the event.</param> /// <param name="e">Standard event arguments.</param> ! protected internal void keyControl_Changed(object sender, ! System.EventArgs e) { this.SizeForInitialUse(); Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.434 retrieving revision 1.435 diff -C2 -d -r1.434 -r1.435 *** Versions.txt 26 Jun 2004 11:39:28 -0000 1.434 --- Versions.txt 26 Jun 2004 12:27:31 -0000 1.435 *************** *** 431,433 **** 0.1.432 tblFunction - Add data - GRUDTL - Ref DA979571 0.1.433 DtlFormLink - Add - Ref DA980223 ! 0.1.434 frmGeneric - GetDataItem - Ref DA980245 \ No newline at end of file --- 431,435 ---- 0.1.432 tblFunction - Add data - GRUDTL - Ref DA979571 0.1.433 DtlFormLink - Add - Ref DA980223 ! 0.1.434 frmGeneric - GetDataItem - Ref DA980245 ! 0.1.435 frmDTL - Record display - Ref DA980213 ! frmDTL - Display - Ref DA980255 \ No newline at end of file |
From: Rob W. <rm...@us...> - 2004-06-26 12:11:12
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6040 Modified Files: frmGeneric.cs Log Message: frmGeneric - GetDataItem - Ref DA980245 Index: frmGeneric.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmGeneric.cs,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** frmGeneric.cs 26 Jun 2004 11:39:28 -0000 1.33 --- frmGeneric.cs 26 Jun 2004 12:11:02 -0000 1.34 *************** *** 895,899 **** if (theControl.GetDataField() == fieldName) { ! return theControl.GetData.ToString(); } } --- 895,899 ---- if (theControl.GetDataField() == fieldName) { ! return theControl.GetData().ToString(); } } *************** *** 904,908 **** if (theControl.GetDataField() == fieldName) { ! return theControl.GetData.ToString(); } } --- 904,908 ---- if (theControl.GetDataField() == fieldName) { ! return theControl.GetData().ToString(); } } |
From: Rob W. <rm...@us...> - 2004-06-26 11:39:39
|
Update of /cvsroot/minibits/minibitsC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1293 Modified Files: Versions.txt frmGeneric.cs Log Message: frmGeneric - GetDataItem - Ref DA980245 Index: frmGeneric.cs =================================================================== RCS file: /cvsroot/minibits/minibitsC/frmGeneric.cs,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** frmGeneric.cs 24 Jun 2004 14:35:00 -0000 1.32 --- frmGeneric.cs 26 Jun 2004 11:39:28 -0000 1.33 *************** *** 881,884 **** --- 881,916 ---- this.SizeForInitialUse(); } + + /// <summary> + /// Returns the value of the control with a given data field. + /// </summary> + /// <param name="fieldName">Data field of the control to get value. + /// </param> + /// <returns>Value of the control specified.</returns> + protected internal String GetDataItem(String fieldName) + { + // Look for the item in the key controls + foreach(IMiniBitsDataControl theControl in this.keyControls) + { + if (theControl.GetDataField() == fieldName) + { + return theControl.GetData.ToString(); + } + } + + // Look for the item in the form controls + foreach(IMiniBitsDataControl theControl in this.formControls) + { + if (theControl.GetDataField() == fieldName) + { + return theControl.GetData.ToString(); + } + } + + /* If the item is neither a key nor a form control then throw an + * exception. + */ + throw new FieldNotPresentException(); + } } Index: Versions.txt =================================================================== RCS file: /cvsroot/minibits/minibitsC/Versions.txt,v retrieving revision 1.433 retrieving revision 1.434 diff -C2 -d -r1.433 -r1.434 *** Versions.txt 26 Jun 2004 09:40:13 -0000 1.433 --- Versions.txt 26 Jun 2004 11:39:28 -0000 1.434 *************** *** 430,432 **** 0.1.431 tblForm - Add Data - GRUDTL - Ref DA979555 0.1.432 tblFunction - Add data - GRUDTL - Ref DA979571 ! 0.1.433 DtlFormLink - Add - Ref DA980223 \ No newline at end of file --- 430,433 ---- 0.1.431 tblForm - Add Data - GRUDTL - Ref DA979555 0.1.432 tblFunction - Add data - GRUDTL - Ref DA979571 ! 0.1.433 DtlFormLink - Add - Ref DA980223 ! 0.1.434 frmGeneric - GetDataItem - Ref DA980245 \ No newline at end of file |