public frmOptions(clsSupport objSupport, TCBase.clsTCBase objTCBase, Form objParent) : base(objSupport, myFormName, objTCBase, objParent) { Load += frmOptions_Load; Activated += frmOptions_Activated; //This call is required by the Windows Form Designer. InitializeComponent(); }
public clsSpecials(clsSupport objSupport, string ModuleName) : base(objSupport, ModuleName, "Specials") { //This call is required by the Component Designer. InitializeComponent(); //Add any initialization after the InitializeComponent() call }
public frmBlueAngelsHistory(clsSupport objSupport, clsBlueAngelsHistory objBase, Form objParent = null, string Caption = null) : base(myFormName, objSupport, objBase, Caption, objParent) { //This call is required by the Windows Form Designer. InitializeComponent(); this.Text = Strings.Replace(Caption, "&", bpeNullString); LoadDefaultImage(); BindControls(); EnableControls(false); Icon = mTCBase.Icon; MinimumSize = new Size(Width, Height); ReportPath = mTCBase.ReportPath; //Reorder tcMain the way we want it (designer keeps changing it)... this.tcMain.SuspendLayout(); this.tcMain.TabPages.Clear(); TabPage[] pages = { tpGeneral, tpKits, tpDecalSets, tpImage, tpNotes }; this.tcMain.TabPages.AddRange(pages); //Relocate pbGeneral to tpImage... this.tpImage.SuspendLayout(); this.tpImage.Controls.Add(this.pbGeneral); this.pbGeneral.Location = new System.Drawing.Point(8, 8); this.pbGeneral.Size = new System.Drawing.Size(this.tpImage.Width - (2 * 8), this.tpImage.Height - (2 * 8)); this.pbGeneral.Visible = true; this.tpImage.ResumeLayout(false); this.tcMain.ResumeLayout(false); }
public clsBlueAngelsHistory(clsSupport objSupport, string ModuleName) : base(objSupport, ModuleName, "Blue Angels History") { //This call is required by the Component Designer. InitializeComponent(); //Add any initialization after the InitializeComponent() call }
public void DeleteMethodOK() { // create an instance for the class we want to create clsSupportCollection AllSupport = new clsSupportCollection(); // create the item of the test data clsSupport TestItem = new clsSupport(); // var to store the primary key Int32 PrimaryKey = 0; // set it properties TestItem.SupportId = 2; TestItem.Email = "*****@*****.**"; TestItem.Name = "GoGo Pro"; TestItem.Description = "A new invention in Camera module"; TestItem.Phonenum = "11111111111"; TestItem.DateSubmitted = DateTime.Now.Date; // set thisAdress to the test data AllSupport.ThisSupport = TestItem; // add the record PrimaryKey = AllSupport.Add(); // set the primary key TestI data TestItem.SupportId = PrimaryKey; // find the record AllSupport.ThisSupport.Find(PrimaryKey); // delete the record AllSupport.Delete(); //now find the record Boolean Found = AllSupport.ThisSupport.Find(PrimaryKey); // test to see that the record was not found Assert.IsFalse(Found); }
public clsMain(clsSupport objSupport, string ModuleName) : base(objSupport, ModuleName) { try { Trace("clsMain.New()", trcOption.trcApplication); } catch (Exception ex) { throw; } }
private void btnAdd_Click(object sender, EventArgs e) { clsSupport ASupport = new clsSupport(); ASupport.SupportId = -1; SupportAddForm SA = new SupportAddForm(); this.Hide(); SA.ShowDialog(); this.Close(); }
public frmMovies(clsSupport objSupport, clsMovies objBase, Form objParent = null, string Caption = null) : base(myFormName, objSupport, objBase, Caption, objParent) { //This call is required by the Windows Form Designer. InitializeComponent(); this.Text = Strings.Replace(Caption, "&", bpeNullString); LoadDefaultImage(); BindControls(); EnableControls(false); Icon = mTCBase.Icon; MinimumSize = new Size(Width, Height); ReportPath = mTCBase.ReportPath; }
public clsKits(clsSupport objSupport, string ModuleName) : base(objSupport, ModuleName, "Kits") { UpdateInProcess += clsKits_UpdateInProcess; UpdateComplete += clsKits_UpdateComplete; BeforeDelete += clsKits_BeforeDelete; DeleteComplete += clsKits_DeleteComplete; AddInProcess += clsKits_AddInProcess; AddComplete += clsKits_AddComplete; //This call is required by the Component Designer. InitializeComponent(); //Add any initialization after the InitializeComponent() call }
public frmClassifications(clsSupport objSupport, clsClassifications objBase, Form objParent = null, string Caption = null) : base(myFormName, objSupport, objBase, Caption, objParent) { //This call is required by the Windows Form Designer. InitializeComponent(); //Add any initialization after the InitializeComponent() call this.tcMain.Controls.Remove(this.tpNotes); this.Text = Strings.Replace(Caption, "&", bpeNullString); LoadDefaultImage(); BindControls(); EnableControls(false); Icon = mTCBase.Icon; MinimumSize = new Size(Width, Height); ReportPath = mTCBase.ReportPath; }
public void ThisSupportPropertyOK() { // create an instance of the class we want to create clsSupportCollection AllSupport = new clsSupportCollection(); // create some test data to assign the property clsSupport TestSupport = new clsSupport(); // set the properties of the object TestSupport.SupportId = 1; TestSupport.Email = "*****@*****.**"; TestSupport.Name = "GoGo Pro"; TestSupport.Description = "A new invention in Camera module"; TestSupport.Phonenum = "11111111111"; TestSupport.DateSubmitted = DateTime.Now.Date; // assign the data to the property AllSupport.ThisSupport = TestSupport; // test to see that the two values are the same Assert.AreEqual(AllSupport.ThisSupport, TestSupport); }
public frmCompanies(clsSupport objSupport, clsCompanies objBase, Form objParent = null, string Caption = null) : base(myFormName, objSupport, objBase, Caption, objParent) { //This call is required by the Windows Form Designer. InitializeComponent(); this.Text = Strings.Replace(Caption, "&", bpeNullString); LoadDefaultImage(); BindControls(); EnableControls(false); Icon = mTCBase.Icon; MinimumSize = new Size(Width, Height); ReportPath = mTCBase.ReportPath; //Reorder tcMain the way we want it (designer keeps changing it)... this.tcMain.SuspendLayout(); this.tcMain.TabPages.Clear(); TabPage[] pages = { tpGeneral }; this.tcMain.TabPages.AddRange(pages); this.tcMain.ResumeLayout(false); }
public void UpdateMethodOK() { // create an instance for the class we want to create clsSupportCollection AllSupport = new clsSupportCollection(); // create the item of the test data clsSupport TestItem = new clsSupport(); // var to store the primary key Int32 PrimaryKey = 0; // set it properties TestItem.SupportId = 2; TestItem.Email = "*****@*****.**"; TestItem.Name = "GoGo Pro"; TestItem.Description = "A new invention in Camera module"; TestItem.Phonenum = "11111111111"; TestItem.DateSubmitted = DateTime.Now.Date; // set thisAdress to the test data AllSupport.ThisSupport = TestItem; // add the record PrimaryKey = AllSupport.Add(); // set the primary key TestI data TestItem.SupportId = PrimaryKey; // modify the test data TestItem.Email = "*****@*****.**"; TestItem.Name = "Samsung CameraPro"; TestItem.Description = "Samsung's Latest Camera"; TestItem.Phonenum = "22222222222"; TestItem.DateSubmitted = DateTime.Now.Date; // set the record based on the new test data AllSupport.ThisSupport = TestItem; // Update the record AllSupport.Update(); // find the record AllSupport.ThisSupport.Find(PrimaryKey); // test to see that the record was not found Assert.AreEqual(AllSupport.ThisSupport, TestItem); }
public static void Main() { string ApplicationName = getApplicationName(); Debug.WriteLine(string.Format("{0} Started (allocating support infrastructure)...", ApplicationName)); clsSupport objSupport = null; clsMain objMain = null; bool fUnattended = false; try { objSupport = new clsSupport(null, "TreasureChest2"); string RegistryKey = string.Format("Software\\KClark Software\\{0}", objSupport.ApplicationName); objSupport.Trace.TraceMode = Convert.ToBoolean(objSupport.Registry.GetRegistrySetting(RootKeyConstants.HKEY_CURRENT_USER, RegistryKey, "TraceMode", false)); objSupport.Trace.TraceFile = (string)objSupport.Registry.GetRegistrySetting(RootKeyConstants.HKEY_CURRENT_USER, RegistryKey, "TraceFile", string.Format("{0}\\{1}.trace", objSupport.ApplicationPath, objSupport.ApplicationName)); objSupport.Trace.TraceOptions = (trcOption)objSupport.Registry.GetRegistrySetting(RootKeyConstants.HKEY_CURRENT_USER, RegistryKey, "TraceOptions", trcOption.trcApplication); if (objSupport.Trace.TraceMode) { objSupport.Trace.Trace(trcType.trcBody, new string('=', 132)); objSupport.Trace.Trace(trcType.trcBody, string.Format("{0} Start - {1}", objSupport.ApplicationName, objSupport.Trace.TraceFile)); } if (Environment.CommandLine.ToLower().IndexOf("/unattended") > -1) { fUnattended = true; } #if TRACESTARTUP FileInfo fi = new FileInfo(Environment.CommandLine.Split()[0].Replace("\"", "")); objMain = new clsMain(new clsSupport(null, string.Format("{0}.trace", fi.FullName.Substring(0, fi.FullName.Length - fi.Extension.Length)), trcOption.trcEverythingButMemory, true), "Main"); fi = null; #else objMain = new clsMain(objSupport, "modMain"); #endif Application.EnableVisualStyles(); Debug.WriteLine(string.Format("{0} Run()...", ApplicationName)); objMain.Run(); } catch (Exception ex) { string Message = string.Format("{1}{0}{0}StackTrace:{0}{2}{0}", Constants.vbCrLf, ex.Message, ex.StackTrace); Exception iException = ex.InnerException; if ((iException != null)) { Message += string.Format("{0}Underlying Exception(s):{0}", Constants.vbCrLf); while ((iException != null)) { Message += string.Format("{1}{0}{2}{0}{0}StackTrace:{0}{3}{0}", new object[] { Constants.vbCrLf, iException.GetType().Name, iException.Message, iException.StackTrace }); iException = iException.InnerException; } } if (fUnattended) { try { if (!EventLog.SourceExists(ApplicationName)) { EventLog.CreateEventSource(ApplicationName, "Application"); } EventLog.WriteEntry(ApplicationName, Message, EventLogEntryType.Error); } catch (Exception ex2) { } Console.WriteLine(Message); } else { System.Windows.Forms.MessageBox.Show(Message, ex.GetType().Name); } } finally { objMain = null; } }
public clsISBN(clsSupport objSupport) : base() { //Data obtained from http://www.isbn.spk-berlin.de/html/prefix/ //Group If Number Ranges //Identifier "0" are Between Insert Hyphens After //---------------------------------------------------------------------------- //00------------19 00-19 1st digit 3rd digit 9th digit //200-----------699 20-69 " 4th " " //7000----------8499 70-84 " 5th " " //85000---------89999 85-89 " 6th " " //900000--------949999 90-94 " 7th " " //9500000-------9999999 95-99 " 8th " " chstr[0] = "00002070859095"; //English //Group If Number Ranges //Identifier "1" are Between Insert Hyphens After //-------------------------------------------------------------------------- //00------------09 00-09 1st digit 3rd digit 9th digit //100-----------399 10-39 " 4th " " //4000----------5499 40-54 " 5th " " //55000---------86979 5500-8697 " 6th " " //869800--------998999 8698-9989 " 7th " " //9990000-------9999999 9990-9999 " 8th " " chstr[1] = "000010004000550086989990"; //English chstr[2] = "00002070849095"; //French chstr[3] = "00002070859095"; //German chstr[4] = "00002070859095"; //Japan chstr[5] = "000020708590@@92939598"; //Russia chstr[7] = "000010508090"; //China chstr[10] = "000020708590"; //Czechoslovakia chstr[11] = "000020708590"; //India - also has 93 but undefined chstr[12] = "000020709099"; //Norway chstr[13] = "000020708590"; //Poland chstr[14] = "0000207085909597"; //Spain chstr[15] = "000020708590"; //Brazil chstr[16] = "000030708090"; //Yugoslavia chstr[17] = "000040708597"; //Denmark chstr[18] = "000020708590"; //Italian chstr[19] = "000025558595"; //Korea chstr[20] = "000020507080"; //Belgium, Netherlands chstr[21] = "002050708597"; //Sweden chstr[22] = "006080909599"; //Unesco chstr[50] = "0000509099"; //Argentina chstr[51] = "0020558995"; //Finland chstr[52] = "00002050@@89@@9599"; //Finland chstr[53] = "0010156096"; //Croatia chstr[54] = "000030809095"; //Bulgaria chstr[55] = "0020558095"; //Sri Lanka chstr[56] = "00002070"; //Chile chstr[57] = "0000448297"; //Taiwan chstr[58] = "0000608095"; //Colombia chstr[59] = "00002070"; //Cuba chstr[60] = "0000207085"; //Greece chstr[61] = "0000206090"; //Slovenia chstr[62] = "00002070858790"; //Hong Kong chstr[63] = "000020708590"; //Hungary chstr[64] = "0000305590"; //Iran chstr[65] = "0000207090"; //Israel chstr[66] = "0000507090"; //Ukraine chstr[67] = "00609099"; //Malaysia -- 999 makes 5 digits but this is now accounted for later chstr[68] = "00004050@@80"; //Mexico -- don't know what happens before 10 and after 899 chstr[69] = "00204080"; //Pakistan chstr[70] = "0000609091"; //Mexico chstr[71] = "0000508591"; //Philippines chstr[72] = "0020558095"; //Portugal chstr[73] = "0020558095"; //Romania chstr[74] = "0000207085"; //Thailand chstr[75] = "0000306092"; //Turkey chstr[76] = "0040608095"; //Caribbean chstr[77] = "0000205070"; //Egypt chstr[78] = "00000020308090"; //Nigeria chstr[79] = "0020408095"; //Indonesia chstr[80] = "00002060"; //Venezuela chstr[81] = "00002030"; //Singapore chstr[82] = "000010@@70@@90"; //South Pacific chstr[83] = "000002204050809099"; //Malaysia chstr[84] = "0000408090"; //Bangladesh chstr[85] = "0000406090"; //Belarus chstr[87] = "0000509095"; //Argentina chstr[154] = "00204080"; //Morocco chstr[155] = "00004090"; //Lithuania chstr[156] = "00104090"; //Cameroun chstr[157] = "00004085"; //Jordan chstr[158] = "00105090"; //Bosnia chstr[160] = "00006090"; //Saudi Arabia chstr[161] = "00508095"; //Algeria chstr[162] = "00006085"; //Panama chstr[163] = "00305575"; //Cyprus chstr[164] = "007095"; //Ghana chstr[165] = "00004090"; //Kazakstan chstr[166] = "00008096"; //Kenya chstr[167] = "00004090"; //Kyrgyzstan chstr[168] = "00107097"; //Costa Rica chstr[170] = "00004090"; //Uganda chstr[171] = "00609099"; //Singapore chstr[172] = "0000@@@@10406090"; //Peru chstr[173] = "00107097"; //Tunisia chstr[174] = "00305575"; //Uruguay chstr[175] = "00509095"; //Moldova chstr[176] = "006090"; //Tanzania + 999 is 4 digits chstr[177] = "00009099"; //Costa Rica chstr[178] = "00009599"; //Ecuador chstr[179] = "00508090"; //Iceland chstr[180] = "004090"; //Papua New Guinea chstr[181] = "00001016208095"; //Morocco chstr[182] = "00008099"; //Zambia chstr[183] = "00809599"; //Gambia -- Don't know what happens before 80 chstr[184] = "00005090"; //Latvia chstr[185] = "00508090"; //Estonia chstr[186] = "000040909497"; //Lithuania chstr[187] = "00004088"; //Tanzania chstr[188] = "00305575"; //Ghana chstr[189] = "00306095"; //Macedonia chstr[203] = "002090"; //Mauritius chstr[204] = "006090"; //Netherlands Antilles chstr[206] = "003060"; //Kuwait chstr[208] = "001090"; //Malawi chstr[209] = "004095"; //Malta chstr[210] = "003090"; //Sierra Leone chstr[211] = "000060"; //Lesotho chstr[212] = "006090"; //Botswana chstr[214] = "005090"; //Suriname chstr[215] = "005080"; //Maldives chstr[216] = "003070"; //Namibia chstr[217] = "003090"; //Brunei Darussalam chstr[218] = "004090"; //Faroes chstr[219] = "004090"; //Benin chstr[220] = "005090"; //Andorra chstr[221] = "002070"; //Qatar chstr[223] = "002080"; //El Salvador chstr[225] = "004080"; //Paraguay chstr[226] = "001060"; //Honduras chstr[227] = "003060"; //Albania chstr[228] = "001080"; //Georgia chstr[231] = "005080"; //Seychelles chstr[232] = "001060"; //Malta }