Add project files.

This commit is contained in:
fireshaper 2024-05-02 08:35:02 -04:00
parent d406c31bfc
commit 549154bfb7
65 changed files with 22301 additions and 0 deletions

25
Kindlebox.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kindlebox", "Kindlebox\Kindlebox.csproj", "{E6C194AC-7AE5-4257-A25C-5AF9AC693079}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E6C194AC-7AE5-4257-A25C-5AF9AC693079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6C194AC-7AE5-4257-A25C-5AF9AC693079}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6C194AC-7AE5-4257-A25C-5AF9AC693079}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6C194AC-7AE5-4257-A25C-5AF9AC693079}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {399EFE77-28F7-497F-AD16-C4A2C3110D31}
EndGlobalSection
EndGlobal

108
Kindlebox/AddABreeding.Designer.cs generated Normal file
View File

@ -0,0 +1,108 @@
namespace Kindlebox
{
partial class AddABreeding
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblSire = new System.Windows.Forms.Label();
this.cbSire = new System.Windows.Forms.ComboBox();
this.dtpBreeding = new System.Windows.Forms.DateTimePicker();
this.lblBreedingDate = new System.Windows.Forms.Label();
this.bSave = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblSire
//
this.lblSire.AutoSize = true;
this.lblSire.Location = new System.Drawing.Point(12, 9);
this.lblSire.Name = "lblSire";
this.lblSire.Size = new System.Drawing.Size(73, 13);
this.lblSire.TabIndex = 0;
this.lblSire.Text = "Choose a Sire";
//
// cbSire
//
this.cbSire.FormattingEnabled = true;
this.cbSire.Location = new System.Drawing.Point(15, 26);
this.cbSire.Name = "cbSire";
this.cbSire.Size = new System.Drawing.Size(277, 21);
this.cbSire.Sorted = true;
this.cbSire.TabIndex = 1;
//
// dtpBreeding
//
this.dtpBreeding.Location = new System.Drawing.Point(12, 91);
this.dtpBreeding.Name = "dtpBreeding";
this.dtpBreeding.Size = new System.Drawing.Size(200, 20);
this.dtpBreeding.TabIndex = 2;
//
// lblBreedingDate
//
this.lblBreedingDate.AutoSize = true;
this.lblBreedingDate.Location = new System.Drawing.Point(12, 72);
this.lblBreedingDate.Name = "lblBreedingDate";
this.lblBreedingDate.Size = new System.Drawing.Size(87, 13);
this.lblBreedingDate.TabIndex = 3;
this.lblBreedingDate.Text = "Date of Breeding";
//
// bSave
//
this.bSave.Location = new System.Drawing.Point(428, 134);
this.bSave.Name = "bSave";
this.bSave.Size = new System.Drawing.Size(75, 32);
this.bSave.TabIndex = 4;
this.bSave.Text = "Save";
this.bSave.UseVisualStyleBackColor = true;
this.bSave.Click += new System.EventHandler(this.bSave_Click);
//
// AddABreeding
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(515, 178);
this.Controls.Add(this.bSave);
this.Controls.Add(this.lblBreedingDate);
this.Controls.Add(this.dtpBreeding);
this.Controls.Add(this.cbSire);
this.Controls.Add(this.lblSire);
this.Name = "AddABreeding";
this.Text = "Add A Breeding";
this.Load += new System.EventHandler(this.AddABreeding_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblSire;
private System.Windows.Forms.ComboBox cbSire;
private System.Windows.Forms.DateTimePicker dtpBreeding;
private System.Windows.Forms.Label lblBreedingDate;
private System.Windows.Forms.Button bSave;
}
}

93
Kindlebox/AddABreeding.cs Normal file
View File

@ -0,0 +1,93 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class AddABreeding : Form
{
Guid _breedingID;
Guid damID;
Guid sireID;
Form addBreedingForm = new Form();
public AddABreeding(Guid _damID)
{
InitializeComponent();
damID = _damID;
}
private void AddABreeding_Load(object sender, EventArgs e)
{
addBreedingForm = this;
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.Sex == "Buck" && r.Status.Equals(0))
{
cbSire.Items.Add(new BreedingComboBoxItem { Text = r.RabbitName, Value = r.RabbitID });
}
}
}
private void bSave_Click(object sender, EventArgs e)
{
sireID = (cbSire.SelectedItem as BreedingComboBoxItem).Value;
_breedingID = Guid.NewGuid();
if (BreedingList.breedings != null)
{
Breeding breeding = new Breeding(_breedingID, sireID, damID, dtpBreeding.Value);
BreedingList.breedings.Add(breeding);
}
else
{
BreedingList.breedings = new List<Breeding>();
Breeding breeding = new Breeding(_breedingID, sireID, damID, dtpBreeding.Value);
BreedingList.breedings.Add(breeding);
}
foreach (var rabbit in RabbitList.rabbits.Where(Rabbit => Rabbit.RabbitID == damID))
{
rabbit.PregnantStatus = true;
}
UpdateJson.UpdateRabbits();
//string fileName = Properties.Settings.Default.RabbitFile;
//var json = JsonConvert.SerializeObject(RabbitList.rabbits);
//System.IO.File.WriteAllText(fileName, json);
SaveBreeding();
addBreedingForm.Close();
}
private void SaveBreeding()
{
foreach (var breeding in BreedingList.breedings.Where(Breeding => Breeding.BreedingID == _breedingID)) {
breeding.BreedingDate = dtpBreeding.Value;
breeding.SireID = sireID;
breeding.DamID = damID;
UpdateJson.UpdateBreedings();
//string fileName = Properties.Settings.Default.BreedingFile;
//var json = JsonConvert.SerializeObject(BreedingList.breedings);
//System.IO.File.WriteAllText(fileName, json);
}
}
}
}

120
Kindlebox/AddABreeding.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

130
Kindlebox/AddALitter.Designer.cs generated Normal file
View File

@ -0,0 +1,130 @@
namespace Kindlebox
{
partial class AddALitter
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dtpBirthDate = new System.Windows.Forms.DateTimePicker();
this.lblDate = new System.Windows.Forms.Label();
this.lblDam = new System.Windows.Forms.Label();
this.lblSire = new System.Windows.Forms.Label();
this.lblLitterSize = new System.Windows.Forms.Label();
this.tbLitterSize = new System.Windows.Forms.TextBox();
this.bAddLitter = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// dtpBirthDate
//
this.dtpBirthDate.Location = new System.Drawing.Point(12, 33);
this.dtpBirthDate.Name = "dtpBirthDate";
this.dtpBirthDate.Size = new System.Drawing.Size(200, 20);
this.dtpBirthDate.TabIndex = 0;
//
// lblDate
//
this.lblDate.AutoSize = true;
this.lblDate.Location = new System.Drawing.Point(13, 13);
this.lblDate.Name = "lblDate";
this.lblDate.Size = new System.Drawing.Size(54, 13);
this.lblDate.TabIndex = 1;
this.lblDate.Text = "Birth Date";
//
// lblDam
//
this.lblDam.AutoSize = true;
this.lblDam.Location = new System.Drawing.Point(13, 76);
this.lblDam.Name = "lblDam";
this.lblDam.Size = new System.Drawing.Size(35, 13);
this.lblDam.TabIndex = 2;
this.lblDam.Text = "Dam: ";
//
// lblSire
//
this.lblSire.AutoSize = true;
this.lblSire.Location = new System.Drawing.Point(13, 108);
this.lblSire.Name = "lblSire";
this.lblSire.Size = new System.Drawing.Size(31, 13);
this.lblSire.TabIndex = 3;
this.lblSire.Text = "Sire: ";
//
// lblLitterSize
//
this.lblLitterSize.AutoSize = true;
this.lblLitterSize.Location = new System.Drawing.Point(13, 144);
this.lblLitterSize.Name = "lblLitterSize";
this.lblLitterSize.Size = new System.Drawing.Size(53, 13);
this.lblLitterSize.TabIndex = 5;
this.lblLitterSize.Text = "Litter Size";
//
// tbLitterSize
//
this.tbLitterSize.Location = new System.Drawing.Point(12, 160);
this.tbLitterSize.Name = "tbLitterSize";
this.tbLitterSize.Size = new System.Drawing.Size(100, 20);
this.tbLitterSize.TabIndex = 6;
//
// bAddLitter
//
this.bAddLitter.Location = new System.Drawing.Point(292, 201);
this.bAddLitter.Name = "bAddLitter";
this.bAddLitter.Size = new System.Drawing.Size(75, 23);
this.bAddLitter.TabIndex = 7;
this.bAddLitter.Text = "Save";
this.bAddLitter.UseVisualStyleBackColor = true;
this.bAddLitter.Click += new System.EventHandler(this.bAddLitter_Click);
//
// AddALitter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(379, 249);
this.Controls.Add(this.bAddLitter);
this.Controls.Add(this.tbLitterSize);
this.Controls.Add(this.lblLitterSize);
this.Controls.Add(this.lblSire);
this.Controls.Add(this.lblDam);
this.Controls.Add(this.lblDate);
this.Controls.Add(this.dtpBirthDate);
this.Name = "AddALitter";
this.Text = "Add a Litter";
this.Load += new System.EventHandler(this.AddALitter_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DateTimePicker dtpBirthDate;
private System.Windows.Forms.Label lblDate;
private System.Windows.Forms.Label lblDam;
private System.Windows.Forms.Label lblSire;
private System.Windows.Forms.Label lblLitterSize;
private System.Windows.Forms.TextBox tbLitterSize;
private System.Windows.Forms.Button bAddLitter;
}
}

144
Kindlebox/AddALitter.cs Normal file
View File

@ -0,0 +1,144 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace Kindlebox
{
public partial class AddALitter : Form
{
Guid damID;
Guid litterID;
Guid sireID;
Guid breedingID;
int litterSize = 0;
Form addLitterForm = new Form();
public AddALitter(Guid _damID)
{
InitializeComponent();
damID = _damID;
}
private void AddALitter_Load(object sender, EventArgs e)
{
addLitterForm = this;
foreach (Breeding b in BreedingList.breedings)
{
if (b.DamID == damID)
{
breedingID = b.BreedingID;
sireID = b.SireID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
//if (r.Sex == "Buck" && r.Status.Equals(0))
//{
// cbChooseSire.Items.Add(new BreedingComboBoxItem { Text = r.RabbitName, Value = r.RabbitID });
//}
if (r.RabbitID == sireID)
{
lblSire.Text = "Sire: " + r.RabbitName;
}
if (r.RabbitID == damID)
{
lblDam.Text = "Dam: " + r.RabbitName;
}
}
}
private void bAddLitter_Click(object sender, EventArgs e)
{
//sireID = (cbChooseSire.SelectedItem as BreedingComboBoxItem).Value;
litterID = Guid.NewGuid();
litterSize = int.Parse(tbLitterSize.Text);
if (LitterList.litters != null)
{
Litter litter = new Litter(litterID, sireID, damID, litterSize, dtpBirthDate.Value);
LitterList.litters.Add(litter);
}
else
{
LitterList.litters = new List<Litter>();
Litter litter = new Litter(litterID, sireID, damID, litterSize, dtpBirthDate.Value);
LitterList.litters.Add(litter);
}
// Update the dam's pregnancy status
foreach (var rabbit in RabbitList.rabbits.Where(Rabbit => Rabbit.RabbitID == damID))
{
rabbit.PregnantStatus = false;
}
// Add each new kit that was in the litter
for (int i = 0; i < litterSize; i++)
{
Guid newKitID = Guid.NewGuid();
var firstChars = Properties.Settings.Default.FarmName.Split(' ').Select(s => s[0]);
var FarmInitials = "";
foreach (var firstChar in firstChars)
{
FarmInitials += firstChar;
}
String newKitName = FarmInitials + " kit (" + newKitID.ToString("N").Substring(0,5) + ")";
Rabbit rabbit = new Rabbit(newKitID, Properties.Settings.Default.FarmName, newKitName, dtpBirthDate.Value, sireID, damID, litterID);
RabbitList.rabbits.Add(rabbit);
}
UpdateJson.UpdateRabbits();
SaveLitter();
addLitterForm.Close();
}
private void SaveLitter()
{
foreach (var litter in LitterList.litters.Where(Litter => Litter.LitterID == litterID)){
litter.SireID = sireID;
litter.DamID = damID;
litter.LitterSize = litterSize;
litter.LitterDate = dtpBirthDate.Value;
}
UpdateJson.UpdateLitters();
foreach (Breeding b in BreedingList.breedings.Where(Breeding => Breeding.BreedingID == breedingID))
{
b.isSuccessful = true;
b.isActive = false;
b.LitterID = litterID;
}
//BreedingList.breedings.RemoveAll(x => x.BreedingID == breedingID);
UpdateJson.UpdateBreedings();
}
}
}

120
Kindlebox/AddALitter.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

312
Kindlebox/AddRabbitForm.Designer.cs generated Normal file
View File

@ -0,0 +1,312 @@
namespace Kindlebox
{
partial class AddRabbitForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.tbFarmName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbRabbitName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tbEarNum = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.munWeight = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.tbColor = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label7 = new System.Windows.Forms.Label();
this.tbRegNum = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.tbGCNum = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.cbSex = new System.Windows.Forms.ComboBox();
this.bSave = new System.Windows.Forms.Button();
this.bVerifyRabbit = new System.Windows.Forms.Button();
this.cbRabbitOwned = new System.Windows.Forms.CheckBox();
this.cbDOBUnknwon = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.munWeight)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 29);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(61, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Farm Name";
//
// tbFarmName
//
this.tbFarmName.Location = new System.Drawing.Point(15, 45);
this.tbFarmName.Name = "tbFarmName";
this.tbFarmName.Size = new System.Drawing.Size(175, 20);
this.tbFarmName.TabIndex = 0;
this.tbFarmName.MouseHover += new System.EventHandler(this.tbFarmName_MouseHover);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(257, 29);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(69, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Rabbit Name";
//
// tbRabbitName
//
this.tbRabbitName.Location = new System.Drawing.Point(260, 45);
this.tbRabbitName.Name = "tbRabbitName";
this.tbRabbitName.Size = new System.Drawing.Size(188, 20);
this.tbRabbitName.TabIndex = 1;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 84);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(63, 13);
this.label3.TabIndex = 0;
this.label3.Text = "Ear Number";
//
// tbEarNum
//
this.tbEarNum.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.tbEarNum.Location = new System.Drawing.Point(15, 100);
this.tbEarNum.Name = "tbEarNum";
this.tbEarNum.Size = new System.Drawing.Size(175, 20);
this.tbEarNum.TabIndex = 2;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 138);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(63, 13);
this.label4.TabIndex = 0;
this.label4.Text = "Weight (lbs)";
//
// munWeight
//
this.munWeight.DecimalPlaces = 1;
this.munWeight.Location = new System.Drawing.Point(15, 155);
this.munWeight.Name = "munWeight";
this.munWeight.Size = new System.Drawing.Size(59, 20);
this.munWeight.TabIndex = 4;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 196);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(31, 13);
this.label5.TabIndex = 0;
this.label5.Text = "Color";
//
// tbColor
//
this.tbColor.Location = new System.Drawing.Point(15, 212);
this.tbColor.Name = "tbColor";
this.tbColor.Size = new System.Drawing.Size(433, 20);
this.tbColor.TabIndex = 6;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(257, 138);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(66, 13);
this.label6.TabIndex = 0;
this.label6.Text = "Date of Birth";
//
// dateTimePicker1
//
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker1.Location = new System.Drawing.Point(260, 154);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(105, 20);
this.dateTimePicker1.TabIndex = 5;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 253);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(103, 13);
this.label7.TabIndex = 0;
this.label7.Text = "Registration Number";
//
// tbRegNum
//
this.tbRegNum.Location = new System.Drawing.Point(15, 269);
this.tbRegNum.Name = "tbRegNum";
this.tbRegNum.Size = new System.Drawing.Size(175, 20);
this.tbRegNum.TabIndex = 7;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(257, 253);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(126, 13);
this.label8.TabIndex = 0;
this.label8.Text = "Grand Champion Number";
//
// tbGCNum
//
this.tbGCNum.Location = new System.Drawing.Point(260, 269);
this.tbGCNum.Name = "tbGCNum";
this.tbGCNum.Size = new System.Drawing.Size(188, 20);
this.tbGCNum.TabIndex = 8;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(257, 84);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(25, 13);
this.label9.TabIndex = 0;
this.label9.Text = "Sex";
//
// cbSex
//
this.cbSex.FormattingEnabled = true;
this.cbSex.Items.AddRange(new object[] {
"Buck",
"Doe"});
this.cbSex.Location = new System.Drawing.Point(260, 100);
this.cbSex.Name = "cbSex";
this.cbSex.Size = new System.Drawing.Size(121, 21);
this.cbSex.TabIndex = 3;
//
// bSave
//
this.bSave.Location = new System.Drawing.Point(373, 345);
this.bSave.Name = "bSave";
this.bSave.Size = new System.Drawing.Size(75, 23);
this.bSave.TabIndex = 9;
this.bSave.TabStop = false;
this.bSave.Text = "Save";
this.bSave.UseVisualStyleBackColor = true;
this.bSave.Click += new System.EventHandler(this.bSave_Click);
//
// bVerifyRabbit
//
this.bVerifyRabbit.Location = new System.Drawing.Point(456, 43);
this.bVerifyRabbit.Name = "bVerifyRabbit";
this.bVerifyRabbit.Size = new System.Drawing.Size(26, 23);
this.bVerifyRabbit.TabIndex = 10;
this.bVerifyRabbit.Text = "?";
this.bVerifyRabbit.UseVisualStyleBackColor = true;
this.bVerifyRabbit.Click += new System.EventHandler(this.bVerifyRabbit_Click);
this.bVerifyRabbit.MouseHover += new System.EventHandler(this.bVerifyRabbit_MouseHover);
//
// cbRabbitOwned
//
this.cbRabbitOwned.AutoSize = true;
this.cbRabbitOwned.Location = new System.Drawing.Point(15, 323);
this.cbRabbitOwned.Name = "cbRabbitOwned";
this.cbRabbitOwned.Size = new System.Drawing.Size(100, 17);
this.cbRabbitOwned.TabIndex = 11;
this.cbRabbitOwned.Text = "I own this rabbit";
this.cbRabbitOwned.UseVisualStyleBackColor = true;
//
// cbDOBUnknwon
//
this.cbDOBUnknwon.AutoSize = true;
this.cbDOBUnknwon.Location = new System.Drawing.Point(260, 180);
this.cbDOBUnknwon.Name = "cbDOBUnknwon";
this.cbDOBUnknwon.Size = new System.Drawing.Size(134, 17);
this.cbDOBUnknwon.TabIndex = 12;
this.cbDOBUnknwon.Text = "Date of Birth Unknown";
this.cbDOBUnknwon.UseVisualStyleBackColor = true;
this.cbDOBUnknwon.CheckedChanged += new System.EventHandler(this.cbDOBUnknwon_CheckedChanged);
//
// AddRabbitForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(501, 408);
this.Controls.Add(this.cbDOBUnknwon);
this.Controls.Add(this.cbRabbitOwned);
this.Controls.Add(this.bVerifyRabbit);
this.Controls.Add(this.bSave);
this.Controls.Add(this.cbSex);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.label6);
this.Controls.Add(this.munWeight);
this.Controls.Add(this.label4);
this.Controls.Add(this.tbColor);
this.Controls.Add(this.tbGCNum);
this.Controls.Add(this.tbRabbitName);
this.Controls.Add(this.tbEarNum);
this.Controls.Add(this.label8);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbRegNum);
this.Controls.Add(this.label9);
this.Controls.Add(this.label3);
this.Controls.Add(this.label7);
this.Controls.Add(this.tbFarmName);
this.Controls.Add(this.label1);
this.Name = "AddRabbitForm";
this.Text = "Rabbit Info";
this.Load += new System.EventHandler(this.AddRabbitForm_Load);
((System.ComponentModel.ISupportInitialize)(this.munWeight)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbFarmName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbRabbitName;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tbEarNum;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown munWeight;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tbColor;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox tbRegNum;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tbGCNum;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox cbSex;
private System.Windows.Forms.Button bSave;
private System.Windows.Forms.Button bVerifyRabbit;
private System.Windows.Forms.CheckBox cbRabbitOwned;
private System.Windows.Forms.CheckBox cbDOBUnknwon;
}
}

334
Kindlebox/AddRabbitForm.cs Normal file
View File

@ -0,0 +1,334 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class AddRabbitForm : Form
{
public string rabbitR;
public int listIndex;
public string nextRel;
public Guid rabbitID = Guid.Empty;
public int status;
public DateTime dateOfBirth;
public AddRabbitForm(string rabbit)
{
InitializeComponent();
rabbitR = rabbit;
string[] relationships = { "root", "sire", "dam", "ssire", "sdam", "dsire", "ddam", "sssire", "ssdam", "sdsire", "sddam", "dssire", "dsdam", "ddsire", "dddam" };
List<string> rabbitRel = new List<string>(relationships);
}
private void AddRabbitForm_Load(object sender, EventArgs e)
{
string[] relationships = { "root", "sire", "dam", "ssire", "sdam", "dsire", "ddam", "sssire", "ssdam", "sdsire", "sddam", "dssire", "dsdam", "ddsire", "dddam" };
List<string> rabbitRel = new List<string>(relationships);
if (rabbitR == "root")
{
cbRabbitOwned.Checked = true;
}
else
{
munWeight.Value = 4;
}
if (rabbitR == "sire" || rabbitR == "ssire" || rabbitR == "sssire" || rabbitR == "sdsire" || rabbitR == "dsire" || rabbitR == "dssire" || rabbitR == "ddsire")
{
cbSex.Text = "Buck";
}
else if (rabbitR == "dam" || rabbitR == "sdam" || rabbitR == "ssdam" || rabbitR == "sddam" || rabbitR == "ddam" || rabbitR == "dsdam" || rabbitR == "dddam")
{
cbSex.Text = "Doe";
}
listIndex = rabbitRel.FindIndex(a => a.Contains(rabbitR));
}
private void SaveRabbit(Guid _rabbitID)
{
if (_rabbitID == Guid.Empty)
{
rabbitID = Guid.NewGuid();
if (rabbitR == "root")
{
AddRabbitPedigree.rootID = rabbitID;
if (cbRabbitOwned.Checked)
{
status = 0;
}
else
{
status = 4;
}
}
else if (rabbitR == "sire")
{
AddRabbitPedigree.sireID = rabbitID;
status = 4;
}
else if (rabbitR == "dam")
{
AddRabbitPedigree.damID = rabbitID;
status = 4;
}
else if (rabbitR == "ssire")
{
AddRabbitPedigree.ssireID = rabbitID;
status = 4;
}
else if (rabbitR == "sssire")
{
AddRabbitPedigree.sssireID = rabbitID;
status = 4;
}
else if (rabbitR == "ssdam")
{
AddRabbitPedigree.ssdamID = rabbitID;
status = 4;
}
else if (rabbitR == "sdam")
{
AddRabbitPedigree.sdamID = rabbitID;
status = 4;
}
else if (rabbitR == "sdsire")
{
AddRabbitPedigree.sdsireID = rabbitID;
status = 4;
}
else if (rabbitR == "sddam")
{
AddRabbitPedigree.sddamID = rabbitID;
status = 4;
}
else if (rabbitR == "dsire")
{
AddRabbitPedigree.dsireID = rabbitID;
status = 4;
}
else if (rabbitR == "ddam")
{
AddRabbitPedigree.ddamID = rabbitID;
status = 4;
}
else if (rabbitR == "dssire")
{
AddRabbitPedigree.dssireID = rabbitID;
status = 4;
}
else if (rabbitR == "dsdam")
{
AddRabbitPedigree.dsdamID = rabbitID;
status = 4;
}
else if (rabbitR == "ddsire")
{
AddRabbitPedigree.ddsireID = rabbitID;
status = 4;
}
else if (rabbitR == "dddam")
{
AddRabbitPedigree.dddamID = rabbitID;
status = 4;
}
if (cbDOBUnknwon.Checked == true)
{
dateOfBirth = DateTime.Parse("01/01/2000");
}
else
{
dateOfBirth = dateTimePicker1.Value;
}
var rabbitName = tbRabbitName.Text;
if (rabbitName.EndsWith("'s")) {
string[] rabbitNameA = rabbitName.Split('\'');
rabbitName = rabbitNameA[0];
}
Rabbit rabbit = new Rabbit(rabbitID, tbFarmName.Text, rabbitName, tbEarNum.Text, tbColor.Text, tbRegNum.Text, tbGCNum.Text, munWeight.Value, dateOfBirth, cbSex.Text, status);
RabbitList.rabbits.Add(rabbit);
}
else
{
rabbitID = _rabbitID;
if (rabbitR == "root")
{
AddRabbitPedigree.rootID = rabbitID;
if (cbRabbitOwned.Checked)
{
status = 0;
}
else
{
status = 4;
}
}
else if (rabbitR == "sire")
{
AddRabbitPedigree.sireID = rabbitID;
status = 4;
}
else if (rabbitR == "dam")
{
AddRabbitPedigree.damID = rabbitID;
status = 4;
}
else if (rabbitR == "ssire")
{
AddRabbitPedigree.ssireID = rabbitID;
status = 4;
}
else if (rabbitR == "sssire")
{
AddRabbitPedigree.sssireID = rabbitID;
status = 4;
}
else if (rabbitR == "ssdam")
{
AddRabbitPedigree.ssdamID = rabbitID;
status = 4;
}
else if (rabbitR == "sdam")
{
AddRabbitPedigree.sdamID = rabbitID;
status = 4;
}
else if (rabbitR == "sdsire")
{
AddRabbitPedigree.sdsireID = rabbitID;
status = 4;
}
else if (rabbitR == "sddam")
{
AddRabbitPedigree.sddamID = rabbitID;
status = 4;
}
else if (rabbitR == "dsire")
{
AddRabbitPedigree.dsireID = rabbitID;
status = 4;
}
else if (rabbitR == "ddam")
{
AddRabbitPedigree.ddamID = rabbitID;
status = 4;
}
else if (rabbitR == "dssire")
{
AddRabbitPedigree.dssireID = rabbitID;
status = 4;
}
else if (rabbitR == "dsdam")
{
AddRabbitPedigree.dsdamID = rabbitID;
status = 4;
}
else if (rabbitR == "ddsire")
{
AddRabbitPedigree.ddsireID = rabbitID;
status = 4;
}
else if (rabbitR == "dddam")
{
AddRabbitPedigree.dddamID = rabbitID;
status = 4;
}
}
}
private void bSave_Click(object sender, EventArgs e)
{
SaveRabbit(rabbitID);
this.Close();
}
private void bVerifyRabbit_Click(object sender, EventArgs e)
{
if (tbFarmName.Text == "" || tbRabbitName.Text == "")
{
MessageBox.Show("You must input both a Farm Name and Rabbit Name to check if the rabbit already exists in your rabbitry file.");
}
List<Rabbit> r = new List<Rabbit>(RabbitList.rabbits.FindAll(rabbit => rabbit.FarmName == tbFarmName.Text && rabbit.RabbitName == tbRabbitName.Text));
foreach(Rabbit i in r)
{
Console.WriteLine(i.ToString());
}
if (r.Count > 0)
{
rabbitID = r[0].RabbitID;
tbFarmName.Text = r[0].FarmName;
tbRabbitName.Text = r[0].RabbitName;
tbEarNum.Text = r[0].EarNumber;
tbColor.Text = r[0].Color;
tbRegNum.Text = r[0].RegNumber;
tbGCNum.Text = r[0].GCNumber;
munWeight.Value = r[0].Weight;
dateTimePicker1.Value = r[0].Birthday;
cbSex.Text = r[0].Sex;
tbEarNum.Enabled = false;
cbSex.Enabled = false;
tbColor.Enabled = false;
tbRegNum.Enabled = false;
tbGCNum.Enabled = false;
munWeight.Enabled = false;
dateTimePicker1.Enabled = false;
//AddRabbitPedigree.rabbitExists = true;
MessageBox.Show(r[0].FarmName + "'s " + r[0].RabbitName + " is already in your rabbitry file.");
}
else
{
MessageBox.Show(tbFarmName.Text + "'s " + tbRabbitName.Text + " does not exist in your rabbitry file. Continue filling out the form to add them.");
}
}
private void bVerifyRabbit_MouseHover(object sender, EventArgs e)
{
ToolTip toolTip = new ToolTip();
toolTip.SetToolTip(this.bVerifyRabbit, "Click to verify if the rabbit already exists.");
}
private void tbFarmName_MouseHover(object sender, EventArgs e)
{
ToolTip toolTip = new ToolTip();
toolTip.SetToolTip(this.tbFarmName, "Don't add the 's to the end, it will be added for you.");
}
private void cbDOBUnknwon_CheckedChanged(object sender, EventArgs e)
{
dateTimePicker1.Enabled = false;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

54
Kindlebox/App.config Normal file
View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Kindlebox.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<Kindlebox.Properties.Settings>
<setting name="RabbitFile" serializeAs="String">
<value />
</setting>
<setting name="LitterFile" serializeAs="String">
<value />
</setting>
<setting name="BreedingFile" serializeAs="String">
<value />
</setting>
<setting name="FarmName" serializeAs="String">
<value />
</setting>
<setting name="UserName" serializeAs="String">
<value />
</setting>
<setting name="FarmStreet" serializeAs="String">
<value />
</setting>
<setting name="FarmCity" serializeAs="String">
<value />
</setting>
<setting name="FarmState" serializeAs="String">
<value />
</setting>
<setting name="FarmZIP" serializeAs="String">
<value />
</setting>
<setting name="FarmPhone" serializeAs="String">
<value />
</setting>
<setting name="FarmEmail" serializeAs="String">
<value />
</setting>
<setting name="FarmWWW" serializeAs="String">
<value />
</setting>
<setting name="FarmLogo" serializeAs="String">
<value />
</setting>
</Kindlebox.Properties.Settings>
</userSettings>
</configuration>

31
Kindlebox/Breeding.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kindlebox
{
internal class Breeding
{
public Guid BreedingID { get; set; }
public Guid SireID { get; set; }
public Guid DamID { get; set; }
public DateTime BreedingDate { get; set; }
public bool isActive { get; set; }
public Guid LitterID { get; set; }
public bool isSuccessful { get; set; }
public Breeding(Guid breedingID, Guid sireID, Guid damID, DateTime breedingDate)
{
BreedingID = breedingID;
SireID = sireID;
DamID = damID;
BreedingDate = breedingDate;
isActive = true;
LitterID = Guid.Empty;
isSuccessful = false;
}
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public class BreedingComboBoxItem
{
public String Text { get; set; }
public Guid Value { get; set; }
public override string ToString()
{
return Text;
}
}
}

31
Kindlebox/BreedingList.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kindlebox
{
internal class BreedingList
{
public static List<Breeding> breedings;
static BreedingList()
{
breedings = new List<Breeding>();
}
public static void Record(Guid BreedingID, Guid SireID, Guid DamID, DateTime BreedingDate)
{
breedings.Add(new Breeding(BreedingID, SireID, DamID, BreedingDate));
}
public static void Display()
{
foreach (var breeding in breedings)
{
Console.WriteLine(breeding.ToString());
}
}
}
}

306
Kindlebox/CreateRabbitry.Designer.cs generated Normal file
View File

@ -0,0 +1,306 @@
namespace Kindlebox
{
partial class CreateRabbitry
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreateRabbitry));
this.tbFarmName = new System.Windows.Forms.TextBox();
this.lblCreateRabbitryInfo = new System.Windows.Forms.Label();
this.lblFarmName = new System.Windows.Forms.Label();
this.lblFarmAddress = new System.Windows.Forms.Label();
this.tbFarmAddress = new System.Windows.Forms.TextBox();
this.lblFarmCity = new System.Windows.Forms.Label();
this.tbFarmCity = new System.Windows.Forms.TextBox();
this.lblFarmState = new System.Windows.Forms.Label();
this.cbFarmState = new System.Windows.Forms.ComboBox();
this.lblFarmZIP = new System.Windows.Forms.Label();
this.tbFarmZIP = new System.Windows.Forms.TextBox();
this.lblFarmPhone = new System.Windows.Forms.Label();
this.tbFarmPhone = new System.Windows.Forms.TextBox();
this.lblFarmEmail = new System.Windows.Forms.Label();
this.tbFarmEmail = new System.Windows.Forms.TextBox();
this.lblFarmWWW = new System.Windows.Forms.Label();
this.tbFarmWWW = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// tbFarmName
//
this.tbFarmName.Location = new System.Drawing.Point(15, 73);
this.tbFarmName.Name = "tbFarmName";
this.tbFarmName.Size = new System.Drawing.Size(232, 20);
this.tbFarmName.TabIndex = 0;
//
// lblCreateRabbitryInfo
//
this.lblCreateRabbitryInfo.AutoSize = true;
this.lblCreateRabbitryInfo.Location = new System.Drawing.Point(12, 9);
this.lblCreateRabbitryInfo.Name = "lblCreateRabbitryInfo";
this.lblCreateRabbitryInfo.Size = new System.Drawing.Size(472, 13);
this.lblCreateRabbitryInfo.TabIndex = 1;
this.lblCreateRabbitryInfo.Text = "Fill in the following text boxes to create your rabbitry. This information is als" +
"o used on your Pedigree.";
//
// lblFarmName
//
this.lblFarmName.AutoSize = true;
this.lblFarmName.Location = new System.Drawing.Point(12, 57);
this.lblFarmName.Name = "lblFarmName";
this.lblFarmName.Size = new System.Drawing.Size(64, 13);
this.lblFarmName.TabIndex = 2;
this.lblFarmName.Text = "Farm Name:";
//
// lblFarmAddress
//
this.lblFarmAddress.AutoSize = true;
this.lblFarmAddress.Location = new System.Drawing.Point(12, 108);
this.lblFarmAddress.Name = "lblFarmAddress";
this.lblFarmAddress.Size = new System.Drawing.Size(48, 13);
this.lblFarmAddress.TabIndex = 4;
this.lblFarmAddress.Text = "Address:";
//
// tbFarmAddress
//
this.tbFarmAddress.Location = new System.Drawing.Point(15, 124);
this.tbFarmAddress.Name = "tbFarmAddress";
this.tbFarmAddress.Size = new System.Drawing.Size(457, 20);
this.tbFarmAddress.TabIndex = 3;
//
// lblFarmCity
//
this.lblFarmCity.AutoSize = true;
this.lblFarmCity.Location = new System.Drawing.Point(12, 161);
this.lblFarmCity.Name = "lblFarmCity";
this.lblFarmCity.Size = new System.Drawing.Size(27, 13);
this.lblFarmCity.TabIndex = 6;
this.lblFarmCity.Text = "City:";
//
// tbFarmCity
//
this.tbFarmCity.Location = new System.Drawing.Point(15, 177);
this.tbFarmCity.Name = "tbFarmCity";
this.tbFarmCity.Size = new System.Drawing.Size(144, 20);
this.tbFarmCity.TabIndex = 5;
//
// lblFarmState
//
this.lblFarmState.AutoSize = true;
this.lblFarmState.Location = new System.Drawing.Point(180, 161);
this.lblFarmState.Name = "lblFarmState";
this.lblFarmState.Size = new System.Drawing.Size(35, 13);
this.lblFarmState.TabIndex = 8;
this.lblFarmState.Text = "State:";
//
// cbFarmState
//
this.cbFarmState.FormattingEnabled = true;
this.cbFarmState.Items.AddRange(new object[] {
"AK",
"AL",
"AR",
"AZ",
"CA",
"CO",
"CT",
"DC",
"DE",
"FL",
"GA",
"HI",
"IA",
"ID",
"IL",
"IN",
"KS",
"KY",
"LA",
"MA",
"MD",
"ME",
"MI",
"MN",
"MO",
"MS",
"MT",
"NC",
"ND",
"NE",
"NH",
"NJ",
"NM",
"NV",
"NY",
"OH",
"OK",
"OR",
"PA",
"RI",
"SC",
"SD",
"TN",
"TX",
"UT",
"VA",
"VT",
"WA",
"WI",
"WV",
"WY"});
this.cbFarmState.Location = new System.Drawing.Point(183, 176);
this.cbFarmState.Name = "cbFarmState";
this.cbFarmState.Size = new System.Drawing.Size(64, 21);
this.cbFarmState.TabIndex = 9;
//
// lblFarmZIP
//
this.lblFarmZIP.AutoSize = true;
this.lblFarmZIP.Location = new System.Drawing.Point(265, 160);
this.lblFarmZIP.Name = "lblFarmZIP";
this.lblFarmZIP.Size = new System.Drawing.Size(27, 13);
this.lblFarmZIP.TabIndex = 11;
this.lblFarmZIP.Text = "ZIP:";
//
// tbFarmZIP
//
this.tbFarmZIP.Location = new System.Drawing.Point(268, 176);
this.tbFarmZIP.Name = "tbFarmZIP";
this.tbFarmZIP.Size = new System.Drawing.Size(89, 20);
this.tbFarmZIP.TabIndex = 10;
//
// lblFarmPhone
//
this.lblFarmPhone.AutoSize = true;
this.lblFarmPhone.Location = new System.Drawing.Point(12, 213);
this.lblFarmPhone.Name = "lblFarmPhone";
this.lblFarmPhone.Size = new System.Drawing.Size(41, 13);
this.lblFarmPhone.TabIndex = 13;
this.lblFarmPhone.Text = "Phone:";
//
// tbFarmPhone
//
this.tbFarmPhone.Location = new System.Drawing.Point(15, 229);
this.tbFarmPhone.Name = "tbFarmPhone";
this.tbFarmPhone.Size = new System.Drawing.Size(144, 20);
this.tbFarmPhone.TabIndex = 12;
//
// lblFarmEmail
//
this.lblFarmEmail.AutoSize = true;
this.lblFarmEmail.Location = new System.Drawing.Point(12, 267);
this.lblFarmEmail.Name = "lblFarmEmail";
this.lblFarmEmail.Size = new System.Drawing.Size(35, 13);
this.lblFarmEmail.TabIndex = 15;
this.lblFarmEmail.Text = "Email:";
//
// tbFarmEmail
//
this.tbFarmEmail.Location = new System.Drawing.Point(15, 283);
this.tbFarmEmail.Name = "tbFarmEmail";
this.tbFarmEmail.Size = new System.Drawing.Size(342, 20);
this.tbFarmEmail.TabIndex = 14;
//
// lblFarmWWW
//
this.lblFarmWWW.AutoSize = true;
this.lblFarmWWW.Location = new System.Drawing.Point(12, 314);
this.lblFarmWWW.Name = "lblFarmWWW";
this.lblFarmWWW.Size = new System.Drawing.Size(74, 13);
this.lblFarmWWW.TabIndex = 17;
this.lblFarmWWW.Text = "Web Address:";
//
// tbFarmWWW
//
this.tbFarmWWW.Location = new System.Drawing.Point(15, 330);
this.tbFarmWWW.Name = "tbFarmWWW";
this.tbFarmWWW.Size = new System.Drawing.Size(457, 20);
this.tbFarmWWW.TabIndex = 16;
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(448, 389);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(90, 33);
this.btnSave.TabIndex = 18;
this.btnSave.Text = "Save";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// CreateRabbitry
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(563, 440);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.lblFarmWWW);
this.Controls.Add(this.tbFarmWWW);
this.Controls.Add(this.lblFarmEmail);
this.Controls.Add(this.tbFarmEmail);
this.Controls.Add(this.lblFarmPhone);
this.Controls.Add(this.tbFarmPhone);
this.Controls.Add(this.lblFarmZIP);
this.Controls.Add(this.tbFarmZIP);
this.Controls.Add(this.cbFarmState);
this.Controls.Add(this.lblFarmState);
this.Controls.Add(this.lblFarmCity);
this.Controls.Add(this.tbFarmCity);
this.Controls.Add(this.lblFarmAddress);
this.Controls.Add(this.tbFarmAddress);
this.Controls.Add(this.lblFarmName);
this.Controls.Add(this.lblCreateRabbitryInfo);
this.Controls.Add(this.tbFarmName);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "CreateRabbitry";
this.Text = "Create Rabbitry";
this.Load += new System.EventHandler(this.CreateRabbitry_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox tbFarmName;
private System.Windows.Forms.Label lblCreateRabbitryInfo;
private System.Windows.Forms.Label lblFarmName;
private System.Windows.Forms.Label lblFarmAddress;
private System.Windows.Forms.TextBox tbFarmAddress;
private System.Windows.Forms.Label lblFarmCity;
private System.Windows.Forms.TextBox tbFarmCity;
private System.Windows.Forms.Label lblFarmState;
private System.Windows.Forms.ComboBox cbFarmState;
private System.Windows.Forms.Label lblFarmZIP;
private System.Windows.Forms.TextBox tbFarmZIP;
private System.Windows.Forms.Label lblFarmPhone;
private System.Windows.Forms.TextBox tbFarmPhone;
private System.Windows.Forms.Label lblFarmEmail;
private System.Windows.Forms.TextBox tbFarmEmail;
private System.Windows.Forms.Label lblFarmWWW;
private System.Windows.Forms.TextBox tbFarmWWW;
private System.Windows.Forms.Button btnSave;
}
}

View File

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class CreateRabbitry : Form
{
public CreateRabbitry()
{
InitializeComponent();
}
private void CreateRabbitry_Load(object sender, EventArgs e)
{
}
private void btnSave_Click(object sender, EventArgs e)
{
Properties.Settings.Default.FarmName = tbFarmName.Text;
Properties.Settings.Default.FarmStreet = tbFarmAddress.Text;
Properties.Settings.Default.FarmCity = tbFarmCity.Text;
Properties.Settings.Default.FarmState = cbFarmState.Text;
Properties.Settings.Default.FarmZIP = tbFarmZIP.Text;
Properties.Settings.Default.FarmPhone = tbFarmPhone.Text;
Properties.Settings.Default.FarmEmail = tbFarmEmail.Text;
Properties.Settings.Default.FarmWWW = tbFarmWWW.Text;
var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string directory = Path.Combine(path, "Kindlebox");
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
string file = Path.Combine(directory, "rabbits.json");
if (!File.Exists(file))
{
File.Create(file);
}
file = Path.Combine(directory, "litters.json");
if (!File.Exists(file))
{
File.Create(file);
}
file = Path.Combine(directory, "breedings.json");
if (!File.Exists(file))
{
File.Create(file);
}
Properties.Settings.Default.RabbitFile = directory + "\\rabbits.json";
Properties.Settings.Default.LitterFile = directory + "\\litters.json";
Properties.Settings.Default.BreedingFile = directory + "\\breedings.json";
Properties.Settings.Default.Save();
this.Hide();
Launch launch = new Launch();
launch.Show();
}
}
}

File diff suppressed because it is too large Load Diff

441
Kindlebox/EditRabbitForm.Designer.cs generated Normal file
View File

@ -0,0 +1,441 @@
namespace Kindlebox
{
partial class EditRabbitForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.tbFarmName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbRabbitName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tbEarNum = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.munWeight = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.tbColor = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label7 = new System.Windows.Forms.Label();
this.tbRegNum = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.tbGCNum = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.cbSex = new System.Windows.Forms.ComboBox();
this.bSave = new System.Windows.Forms.Button();
this.lblStatus = new System.Windows.Forms.Label();
this.cbStatus = new System.Windows.Forms.ComboBox();
this.checkPregnant = new System.Windows.Forms.CheckBox();
this.cbAGene = new System.Windows.Forms.ComboBox();
this.cbBGene = new System.Windows.Forms.ComboBox();
this.cbCGene = new System.Windows.Forms.ComboBox();
this.cbDGene = new System.Windows.Forms.ComboBox();
this.cbEGene = new System.Windows.Forms.ComboBox();
this.cbEnGene = new System.Windows.Forms.ComboBox();
this.cbVGene = new System.Windows.Forms.ComboBox();
this.lblPregDate = new System.Windows.Forms.Label();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
((System.ComponentModel.ISupportInitialize)(this.munWeight)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 68);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(61, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Farm Name";
//
// tbFarmName
//
this.tbFarmName.Location = new System.Drawing.Point(12, 84);
this.tbFarmName.Name = "tbFarmName";
this.tbFarmName.Size = new System.Drawing.Size(175, 20);
this.tbFarmName.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(254, 68);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(69, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Rabbit Name";
//
// tbRabbitName
//
this.tbRabbitName.Location = new System.Drawing.Point(257, 84);
this.tbRabbitName.Name = "tbRabbitName";
this.tbRabbitName.Size = new System.Drawing.Size(188, 20);
this.tbRabbitName.TabIndex = 1;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(9, 123);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(63, 13);
this.label3.TabIndex = 0;
this.label3.Text = "Ear Number";
//
// tbEarNum
//
this.tbEarNum.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.tbEarNum.Location = new System.Drawing.Point(12, 139);
this.tbEarNum.Name = "tbEarNum";
this.tbEarNum.Size = new System.Drawing.Size(175, 20);
this.tbEarNum.TabIndex = 2;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(9, 177);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(63, 13);
this.label4.TabIndex = 0;
this.label4.Text = "Weight (lbs)";
//
// munWeight
//
this.munWeight.DecimalPlaces = 1;
this.munWeight.Location = new System.Drawing.Point(12, 194);
this.munWeight.Name = "munWeight";
this.munWeight.Size = new System.Drawing.Size(59, 20);
this.munWeight.TabIndex = 4;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(9, 235);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(31, 13);
this.label5.TabIndex = 0;
this.label5.Text = "Color";
//
// tbColor
//
this.tbColor.Location = new System.Drawing.Point(12, 251);
this.tbColor.Name = "tbColor";
this.tbColor.Size = new System.Drawing.Size(433, 20);
this.tbColor.TabIndex = 6;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(254, 177);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(66, 13);
this.label6.TabIndex = 0;
this.label6.Text = "Date of Birth";
//
// dateTimePicker1
//
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker1.Location = new System.Drawing.Point(257, 193);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(105, 20);
this.dateTimePicker1.TabIndex = 5;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(9, 348);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(103, 13);
this.label7.TabIndex = 0;
this.label7.Text = "Registration Number";
//
// tbRegNum
//
this.tbRegNum.Location = new System.Drawing.Point(12, 364);
this.tbRegNum.Name = "tbRegNum";
this.tbRegNum.Size = new System.Drawing.Size(175, 20);
this.tbRegNum.TabIndex = 7;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(254, 348);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(126, 13);
this.label8.TabIndex = 0;
this.label8.Text = "Grand Champion Number";
//
// tbGCNum
//
this.tbGCNum.Location = new System.Drawing.Point(257, 364);
this.tbGCNum.Name = "tbGCNum";
this.tbGCNum.Size = new System.Drawing.Size(188, 20);
this.tbGCNum.TabIndex = 8;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(254, 123);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(25, 13);
this.label9.TabIndex = 0;
this.label9.Text = "Sex";
//
// cbSex
//
this.cbSex.FormattingEnabled = true;
this.cbSex.Items.AddRange(new object[] {
"Buck",
"Doe"});
this.cbSex.Location = new System.Drawing.Point(257, 139);
this.cbSex.Name = "cbSex";
this.cbSex.Size = new System.Drawing.Size(121, 21);
this.cbSex.TabIndex = 3;
//
// bSave
//
this.bSave.Location = new System.Drawing.Point(370, 483);
this.bSave.Name = "bSave";
this.bSave.Size = new System.Drawing.Size(75, 23);
this.bSave.TabIndex = 9;
this.bSave.TabStop = false;
this.bSave.Text = "Save";
this.bSave.UseVisualStyleBackColor = true;
this.bSave.Click += new System.EventHandler(this.bSave_Click);
//
// lblStatus
//
this.lblStatus.AutoSize = true;
this.lblStatus.Location = new System.Drawing.Point(9, 18);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(37, 13);
this.lblStatus.TabIndex = 10;
this.lblStatus.Text = "Status";
//
// cbStatus
//
this.cbStatus.FormattingEnabled = true;
this.cbStatus.Items.AddRange(new object[] {
"Herd",
"Holding",
"Sold",
"Culled/Dead",
"Other"});
this.cbStatus.Location = new System.Drawing.Point(12, 35);
this.cbStatus.Name = "cbStatus";
this.cbStatus.Size = new System.Drawing.Size(121, 21);
this.cbStatus.TabIndex = 11;
//
// checkPregnant
//
this.checkPregnant.AutoSize = true;
this.checkPregnant.Location = new System.Drawing.Point(12, 409);
this.checkPregnant.Name = "checkPregnant";
this.checkPregnant.Size = new System.Drawing.Size(75, 17);
this.checkPregnant.TabIndex = 13;
this.checkPregnant.Text = "Pregnant?";
this.checkPregnant.UseVisualStyleBackColor = true;
//
// cbAGene
//
this.cbAGene.FormattingEnabled = true;
this.cbAGene.Items.AddRange(new object[] {
"A_",
"a_"});
this.cbAGene.Location = new System.Drawing.Point(12, 297);
this.cbAGene.Name = "cbAGene";
this.cbAGene.Size = new System.Drawing.Size(39, 21);
this.cbAGene.TabIndex = 14;
//
// cbBGene
//
this.cbBGene.FormattingEnabled = true;
this.cbBGene.Items.AddRange(new object[] {
"B_",
"b_"});
this.cbBGene.Location = new System.Drawing.Point(57, 297);
this.cbBGene.Name = "cbBGene";
this.cbBGene.Size = new System.Drawing.Size(39, 21);
this.cbBGene.TabIndex = 15;
//
// cbCGene
//
this.cbCGene.FormattingEnabled = true;
this.cbCGene.Items.AddRange(new object[] {
"C_",
"cchd_",
"cchl_",
"ch_",
"c_",
"cc (REW)"});
this.cbCGene.Location = new System.Drawing.Point(102, 297);
this.cbCGene.Name = "cbCGene";
this.cbCGene.Size = new System.Drawing.Size(71, 21);
this.cbCGene.TabIndex = 16;
//
// cbDGene
//
this.cbDGene.FormattingEnabled = true;
this.cbDGene.Items.AddRange(new object[] {
"D_",
"d_"});
this.cbDGene.Location = new System.Drawing.Point(179, 297);
this.cbDGene.Name = "cbDGene";
this.cbDGene.Size = new System.Drawing.Size(39, 21);
this.cbDGene.TabIndex = 17;
//
// cbEGene
//
this.cbEGene.FormattingEnabled = true;
this.cbEGene.Items.AddRange(new object[] {
"E_",
"Ed_",
"Es_",
"ej_",
"e_"});
this.cbEGene.Location = new System.Drawing.Point(224, 297);
this.cbEGene.Name = "cbEGene";
this.cbEGene.Size = new System.Drawing.Size(39, 21);
this.cbEGene.TabIndex = 18;
//
// cbEnGene
//
this.cbEnGene.FormattingEnabled = true;
this.cbEnGene.Items.AddRange(new object[] {
"en_",
"En_"});
this.cbEnGene.Location = new System.Drawing.Point(269, 297);
this.cbEnGene.Name = "cbEnGene";
this.cbEnGene.Size = new System.Drawing.Size(39, 21);
this.cbEnGene.TabIndex = 19;
//
// cbVGene
//
this.cbVGene.FormattingEnabled = true;
this.cbVGene.Items.AddRange(new object[] {
"v_",
"V_",
"VV (BEW)"});
this.cbVGene.Location = new System.Drawing.Point(314, 297);
this.cbVGene.Name = "cbVGene";
this.cbVGene.Size = new System.Drawing.Size(48, 21);
this.cbVGene.TabIndex = 20;
//
// lblPregDate
//
this.lblPregDate.AutoSize = true;
this.lblPregDate.Location = new System.Drawing.Point(99, 410);
this.lblPregDate.Name = "lblPregDate";
this.lblPregDate.Size = new System.Drawing.Size(91, 13);
this.lblPregDate.TabIndex = 21;
this.lblPregDate.Text = "Last Mating Date:";
//
// dateTimePicker2
//
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker2.Location = new System.Drawing.Point(196, 406);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(97, 20);
this.dateTimePicker2.TabIndex = 22;
//
// EditRabbitForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(501, 585);
this.Controls.Add(this.dateTimePicker2);
this.Controls.Add(this.lblPregDate);
this.Controls.Add(this.cbVGene);
this.Controls.Add(this.cbEnGene);
this.Controls.Add(this.cbEGene);
this.Controls.Add(this.cbDGene);
this.Controls.Add(this.cbCGene);
this.Controls.Add(this.cbBGene);
this.Controls.Add(this.cbAGene);
this.Controls.Add(this.checkPregnant);
this.Controls.Add(this.cbStatus);
this.Controls.Add(this.lblStatus);
this.Controls.Add(this.bSave);
this.Controls.Add(this.cbSex);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.label6);
this.Controls.Add(this.munWeight);
this.Controls.Add(this.label4);
this.Controls.Add(this.tbColor);
this.Controls.Add(this.tbGCNum);
this.Controls.Add(this.tbRabbitName);
this.Controls.Add(this.tbEarNum);
this.Controls.Add(this.label8);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbRegNum);
this.Controls.Add(this.label9);
this.Controls.Add(this.label3);
this.Controls.Add(this.label7);
this.Controls.Add(this.tbFarmName);
this.Controls.Add(this.label1);
this.Name = "EditRabbitForm";
this.Text = "Edit Rabbit Info";
this.Load += new System.EventHandler(this.EditRabbitForm_Load);
((System.ComponentModel.ISupportInitialize)(this.munWeight)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbFarmName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbRabbitName;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tbEarNum;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown munWeight;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tbColor;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox tbRegNum;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tbGCNum;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox cbSex;
private System.Windows.Forms.Button bSave;
private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.ComboBox cbStatus;
private System.Windows.Forms.CheckBox checkPregnant;
private System.Windows.Forms.ComboBox cbAGene;
private System.Windows.Forms.ComboBox cbBGene;
private System.Windows.Forms.ComboBox cbCGene;
private System.Windows.Forms.ComboBox cbDGene;
private System.Windows.Forms.ComboBox cbEGene;
private System.Windows.Forms.ComboBox cbEnGene;
private System.Windows.Forms.ComboBox cbVGene;
private System.Windows.Forms.Label lblPregDate;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
}
}

144
Kindlebox/EditRabbitForm.cs Normal file
View File

@ -0,0 +1,144 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class EditRabbitForm : Form
{
public Guid _rabbitID;
public EditRabbitForm(Guid rabbitID)
{
InitializeComponent();
_rabbitID = rabbitID;
}
private void EditRabbitForm_Load(object sender, EventArgs e)
{
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == _rabbitID)
{
tbColor.Text = r.Color;
tbEarNum.Text = r.EarNumber;
tbFarmName.Text = r.FarmName;
tbGCNum.Text = r.GCNumber;
tbRabbitName.Text = r.RabbitName;
tbRegNum.Text = r.RegNumber;
cbSex.Text = r.Sex;
munWeight.Value = r.Weight;
dateTimePicker1.Value = r.Birthday.Date;
switch (r.Status)
{
case 0: cbStatus.Text = "Herd";
break;
case 1: cbStatus.Text = "Holding";
break;
case 2: cbStatus.Text = "Sold";
break;
case 3: cbStatus.Text = "Culled/Dead";
break;
case 4: cbStatus.Text = "Other";
break;
}
if (r.PregnantStatus == false)
checkPregnant.Checked = false;
else
{
checkPregnant.Checked = true;
dateTimePicker2.Value = r.LastPregnantDate.Date;
}
}
cbAGene.Text = r.AGene;
cbBGene.Text = r.BGene;
cbCGene.Text = r.CGene;
cbDGene.Text = r.DGene;
cbEGene.Text = r.EGene;
cbEnGene.Text = r.EnGene;
cbVGene.Text = r.VGene;
}
}
private void SaveRabbit()
{
foreach(var rabbit in RabbitList.rabbits.Where(Rabbit => Rabbit.RabbitID == _rabbitID))
{
rabbit.Color = tbColor.Text;
rabbit.EarNumber = tbEarNum.Text;
rabbit.FarmName = tbFarmName.Text;
rabbit.GCNumber = tbGCNum.Text;
rabbit.RabbitName = tbRabbitName.Text;
rabbit.RegNumber = tbRegNum.Text;
rabbit.Sex = cbSex.Text;
rabbit.Weight = munWeight.Value;
rabbit.Birthday = dateTimePicker1.Value;
switch (cbStatus.Text)
{
case "Other":
rabbit.Status = 4;
break;
case "Herd":
rabbit.Status = 0;
break;
case "Holding":
rabbit.Status = 1;
break;
case "Sold":
rabbit.Status = 2;
break;
case "Culled/Dead":
rabbit.Status = 3;
break;
}
if (checkPregnant.Checked == true)
{
rabbit.PregnantStatus = true;
rabbit.LastPregnantDate = dateTimePicker2.Value;
}
else
rabbit.PregnantStatus = false;
rabbit.AGene = cbAGene.Text;
rabbit.BGene = cbBGene.Text;
rabbit.CGene = cbCGene.Text;
rabbit.DGene = cbDGene.Text;
rabbit.EGene = cbEGene.Text;
rabbit.EnGene = cbEnGene.Text;
rabbit.VGene = cbVGene.Text;
}
UpdateJson.UpdateRabbits();
//string fileName = Properties.Settings.Default.RabbitFile;
//var json = JsonConvert.SerializeObject(RabbitList.rabbits);
//System.IO.File.WriteAllText(fileName, json);
}
private void bSave_Click(object sender, EventArgs e)
{
SaveRabbit();
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

2365
Kindlebox/Form1.Designer.cs generated Normal file

File diff suppressed because it is too large Load Diff

976
Kindlebox/Form1.cs Normal file
View File

@ -0,0 +1,976 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using Newtonsoft.Json;
namespace Kindlebox
{
public partial class AddRabbitPedigree : Form
{
//Rabbit IDs
public static Guid rootID, sireID, ssireID, sdamID, sssireID, ssdamID, sdsireID, sddamID, damID, dsireID, ddamID, dssireID, dsdamID, ddsireID, dddamID;
public bool unsavedChanges = false;
public static bool rabbitExists = false;
public AddRabbitPedigree()
{
InitializeComponent();
}
private void AddRabbitPedigree_Load(object sender, EventArgs e)
{
bAddRabbitDam.Enabled = false;
bAddRabbitDDam.Enabled = false;
bAddRabbitDDDam.Enabled = false;
bAddRabbitDDSire.Enabled = false;
bAddRabbitDSDam.Enabled = false;
bAddRabbitDSire.Enabled = false;
bAddRabbitDSSire.Enabled = false;
bAddRabbitSDam.Enabled = false;
bAddRabbitSDDam.Enabled = false;
bAddRabbitSDSire.Enabled = false;
bAddRabbitSire.Enabled = false;
bAddRabbitSSDam.Enabled = false;
bAddRabbitSSire.Enabled = false;
bAddRabbitSSSire.Enabled = false;
}
//Check if there are unsaved changes before closing the window
private void AddRabbitPedigree_FormClosing(object sender, FormClosingEventArgs e)
{
if (unsavedChanges == true)
if (MessageBox.Show("You have unsaved changes. Are you sure you want to close this window?", "Unsaved Changes", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
{
e.Cancel = true;
this.Activate();
}
}
//Save Button
private void bSave_Click(object sender, EventArgs e)
{
if (rootID == Guid.Empty || sireID == Guid.Empty || ssireID == Guid.Empty || sdamID == Guid.Empty || sssireID == Guid.Empty || ssdamID == Guid.Empty || sdsireID == Guid.Empty || sddamID == Guid.Empty || damID == Guid.Empty || dsireID == Guid.Empty || ddamID == Guid.Empty || dssireID == Guid.Empty || dsdamID == Guid.Empty || ddsireID == Guid.Empty || dddamID == Guid.Empty)
{
MessageBox.Show("You will need to fill out the entire pedigree before saving.", "Unable to save Rabbit");
}
else
{
string fileName = "";
var json = JsonConvert.SerializeObject(RabbitList.rabbits);
if (Properties.Settings.Default.RabbitFile == "")
{
MessageBox.Show("You do not have a rabbitry file created. You will need to create one now", "Create a rabbitry");
saveFileDialog1.FileName = "rabbitry.json";
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
fileName = saveFileDialog1.FileName;
}
System.IO.File.WriteAllText(fileName, json);
Properties.Settings.Default.RabbitFile = fileName;
}
else
{
fileName = Properties.Settings.Default.RabbitFile;
System.IO.File.WriteAllText(fileName, json);
}
unsavedChanges = false;
ClearPedigree();
MessageBox.Show("Rabbit saved successfully. You can close this window or input another rabbit.", "Success");
}
}
private void bAddRabbitDSDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("dsdam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("dsdam");
}
private void bAddRabbitDDSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("ddsire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("ddsire");
}
private void bAddRabbitDDDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("dddam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("dddam");
}
private void bAddRabbitDSSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("dssire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("dssire");
}
private void bAddRabbitDDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("ddam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("ddam");
bAddRabbitDDSire.Enabled=true;
bAddRabbitDDDam.Enabled=true;
}
private void bAddRabbitDSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("dsire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("dsire");
bAddRabbitDSSire.Enabled = true;
bAddRabbitDSDam.Enabled=true;
}
private void bAddRabbitSDDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("sddam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("sddam");
}
private void bAddRabbitSDSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("sdsire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("sdsire");
}
private void bAddRabbitSSDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("ssdam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("ssdam");
}
private void bAddRabbitSSSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("sssire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("sssire");
}
private void bAddRabbitSDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("sdam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("sdam");
bAddRabbitSDSire.Enabled = true;
bAddRabbitSDDam.Enabled = true;
}
private void bAddRabbitSSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("ssire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("ssire");
bAddRabbitSSSire.Enabled = true;
bAddRabbitSSDam.Enabled = true;
}
private void bAddRabbitDam_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("dam");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("dam");
bAddRabbitDSire.Enabled = true;
bAddRabbitDDam.Enabled = true;
}
private void bAddRoot_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("root");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
if (rootID != Guid.Empty)
{
UpdatePedigree("root");
bAddRabbitSire.Enabled = true;
bAddRabbitDam.Enabled = true;
unsavedChanges = true;
this.Text = "Add Rabbit by Pedigree *";
}
}
private void bAddRabbitSire_Click(object sender, EventArgs e)
{
AddRabbitForm addRabbitForm = new AddRabbitForm("sire");
addRabbitForm.StartPosition = FormStartPosition.CenterScreen;
addRabbitForm.ShowDialog();
UpdatePedigree("sire");
bAddRabbitSSire.Enabled = true;
bAddRabbitSDam.Enabled = true;
}
//Update Pedigree form with new rabbit info
public void UpdatePedigree(string rabbitR)
{
if (rabbitR == "root")
{
rabbitBoxAddRoot.Visible = false;
rabbitBoxViewRoot.Visible = true;
lblRabbitNameRoot.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).RabbitName;
lblFarmNameRoot.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).EarNumber != "")
{
lblEarNumRoot.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).EarNumber;
}
else
{
lblEarNumRoot.Text = "";
}
lblColorRoot.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).Color;
lblWeightRoot.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).Weight + " lbs";
lblSexRoot.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).RegNumber != "")
{
lblRegNumRoot.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).RegNumber;
}
else
{
lblRegNumRoot.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).GCNumber != "")
{
lblGCNumRoot.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).GCNumber;
}
else
{
lblGCNumRoot.Text = "";
}
lblBirthdayRoot.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == rootID).Birthday.ToShortDateString();
}
else if (rabbitR == "sire")
{
rabbitBoxAddSire.Visible = false;
rabbitBoxViewSire.Visible = true;
lblRabbitNameSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).RabbitName;
lblFarmNameSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).EarNumber != "")
{
lblEarNumSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).EarNumber;
}
else
{
lblEarNumSire.Text = "";
}
lblColorSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).Color;
lblWeightSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).Weight + " lbs";
lblSexSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).RegNumber != "")
{
lblRegNumSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).RegNumber;
}
else
{
lblRegNumSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).GCNumber != "")
{
lblGCNumSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).GCNumber;
}
else
{
lblGCNumSire.Text = "";
}
lblBirthdaySire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == rootID);
RabbitList.rabbits[index].SireID = sireID;
}
else if (rabbitR == "ssire")
{
rabbitBoxAddSSire.Visible = false;
rabbitBoxViewSSire.Visible = true;
lblRabbitNameSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).RabbitName;
lblFarmNameSSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).EarNumber != "")
{
lblEarNumSSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).EarNumber;
}
else
{
lblEarNumSSire.Text = "";
}
lblColorSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).Color;
lblWeightSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).Weight + " lbs";
lblSexSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).RegNumber != "")
{
lblRegNumSSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).RegNumber;
}
else
{
lblRegNumSSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).GCNumber != "")
{
lblGCNumSSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).GCNumber;
}
else
{
lblGCNumSSire.Text = "";
}
lblBirthdaySSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == sireID);
RabbitList.rabbits[index].SireID = ssireID;
}
else if (rabbitR == "sdam")
{
rabbitBoxAddSDam.Visible = false;
rabbitBoxViewSDam.Visible = true;
lblRabbitNameSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).RabbitName;
lblFarmNameSDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).EarNumber != "")
{
lblEarNumSDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).EarNumber;
}
else
{
lblEarNumSDam.Text = "";
}
lblColorSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).Color;
lblWeightSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).Weight + " lbs";
lblSexSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).RegNumber != "")
{
lblRegNumSDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).RegNumber;
}
else
{
lblRegNumSDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).GCNumber != "")
{
lblGCNumSDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).GCNumber;
}
else
{
lblGCNumSDam.Text = "";
}
lblBirthdaySDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdamID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == sireID);
RabbitList.rabbits[index].DamID = sdamID;
}
else if (rabbitR == "sssire")
{
rabbitBoxAddSSSire.Visible = false;
rabbitBoxViewSSSire.Visible = true;
lblRabbitNameSSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).RabbitName;
lblFarmNameSSSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).EarNumber != "")
{
lblEarNumSSSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).EarNumber;
}
else
{
lblEarNumSSSire.Text = "";
}
lblColorSSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).Color;
lblWeightSSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).Weight + " lbs";
lblSexSSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).RegNumber != "")
{
lblRegNumSSSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).RegNumber;
}
else
{
lblRegNumSSSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).GCNumber != "")
{
lblGCNumSSSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).GCNumber;
}
else
{
lblGCNumSSSire.Text = "";
}
lblBirthdaySSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sssireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == ssireID);
RabbitList.rabbits[index].SireID = sssireID;
}
else if (rabbitR == "ssdam")
{
rabbitBoxAddSSDam.Visible = false;
rabbitBoxViewSSDam.Visible = true;
lblRabbitNameSSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).RabbitName;
lblFarmNameSSDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).EarNumber != "")
{
lblEarNumSSDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).EarNumber;
}
else
{
lblEarNumSSDam.Text = "";
}
lblColorSSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).Color;
lblWeightSSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).Weight + " lbs";
lblSexSSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).RegNumber != "")
{
lblRegNumSSDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).RegNumber;
}
else
{
lblRegNumSSDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).GCNumber != "")
{
lblGCNumSSDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).GCNumber;
}
else
{
lblGCNumSSDam.Text = "";
}
lblBirthdaySSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ssdamID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == ssireID);
RabbitList.rabbits[index].DamID = ssdamID;
}
else if (rabbitR == "sdsire")
{
rabbitBoxAddSDSire.Visible = false;
rabbitBoxViewSDSire.Visible = true;
lblRabbitNameSDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).RabbitName;
lblFarmNameSDSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).EarNumber != "")
{
lblEarNumSDSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).EarNumber;
}
else
{
lblEarNumSDSire.Text = "";
}
lblColorSDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).Color;
lblWeightSDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).Weight + " lbs";
lblSexSDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).RegNumber != "")
{
lblRegNumSDSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).RegNumber;
}
else
{
lblRegNumSDSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).GCNumber != "")
{
lblGCNumSDSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).GCNumber;
}
else
{
lblGCNumSDSire.Text = "";
}
lblBirthdaySDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sdsireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == sdamID);
RabbitList.rabbits[index].SireID = sdsireID;
}
else if (rabbitR == "sddam")
{
rabbitBoxAddSDDam.Visible = false;
rabbitBoxViewSDDam.Visible = true;
lblRabbitNameSDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).RabbitName;
lblFarmNameSDDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).EarNumber != "")
{
lblEarNumSDDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).EarNumber;
}
else
{
lblEarNumSDDam.Text = "";
}
lblColorSDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).Color;
lblWeightSDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).Weight + " lbs";
lblSexSDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).RegNumber != "")
{
lblRegNumSDDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).RegNumber;
}
else
{
lblRegNumSDDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).GCNumber != "")
{
lblGCNumSDDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).GCNumber;
}
else
{
lblGCNumSDDam.Text = "";
}
lblBirthdaySDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == sddamID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == sdamID);
RabbitList.rabbits[index].DamID = sddamID;
}
else if (rabbitR == "dam")
{
rabbitBoxAddDam.Visible = false;
rabbitBoxViewDam.Visible = true;
lblRabbitNameDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).RabbitName;
lblFarmNameDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).EarNumber != "")
{
lblEarNumDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).EarNumber;
}
else
{
lblEarNumDam.Text = "";
}
lblColorDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).Color;
lblWeightDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).Weight + " lbs";
lblSexDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).RegNumber != "")
{
lblRegNumDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).RegNumber;
}
else
{
lblRegNumDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).GCNumber != "")
{
lblGCNumDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).GCNumber;
}
else
{
lblGCNumDam.Text = "";
}
lblBirthdayDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == damID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == rootID);
RabbitList.rabbits[index].DamID = damID;
}
else if (rabbitR == "dsire")
{
rabbitBoxAddDSire.Visible = false;
rabbitBoxViewDSire.Visible = true;
lblRabbitNameDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).RabbitName;
lblFarmNameDSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).EarNumber != "")
{
lblEarNumDSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).EarNumber;
}
else
{
lblEarNumDSire.Text = "";
}
lblColorDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).Color;
lblWeightDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).Weight + " lbs";
lblSexDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).RegNumber != "")
{
lblRegNumDSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).RegNumber;
}
else
{
lblRegNumDSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).GCNumber != "")
{
lblGCNumDSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).GCNumber;
}
else
{
lblGCNumDSire.Text = "";
}
lblBirthdayDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == damID);
RabbitList.rabbits[index].SireID = dsireID;
}
else if (rabbitR == "dssire")
{
rabbitBoxAddDSSire.Visible = false;
rabbitBoxViewDSSire.Visible = true;
lblRabbitNameDSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).RabbitName;
lblFarmNameDSSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).EarNumber != "")
{
lblEarNumDSSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).EarNumber;
}
else
{
lblEarNumDSSire.Text = "";
}
lblColorDSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).Color;
lblWeightDSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).Weight + " lbs";
lblSexDSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).RegNumber != "")
{
lblRegNumDSSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).RegNumber;
}
else
{
lblRegNumDSSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).GCNumber != "")
{
lblGCNumDSSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).GCNumber;
}
else
{
lblGCNumDSSire.Text = "";
}
lblBirthdayDSSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dssireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == dsireID);
RabbitList.rabbits[index].SireID = dssireID;
}
else if (rabbitR == "dsdam")
{
rabbitBoxAddDSDam.Visible = false;
rabbitBoxViewDSDam.Visible = true;
lblRabbitNameDSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).RabbitName;
lblFarmNameDSDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).EarNumber != "")
{
lblEarNumDSDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).EarNumber;
}
else
{
lblEarNumDSDam.Text = "";
}
lblColorDSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).Color;
lblWeightDSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).Weight + " lbs";
lblSexDSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).RegNumber != "")
{
lblRegNumDSDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).RegNumber;
}
else
{
lblRegNumDSDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).GCNumber != "")
{
lblGCNumDSDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).GCNumber;
}
else
{
lblGCNumDSDam.Text = "";
}
lblBirthdayDSDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dsdamID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == dsireID);
RabbitList.rabbits[index].DamID = dsdamID;
}
else if (rabbitR == "ddam")
{
rabbitBoxAddDDam.Visible = false;
rabbitBoxViewDDam.Visible = true;
lblRabbitNameDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).RabbitName;
lblFarmNameDDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).EarNumber != "")
{
lblEarNumDDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).EarNumber;
}
else
{
lblEarNumDDam.Text = "";
}
lblColorDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).Color;
lblWeightDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).Weight + " lbs";
lblSexDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).RegNumber != "")
{
lblRegNumDDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).RegNumber;
}
else
{
lblRegNumDDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).GCNumber != "")
{
lblGCNumDDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).GCNumber;
}
else
{
lblGCNumDDam.Text = "";
}
lblBirthdayDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddamID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == damID);
RabbitList.rabbits[index].DamID = ddamID;
}
else if (rabbitR == "ddsire")
{
rabbitBoxAddDDSire.Visible = false;
rabbitBoxViewDDSire.Visible = true;
lblRabbitNameDDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).RabbitName;
lblFarmNameDDSire.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).EarNumber != "")
{
lblEarNumDDSire.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).EarNumber;
}
else
{
lblEarNumDDSire.Text = "";
}
lblColorDDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).Color;
lblWeightDDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).Weight + " lbs";
lblSexDDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).RegNumber != "")
{
lblRegNumDDSire.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).RegNumber;
}
else
{
lblRegNumDDSire.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).GCNumber != "")
{
lblGCNumDDSire.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).GCNumber;
}
else
{
lblGCNumDDSire.Text = "";
}
lblBirthdayDDSire.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == ddsireID).Birthday.ToShortDateString();
//Set previous rabbit's Sire ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == ddamID);
RabbitList.rabbits[index].SireID = ddsireID;
}
else if (rabbitR == "dddam")
{
rabbitBoxAddDDDam.Visible = false;
rabbitBoxViewDDDam.Visible = true;
lblRabbitNameDDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).RabbitName;
lblFarmNameDDDam.Text = EscapeFarmName(RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).FarmName) + "'s";
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).EarNumber != "")
{
lblEarNumDDDam.Text = "Ear: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).EarNumber;
}
else
{
lblEarNumDDDam.Text = "";
}
lblColorDDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).Color;
lblWeightDDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).Weight + " lbs";
lblSexDDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).Sex;
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).RegNumber != "")
{
lblRegNumDDDam.Text = "Reg #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).RegNumber;
}
else
{
lblRegNumDDDam.Text = "";
}
if (RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).GCNumber != "")
{
lblGCNumDDDam.Text = "GC #: " + RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).GCNumber;
}
else
{
lblGCNumDDDam.Text = "";
}
lblBirthdayDDDam.Text = RabbitList.rabbits.First(rabbit => rabbit.RabbitID == dddamID).Birthday.ToShortDateString();
//Set previous rabbit's Dam ID
int index = RabbitList.rabbits.FindIndex(rabbit => rabbit.RabbitID == ddamID);
RabbitList.rabbits[index].DamID = dddamID;
}
}
// Clear Pedigree form
public void ClearPedigree()
{
rabbitBoxAddDam.Show();
rabbitBoxAddDDam.Show();
rabbitBoxAddDDDam.Show();
rabbitBoxAddDDSire.Show();
rabbitBoxAddDSDam.Show();
rabbitBoxAddDSire.Show();
rabbitBoxAddDSSire.Show();
rabbitBoxAddRoot.Show();
rabbitBoxAddSDam.Show();
rabbitBoxAddSDDam.Show();
rabbitBoxAddSDSire.Show();
rabbitBoxAddSire.Show();
rabbitBoxAddSSDam.Show();
rabbitBoxAddSSire.Show();
rabbitBoxAddSSSire.Show();
rabbitBoxViewDam.Hide();
rabbitBoxViewDDam.Hide();
rabbitBoxViewDDDam.Hide();
rabbitBoxViewDDSire.Hide();
rabbitBoxViewDSDam.Hide();
rabbitBoxViewDSSire.Hide();
rabbitBoxViewDSire.Hide();
rabbitBoxViewRoot.Hide();
rabbitBoxViewSDam.Hide();
rabbitBoxViewSDDam.Hide();
rabbitBoxViewSDSire.Hide();
rabbitBoxViewSire.Hide();
rabbitBoxViewSSDam.Hide();
rabbitBoxViewSSire.Hide();
rabbitBoxViewSSSire.Hide();
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private string EscapeFarmName(string farmName)
{
if (farmName.Contains("&"))
{
farmName = farmName.Replace("&", "&&");
}
return farmName;
}
}
}

123
Kindlebox/Form1.resx Normal file
View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

234
Kindlebox/Kindlebox.csproj Normal file
View File

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E6C194AC-7AE5-4257-A25C-5AF9AC693079}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Kindlebox</RootNamespace>
<AssemblyName>Kindlebox</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>
</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>kindlebox icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AddABreeding.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AddABreeding.Designer.cs">
<DependentUpon>AddABreeding.cs</DependentUpon>
</Compile>
<Compile Include="AddALitter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AddALitter.Designer.cs">
<DependentUpon>AddALitter.cs</DependentUpon>
</Compile>
<Compile Include="Breeding.cs" />
<Compile Include="BreedingComboBoxItem.cs" />
<Compile Include="BreedingList.cs" />
<Compile Include="CreateRabbitry.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CreateRabbitry.Designer.cs">
<DependentUpon>CreateRabbitry.cs</DependentUpon>
</Compile>
<Compile Include="EditRabbitForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="EditRabbitForm.Designer.cs">
<DependentUpon>EditRabbitForm.cs</DependentUpon>
</Compile>
<Compile Include="AddRabbitForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AddRabbitForm.Designer.cs">
<DependentUpon>AddRabbitForm.cs</DependentUpon>
</Compile>
<Compile Include="Splash.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Splash.Designer.cs">
<DependentUpon>Splash.cs</DependentUpon>
</Compile>
<Compile Include="UpdateJson.cs" />
<Compile Include="ViewPedigree.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ViewPedigree.Designer.cs">
<DependentUpon>ViewPedigree.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Launch.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Launch.Designer.cs">
<DependentUpon>Launch.cs</DependentUpon>
</Compile>
<Compile Include="Litter.cs" />
<Compile Include="LitterList.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rabbit.cs" />
<Compile Include="RabbitList.cs" />
<Compile Include="RabbitryListByType.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="RabbitryListByType.Designer.cs">
<DependentUpon>RabbitryListByType.cs</DependentUpon>
</Compile>
<Compile Include="RabbitUserControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="RabbitUserControl.Designer.cs">
<DependentUpon>RabbitUserControl.cs</DependentUpon>
</Compile>
<Compile Include="SmallPedigreeUC.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SmallPedigreeUC.Designer.cs">
<DependentUpon>SmallPedigreeUC.cs</DependentUpon>
</Compile>
<Compile Include="ViewRabbit.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ViewRabbit.Designer.cs">
<DependentUpon>ViewRabbit.cs</DependentUpon>
</Compile>
<Compile Include="ViewRabbitForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ViewRabbitForm.Designer.cs">
<DependentUpon>ViewRabbitForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="AddABreeding.resx">
<DependentUpon>AddABreeding.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="AddALitter.resx">
<DependentUpon>AddALitter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CreateRabbitry.resx">
<DependentUpon>CreateRabbitry.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="EditRabbitForm.resx">
<DependentUpon>EditRabbitForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AddRabbitForm.resx">
<DependentUpon>AddRabbitForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Splash.resx">
<DependentUpon>Splash.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ViewPedigree.resx">
<DependentUpon>ViewPedigree.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Launch.resx">
<DependentUpon>Launch.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="RabbitryListByType.resx">
<DependentUpon>RabbitryListByType.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="RabbitUserControl.resx">
<DependentUpon>RabbitUserControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SmallPedigreeUC.resx">
<DependentUpon>SmallPedigreeUC.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ViewRabbit.resx">
<DependentUpon>ViewRabbit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ViewRabbitForm.resx">
<DependentUpon>ViewRabbitForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\rabbit_placeholder-100px.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\app icon.bmp" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\kindlebox icon.png" />
</ItemGroup>
<ItemGroup>
<Content Include="kindlebox icon.ico" />
<None Include="Resources\kindlebox icon 256x256.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

235
Kindlebox/Launch.Designer.cs generated Normal file
View File

@ -0,0 +1,235 @@
namespace Kindlebox
{
partial class Launch
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Launch));
this.bAddRabbitByPedigree = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.bViewHerd = new System.Windows.Forms.Button();
this.bViewDoes = new System.Windows.Forms.Button();
this.bViewBucks = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.lblBirthdays = new System.Windows.Forms.Label();
this.bAddSingleRabbit = new System.Windows.Forms.Button();
this.lblBreedings = new System.Windows.Forms.Label();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
this.SuspendLayout();
//
// bAddRabbitByPedigree
//
this.bAddRabbitByPedigree.Location = new System.Drawing.Point(12, 58);
this.bAddRabbitByPedigree.Name = "bAddRabbitByPedigree";
this.bAddRabbitByPedigree.Size = new System.Drawing.Size(168, 78);
this.bAddRabbitByPedigree.TabIndex = 0;
this.bAddRabbitByPedigree.Text = "Add A Rabbit by Pedigree";
this.bAddRabbitByPedigree.UseVisualStyleBackColor = true;
this.bAddRabbitByPedigree.Click += new System.EventHandler(this.bAddRabbitByPedigree_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(867, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem,
this.saveToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.saveToolStripMenuItem.Text = "Save";
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// bViewHerd
//
this.bViewHerd.Location = new System.Drawing.Point(12, 277);
this.bViewHerd.Name = "bViewHerd";
this.bViewHerd.Size = new System.Drawing.Size(168, 78);
this.bViewHerd.TabIndex = 2;
this.bViewHerd.Text = "My Herd";
this.bViewHerd.UseVisualStyleBackColor = true;
this.bViewHerd.Click += new System.EventHandler(this.bViewHerd_Click);
//
// bViewDoes
//
this.bViewDoes.Location = new System.Drawing.Point(12, 361);
this.bViewDoes.Name = "bViewDoes";
this.bViewDoes.Size = new System.Drawing.Size(168, 78);
this.bViewDoes.TabIndex = 3;
this.bViewDoes.Text = "My Does";
this.bViewDoes.UseVisualStyleBackColor = true;
this.bViewDoes.Click += new System.EventHandler(this.bViewDoes_Click);
//
// bViewBucks
//
this.bViewBucks.Location = new System.Drawing.Point(12, 445);
this.bViewBucks.Name = "bViewBucks";
this.bViewBucks.Size = new System.Drawing.Size(168, 78);
this.bViewBucks.TabIndex = 4;
this.bViewBucks.Text = "My Bucks";
this.bViewBucks.UseVisualStyleBackColor = true;
this.bViewBucks.Click += new System.EventHandler(this.bViewBucks_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(208, 69);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.Size = new System.Drawing.Size(637, 145);
this.dataGridView1.TabIndex = 5;
//
// lblBirthdays
//
this.lblBirthdays.AutoSize = true;
this.lblBirthdays.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBirthdays.Location = new System.Drawing.Point(204, 49);
this.lblBirthdays.Name = "lblBirthdays";
this.lblBirthdays.Size = new System.Drawing.Size(255, 20);
this.lblBirthdays.TabIndex = 6;
this.lblBirthdays.Text = "Rabbits turning 6 months old soon:";
//
// bAddSingleRabbit
//
this.bAddSingleRabbit.Enabled = false;
this.bAddSingleRabbit.ForeColor = System.Drawing.SystemColors.GrayText;
this.bAddSingleRabbit.Location = new System.Drawing.Point(12, 155);
this.bAddSingleRabbit.Name = "bAddSingleRabbit";
this.bAddSingleRabbit.Size = new System.Drawing.Size(168, 43);
this.bAddSingleRabbit.TabIndex = 7;
this.bAddSingleRabbit.Text = "Add A Single Rabbit";
this.bAddSingleRabbit.UseVisualStyleBackColor = true;
this.bAddSingleRabbit.Click += new System.EventHandler(this.bAddSingleRabbit_Click);
//
// lblBreedings
//
this.lblBreedings.AutoSize = true;
this.lblBreedings.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBreedings.Location = new System.Drawing.Point(204, 257);
this.lblBreedings.Name = "lblBreedings";
this.lblBreedings.Size = new System.Drawing.Size(99, 20);
this.lblBreedings.TabIndex = 9;
this.lblBreedings.Text = "Bred rabbits:";
//
// dataGridView2
//
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Location = new System.Drawing.Point(208, 277);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.Size = new System.Drawing.Size(637, 145);
this.dataGridView2.TabIndex = 8;
//
// Launch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(867, 728);
this.Controls.Add(this.lblBreedings);
this.Controls.Add(this.dataGridView2);
this.Controls.Add(this.bAddSingleRabbit);
this.Controls.Add(this.lblBirthdays);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.bViewBucks);
this.Controls.Add(this.bViewDoes);
this.Controls.Add(this.bViewHerd);
this.Controls.Add(this.bAddRabbitByPedigree);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "Launch";
this.Text = "Welcome to Kindlebox";
this.Activated += new System.EventHandler(this.Launch_Activated_1);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Launch_FormClosed);
this.Load += new System.EventHandler(this.Launch_Load);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button bAddRabbitByPedigree;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button bViewHerd;
private System.Windows.Forms.Button bViewDoes;
private System.Windows.Forms.Button bViewBucks;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label lblBirthdays;
private System.Windows.Forms.Button bAddSingleRabbit;
private System.Windows.Forms.Label lblBreedings;
private System.Windows.Forms.DataGridView dataGridView2;
}
}

253
Kindlebox/Launch.cs Normal file
View File

@ -0,0 +1,253 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class Launch : Form
{
BindingSource bindingSource = new BindingSource();
DataTable dtBirthdays = new DataTable();
BindingSource bindingSource1 = new BindingSource();
DataTable dtBreedings = new DataTable();
public Launch()
{
InitializeComponent();
}
private void bAddRabbitByPedigree_Click(object sender, EventArgs e)
{
AddRabbitPedigree addRabbitPedigree = new AddRabbitPedigree();
addRabbitPedigree.Show();
}
private void Launch_Load(object sender, EventArgs e)
{
//---DEBUG
//Properties.Settings.Default.RabbitFile = "C:\\Users\\rory5\\Documents\\rabbits.json";
//Properties.Settings.Default.LitterFile = "C:\\Users\\rory5\\Documents\\litters.json";
//Properties.Settings.Default.BreedingFile = "C:\\Users\\rory5\\Documents\\breedings.json";
//Properties.Settings.Default.FarmName = "Whispering Wilds";
//Properties.Settings.Default.FarmStreet = "3800 Byrd Rd";
//Properties.Settings.Default.FarmCity = "Augusta";
//Properties.Settings.Default.FarmState = "GA";
//Properties.Settings.Default.FarmZIP = "30906";
//Properties.Settings.Default.FarmWWW = "www.whisperingwilds.com";
//---DEBUG
string fileName = "";
string litterFileName = "";
string breedingFileName = "";
string directoryName = "";
// Set up rabbit birthday table
dtBirthdays.Columns.Add("Farm Name");
dtBirthdays.Columns.Add("Rabbit Name");
dtBirthdays.Columns.Add("6 Month Birthday");
dtBirthdays.Columns.Add("Days Until 6 Month Birthday");
// Set up rabbit breedings table
dtBreedings.Columns.Add("Doe Name");
dtBreedings.Columns.Add("Breeding Date");
dtBreedings.Columns.Add("Estimated Birthdate");
dtBreedings.Columns.Add("Days until kindling");
fileName = Properties.Settings.Default.RabbitFile;
litterFileName = Properties.Settings.Default.LitterFile;
breedingFileName = Properties.Settings.Default.BreedingFile;
string json = System.IO.File.ReadAllText(fileName);
RabbitList.rabbits = JsonConvert.DeserializeObject<List<Rabbit>>(json);
string litterJson = System.IO.File.ReadAllText(litterFileName);
LitterList.litters = JsonConvert.DeserializeObject<List<Litter>>(litterJson);
string breedingJson = System.IO.File.ReadAllText(breedingFileName);
BreedingList.breedings = JsonConvert.DeserializeObject<List<Breeding>>(breedingJson);
FillTables();
}
private void FillTables()
{
DateTime now = DateTime.Now;
// Birthday Table
dtBirthdays.Clear();
foreach (Rabbit r in RabbitList.rabbits ?? Enumerable.Empty<Rabbit>())
{
if (r.Status == 0)
{
var rBDay = r.Birthday.Date;
DateTime endDate = new DateTime(rBDay.Year, rBDay.Month, rBDay.Day).AddMonths(6);
var age = now.Subtract(r.Birthday).Days / (365.25 / 12);
var daysTil6Mo = now.Subtract(endDate).Days * -1;
if (age < 6 && age > 4)
{
DataRow row = dtBirthdays.NewRow();
row["Farm Name"] = r.FarmName;
row["Rabbit Name"] = r.RabbitName;
row["6 Month Birthday"] = endDate.ToShortDateString();
row["Days Until 6 Month Birthday"] = daysTil6Mo;
dtBirthdays.Rows.Add(row);
}
}
}
dataGridView1.DataSource = dtBirthdays;
dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);
dataGridView1.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView1.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView1.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView1.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
for (int i = 0; i < dataGridView1.Columns.Count - 1; i++)
{
int colw = dataGridView1.Columns[i].Width;
dataGridView1.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
dataGridView1.Columns[i].Width = colw;
}
dataGridView1.Refresh();
//Breedings Table
dtBreedings.Clear();
foreach (Breeding b in BreedingList.breedings ?? Enumerable.Empty<Breeding>())
{
if (b.isActive == true)
{
var bDate = b.BreedingDate;
var bBirthdate = bDate.AddDays(30);
var daysTilBirth = now.Subtract(bBirthdate).Days * -1;
string doeName = "";
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == b.DamID)
{
doeName = r.RabbitName; break;
}
}
DataRow dtrow = dtBreedings.NewRow();
dtrow["Doe Name"] = doeName;
dtrow["Breeding Date"] = bDate.Date.ToShortDateString();
dtrow["Estimated Birthdate"] = bBirthdate.Date.ToShortDateString();
dtrow["Days until kindling"] = daysTilBirth;
dtBreedings.Rows.Add(dtrow);
}
}
dataGridView2.DataSource = dtBreedings;
dataGridView2.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);
dataGridView2.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView2.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView2.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView2.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
for (int i = 0; i < dataGridView2.Columns.Count - 1; i++)
{
int colw = dataGridView2.Columns[i].Width;
dataGridView2.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
dataGridView2.Columns[i].Width = colw;
}
dataGridView2.Refresh();
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
string openFileName = "";
string openLitterFileName = "";
string openBreedingFileName = "";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
openFileName = openFileDialog1.FileName;
openLitterFileName = Path.GetDirectoryName(openFileName) + "litters.json";
openBreedingFileName = Path.GetDirectoryName(openFileName) + "breedings.json";
Properties.Settings.Default.RabbitFile = openFileName;
Properties.Settings.Default.LitterFile = openLitterFileName;
Properties.Settings.Default.BreedingFile = openBreedingFileName;
Console.WriteLine("File opened: " + Properties.Settings.Default.RabbitFile);
string json = System.IO.File.ReadAllText(openFileName);
RabbitList.rabbits = JsonConvert.DeserializeObject<List<Rabbit>>(json);
string litterJson = System.IO.File.ReadAllText(openLitterFileName);
LitterList.litters = JsonConvert.DeserializeObject<List<Litter>>(litterJson);
string breedingJson = System.IO.File.ReadAllText(openBreedingFileName);
BreedingList.breedings = JsonConvert.DeserializeObject<List<Breeding>>(breedingJson);
}
}
private void bViewHerd_Click(object sender, EventArgs e)
{
RabbitryListByType rabbitryListByType = new RabbitryListByType("herd");
rabbitryListByType.Show();
}
private void bViewDoes_Click(object sender, EventArgs e)
{
RabbitryListByType rabbitryListByType = new RabbitryListByType("does");
rabbitryListByType.Show();
}
private void bViewBucks_Click(object sender, EventArgs e)
{
RabbitryListByType rabbitryListByType = new RabbitryListByType("bucks");
rabbitryListByType.Show();
}
private static bool IsBeforeNow(DateTime now, DateTime dateTime)
{
return dateTime.Month < now.Month
|| (dateTime.Month == now.Month && dateTime.Day < now.Day);
}
private void bAddSingleRabbit_Click(object sender, EventArgs e)
{
}
private void Launch_Activated_1(object sender, EventArgs e)
{
FillTables();
}
private void Launch_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
}
}

4448
Kindlebox/Launch.resx Normal file

File diff suppressed because it is too large Load Diff

29
Kindlebox/Litter.cs Normal file
View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kindlebox
{
internal class Litter
{
public Guid LitterID { get; set; }
public Guid SireID { get; set; }
public Guid DamID { get; set; }
public int LitterSize { get; set; }
public DateTime LitterDate { get; set; }
public Litter(Guid litterID, Guid sireID, Guid damID, int litterSize, DateTime litterDate)
{
LitterID = litterID;
SireID = sireID;
DamID = damID;
LitterSize = litterSize;
LitterDate = litterDate;
}
}
}

31
Kindlebox/LitterList.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kindlebox
{
internal class LitterList
{
public static List<Litter> litters;
static LitterList()
{
litters = new List<Litter>();
}
public static void Record(Guid RabbitID, Guid SireID, Guid DamID, int LitterSize, DateTime LitterDate)
{
litters.Add(new Litter(RabbitID, SireID, DamID, LitterSize, LitterDate));
}
public static void Display()
{
foreach (var litter in litters)
{
Console.WriteLine(litter.ToString());
}
}
}
}

25
Kindlebox/Program.cs Normal file
View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var splash = new Splash();
splash.Show();
Application.Run();
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Kindlebox")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Kindlebox")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e6c194ac-7ae5-4257-a25c-5af9ac693079")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,93 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Kindlebox.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Kindlebox.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap kindlebox_icon {
get {
object obj = ResourceManager.GetObject("kindlebox_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap kindlebox_icon_256x256 {
get {
object obj = ResourceManager.GetObject("kindlebox icon 256x256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap rabbit_placeholder {
get {
object obj = ResourceManager.GetObject("rabbit_placeholder", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="rabbit_placeholder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rabbit_placeholder-100px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="kindlebox_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\kindlebox icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="kindlebox icon 256x256" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\kindlebox icon 256x256.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

182
Kindlebox/Properties/Settings.Designer.cs generated Normal file
View File

@ -0,0 +1,182 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Kindlebox.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string RabbitFile {
get {
return ((string)(this["RabbitFile"]));
}
set {
this["RabbitFile"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string LitterFile {
get {
return ((string)(this["LitterFile"]));
}
set {
this["LitterFile"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string BreedingFile {
get {
return ((string)(this["BreedingFile"]));
}
set {
this["BreedingFile"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmName {
get {
return ((string)(this["FarmName"]));
}
set {
this["FarmName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string UserName {
get {
return ((string)(this["UserName"]));
}
set {
this["UserName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmStreet {
get {
return ((string)(this["FarmStreet"]));
}
set {
this["FarmStreet"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmCity {
get {
return ((string)(this["FarmCity"]));
}
set {
this["FarmCity"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmState {
get {
return ((string)(this["FarmState"]));
}
set {
this["FarmState"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmZIP {
get {
return ((string)(this["FarmZIP"]));
}
set {
this["FarmZIP"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmPhone {
get {
return ((string)(this["FarmPhone"]));
}
set {
this["FarmPhone"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmEmail {
get {
return ((string)(this["FarmEmail"]));
}
set {
this["FarmEmail"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmWWW {
get {
return ((string)(this["FarmWWW"]));
}
set {
this["FarmWWW"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FarmLogo {
get {
return ((string)(this["FarmLogo"]));
}
set {
this["FarmLogo"] = value;
}
}
}
}

View File

@ -0,0 +1,45 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Kindlebox.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="RabbitFile" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="LitterFile" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="BreedingFile" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmName" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="UserName" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmStreet" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmCity" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmState" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmZIP" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmPhone" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmEmail" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmWWW" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="FarmLogo" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

167
Kindlebox/Rabbit.cs Normal file
View File

@ -0,0 +1,167 @@
using Kindlebox.Properties;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace Kindlebox
{
internal class Rabbit
{
/*=====================
* Status Codes
*---------------
* 0 = Herd
* 1 = For Sale
* 2 = Holding
* 3 = Sold/Adopted
* 4 = Other
* 5 = Culled
=====================*/
public Guid RabbitID { get; set; }
public string FarmName { get; set; }
public string RabbitName { get; set; }
public string Breed { get; set; }
public string EarNumber { get; set; }
public string Color { get; set; }
public string RegNumber { get; set; }
public string GCNumber { get; set; }
public decimal Weight { get; set; }
public DateTime Birthday { get; set; }
public string Sex { get; set; }
public string AGene { get; set; }
public string BGene { get; set; }
public string CGene { get; set; }
public string DGene { get; set; }
public string EGene { get; set; }
public string EnGene { get; set; }
public string VGene { get; set; }
public Guid SireID { get; set; }
public Guid DamID { get; set; }
public Guid LitterID { get; set; }
public int Status { get; set; }
public List<Guid> Litters { get; set; }
public string ImagePath { get; set; }
public bool PregnantStatus { get; set; }
public DateTime SellDate { get; set; }
public DateTime DeathDate { get; set; }
public DateTime LastPregnantDate { get; set; }
[JsonConstructor]
public Rabbit(Guid rabbitID, string farmName, string rabbitName, string earNumber, string color, string regNum, string gcNum, decimal weight, DateTime birthday, string sex, int status)
{
RabbitID = rabbitID;
FarmName = farmName;
RabbitName = rabbitName;
Breed = "Holland Lop";
EarNumber = earNumber;
Color = color;
RegNumber = regNum;
GCNumber = gcNum;
Weight = weight;
Birthday = birthday;
Sex = sex;
ImagePath = "rabbit_placeholder";
LitterID = Guid.NewGuid();
Status = status;
Litters = null;
ImagePath = "rabbit_placeholder";
AGene = "A_";
BGene = "B_";
CGene = "C_";
DGene = "D_";
EGene = "E_";
EnGene = "en_";
VGene = "v_";
PregnantStatus = false;
SellDate = DateTime.Parse("2222-01-01");
DeathDate = DateTime.Parse("2222-01-01");
LastPregnantDate = DateTime.Parse("0001-01-01");
}
public Rabbit(Guid rabbitID, string farmName, string rabbitName, DateTime birthday, Guid sireID, Guid damID, Guid litterID)
{
RabbitID = rabbitID;
FarmName = farmName;
RabbitName = rabbitName;
Breed = "Holland Lop";
EarNumber = "";
Color = "";
RegNumber = "";
GCNumber = "";
Weight = 0;
Birthday = birthday;
Sex = "";
AGene = "A_";
BGene = "B_";
CGene = "C_";
DGene = "D_";
EGene = "E_";
EnGene = "en_";
VGene = "v_";
SireID = sireID;
DamID = damID;
LitterID = litterID;
Status = 0;
Litters = null;
ImagePath = "rabbit_placeholder";
PregnantStatus = false;
SellDate = DateTime.Parse("2222-01-01");
DeathDate = DateTime.Parse("2222-01-01");
LastPregnantDate = DateTime.Parse("0001-01-01");
}
public Rabbit getRabbit(Guid rabbitID)
{
Rabbit rabbit = null;
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID.Equals(rabbitID))
{
rabbit = r;
}
}
return rabbit;
}
public Rabbit getSire(Guid sireID)
{
Rabbit sire = null;
foreach (Rabbit rabbit in RabbitList.rabbits)
{
if (rabbit.RabbitID.Equals(sireID))
{
sire = rabbit;
}
}
return sire;
}
public Rabbit getDam (Guid damID)
{
Rabbit dam = null;
foreach (Rabbit rabbit in RabbitList.rabbits)
{
if (rabbit.RabbitID.Equals(damID))
{
dam = rabbit;
}
}
return dam;
}
}
}

33
Kindlebox/RabbitList.cs Normal file
View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
internal class RabbitList
{
public static List<Rabbit> rabbits;
static RabbitList()
{
rabbits = new List<Rabbit>();
}
public static void Record(Guid rabbitID, string farmName, string rabbitName, string earNumber, string color, string regNum, string gcNum, decimal weight, DateTime birthday, string sex, int status)
{
rabbits.Add(new Rabbit (rabbitID, farmName, rabbitName, earNumber, color, regNum, gcNum, weight, birthday, sex, status ));
}
public static void Display()
{
foreach (var rabbit in rabbits)
{
Console.WriteLine(rabbit.ToString());
}
}
}
}

163
Kindlebox/RabbitUserControl.Designer.cs generated Normal file
View File

@ -0,0 +1,163 @@
namespace Kindlebox
{
partial class RabbitUserControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblRabbitName = new System.Windows.Forms.Label();
this.lblFarmName = new System.Windows.Forms.Label();
this.lblColor = new System.Windows.Forms.Label();
this.AgeLabel = new System.Windows.Forms.Label();
this.lblAge = new System.Windows.Forms.Label();
this.lblWeight = new System.Windows.Forms.Label();
this.WeightLabel = new System.Windows.Forms.Label();
this.btnView = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(119, 50);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(100, 100);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// lblRabbitName
//
this.lblRabbitName.AutoSize = true;
this.lblRabbitName.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRabbitName.Location = new System.Drawing.Point(3, 26);
this.lblRabbitName.Name = "lblRabbitName";
this.lblRabbitName.Size = new System.Drawing.Size(90, 18);
this.lblRabbitName.TabIndex = 1;
this.lblRabbitName.Text = "RabbitName";
//
// lblFarmName
//
this.lblFarmName.AutoSize = true;
this.lblFarmName.Location = new System.Drawing.Point(3, 10);
this.lblFarmName.Name = "lblFarmName";
this.lblFarmName.Size = new System.Drawing.Size(58, 13);
this.lblFarmName.TabIndex = 2;
this.lblFarmName.Text = "FarmName";
//
// lblColor
//
this.lblColor.Location = new System.Drawing.Point(245, 5);
this.lblColor.Name = "lblColor";
this.lblColor.Size = new System.Drawing.Size(100, 23);
this.lblColor.TabIndex = 3;
this.lblColor.Text = "Color";
this.lblColor.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// AgeLabel
//
this.AgeLabel.AutoSize = true;
this.AgeLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.AgeLabel.Location = new System.Drawing.Point(110, 163);
this.AgeLabel.Name = "AgeLabel";
this.AgeLabel.Size = new System.Drawing.Size(29, 13);
this.AgeLabel.TabIndex = 4;
this.AgeLabel.Text = "Age";
//
// lblAge
//
this.lblAge.Location = new System.Drawing.Point(72, 179);
this.lblAge.Name = "lblAge";
this.lblAge.Size = new System.Drawing.Size(100, 23);
this.lblAge.TabIndex = 5;
this.lblAge.Text = "0y 0m 0d";
this.lblAge.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblWeight
//
this.lblWeight.Location = new System.Drawing.Point(192, 184);
this.lblWeight.Name = "lblWeight";
this.lblWeight.Size = new System.Drawing.Size(50, 13);
this.lblWeight.TabIndex = 7;
this.lblWeight.Text = "0 lbs";
this.lblWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// WeightLabel
//
this.WeightLabel.AutoSize = true;
this.WeightLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.WeightLabel.Location = new System.Drawing.Point(196, 163);
this.WeightLabel.Name = "WeightLabel";
this.WeightLabel.Size = new System.Drawing.Size(47, 13);
this.WeightLabel.TabIndex = 6;
this.WeightLabel.Text = "Weight";
//
// btnView
//
this.btnView.Location = new System.Drawing.Point(273, 174);
this.btnView.Name = "btnView";
this.btnView.Size = new System.Drawing.Size(60, 23);
this.btnView.TabIndex = 8;
this.btnView.Text = "View";
this.btnView.UseVisualStyleBackColor = true;
this.btnView.Click += new System.EventHandler(this.btnView_Click);
//
// RabbitUserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Gainsboro;
this.Controls.Add(this.btnView);
this.Controls.Add(this.lblWeight);
this.Controls.Add(this.WeightLabel);
this.Controls.Add(this.lblAge);
this.Controls.Add(this.AgeLabel);
this.Controls.Add(this.lblColor);
this.Controls.Add(this.lblFarmName);
this.Controls.Add(this.lblRabbitName);
this.Controls.Add(this.pictureBox1);
this.Name = "RabbitUserControl";
this.Size = new System.Drawing.Size(348, 215);
this.Load += new System.EventHandler(this.RabbitUserControl_Load);
this.Click += new System.EventHandler(this.RabbitUserControl_Click);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblRabbitName;
private System.Windows.Forms.Label lblFarmName;
private System.Windows.Forms.Label lblColor;
private System.Windows.Forms.Label AgeLabel;
private System.Windows.Forms.Label lblAge;
private System.Windows.Forms.Label lblWeight;
private System.Windows.Forms.Label WeightLabel;
private System.Windows.Forms.Button btnView;
}
}

View File

@ -0,0 +1,65 @@
using Kindlebox.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class RabbitUserControl : UserControl
{
private string _farmName;
private string _rabbitName;
private string _color;
private string _age;
private string _weight;
private Guid _rabbitID;
private Image _image;
public RabbitUserControl()
{
InitializeComponent();
}
private void RabbitUserControl_Load(object sender, EventArgs e)
{
_farmName = "Farm Name";
_rabbitName = "Rabbit Name";
_color = "Color";
_age = "0y 0m 0d";
_weight = "0lbs";
Image rabbitImage = (Image)Properties.Resources.ResourceManager.GetObject("rabbit_placeholder");
_image = rabbitImage;
}
public string FarmNameText { get { return _farmName; } set { _farmName = value; lblFarmName.Text = _farmName; } }
public string RabbitNameText { get { return _rabbitName; } set { _rabbitName = value; lblRabbitName.Text = _rabbitName; } }
public string ColorText { get { return _color; } set { _color = value; lblColor.Text = _color; } }
public string AgeText { get { return _age; } set { _age = value; lblAge.Text = _age; } }
public string WeightText { get { return _weight; } set { _weight = value; lblWeight.Text = _weight; } }
public Guid RabbitIDText { get { return _rabbitID; } set { _rabbitID = value;} }
public Image RabbitImagePath { get { return _image; } set { _image = value; pictureBox1.Image = _image; } }
private void btnView_Click(object sender, EventArgs e)
{
ViewRabbit viewRabbit = new ViewRabbit();
viewRabbit.rabbitID = _rabbitID;
viewRabbit.Show();
}
private void RabbitUserControl_Click(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

60
Kindlebox/RabbitryListByType.Designer.cs generated Normal file
View File

@ -0,0 +1,60 @@
namespace Kindlebox
{
partial class RabbitryListByType
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.Location = new System.Drawing.Point(13, 13);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(1129, 783);
this.flowLayoutPanel1.TabIndex = 0;
//
// RabbitryListByType
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1154, 808);
this.Controls.Add(this.flowLayoutPanel1);
this.Name = "RabbitryListByType";
this.Text = "RabbitryListByType";
this.Activated += new System.EventHandler(this.RabbitryListByType_Activated);
this.Load += new System.EventHandler(this.RabbitryListByType_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}

View File

@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class RabbitryListByType : Form
{
string type = "";
public RabbitryListByType(string _type)
{
InitializeComponent();
type = _type;
}
private void RabbitryListByType_Load(object sender, EventArgs e)
{
flowLayoutPanel1.Controls.Clear();
RefreshRabbitryList();
}
public static string ToAgeString (DateTime dob)
{
DateTime today = DateTime.Today;
int months = today.Month - dob.Month;
int years = today.Year - dob.Year;
if (today.Day < dob.Day)
{
months--;
}
if (months < 0)
{
years--;
months += 12;
}
int days = (today - dob.AddMonths((years * 12) + months)).Days;
return string.Format("{0} year{1}, {2} month{3} and {4} day{5}",
years, (years == 1) ? "" : "s",
months, (months == 1) ? "" : "s",
days, (days == 1) ? "" : "s");
}
public void RefreshRabbitryList()
{
ResourceManager resManager = new ResourceManager("Kindlebox.Properties", GetType().Assembly);
if (type == "herd")
{
foreach (Rabbit r in RabbitList.rabbits.OrderBy(x => x.RabbitName))
{
if (r.Status == 0)
{
string age = ToAgeString(r.Birthday);
//Image rabbitImage = (Image)(resManager.GetObject(r.ImagePath));
Image rabbitImage = (Image)Properties.Resources.ResourceManager.GetObject("rabbit_placeholder");
RabbitUserControl rabbitUserControl = new RabbitUserControl();
rabbitUserControl.FarmNameText = r.FarmName;
rabbitUserControl.RabbitNameText = r.RabbitName;
rabbitUserControl.ColorText = r.Color;
rabbitUserControl.AgeText = age;
rabbitUserControl.WeightText = r.Weight + " lbs";
rabbitUserControl.RabbitIDText = r.RabbitID;
rabbitUserControl.RabbitImagePath = rabbitImage;
flowLayoutPanel1.Controls.Add(rabbitUserControl);
}
}
} else if (type == "does")
{
foreach (Rabbit r in RabbitList.rabbits.OrderBy(x => x.RabbitName))
{
if (r.Status == 0 && r.Sex == "Doe")
{
string age = ToAgeString(r.Birthday);
//Image rabbitImage = (Image)(resManager.GetObject(r.ImagePath));
Image rabbitImage = (Image)Properties.Resources.ResourceManager.GetObject("rabbit_placeholder");
RabbitUserControl rabbitUserControl = new RabbitUserControl();
rabbitUserControl.FarmNameText = r.FarmName;
rabbitUserControl.RabbitNameText = r.RabbitName;
rabbitUserControl.ColorText = r.Color;
rabbitUserControl.AgeText = age;
rabbitUserControl.WeightText = r.Weight + " lbs";
rabbitUserControl.RabbitIDText = r.RabbitID;
rabbitUserControl.RabbitImagePath = rabbitImage;
flowLayoutPanel1.Controls.Add(rabbitUserControl);
}
}
}
else if (type == "bucks")
{
foreach (Rabbit r in RabbitList.rabbits.OrderBy(x => x.RabbitName))
{
if (r.Status == 0 && r.Sex == "Buck")
{
string age = ToAgeString(r.Birthday);
//Image rabbitImage = (Image)(resManager.GetObject(r.ImagePath));
Image rabbitImage = (Image)Properties.Resources.ResourceManager.GetObject("rabbit_placeholder");
RabbitUserControl rabbitUserControl = new RabbitUserControl();
rabbitUserControl.FarmNameText = r.FarmName;
rabbitUserControl.RabbitNameText = r.RabbitName;
rabbitUserControl.ColorText = r.Color;
rabbitUserControl.AgeText = age;
rabbitUserControl.WeightText = r.Weight + " lbs";
rabbitUserControl.RabbitIDText = r.RabbitID;
rabbitUserControl.RabbitImagePath = rabbitImage;
flowLayoutPanel1.Controls.Add(rabbitUserControl);
}
}
}
}
private void RabbitryListByType_Activated(object sender, EventArgs e)
{
flowLayoutPanel1.Controls.Clear();
RefreshRabbitryList();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

133
Kindlebox/SmallPedigreeUC.Designer.cs generated Normal file
View File

@ -0,0 +1,133 @@
namespace Kindlebox
{
partial class SmallPedigreeUC
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblSire = new System.Windows.Forms.Label();
this.lblDam = new System.Windows.Forms.Label();
this.lblSDam = new System.Windows.Forms.Label();
this.lblSSire = new System.Windows.Forms.Label();
this.lblDDam = new System.Windows.Forms.Label();
this.lblDSire = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblSire
//
this.lblSire.AutoSize = true;
this.lblSire.Location = new System.Drawing.Point(13, 53);
this.lblSire.Name = "lblSire";
this.lblSire.Size = new System.Drawing.Size(76, 26);
this.lblSire.TabIndex = 0;
this.lblSire.Text = "SireFarmName\r\nSireName\r\n";
//
// lblDam
//
this.lblDam.AutoSize = true;
this.lblDam.Location = new System.Drawing.Point(13, 175);
this.lblDam.Name = "lblDam";
this.lblDam.Size = new System.Drawing.Size(80, 26);
this.lblDam.TabIndex = 1;
this.lblDam.Text = "DamFarmName\r\nDamName\r\n";
//
// lblSDam
//
this.lblSDam.AutoSize = true;
this.lblSDam.Location = new System.Drawing.Point(154, 84);
this.lblSDam.Name = "lblSDam";
this.lblSDam.Size = new System.Drawing.Size(80, 26);
this.lblSDam.TabIndex = 3;
this.lblSDam.Text = "DamFarmName\r\nDamName\r\n";
//
// lblSSire
//
this.lblSSire.AutoSize = true;
this.lblSSire.Location = new System.Drawing.Point(154, 27);
this.lblSSire.Name = "lblSSire";
this.lblSSire.Size = new System.Drawing.Size(76, 26);
this.lblSSire.TabIndex = 2;
this.lblSSire.Text = "SireFarmName\r\nSireName\r\n";
//
// lblDDam
//
this.lblDDam.AutoSize = true;
this.lblDDam.Location = new System.Drawing.Point(154, 207);
this.lblDDam.Name = "lblDDam";
this.lblDDam.Size = new System.Drawing.Size(80, 26);
this.lblDDam.TabIndex = 5;
this.lblDDam.Text = "DamFarmName\r\nDamName\r\n";
//
// lblDSire
//
this.lblDSire.AutoSize = true;
this.lblDSire.Location = new System.Drawing.Point(154, 150);
this.lblDSire.Name = "lblDSire";
this.lblDSire.Size = new System.Drawing.Size(76, 26);
this.lblDSire.TabIndex = 4;
this.lblDSire.Text = "SireFarmName\r\nSireName\r\n";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(51, 259);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(200, 16);
this.label1.TabIndex = 6;
this.label1.Text = "Doubleclick to Expand Pedigree";
//
// SmallPedigreeUC
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label1);
this.Controls.Add(this.lblDDam);
this.Controls.Add(this.lblDSire);
this.Controls.Add(this.lblSDam);
this.Controls.Add(this.lblSSire);
this.Controls.Add(this.lblDam);
this.Controls.Add(this.lblSire);
this.Name = "SmallPedigreeUC";
this.Size = new System.Drawing.Size(303, 285);
this.Load += new System.EventHandler(this.SmallPedigreeUC_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblSire;
private System.Windows.Forms.Label lblDam;
private System.Windows.Forms.Label lblSDam;
private System.Windows.Forms.Label lblSSire;
private System.Windows.Forms.Label lblDDam;
private System.Windows.Forms.Label lblDSire;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class SmallPedigreeUC : UserControl
{
private string _SireFarmName;
private string _SireRabbitName;
private string _DamFarmName;
private string _DamRabbitName;
private string _SSireFarmName;
private string _SSireRabbitName;
private string _SDamFarmName;
private string _SDamRabbitName;
private string _DSireFarmName;
private string _DSireRabbitName;
private string _DDamFarmName;
private string _DDamRabbitName;
public SmallPedigreeUC()
{
InitializeComponent();
}
private void SmallPedigreeUC_Load(object sender, EventArgs e)
{
}
public string SireFarmText { get { return _SireFarmName; } set { _SireFarmName = value; lblSire.Text = value + "\n" + _SireRabbitName; } }
public string SireRabbitText { get { return _SireRabbitName; } set { _SireRabbitName = value; lblSire.Text = _SireFarmName + "\n" + value; } }
public string DamFarmText { get { return _DamFarmName; } set { _DamFarmName = value; lblDam.Text = value + "\n" + _DamRabbitName; } }
public string DamRabbitText { get { return _DamRabbitName; } set { _DamRabbitName = value; lblDam.Text = _DamFarmName + "\n" + value; } }
public string SSireFarmText { get { return _SSireFarmName; } set { _SSireFarmName = value; lblSSire.Text = value + "\n" + _SSireRabbitName; } }
public string SSireRabbitText { get { return _SSireRabbitName; } set { _SSireRabbitName = value; lblSSire.Text = _SSireFarmName + "\n" + value; } }
public string SDamFarmText { get { return _SDamFarmName; } set { _SDamFarmName = value; lblSDam.Text = value + "\n" + _SDamRabbitName; } }
public string SDamRabbitText { get { return _SDamRabbitName; } set { _SDamRabbitName = value; lblSDam.Text = _SDamFarmName + "\n" + value; } }
public string DSireFarmText { get { return _DSireFarmName; } set { _DSireFarmName = value; lblDSire.Text = value + "\n" + _DSireRabbitName; } }
public string DSireRabbitText { get { return _DSireRabbitName; } set { _DSireRabbitName = value; lblDSire.Text = _DSireFarmName + "\n" + value; } }
public string DDamFarmText { get { return _DDamFarmName; } set { _DDamFarmName = value; lblDDam.Text = value + "\n" + _DDamRabbitName; } }
public string DDamRabbitText { get { return _DDamRabbitName; } set { _DDamRabbitName = value; lblDDam.Text = _DDamFarmName + "\n" + value; } }
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

115
Kindlebox/Splash.Designer.cs generated Normal file
View File

@ -0,0 +1,115 @@
namespace Kindlebox
{
partial class Splash
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblKindlebox = new System.Windows.Forms.Label();
this.lblKindleboxdesc = new System.Windows.Forms.Label();
this.lblBYTAG = new System.Windows.Forms.Label();
this.lblVersion = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Image = global::Kindlebox.Properties.Resources.kindlebox_icon_256x256;
this.pictureBox1.Location = new System.Drawing.Point(12, 7);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(258, 256);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// lblKindlebox
//
this.lblKindlebox.AutoSize = true;
this.lblKindlebox.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblKindlebox.Location = new System.Drawing.Point(355, 97);
this.lblKindlebox.Name = "lblKindlebox";
this.lblKindlebox.Size = new System.Drawing.Size(223, 39);
this.lblKindlebox.TabIndex = 1;
this.lblKindlebox.Text = "KINDLEBOX";
//
// lblKindleboxdesc
//
this.lblKindleboxdesc.AutoSize = true;
this.lblKindleboxdesc.Location = new System.Drawing.Point(384, 136);
this.lblKindleboxdesc.Name = "lblKindleboxdesc";
this.lblKindleboxdesc.Size = new System.Drawing.Size(157, 13);
this.lblKindleboxdesc.TabIndex = 2;
this.lblKindleboxdesc.Text = "a rabbitry management software";
//
// lblBYTAG
//
this.lblBYTAG.AutoSize = true;
this.lblBYTAG.Location = new System.Drawing.Point(543, 250);
this.lblBYTAG.Name = "lblBYTAG";
this.lblBYTAG.Size = new System.Drawing.Size(116, 13);
this.lblBYTAG.TabIndex = 3;
this.lblBYTAG.Text = "Made by Rory Rezzelle";
//
// lblVersion
//
this.lblVersion.AutoSize = true;
this.lblVersion.Location = new System.Drawing.Point(441, 160);
this.lblVersion.Name = "lblVersion";
this.lblVersion.Size = new System.Drawing.Size(35, 13);
this.lblVersion.TabIndex = 4;
this.lblVersion.Text = "label1";
//
// Splash
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(671, 272);
this.ControlBox = false;
this.Controls.Add(this.lblVersion);
this.Controls.Add(this.lblBYTAG);
this.Controls.Add(this.lblKindleboxdesc);
this.Controls.Add(this.lblKindlebox);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Splash";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Load += new System.EventHandler(this.Splash_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblKindlebox;
private System.Windows.Forms.Label lblKindleboxdesc;
private System.Windows.Forms.Label lblBYTAG;
private System.Windows.Forms.Label lblVersion;
}
}

66
Kindlebox/Splash.cs Normal file
View File

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class Splash : Form
{
Timer timer = new Timer();
String version = "0.02";
public Splash()
{
InitializeComponent();
}
private void Splash_Load(object sender, EventArgs e)
{
lblVersion.Text = "v. " + version;
if (Properties.Settings.Default.RabbitFile == "")
{
timer.Interval = 5000;
timer.Tick += new EventHandler(timer_Tick_New);
timer.Start();
}
else
{
timer.Interval = 5000;
timer.Tick += new EventHandler(timer_Tick_Launch);
timer.Start();
}
}
private void timer_Tick_New(object sender, EventArgs e)
{
timer.Stop();
CreateRabbitry createRabbitry = new CreateRabbitry();
createRabbitry.Show();
this.Close();
}
private void timer_Tick_Launch(object sender, EventArgs e)
{
timer.Stop();
Launch launch = new Launch();
launch.Show();
this.Close();
}
}
}

120
Kindlebox/Splash.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

60
Kindlebox/UpdateJson.cs Normal file
View File

@ -0,0 +1,60 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kindlebox
{
internal class UpdateJson
{
public UpdateJson() { }
public UpdateJson(string _arg)
{
if (_arg == "rabbits")
{
UpdateRabbits();
}
else if(_arg == "litters")
{
UpdateLitters();
}
else if (_arg == "breedings")
{
UpdateBreedings();
}
else if (_arg == "all")
{
UpdateRabbits();
UpdateLitters();
UpdateBreedings();
}
}
public static void UpdateRabbits()
{
string fileName = Properties.Settings.Default.RabbitFile;
var json = JsonConvert.SerializeObject(RabbitList.rabbits);
System.IO.File.WriteAllText(fileName, json);
}
public static void UpdateLitters()
{
string fileName = Properties.Settings.Default.LitterFile;
var json = JsonConvert.SerializeObject(LitterList.litters);
System.IO.File.WriteAllText(fileName, json);
}
public static void UpdateBreedings()
{
string fileName = Properties.Settings.Default.BreedingFile;
var json = JsonConvert.SerializeObject(BreedingList.breedings);
System.IO.File.WriteAllText(fileName, json);
}
}
}

2045
Kindlebox/ViewPedigree.Designer.cs generated Normal file

File diff suppressed because it is too large Load Diff

942
Kindlebox/ViewPedigree.cs Normal file
View File

@ -0,0 +1,942 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using Newtonsoft.Json;
namespace Kindlebox
{
public partial class ViewPedigree : Form
{
//Rabbit IDs
public static Guid rootID, sireID, ssireID, sdamID, sssireID, ssdamID, sdsireID, sddamID, damID, dsireID, ddamID, dssireID, dsdamID, ddsireID, dddamID;
Rabbit root, sire, ssire, sdam, sssire, ssdam, sdsire, sddam, dam, dsire, ddam, dssire, dsdam, ddsire, dddam;
public bool unsavedChanges = false;
public static bool rabbitExists = false;
Bitmap memoryImage;
public ViewPedigree(Guid rabbitID)
{
InitializeComponent();
rootID = rabbitID;
}
private void ViewPedigree_Load(object sender, EventArgs e)
{
//Farm Info
lblFarmName.Text = Properties.Settings.Default.FarmName;
lblFarmAddress.Text = Properties.Settings.Default.FarmStreet + "\n" + Properties.Settings.Default.FarmCity + ", " + Properties.Settings.Default.FarmState + " " + Properties.Settings.Default.FarmZIP;
lblFarmPhone.Text = "Phone # " + Properties.Settings.Default.FarmPhone;
lblFarmWWW.Text = "Find us on the web: " + Properties.Settings.Default.FarmWWW;
// Start Pedigree
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == rootID)
{
root = r.getRabbit(r.RabbitID);
sire = r.getSire(r.SireID);
dam = r.getDam(r.DamID);
sireID = r.SireID;
damID = r.DamID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == sireID)
{
ssire = r.getSire(r.SireID);
sdam = r.getDam(r.DamID);
ssireID = r.SireID;
sdamID = r.DamID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == ssireID)
{
sssire = r.getSire(r.SireID);
ssdam = r.getDam(r.DamID);
sssireID = r.SireID;
ssdamID = r.DamID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == sdamID)
{
sdsire = r.getSire(r.SireID);
sddam = r.getDam(r.DamID);
sdsireID = r.SireID;
sddamID = r.DamID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == damID)
{
dsire = r.getSire(r.SireID);
ddam = r.getDam(r.DamID);
dsireID = r.SireID;
ddamID = r.DamID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == dsireID)
{
dssire = r.getSire(r.SireID);
dsdam = r.getDam(r.DamID);
dssireID = r.SireID;
dsdamID = r.DamID;
}
}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == ddamID)
{
ddsire = r.getSire(r.SireID);
dddam = r.getDam(r.DamID);
ddsireID = r.SireID;
dddamID = r.DamID;
}
}
/* -- fill in pedigree -- */
lblFarmNameRoot.Text = EscapeFarmName(root.FarmName) + "'s";
lblRabbitNameRoot.Text = root.RabbitName;
lblEarNumRoot.Text = "Ear#: " + root.EarNumber;
lblColorRoot.Text = "Color: " + root.Color;
lblRegNumRoot.Text = "Reg#: " + root.RegNumber;
lblGCNumRoot.Text = "GC#: " + root.GCNumber;
lblSexRoot.Text = root.Sex;
lblBirthdayRoot.Text = root.Birthday.ToString("MM-dd-yyyy");
lblWeightRoot.Text = "WT: " + root.Weight + " lbs";
lblFarmNameSire.Text = EscapeFarmName(sire.FarmName) + "'s";
lblRabbitNameSire.Text = sire.RabbitName;
lblEarNumSire.Text = "Ear#: " + sire.EarNumber;
lblColorSire.Text = "Color: " + sire.Color;
lblRegNumSire.Text = "Reg#: " + sire.RegNumber;
lblGCNumSire.Text = "GC#: " + sire.GCNumber;
lblSexSire.Text = sire.Sex;
lblBirthdaySire.Text = sire.Birthday.ToString("MM-dd-yyyy");
lblWeightSire.Text = "WT: " + sire.Weight + " lbs";
lblFarmNameSSire.Text = EscapeFarmName(ssire.FarmName) + "'s";
lblRabbitNameSSire.Text = ssire.RabbitName;
lblEarNumSSire.Text = "Ear#: " + ssire.EarNumber;
lblColorSSire.Text = "Color: " + ssire.Color;
lblRegNumSSire.Text = "Reg#: " + ssire.RegNumber;
lblGCNumSSire.Text = "GC#: " + ssire.GCNumber;
lblSexSSire.Text = ssire.Sex;
lblBirthdaySSire.Text = ssire.Birthday.ToString("MM-dd-yyyy");
lblWeightSSire.Text = "WT: " + ssire.Weight + " lbs";
lblFarmNameSSSire.Text = EscapeFarmName(sssire.FarmName) + "'s";
lblRabbitNameSSSire.Text = sssire.RabbitName;
lblEarNumSSSire.Text = "Ear#: " + sssire.EarNumber;
lblColorSSSire.Text = "Color: " + sssire.Color;
lblRegNumSSSire.Text = "Reg#: " + sssire.RegNumber;
lblGCNumSSSire.Text = "GC#: " + sssire.GCNumber;
lblSexSSSire.Text = sssire.Sex;
lblBirthdaySSSire.Text = sssire.Birthday.ToString("MM-dd-yyyy");
lblWeightSSSire.Text = "WT: " + sssire.Weight + " lbs";
lblFarmNameSSDam.Text = EscapeFarmName(ssdam.FarmName) + "'s";
lblRabbitNameSSDam.Text = ssdam.RabbitName;
lblEarNumSSDam.Text = "Ear#: " + ssdam.EarNumber;
lblColorSSDam.Text = "Color: " + ssdam.Color;
lblRegNumSSDam.Text = "Reg#: " + ssdam.RegNumber;
lblGCNumSSDam.Text = "GC#: " + ssdam.GCNumber;
lblSexSSDam.Text = ssdam.Sex;
lblBirthdaySSDam.Text = ssdam.Birthday.ToString("MM-dd-yyyy");
lblWeightSSDam.Text = "WT: " + ssdam.Weight + " lbs";
lblFarmNameSDam.Text = EscapeFarmName(sdam.FarmName) + "'s";
lblRabbitNameSDam.Text = sdam.RabbitName;
lblEarNumSDam.Text = "Ear#: " + sdam.EarNumber;
lblColorSDam.Text = "Color: " + sdam.Color;
lblRegNumSDam.Text = "Reg#: " + sdam.RegNumber;
lblGCNumSDam.Text = "GC#: " + sdam.GCNumber;
lblSexSDam.Text = sdam.Sex;
lblBirthdaySDam.Text = sdam.Birthday.ToString("MM-dd-yyyy");
lblWeightSDam.Text = "WT: " + sdam.Weight + " lbs";
lblFarmNameSDSire.Text = EscapeFarmName(sdsire.FarmName) + "'s";
lblRabbitNameSDSire.Text = sdsire.RabbitName;
lblEarNumSDSire.Text = "Ear#: " + sdsire.EarNumber;
lblColorSDSire.Text = "Color: " + sdsire.Color;
lblRegNumSDSire.Text = "Reg#: " + sdsire.RegNumber;
lblGCNumSDSire.Text = "GC#: " + sdsire.GCNumber;
lblSexSDSire.Text = sdsire.Sex;
lblBirthdaySDSire.Text = sdsire.Birthday.ToString("MM-dd-yyyy");
lblWeightSDSire.Text = "WT: " + sdsire.Weight + " lbs";
lblFarmNameSDDam.Text = EscapeFarmName(sddam.FarmName) + "'s";
lblRabbitNameSDDam.Text = sddam.RabbitName;
lblEarNumSDDam.Text = "Ear#: " + sddam.EarNumber;
lblColorSDDam.Text = "Color: " + sddam.Color;
lblRegNumSDDam.Text = "Reg#: " + sddam.RegNumber;
lblGCNumSDDam.Text = "GC#: " + sddam.GCNumber;
lblSexSDDam.Text = sddam.Sex;
lblBirthdaySDDam.Text = sddam.Birthday.ToString("MM-dd-yyyy");
lblWeightSDDam.Text = "WT: " + sddam.Weight + " lbs";
lblFarmNameDam.Text = EscapeFarmName(dam.FarmName) + "'s";
lblRabbitNameDam.Text = dam.RabbitName;
lblEarNumDam.Text = "Ear#: " + dam.EarNumber;
lblColorDam.Text = "Color: " + dam.Color;
lblRegNumDam.Text = "Reg#: " + dam.RegNumber;
lblGCNumDam.Text = "GC#: " + dam.GCNumber;
lblSexDam.Text = dam.Sex;
lblBirthdayDam.Text = dam.Birthday.ToString("MM-dd-yyyy");
lblWeightDam.Text = "WT: " + dam.Weight + " lbs";
lblFarmNameDSire.Text = EscapeFarmName(dsire.FarmName) + "'s";
lblRabbitNameDSire.Text = dsire.RabbitName;
lblEarNumDSire.Text = "Ear#: " + dsire.EarNumber;
lblColorDSire.Text = "Color: " + dsire.Color;
lblRegNumDSire.Text = "Reg#: " + dsire.RegNumber;
lblGCNumDSire.Text = "GC#: " + dsire.GCNumber;
lblSexDSire.Text = dsire.Sex;
lblBirthdayDSire.Text = dsire.Birthday.ToString("MM-dd-yyyy");
lblWeightDSire.Text = "WT: " + dsire.Weight + " lbs";
lblFarmNameDSSire.Text = EscapeFarmName(dssire.FarmName) + "'s";
lblRabbitNameDSSire.Text = dssire.RabbitName;
lblEarNumDSSire.Text = "Ear#: " + dssire.EarNumber;
lblColorDSSire.Text = "Color: " + dssire.Color;
lblRegNumDSSire.Text = "Reg#: " + dssire.RegNumber;
lblGCNumDSSire.Text = "GC#: " + dssire.GCNumber;
lblSexDSSire.Text = dssire.Sex;
lblBirthdayDSSire.Text = dssire.Birthday.ToString("MM-dd-yyyy");
lblWeightDSSire.Text = "WT: " + dssire.Weight + " lbs";
lblFarmNameDSDam.Text = EscapeFarmName(dsdam.FarmName) + "'s";
lblRabbitNameDSDam.Text = dsdam.RabbitName;
lblEarNumDSDam.Text = "Ear#: " + dsdam.EarNumber;
lblColorDSDam.Text = "Color: " + dsdam.Color;
lblRegNumDSDam.Text = "Reg#: " + dsdam.RegNumber;
lblGCNumDSDam.Text = "GC#: " + dsdam.GCNumber;
lblSexDSDam.Text = dsdam.Sex;
lblBirthdayDSDam.Text = dsdam.Birthday.ToString("MM-dd-yyyy");
lblWeightDSDam.Text = "WT: " + dsdam.Weight + " lbs";
lblFarmNameDDam.Text = EscapeFarmName(ddam.FarmName) + "'s";
lblRabbitNameDDam.Text = ddam.RabbitName;
lblEarNumDDam.Text = "Ear#: " + ddam.EarNumber;
lblColorDDam.Text = "Color: " + ddam.Color;
lblRegNumDDam.Text = "Reg#: " + ddam.RegNumber;
lblGCNumDDam.Text = "GC#: " + ddam.GCNumber;
lblSexDDam.Text = ddam.Sex;
lblBirthdayDDam.Text = ddam.Birthday.ToString("MM-dd-yyyy");
lblWeightDDam.Text = "WT: " + ddam.Weight + " lbs";
lblFarmNameDDSire.Text = EscapeFarmName(ddsire.FarmName) + "'s";
lblRabbitNameDDSire.Text = ddsire.RabbitName;
lblEarNumDDSire.Text = "Ear#: " + ddsire.EarNumber;
lblColorDDSire.Text = "Color: " + ddsire.Color;
lblRegNumDDSire.Text = "Reg#: " + ddsire.RegNumber;
lblGCNumDDSire.Text = "GC#: " + ddsire.GCNumber;
lblSexDDSire.Text = ddsire.Sex;
lblBirthdayDDSire.Text = ddsire.Birthday.ToString("MM-dd-yyyy");
lblWeightDDSire.Text = "WT: " + ddsire.Weight + " lbs";
lblFarmNameDDDam.Text = EscapeFarmName(dddam.FarmName) + "'s";
lblRabbitNameDDDam.Text = dddam.RabbitName;
lblEarNumDDDam.Text = "Ear#: " + dddam.EarNumber;
lblColorDDDam.Text = "Color: " + dddam.Color;
lblRegNumDDDam.Text = "Reg#: " + dddam.RegNumber;
lblGCNumDDDam.Text = "GC#: " + dddam.GCNumber;
lblSexDDDam.Text = dddam.Sex;
lblBirthdayDDDam.Text = dddam.Birthday.ToString("MM-dd-yyyy");
lblWeightDDDam.Text = "WT: " + dddam.Weight + " lbs";
}
//Check if there are unsaved changes before closing the window
private void ViewPedigree_FormClosing(object sender, FormClosingEventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
//e.Graphics.DrawImage(memoryImage, e.MarginBounds);
Pen blackPen = new Pen(Color.Black);
Brush blackBrush = new SolidBrush(Color.Black);
Font normal = new Font("Arial", 8.0f, FontStyle.Regular);
Font normalB = new Font("Arial", 8.0F, FontStyle.Bold);
Font large = new Font("Arial", 11.0f, FontStyle.Bold);
Font largeR = new Font("Arial", 11.0f, FontStyle.Regular);
Font xlarge = new Font("Arial", 14.0f, FontStyle.Bold);
Font small = new Font("Arial", 6.0f, FontStyle.Regular);
int x1 = 100;
int x1_5 = 150;
int x2 = 200;
int x3 = 300;
int x3_5 = 350;
/* -- Draw the boxes -- */
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewRoot.Bounds.X, rabbitBoxViewRoot.Bounds.Y, rabbitBoxViewRoot.Bounds.Width - 100, rabbitBoxViewRoot.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSire.Bounds.X - 125, rabbitBoxViewSire.Bounds.Y, rabbitBoxViewSire.Bounds.Width - 100, rabbitBoxViewSire.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSSire.Bounds.X - 250, rabbitBoxViewSSire.Bounds.Y, rabbitBoxViewSSire.Bounds.Width - 100, rabbitBoxViewSSire.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSSSire.Bounds.X - 375, rabbitBoxViewSSSire.Bounds.Y, rabbitBoxViewSSSire.Bounds.Width - 150, rabbitBoxViewSSSire.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSSDam.Bounds.X - 375, rabbitBoxViewSSDam.Bounds.Y, rabbitBoxViewSSDam.Bounds.Width - 150, rabbitBoxViewSSDam.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSDam.Bounds.X - 250, rabbitBoxViewSDam.Bounds.Y, rabbitBoxViewSDam.Bounds.Width - 100, rabbitBoxViewSDam.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSDSire.Bounds.X - 375, rabbitBoxViewSDSire.Bounds.Y, rabbitBoxViewSDSire.Bounds.Width - 150, rabbitBoxViewSDSire.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewSDDam.Bounds.X - 375, rabbitBoxViewSDDam.Bounds.Y, rabbitBoxViewSDDam.Bounds.Width - 150, rabbitBoxViewSDDam.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDam.Bounds.X - 125, rabbitBoxViewDam.Bounds.Y, rabbitBoxViewDam.Bounds.Width - 100, rabbitBoxViewDam.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDSire.Bounds.X - 250, rabbitBoxViewDSire.Bounds.Y, rabbitBoxViewDSire.Bounds.Width - 100, rabbitBoxViewDSire.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDSSire.Bounds.X - 375, rabbitBoxViewDSSire.Bounds.Y, rabbitBoxViewDSSire.Bounds.Width - 150, rabbitBoxViewDSSire.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDSDam.Bounds.X - 375, rabbitBoxViewDSDam.Bounds.Y, rabbitBoxViewDSDam.Bounds.Width - 150, rabbitBoxViewDSDam.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDDam.Bounds.X - 250, rabbitBoxViewDDam.Bounds.Y, rabbitBoxViewDDam.Bounds.Width - 100, rabbitBoxViewDDam.Bounds.Height - 40);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDDSire.Bounds.X - 375, rabbitBoxViewDDSire.Bounds.Y, rabbitBoxViewDDSire.Bounds.Width - 150, rabbitBoxViewDDSire.Bounds.Height - 30);
e.Graphics.DrawRectangle(blackPen, rabbitBoxViewDDDam.Bounds.X - 375, rabbitBoxViewDDDam.Bounds.Y, rabbitBoxViewDDDam.Bounds.Width - 150, rabbitBoxViewDDDam.Bounds.Height - 30);
/* -- Draw the text -- */
foreach (Control g in this.Controls)
{
Type t = g.GetType();
if (t.Name == "GroupBox")
{
foreach (Control c in g.Controls)
{
if (c.Name.Contains("Root"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 5, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 5, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 5, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 5, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 5, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 5, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 60, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 55, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 95, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("DDSire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("SDSire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("DSire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 310, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 305, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 345, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("DSSire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("SSSire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("SSire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 308, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 305, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 345, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("Sire"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 185, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 180, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 220, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("DDDam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("SDDam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("DDam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 310, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 305, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 345, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("DSDam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("SSDam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 13);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, normalB, blackBrush, g.Bounds.X + c.Bounds.X - 382, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 23);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 28);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 380, g.Bounds.Y + c.Bounds.Y - 25);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 480, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 465, g.Bounds.Y + c.Bounds.Y - 8);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, small, blackBrush, g.Bounds.X + c.Bounds.X - 510, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("SDam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 254, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 308, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 305, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 345, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
else if (c.Name.Contains("Dam"))
{
switch (c.Name)
{
case string a when a.Contains("lblFarmName"):
e.Graphics.DrawString(EscapeFarmNamePrint(c.Text), normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblRabbitName"):
e.Graphics.DrawString(c.Text, large, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 20);
break;
case string a when a.Contains("lblEarNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 30);
break;
case string a when a.Contains("lblColor"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblRegNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblGCNum"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 130, g.Bounds.Y + c.Bounds.Y - 35);
break;
case string a when a.Contains("lblSex"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 185, g.Bounds.Y + c.Bounds.Y - 15);
break;
case string a when a.Contains("lblBirthday"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 180, g.Bounds.Y + c.Bounds.Y - 12);
break;
case string a when a.Contains("lblWeight"):
e.Graphics.DrawString(c.Text, normal, blackBrush, g.Bounds.X + c.Bounds.X - 220, g.Bounds.Y + c.Bounds.Y - 20);
break;
}
}
}
}
else if (t.Name == "Label" && g.Name == "lblFarmName") //Print Farm Name
{
e.Graphics.DrawString(g.Text, xlarge, blackBrush, 10, 10);
}
else if (t.Name == "Label" && g.Name == "lblFarmAddress") //Print Address
{
e.Graphics.DrawString(g.Text, largeR, blackBrush, 10, 35);
}
else if (t.Name == "Label" && g.Name == "lblFarmPhone") //Print Phone
{
e.Graphics.DrawString(g.Text, largeR, blackBrush, 10, 68);
}
else if (t.Name == "Label" && g.Name == "lblFarmWWW") //Print WWW
{
e.Graphics.DrawString(g.Text, largeR, blackBrush, 10, 82);
}
else if (t.Name == "Label" && g.Name == "lblCertification")
{
e.Graphics.DrawString(g.Text, normal, blackBrush, 10, 750);
}
else if (t.Name == "Label" && g.Name == "lblSigned")
{
e.Graphics.DrawString(g.Text, normal, blackBrush, 10, 780);
e.Graphics.DrawLine(blackPen, 80, 800, 300, 800);
}
}
}
private void btnPrint_Click(object sender, EventArgs e)
{
Margins margins = new Margins(10, 10, 100, 100);
Panel panel = new Panel();
this.Controls.Add(panel);
Graphics graphics = panel.CreateGraphics();
Size size = this.ClientSize;
memoryImage = new Bitmap(size.Width, size.Height, graphics);
graphics = Graphics.FromImage(memoryImage);
Point point = PointToScreen(panel.Location);
graphics.CopyFromScreen(point.X, point.Y, 0, 0, size);
printDocument1.DefaultPageSettings.Landscape = true;
printDocument1.DefaultPageSettings.Margins = margins;
//printPreviewDialog1.Document = printDocument1;
//printPreviewDialog1.ShowDialog();
printDialog1.AllowSomePages = true;
printDialog1.ShowHelp = true;
printDialog1.Document = printDocument1;
DialogResult result = printDialog1.ShowDialog();
if (result == DialogResult.OK)
{
printDocument1.Print();
}
}
private string EscapeFarmName(string farmName)
{
if (farmName.Contains("&"))
{
farmName = farmName.Replace("&", "&&");
}
return farmName;
}
private string EscapeFarmNamePrint(string farmName)
{
if (farmName.Contains("&&"))
{
farmName = farmName.Replace("&&", "&");
}
return farmName;
}
}
}

306
Kindlebox/ViewPedigree.resx Normal file
View File

@ -0,0 +1,306 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="printPreviewDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>153, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="printPreviewDialog1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAICAQAAAAAADoAgAAZgAAABAQEAAAAAAAKAEAAE4DAAAgIAAAAQAIAKgIAAB2BAAAEBAAAAEA
CABoBQAAHg0AACAgAAABACAAqBAAAIYSAAAQEAAAAQAgAGgEAAAuIwAAKAAAACAAAABAAAAAAQAEAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAACAgACAAAAAgACAAICAAACAgIAAwMDAAAAA
/wAA/wAAAP//AP8AAAD/AP8A//8AAP///wAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIoiI
iIiIiIiIiIiIiIiIiIiCIigiIiIozMzMzMzMyCIogiIoIiIiKM7m5ubm5sgiKIIiKCIiIijObm5ubm7I
IiiCIigiIiIozubm5ubmyCIogiIoIiIiKM5ubm5ubsgiKIIiKCIiIijO5ubm5ubIIiiIiIiIiIiIzm5u
bm5uyCIogRERERERGM7u7u7u7sgiKIHZWVlZWRjMzMzMzMzIIiiB1ZWVlZUYiIiIiIiIiIiIgdlZWVlZ
GDMzMzMzMzMzOIHVlZWVlRg/uLi4uLi4uDiB2VlZWVkYP7uLi4uLi4s4gdWVlZWVGD+4uLi4uLi4OIHZ
WVlZWRg/u4uLi4uLiziB1ZWVlZUYP7i4uLi4uLg4gdlZWVlZGD+7i4uLi4uLOIHVlZWVlRg/uLi4uLi4
uDiB3d3d3d0YP7uLi4uLi4s4gRERERERGD+4uLi4uLi4OIiIiIiIiIg/u4uLi4uLiziCIiIiIiIoP7i4
uLi4uLg4giIiIiIiKD+7i4uLi4uLOIIiIiIiIig/uLi4uLi4uDiCIiIiIiIoP7u7u7u7u7s4giIiIiIi
KD//////////OIIiIiIiIigzMzMzMzMzMziIiIiIiIiIiIiIiIiIiIiIIiIiIiIiIiIiIiIiIiIiIv//
////////AAAAAHv4AA57+AAOe/gADnv4AA57+AAOe/gADgAAAA4AAAAOAAAADgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/4AAB/+AAAf/gAAH/4AAB/+AAAf/gAAAAA
AAD/////KAAAABAAAAAgAAAAAQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAACA
gACAAAAAgACAAICAAACAgIAAwMDAAAAA/wAA/wAAAP//AP8AAAD/AP8A//8AAP///wAiIiIiIiIiIoiI
iIiIiIiIgigijMzMyCiCKCKM5mbIKIiIiIzu7sgogRERjMzMyCiB2ZGIiIiIiIHZkYMzMzM4gdmRg/u7
uziB3dGD+7u7OIEREYP7u7s4iIiIg/u7uziCIiKD+7u7OIIiIoP///84giIigzMzMziIiIiIiIiIiP//
KCIAACjObALm5mwCIigAAoiIAAKIzgAAbm4AACIoAAAREQAAGM4AAO7uAAAiKHwAWVl8ABjMfADMzAAA
IigoAAAAIAAAAEAAAAABAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA
AACAAIAAgIAAAICAgADA3MAA8MqmAKo/KgD/PyoAAF8qAFVfKgCqXyoA/18qAAB/KgBVfyoAqn8qAP9/
KgAAnyoAVZ8qAKqfKgD/nyoAAL8qAFW/KgCqvyoA/78qAADfKgBV3yoAqt8qAP/fKgAA/yoAVf8qAKr/
KgD//yoAAABVAFUAVQCqAFUA/wBVAAAfVQBVH1UAqh9VAP8fVQAAP1UAVT9VAKo/VQD/P1UAAF9VAFVf
VQCqX1UA/19VAAB/VQBVf1UAqn9VAP9/VQAAn1UAVZ9VAKqfVQD/n1UAAL9VAFW/VQCqv1UA/79VAADf
VQBV31UAqt9VAP/fVQAA/1UAVf9VAKr/VQD//1UAAAB/AFUAfwCqAH8A/wB/AAAffwBVH38Aqh9/AP8f
fwAAP38AVT9/AKo/fwD/P38AAF9/AFVffwCqX38A/19/AAB/fwBVf38Aqn9/AP9/fwAAn38AVZ9/AKqf
fwD/n38AAL9/AFW/fwCqv38A/79/AADffwBV338Aqt9/AP/ffwAA/38AVf9/AKr/fwD//38AAACqAFUA
qgCqAKoA/wCqAAAfqgBVH6oAqh+qAP8fqgAAP6oAVT+qAKo/qgD/P6oAAF+qAFVfqgCqX6oA/1+qAAB/
qgBVf6oAqn+qAP9/qgAAn6oAVZ+qAKqfqgD/n6oAAL+qAFW/qgCqv6oA/7+qAADfqgBV36oAqt+qAP/f
qgAA/6oAVf+qAKr/qgD//6oAAADUAFUA1ACqANQA/wDUAAAf1ABVH9QAqh/UAP8f1AAAP9QAVT/UAKo/
1AD/P9QAAF/UAFVf1ACqX9QA/1/UAAB/1ABVf9QAqn/UAP9/1AAAn9QAVZ/UAKqf1AD/n9QAAL/UAFW/
1ACqv9QA/7/UAADf1ABV39QAqt/UAP/f1AAA/9QAVf/UAKr/1AD//9QAVQD/AKoA/wAAH/8AVR//AKof
/wD/H/8AAD//AFU//wCqP/8A/z//AABf/wBVX/8Aql//AP9f/wAAf/8AVX//AKp//wD/f/8AAJ//AFWf
/wCqn/8A/5//AAC//wBVv/8Aqr//AP+//wAA3/8AVd//AKrf/wD/3/8AVf//AKr//wD/zMwA/8z/AP//
MwD//2YA//+ZAP//zAAAfwAAVX8AAKp/AAD/fwAAAJ8AAFWfAACqnwAA/58AAAC/AABVvwAAqr8AAP+/
AAAA3wAAVd8AAKrfAAD/3wAAVf8AAKr/AAAAACoAVQAqAKoAKgD/ACoAAB8qAFUfKgCqHyoA/x8qAAA/
KgBVPyoA8Pv/AKSgoACAgIAAAAD/AAD/AAAA//8A/wAAAAAAAAD//wAA////AP39/f39/f39/f39/f39
/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39
/f39/f39/f39/f39/f39/f39/f39/f39qoYIqoYIhqoIqgiqCaoIqgiqhqqGhoYIhoYIqv39/f0I/f39
/ar9/f39/YY2Ng4yDg4ODgoOCgoKCgqG/f39/Yb9/f39CP39/f39qjY7Ozs3Nzc3NjMSMjIOCqr9/f39
qv39/f2G/f39/f0IN19fOzs3Nzc3NjcODg4KCP39/f0I/f39/ar9/f39/ao6X19fXzs7Ozc3NzY3NgqG
/f39/Yb9/f39CP39/f39hl9jY19jX187Ozs7Nzc3Dqr9/f39qv39/f2G/f39/f0IOodjh19jX19fXztf
OzcOCP39/f0ICAmqCAiqCKoICapfCYdjh2ODY19fXzs7Ow6q/f39/QhITEwoSCUoKSQoqmMJCYcJCWNj
Y2NfY19fNgj9/f39qkyZmZmYmJRwlCmqX19fXl9fX186WzY3Njc2gv39/f0JcJ2dmZmZlJmUJAmqCaoJ
hggIqggICKoIqggI/f39/YZwnp2dnZmZmJVMqnx8fHx8fFR8VHhUVFRUVKr9/f39CHChoZ2dnZ2ZmUwJ
fKSkxqSkxqSkpKSkpKBUCP39/f2qcKLDoqGdnZ2ZTKp8ysakxqSkxqSkxqSkpFSq/f39/QiUpqbDoqHE
nZ1Mq3ykqMakyqSkxqSkpKSkVAj9/f39hpTIyKbHoqGhoXAIfMrLpMqkxqSkxqTGpKRUqv39/f0IlMym
yKbIpcShcAh8y6jKpMqkxsqkpKSkxlQI/f39/aqUzMzMyKbIpqJwqnzLy8qpxsqkpMakxqSkeAj9/f39
CJSUlJSUlJSUlJQJgMupy8qpysqkyqSkxqRUqv39/f2GCKoIqgiqCKoIhgigrcvPqcuoy8qkxsqkxnyG
/f39/ar9/f39/f39/f39qnzPz6nLy8uoyqnKpKTKVAj9/f39CP39/f39/f39/f0IfNDPz8+py8upyqjG
yqR8hv39/f2G/f39/f39/f39/Qik0K7P0M+ty8vLy6jKpXyq/f39/ar9/f39/f39/f39CHzQ09Ctz8/P
qcupy6jKeAj9/f39CP39/f39/f39/f2qoNPQ0NPQ0M/Qz8vLy6l8CP39/f2G/f39/f39/f39/QmkfKR8
oHx8fHx8fHx8fHyG/f39/aoIqgiqCKoIqgiqCKoIqgiqCKoIqgiqCKoIqgj9/f39/f39/f39/f39/f39
/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3/////////////
///AAAAD3vgAA974AAPe+AAD3vgAA974AAPe+AADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAADwAAAA9/4AAPf+AAD3/gAA9/4AAPf+AAD3/gAA8AAAAP//////////ygA
AAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAA
gACAgAAAgICAAMDcwADwyqYAqj8qAP8/KgAAXyoAVV8qAKpfKgD/XyoAAH8qAFV/KgCqfyoA/38qAACf
KgBVnyoAqp8qAP+fKgAAvyoAVb8qAKq/KgD/vyoAAN8qAFXfKgCq3yoA/98qAAD/KgBV/yoAqv8qAP//
KgAAAFUAVQBVAKoAVQD/AFUAAB9VAFUfVQCqH1UA/x9VAAA/VQBVP1UAqj9VAP8/VQAAX1UAVV9VAKpf
VQD/X1UAAH9VAFV/VQCqf1UA/39VAACfVQBVn1UAqp9VAP+fVQAAv1UAVb9VAKq/VQD/v1UAAN9VAFXf
VQCq31UA/99VAAD/VQBV/1UAqv9VAP//VQAAAH8AVQB/AKoAfwD/AH8AAB9/AFUffwCqH38A/x9/AAA/
fwBVP38Aqj9/AP8/fwAAX38AVV9/AKpffwD/X38AAH9/AFV/fwCqf38A/39/AACffwBVn38Aqp9/AP+f
fwAAv38AVb9/AKq/fwD/v38AAN9/AFXffwCq338A/99/AAD/fwBV/38Aqv9/AP//fwAAAKoAVQCqAKoA
qgD/AKoAAB+qAFUfqgCqH6oA/x+qAAA/qgBVP6oAqj+qAP8/qgAAX6oAVV+qAKpfqgD/X6oAAH+qAFV/
qgCqf6oA/3+qAACfqgBVn6oAqp+qAP+fqgAAv6oAVb+qAKq/qgD/v6oAAN+qAFXfqgCq36oA/9+qAAD/
qgBV/6oAqv+qAP//qgAAANQAVQDUAKoA1AD/ANQAAB/UAFUf1ACqH9QA/x/UAAA/1ABVP9QAqj/UAP8/
1AAAX9QAVV/UAKpf1AD/X9QAAH/UAFV/1ACqf9QA/3/UAACf1ABVn9QAqp/UAP+f1AAAv9QAVb/UAKq/
1AD/v9QAAN/UAFXf1ACq39QA/9/UAAD/1ABV/9QAqv/UAP//1ABVAP8AqgD/AAAf/wBVH/8Aqh//AP8f
/wAAP/8AVT//AKo//wD/P/8AAF//AFVf/wCqX/8A/1//AAB//wBVf/8Aqn//AP9//wAAn/8AVZ//AKqf
/wD/n/8AAL//AFW//wCqv/8A/7//AADf/wBV3/8Aqt//AP/f/wBV//8Aqv//AP/MzAD/zP8A//8zAP//
ZgD//5kA///MAAB/AABVfwAAqn8AAP9/AAAAnwAAVZ8AAKqfAAD/nwAAAL8AAFW/AACqvwAA/78AAADf
AABV3wAAqt8AAP/fAABV/wAAqv8AAAAAKgBVACoAqgAqAP8AKgAAHyoAVR8qAKofKgD/HyoAAD8qAFU/
KgDw+/8ApKCgAICAgAAAAP8AAP8AAAD//wD/AAAAAAAAAP//AAD///8A/f39/f39/f39/f39/f39/f0I
hgiqCKoICKoICKaGCP39qv39hv2GNg4ODjII/ar9/Yb9/ar9qjdjXzsOCP2G/f0IhquGCAleCWNfNob9
qv39qkxMTEgIX19fX18I/Qj9/QhwnZlMqoYIqggIqgiG/f2qcKadcAl8fFQDVFQDqv39CHDMpnCqfMvL
ysrKVAj9/QiUlHBwCYDPy8/LylSG/f2GqoYIqgig0M/Py8t8qv39CP39/f2GpNDQ0M/PfAn9/ar9/f39
qqT20NDQ0Hyq/f2G/f39/QmkpKSloKR8CP39CKoIhgiqCIYIqgiGCKr9/f39/f39/f39/f39/f39/f//
hv2AAf0ItAX9/bQFX2OABWNfgAU7O4ABNzeAAf39gAGq/YAB/YaAAf39vAE6h7wBX2O8AV9fgAE7N///
/f0oAAAAIAAAAEAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAADCv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/
wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/
wf/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAA
AAAAAAAAwr/B/7Z3Sf+zckT/rm0//6toO/+nYjb/pF4y/6BZLv+dVCr/mlEn/5dNI/+VSiH/kkce/5FE
HP+RRBz/kUUb/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/AAAAAAAA
AAAAAAAAAAAAAAAAAADCv8H/v4JS//+aZv//lWD/+5Bc//WLV//uh1P/54FO/997S//Wdkb/zXBD/8Vr
QP+9Zj3/tGI5/65dN/+RRRz/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/AAAAAAAAAAAAAAAAAAAAAMK/
wf8AAAAAAAAAAAAAAAAAAAAAAAAAAMK/wf/GjFv//6Rz//+fbf//m2f//5Zh//yRXf/3jVj/8IhV/+mD
UP/hfUz/2HhI/9ByRP/HbED/v2c9/5VJIf/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAA
AAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAAAAAAAAAAwr/B/86WZP//r4L//6p7//+mdf//oW7//5xo//+X
Yv/9kl7/+I5a//KJVf/rhFH/4n5N/9t4SP/Sc0X/mlEm/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAA
AAAAAAAAAAAAAAAAAADCv8H/AAAAAAAAAAAAAAAAAAAAAAAAAADCv8H/1J9s//+4kf//tIv//6+E//+r
ff//p3f//6Jw//+eav//mWT//pRf//qQWv/0i1b/7IVS/+V/Tv+gWC7/wr/B/wAAAAAAAAAAAAAAAAAA
AADCv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAAAAAAMK/wf/apnP//7+d//+7
mP//uJL//7WM//+whv//rH///6d4//+jcf//n2v//5ll//+VYP/6kVv/9YxY/6diN//Cv8H/AAAAAAAA
AAAAAAAAAAAAAMK/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/96t
eP//wqL//8Gi//+/nv//vJn//7mT//+2jv//sYj//66A//+pev//pHP//6Bt//+bZ///l2L/r20//8K/
wf8AAAAAAAAAAAAAAAAAAAAAwr/B/xYXev8XF3b/GBVx/xkUbf8ZFGr/GhNm/xoSY/8bEV//HBFd/xwQ
W//Cv8H/4K96///Cov//wqL//8Ki///Cov//wJ///72b//+6lf//t4///7KJ//+ugv//qnv//6V0//+h
bv+3d0n/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/FRqE/0dN1v8/RNL/Nz3Q/y40zv8nLcz/ISfK/xwh
yf8WHMf/GxJh/8K/wf/gr3r/4K96/+Cvev/gr3r/3614/9yqdf/apnL/16Nw/9Sea//Rmmj/zZZk/8qR
X//GjFz/w4dW/7+CUv/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8SHZD/WF3a/05U1/9FS9X/PUPS/zU7
0P8uM83/JyzL/yAmyf8aFGn/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/
wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/xAfnP9obt7/YGTc/1Zb
2f9NU9f/RUrU/ztB0v80OdD/LDHO/xgWcv/Cv8H/Dn+n/w18pP8MeqH/DHie/wt1m/8Kc5j/CXGV/wlv
k/8JbJD/CGqN/wdpi/8HZ4j/BmWH/wZkhf8GYoP/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/DiKp/3l+
4/9vdeH/Zmze/11i2/9UWtn/S1HW/0NI1P86P9H/Fhh9/8K/wf8Ogar/Barp/wGo6P8Apef/AKPm/wCi
5P8An+L/AJ7h/wCd3/8AnN7/AJnc/wCY2/8AmNn/AJbX/wZjhP/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/
wf8MJbX/iI7n/4CF5v93fOP/bnPg/2Vr3f9bYdv/UljY/0lP1v8UGoj/wr/B/w+Erf8Lrur/Bqvq/wOo
6f8Apuf/AKTm/wCi5f8AoOT/AJ/i/wCd4f8AnN//AJrd/wCZ2/8AmNr/BmWH/8K/wf8AAAAAAAAAAAAA
AAAAAAAAwr/B/wkowP+WnOz/jpTq/4aL6P9+hOX/dXri/2xx4P9jaN3/WV/b/xEek//Cv8H/EIaw/xay
7P8Or+z/Cavr/wWq6v8Bp+j/AKbn/wCj5f8AoeT/AJ/j/wCe4f8AnOD/AJve/wCa3f8HZ4n/wr/B/wAA
AAAAAAAAAAAAAAAAAADCv8H/CCrK/6Ko7/+coe7/lZrr/42T6f+Fiub/fIHl/3N54v9rcN//ECGg/8K/
wf8QiLP/I7nu/xq07f8Ssez/C63r/war6v8Cqen/AKbo/wCk5v8AouX/AKHk/wCf4f8AneH/AJzf/who
i//Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8GLNP/q7Hy/6as8P+hpu//mp/u/5OY6/+LkOj/g4nm/3qA
5P8NI6z/wr/B/xCKtv8xvvD/J7rv/x627f8Vsuz/Dq/s/wmr6/8Equn/Aafo/wCl5/8Ao+X/AKHk/wCf
4v8AnuH/CGqO/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wUu2/+vtPP/r7Tz/6qv8v+mq/D/oKXv/5me
7f+Sl+v/io/p/wsmt//Cv8H/Eo24/0HF8f82wfD/LLzv/yK47v8atO3/EbHs/wut6/8Gq+r/A6np/wCm
6P8Apeb/AKLl/wCh5P8IbJD/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/BC/h/wQv3/8FL9z/BS3Z/wYt
1v8GLNL/ByvP/wgqy/8IKcb/CSnC/8K/wf8Sjrv/Uszy/0fH8f87w/H/Mb7v/ye67/8et+7/FbPt/w6v
6/8IrOv/BKnp/wGo6P8Apef/AKPl/wluk//Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf/Cv8H/wr/B/8K/
wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/xKRvf9j0/P/WM/z/0zK8f9BxfH/N8Hw/yy8
7/8iuO7/GbTt/xGx7P8Lruv/Bqrq/wOo6f8Apuf/CnGV/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCv8H/E5LA/3Ta8/9q1fP/XtHz/1LM
8v9Hx/H/O8Pw/zG+7/8nu+//Hrbt/xay7f8Or+v/CKzq/wSq6f8Kc5j/wr/B/wAAAAAAAAAAAAAAAAAA
AADCv8H/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK/wf8UlMH/hOD1/3rc
9f9v2PP/ZNTy/1jO8v9NyvH/Qsbx/zbB8P8svO//I7ju/xm07f8SsOz/C67r/wt2m//Cv8H/AAAAAAAA
AAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwr/B/xSW
w/+T5vb/iuL1/3/e9P912vT/adbz/13R8/9SzPL/R8jx/zzD8P8xvvD/J7rv/x627v8Vsuz/C3ie/8K/
wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AADCv8H/FJbG/57r9/+X6Pb/juT1/4Th9f963fX/b9j0/2PT8/9Yz/L/TMrx/0HF8f83wO//LLzv/yK4
7v8MeqH/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAMK/wf8VmMf/qO/3/6Lt9/+b6vb/kub2/4rj9f9/3vX/dNrz/2rV8/9d0fP/Uszy/0fI
8f88w/D/Mr7v/w19pP/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAwr/B/xWZyP8UmMf/FZfF/xSVw/8TlML/E5K//xOQvf8Sjrv/EYy4/xGK
tv8QiLL/D4Ww/w+Erf8Pgar/Dn+n/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/8K/wf/Cv8H/wr/B/8K/
wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/
wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//
/////////////8AAAAPe+AAD3vgAA974AAPe+AAD3vgAA974AAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAAD3/gAA9/4AAPf+AAD3/gAA9/4AAPf+AADwAAAA///
////////KAAAABAAAAAgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDA/8DA
wP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP8AAAAAAAAAAMDA
wP8AAAAAAAAAAMDAwP8AAAAAwMDA/8F2R/+9bj//umc6/7diNf+3YjX/wMDA/wAAAADAwMD/AAAAAAAA
AADAwMD/AAAAAAAAAADAwMD/AAAAAMDAwP/RkmD//7aP//+ldP/8kl3/vW0//8DAwP8AAAAAwMDA/wAA
AAAAAAAAwMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/3ap2///Cov//to7//6V0/8uJWP/AwMD/AAAAAMDA
wP8AAAAAAAAAAMDAwP8THI7/FBqF/xYYfP8XFnP/wMDA/+Cvev/gr3r/4K96/92qdv/ao3D/wMDA/wAA
AADAwMD/AAAAAAAAAADAwMD/ECCd/2Fn3P8zOc//FRmC/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DA
wP/AwMD/wMDA/wAAAAAAAAAAwMDA/w0krP+Pler/YWbd/xIcj//AwMD/DHmf/wpzmP8Ib5L/B2uO/wdq
jf8Gao3/B2qN/8DAwP8AAAAAAAAAAMDAwP8KJrv/r7Tz/5CU6v8PIJ//wMDA/w+Dq/87y/z/Kcb8/xrD
/P8QwPv/EMD7/wdqjf/AwMD/AAAAAAAAAADAwMD/CCrI/woowP8LJrf/DSSu/8DAwP8Sjbj/Zdb9/0/Q
/P88y/v/Kcf7/xrC+/8IbZD/wMDA/wAAAAAAAAAAwMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/FpfG/43h
/f962/3/Zdb8/0/Q/P87zPz/CXSZ/8DAwP8AAAAAAAAAAMDAwP8AAAAAAAAAAAAAAAAAAAAAwMDA/xif
z/+u6f7/n+X9/47h/f953P3/ZNb9/w19pP/AwMD/AAAAAAAAAADAwMD/AAAAAAAAAAAAAAAAAAAAAMDA
wP8apNX/uez+/7ns/v+u6f7/oOX9/43h/f8Rh7H/wMDA/wAAAAAAAAAAwMDA/wAAAAAAAAAAAAAAAAAA
AADAwMD/GqTV/xqk1f8apNX/GaHR/xecy/8WmMb/FJK+/8DAwP8AAAAAAAAAAMDAwP/AwMD/wMDA/8DA
wP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/AAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAgAEAALQF
wf+0BQAAgAUAAIAFAACAAQAAgAHB/4ABAACAAQAAgAEAALwBAAC8AQAAvAHB/4ABbP///5H/
</value>
</data>
<metadata name="printDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>314, 17</value>
</metadata>
<metadata name="printDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>455, 17</value>
</metadata>
</root>

493
Kindlebox/ViewRabbit.Designer.cs generated Normal file
View File

@ -0,0 +1,493 @@
namespace Kindlebox
{
partial class ViewRabbit
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblRabbitName = new System.Windows.Forms.Label();
this.pbRabbitImage = new System.Windows.Forms.PictureBox();
this.lblFarmName = new System.Windows.Forms.Label();
this.lbBday = new System.Windows.Forms.Label();
this.lblBirthdayText = new System.Windows.Forms.Label();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.lblSexText = new System.Windows.Forms.Label();
this.lblSex = new System.Windows.Forms.Label();
this.lblWeightText = new System.Windows.Forms.Label();
this.lblWeight = new System.Windows.Forms.Label();
this.lblEarNumText = new System.Windows.Forms.Label();
this.lblEarNum = new System.Windows.Forms.Label();
this.lblColorText = new System.Windows.Forms.Label();
this.lblColor = new System.Windows.Forms.Label();
this.lblGCNumText = new System.Windows.Forms.Label();
this.lblGCNum = new System.Windows.Forms.Label();
this.lblRegNumText = new System.Windows.Forms.Label();
this.lblRegNum = new System.Windows.Forms.Label();
this.btnEdit = new System.Windows.Forms.Button();
this.lblAGene = new System.Windows.Forms.Label();
this.lblBGene = new System.Windows.Forms.Label();
this.lblCGene = new System.Windows.Forms.Label();
this.lblDGene = new System.Windows.Forms.Label();
this.lblEGene = new System.Windows.Forms.Label();
this.lblEnGene = new System.Windows.Forms.Label();
this.lblVGene = new System.Windows.Forms.Label();
this.btnPedigree = new System.Windows.Forms.Button();
this.btnBreeding = new System.Windows.Forms.Button();
this.lblKits = new System.Windows.Forms.Label();
this.listbKits = new System.Windows.Forms.ListBox();
this.btnAddLitter = new System.Windows.Forms.Button();
this.listbLitters = new System.Windows.Forms.ListBox();
this.lblLitters = new System.Windows.Forms.Label();
this.bRemoveBreeding = new System.Windows.Forms.Button();
this.smallPedigreeUC1 = new Kindlebox.SmallPedigreeUC();
((System.ComponentModel.ISupportInitialize)(this.pbRabbitImage)).BeginInit();
this.SuspendLayout();
//
// lblRabbitName
//
this.lblRabbitName.AutoSize = true;
this.lblRabbitName.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRabbitName.Location = new System.Drawing.Point(164, 29);
this.lblRabbitName.Name = "lblRabbitName";
this.lblRabbitName.Size = new System.Drawing.Size(165, 31);
this.lblRabbitName.TabIndex = 0;
this.lblRabbitName.Text = "RabbitName";
//
// pbRabbitImage
//
this.pbRabbitImage.Location = new System.Drawing.Point(170, 100);
this.pbRabbitImage.Name = "pbRabbitImage";
this.pbRabbitImage.Size = new System.Drawing.Size(100, 100);
this.pbRabbitImage.TabIndex = 1;
this.pbRabbitImage.TabStop = false;
//
// lblFarmName
//
this.lblFarmName.AutoSize = true;
this.lblFarmName.Location = new System.Drawing.Point(167, 16);
this.lblFarmName.Name = "lblFarmName";
this.lblFarmName.Size = new System.Drawing.Size(58, 13);
this.lblFarmName.TabIndex = 3;
this.lblFarmName.Text = "FarmName";
//
// lbBday
//
this.lbBday.AutoSize = true;
this.lbBday.Location = new System.Drawing.Point(357, 78);
this.lbBday.Name = "lbBday";
this.lbBday.Size = new System.Drawing.Size(48, 13);
this.lbBday.TabIndex = 4;
this.lbBday.Text = "Birthday:";
//
// lblBirthdayText
//
this.lblBirthdayText.AutoSize = true;
this.lblBirthdayText.Location = new System.Drawing.Point(411, 78);
this.lblBirthdayText.Name = "lblBirthdayText";
this.lblBirthdayText.Size = new System.Drawing.Size(64, 13);
this.lblBirthdayText.TabIndex = 5;
this.lblBirthdayText.Text = "RabbitBDay";
//
// lblSexText
//
this.lblSexText.AutoSize = true;
this.lblSexText.Location = new System.Drawing.Point(411, 100);
this.lblSexText.Name = "lblSexText";
this.lblSexText.Size = new System.Drawing.Size(73, 13);
this.lblSexText.TabIndex = 8;
this.lblSexText.Text = "RabbitGender";
//
// lblSex
//
this.lblSex.AutoSize = true;
this.lblSex.Location = new System.Drawing.Point(357, 100);
this.lblSex.Name = "lblSex";
this.lblSex.Size = new System.Drawing.Size(45, 13);
this.lblSex.TabIndex = 7;
this.lblSex.Text = "Gender:";
//
// lblWeightText
//
this.lblWeightText.AutoSize = true;
this.lblWeightText.Location = new System.Drawing.Point(411, 121);
this.lblWeightText.Name = "lblWeightText";
this.lblWeightText.Size = new System.Drawing.Size(72, 13);
this.lblWeightText.TabIndex = 10;
this.lblWeightText.Text = "RabbitWeight";
//
// lblWeight
//
this.lblWeight.AutoSize = true;
this.lblWeight.Location = new System.Drawing.Point(357, 121);
this.lblWeight.Name = "lblWeight";
this.lblWeight.Size = new System.Drawing.Size(44, 13);
this.lblWeight.TabIndex = 9;
this.lblWeight.Text = "Weight:";
//
// lblEarNumText
//
this.lblEarNumText.AutoSize = true;
this.lblEarNumText.Location = new System.Drawing.Point(411, 142);
this.lblEarNumText.Name = "lblEarNumText";
this.lblEarNumText.Size = new System.Drawing.Size(76, 13);
this.lblEarNumText.TabIndex = 12;
this.lblEarNumText.Text = "RabbitEarNum";
//
// lblEarNum
//
this.lblEarNum.AutoSize = true;
this.lblEarNum.Location = new System.Drawing.Point(357, 142);
this.lblEarNum.Name = "lblEarNum";
this.lblEarNum.Size = new System.Drawing.Size(36, 13);
this.lblEarNum.TabIndex = 11;
this.lblEarNum.Text = "Ear #:";
//
// lblColorText
//
this.lblColorText.AutoSize = true;
this.lblColorText.Location = new System.Drawing.Point(411, 164);
this.lblColorText.Name = "lblColorText";
this.lblColorText.Size = new System.Drawing.Size(62, 13);
this.lblColorText.TabIndex = 14;
this.lblColorText.Text = "RabbitColor";
//
// lblColor
//
this.lblColor.AutoSize = true;
this.lblColor.Location = new System.Drawing.Point(357, 164);
this.lblColor.Name = "lblColor";
this.lblColor.Size = new System.Drawing.Size(37, 13);
this.lblColor.TabIndex = 13;
this.lblColor.Text = "Color: ";
//
// lblGCNumText
//
this.lblGCNumText.AutoSize = true;
this.lblGCNumText.Location = new System.Drawing.Point(411, 208);
this.lblGCNumText.Name = "lblGCNumText";
this.lblGCNumText.Size = new System.Drawing.Size(75, 13);
this.lblGCNumText.TabIndex = 18;
this.lblGCNumText.Text = "RabbitGCNum";
//
// lblGCNum
//
this.lblGCNum.AutoSize = true;
this.lblGCNum.Location = new System.Drawing.Point(357, 208);
this.lblGCNum.Name = "lblGCNum";
this.lblGCNum.Size = new System.Drawing.Size(38, 13);
this.lblGCNum.TabIndex = 17;
this.lblGCNum.Text = "GC #: ";
//
// lblRegNumText
//
this.lblRegNumText.AutoSize = true;
this.lblRegNumText.Location = new System.Drawing.Point(411, 186);
this.lblRegNumText.Name = "lblRegNumText";
this.lblRegNumText.Size = new System.Drawing.Size(80, 13);
this.lblRegNumText.TabIndex = 16;
this.lblRegNumText.Text = "RabbitRegNum";
//
// lblRegNum
//
this.lblRegNum.AutoSize = true;
this.lblRegNum.Location = new System.Drawing.Point(357, 186);
this.lblRegNum.Name = "lblRegNum";
this.lblRegNum.Size = new System.Drawing.Size(40, 13);
this.lblRegNum.TabIndex = 15;
this.lblRegNum.Text = "Reg #:";
//
// btnEdit
//
this.btnEdit.Location = new System.Drawing.Point(10, 18);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(79, 35);
this.btnEdit.TabIndex = 19;
this.btnEdit.Text = "Edit Rabbit";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
//
// lblAGene
//
this.lblAGene.AutoSize = true;
this.lblAGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAGene.Location = new System.Drawing.Point(192, 304);
this.lblAGene.Name = "lblAGene";
this.lblAGene.Size = new System.Drawing.Size(34, 22);
this.lblAGene.TabIndex = 20;
this.lblAGene.Text = "A_";
//
// lblBGene
//
this.lblBGene.AutoSize = true;
this.lblBGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBGene.Location = new System.Drawing.Point(232, 304);
this.lblBGene.Name = "lblBGene";
this.lblBGene.Size = new System.Drawing.Size(34, 22);
this.lblBGene.TabIndex = 21;
this.lblBGene.Text = "B_";
//
// lblCGene
//
this.lblCGene.AutoSize = true;
this.lblCGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCGene.Location = new System.Drawing.Point(272, 304);
this.lblCGene.Name = "lblCGene";
this.lblCGene.Size = new System.Drawing.Size(35, 22);
this.lblCGene.TabIndex = 22;
this.lblCGene.Text = "C_";
//
// lblDGene
//
this.lblDGene.AutoSize = true;
this.lblDGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblDGene.Location = new System.Drawing.Point(324, 304);
this.lblDGene.Name = "lblDGene";
this.lblDGene.Size = new System.Drawing.Size(35, 22);
this.lblDGene.TabIndex = 23;
this.lblDGene.Text = "D_";
//
// lblEGene
//
this.lblEGene.AutoSize = true;
this.lblEGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblEGene.Location = new System.Drawing.Point(365, 304);
this.lblEGene.Name = "lblEGene";
this.lblEGene.Size = new System.Drawing.Size(34, 22);
this.lblEGene.TabIndex = 24;
this.lblEGene.Text = "E_";
//
// lblEnGene
//
this.lblEnGene.AutoSize = true;
this.lblEnGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblEnGene.Location = new System.Drawing.Point(405, 304);
this.lblEnGene.Name = "lblEnGene";
this.lblEnGene.Size = new System.Drawing.Size(43, 22);
this.lblEnGene.TabIndex = 25;
this.lblEnGene.Text = "en_";
//
// lblVGene
//
this.lblVGene.AutoSize = true;
this.lblVGene.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblVGene.Location = new System.Drawing.Point(454, 304);
this.lblVGene.Name = "lblVGene";
this.lblVGene.Size = new System.Drawing.Size(31, 22);
this.lblVGene.TabIndex = 26;
this.lblVGene.Text = "v_";
//
// btnPedigree
//
this.btnPedigree.Location = new System.Drawing.Point(10, 65);
this.btnPedigree.Name = "btnPedigree";
this.btnPedigree.Size = new System.Drawing.Size(79, 35);
this.btnPedigree.TabIndex = 27;
this.btnPedigree.Text = "View Pedigree";
this.btnPedigree.UseVisualStyleBackColor = true;
this.btnPedigree.Click += new System.EventHandler(this.btnPedigree_Click);
//
// btnBreeding
//
this.btnBreeding.Location = new System.Drawing.Point(10, 111);
this.btnBreeding.Name = "btnBreeding";
this.btnBreeding.Size = new System.Drawing.Size(79, 35);
this.btnBreeding.TabIndex = 28;
this.btnBreeding.Text = "Add A Breeding";
this.btnBreeding.UseVisualStyleBackColor = true;
this.btnBreeding.Visible = false;
this.btnBreeding.Click += new System.EventHandler(this.btnBreeding_Click);
//
// lblKits
//
this.lblKits.AutoSize = true;
this.lblKits.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblKits.Location = new System.Drawing.Point(607, 23);
this.lblKits.Name = "lblKits";
this.lblKits.Size = new System.Drawing.Size(43, 24);
this.lblKits.TabIndex = 29;
this.lblKits.Text = "Kits";
//
// listbKits
//
this.listbKits.FormattingEnabled = true;
this.listbKits.Location = new System.Drawing.Point(611, 51);
this.listbKits.Name = "listbKits";
this.listbKits.Size = new System.Drawing.Size(232, 95);
this.listbKits.TabIndex = 30;
this.listbKits.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listbKits_MouseDoubleClick);
//
// btnAddLitter
//
this.btnAddLitter.Location = new System.Drawing.Point(10, 161);
this.btnAddLitter.Name = "btnAddLitter";
this.btnAddLitter.Size = new System.Drawing.Size(79, 35);
this.btnAddLitter.TabIndex = 31;
this.btnAddLitter.Text = "Add A Litter";
this.btnAddLitter.UseVisualStyleBackColor = true;
this.btnAddLitter.Visible = false;
this.btnAddLitter.Click += new System.EventHandler(this.btnAddLitter_Click);
//
// listbLitters
//
this.listbLitters.FormattingEnabled = true;
this.listbLitters.Location = new System.Drawing.Point(611, 208);
this.listbLitters.Name = "listbLitters";
this.listbLitters.Size = new System.Drawing.Size(232, 95);
this.listbLitters.TabIndex = 32;
//
// lblLitters
//
this.lblLitters.AutoSize = true;
this.lblLitters.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLitters.Location = new System.Drawing.Point(607, 181);
this.lblLitters.Name = "lblLitters";
this.lblLitters.Size = new System.Drawing.Size(65, 24);
this.lblLitters.TabIndex = 33;
this.lblLitters.Text = "Litters";
this.lblLitters.Click += new System.EventHandler(this.label1_Click);
//
// bRemoveBreeding
//
this.bRemoveBreeding.Location = new System.Drawing.Point(10, 111);
this.bRemoveBreeding.Name = "bRemoveBreeding";
this.bRemoveBreeding.Size = new System.Drawing.Size(79, 35);
this.bRemoveBreeding.TabIndex = 34;
this.bRemoveBreeding.Text = "Remove Breeding";
this.bRemoveBreeding.UseVisualStyleBackColor = true;
this.bRemoveBreeding.Visible = false;
this.bRemoveBreeding.Click += new System.EventHandler(this.bRemoveBreeding_Click);
//
// smallPedigreeUC1
//
this.smallPedigreeUC1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.smallPedigreeUC1.DamFarmText = null;
this.smallPedigreeUC1.DamRabbitText = null;
this.smallPedigreeUC1.DDamFarmText = null;
this.smallPedigreeUC1.DDamRabbitText = null;
this.smallPedigreeUC1.DSireFarmText = null;
this.smallPedigreeUC1.DSireRabbitText = null;
this.smallPedigreeUC1.Location = new System.Drawing.Point(180, 463);
this.smallPedigreeUC1.Name = "smallPedigreeUC1";
this.smallPedigreeUC1.SDamFarmText = null;
this.smallPedigreeUC1.SDamRabbitText = null;
this.smallPedigreeUC1.SireFarmText = null;
this.smallPedigreeUC1.SireRabbitText = null;
this.smallPedigreeUC1.Size = new System.Drawing.Size(303, 285);
this.smallPedigreeUC1.SSireFarmText = null;
this.smallPedigreeUC1.SSireRabbitText = null;
this.smallPedigreeUC1.TabIndex = 6;
this.smallPedigreeUC1.DoubleClick += new System.EventHandler(this.smallPedigreeUC1_DoubleClick);
//
// ViewRabbit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(872, 778);
this.Controls.Add(this.bRemoveBreeding);
this.Controls.Add(this.lblLitters);
this.Controls.Add(this.listbLitters);
this.Controls.Add(this.btnAddLitter);
this.Controls.Add(this.listbKits);
this.Controls.Add(this.lblKits);
this.Controls.Add(this.btnBreeding);
this.Controls.Add(this.btnPedigree);
this.Controls.Add(this.lblVGene);
this.Controls.Add(this.lblEnGene);
this.Controls.Add(this.lblEGene);
this.Controls.Add(this.lblDGene);
this.Controls.Add(this.lblCGene);
this.Controls.Add(this.lblBGene);
this.Controls.Add(this.lblAGene);
this.Controls.Add(this.btnEdit);
this.Controls.Add(this.lblGCNumText);
this.Controls.Add(this.lblGCNum);
this.Controls.Add(this.lblRegNumText);
this.Controls.Add(this.lblRegNum);
this.Controls.Add(this.lblColorText);
this.Controls.Add(this.lblColor);
this.Controls.Add(this.lblEarNumText);
this.Controls.Add(this.lblEarNum);
this.Controls.Add(this.lblWeightText);
this.Controls.Add(this.lblWeight);
this.Controls.Add(this.lblSexText);
this.Controls.Add(this.lblSex);
this.Controls.Add(this.smallPedigreeUC1);
this.Controls.Add(this.lblBirthdayText);
this.Controls.Add(this.lbBday);
this.Controls.Add(this.lblFarmName);
this.Controls.Add(this.pbRabbitImage);
this.Controls.Add(this.lblRabbitName);
this.Name = "ViewRabbit";
this.Text = "ViewRabbit";
this.Activated += new System.EventHandler(this.ViewRabbit_Activated);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ViewRabbit_FormClosing);
this.Load += new System.EventHandler(this.ViewRabbit_Load);
this.Leave += new System.EventHandler(this.ViewRabbit_Leave);
((System.ComponentModel.ISupportInitialize)(this.pbRabbitImage)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblRabbitName;
private System.Windows.Forms.PictureBox pbRabbitImage;
private System.Windows.Forms.Label lblFarmName;
private System.Windows.Forms.Label lbBday;
private System.Windows.Forms.Label lblBirthdayText;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
private SmallPedigreeUC smallPedigreeUC1;
private System.Windows.Forms.Label lblSexText;
private System.Windows.Forms.Label lblSex;
private System.Windows.Forms.Label lblWeightText;
private System.Windows.Forms.Label lblWeight;
private System.Windows.Forms.Label lblEarNumText;
private System.Windows.Forms.Label lblEarNum;
private System.Windows.Forms.Label lblColorText;
private System.Windows.Forms.Label lblColor;
private System.Windows.Forms.Label lblGCNumText;
private System.Windows.Forms.Label lblGCNum;
private System.Windows.Forms.Label lblRegNumText;
private System.Windows.Forms.Label lblRegNum;
private System.Windows.Forms.Button btnEdit;
private System.Windows.Forms.Label lblAGene;
private System.Windows.Forms.Label lblBGene;
private System.Windows.Forms.Label lblCGene;
private System.Windows.Forms.Label lblDGene;
private System.Windows.Forms.Label lblEGene;
private System.Windows.Forms.Label lblEnGene;
private System.Windows.Forms.Label lblVGene;
private System.Windows.Forms.Button btnPedigree;
private System.Windows.Forms.Button btnBreeding;
private System.Windows.Forms.Label lblKits;
private System.Windows.Forms.ListBox listbKits;
private System.Windows.Forms.Button btnAddLitter;
private System.Windows.Forms.ListBox listbLitters;
private System.Windows.Forms.Label lblLitters;
private System.Windows.Forms.Button bRemoveBreeding;
}
}

287
Kindlebox/ViewRabbit.cs Normal file
View File

@ -0,0 +1,287 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class ViewRabbit : Form
{
List<Kit> kitList = new List<Kit>();
public Guid kitID = Guid.Empty;
List<Litter> litterList = new List<Litter>();
public Guid litterID = Guid.Empty;
public Guid rabbitID;
public ViewRabbit()
{
InitializeComponent();
}
private void ViewRabbit_Load(object sender, EventArgs e)
{
RefreshRabbitInfo();
}
private void ViewRabbit_Leave(object sender, EventArgs e)
{
}
private void ViewRabbit_FormClosing(object sender, FormClosingEventArgs e)
{
//rabbitID = Guid.Empty;
}
private void btnEdit_Click(object sender, EventArgs e)
{
EditRabbitForm editRabbitForm = new EditRabbitForm(rabbitID);
editRabbitForm.ShowDialog();
}
public void RefreshRabbitInfo()
{
if (rabbitID != Guid.Empty)
{
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == rabbitID)
{
this.Text = r.FarmName + "'s " + r.RabbitName;
// get rabbit info
lblFarmName.Text = r.FarmName + "'s";
lblRabbitName.Text = r.RabbitName;
pbRabbitImage.Image = (Image)Properties.Resources.ResourceManager.GetObject(r.ImagePath);
lblBirthdayText.Text = r.Birthday.ToShortDateString();
lblColorText.Text = r.Color;
lblEarNumText.Text = r.EarNumber;
lblGCNumText.Text = r.GCNumber;
lblRegNumText.Text = r.RegNumber;
lblSexText.Text = r.Sex;
lblWeightText.Text = r.Weight + " lbs.";
lblAGene.Text = r.AGene;
lblBGene.Text = r.BGene;
lblCGene.Text = r.CGene;
lblDGene.Text = r.DGene;
lblEGene.Text = r.EGene;
lblEnGene.Text = r.EnGene;
lblVGene.Text = r.VGene;
// fill in mini pedigree
Rabbit sire = r.getSire(r.SireID);
smallPedigreeUC1.SireFarmText = EscapeFarmName(sire.FarmName);
smallPedigreeUC1.SireRabbitText = sire.RabbitName;
Rabbit dam = r.getDam(r.DamID);
smallPedigreeUC1.DamFarmText = EscapeFarmName(dam.FarmName);
smallPedigreeUC1.DamRabbitText = dam.RabbitName;
Rabbit ssire = sire.getSire(sire.SireID);
smallPedigreeUC1.SSireFarmText = EscapeFarmName(ssire.FarmName);
smallPedigreeUC1.SSireRabbitText = ssire.RabbitName;
Rabbit sdam = sire.getDam(sire.DamID);
smallPedigreeUC1.SDamFarmText = EscapeFarmName(sdam.FarmName);
smallPedigreeUC1.SDamRabbitText = sdam.RabbitName;
Rabbit dsire = dam.getSire(dam.SireID);
smallPedigreeUC1.DSireFarmText = EscapeFarmName(dsire.FarmName);
smallPedigreeUC1.DSireRabbitText = dsire.RabbitName;
Rabbit ddam = dam.getDam(dam.DamID);
smallPedigreeUC1.DDamFarmText = EscapeFarmName(ddam.FarmName);
smallPedigreeUC1.DDamRabbitText = ddam.RabbitName;
if (r.Sex == "Doe")
{
if (r.PregnantStatus == true)
{
btnAddLitter.Visible = true;
bRemoveBreeding.Visible = true;
btnBreeding.Visible = false;
}
else
{
btnBreeding.Visible = true;
btnAddLitter.Visible = false;
bRemoveBreeding.Visible = false;
}
}
// fill in the kits
foreach (Rabbit k in RabbitList.rabbits)
{
if (!listbKits.Items.Contains(k.RabbitName + " - " + k.Color)){
if (k.DamID == rabbitID || k.SireID == rabbitID)
{
// Add kit to listbox
Kit kit = new Kit(k.RabbitID, k.RabbitName, k.Color);
listbKits.Items.Add(k.RabbitName + " - " + k.Color);
// Add kit to kitList
kitList.Add(kit);
}
}
}
// fill in the litters
foreach (Litter l in LitterList.litters)
{
if (l.DamID == rabbitID || l.SireID == rabbitID)
{
if (!listbLitters.Items.Contains(l.LitterDate.ToShortDateString() + " - " + l.LitterSize))
{
//Add Litter to listbox
Litter litter = new Litter(l.LitterID, l.SireID, l.DamID, l.LitterSize, l.LitterDate);
listbLitters.Items.Add(l.LitterDate.ToShortDateString() + " - " + l.LitterSize);
//Add Litter to litterList
litterList.Add(litter);
}
}
}
}
}
}
}
private string EscapeFarmName(string farmName)
{
if (farmName.Contains("&"))
{
farmName = farmName.Replace("&", "&&");
}
return farmName;
}
private void ViewRabbit_Activated(object sender, EventArgs e)
{
RefreshRabbitInfo();
}
private void btnPedigree_Click(object sender, EventArgs e)
{
ViewPedigree viewPedigree = new ViewPedigree(rabbitID);
viewPedigree.Show();
}
private void btnBreeding_Click(object sender, EventArgs e)
{
AddABreeding addABreeding = new AddABreeding(rabbitID);
addABreeding.Show();
}
private void listbKits_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (listbKits.SelectedItem != null)
{
var index = listbKits.SelectedIndex;
var kitID = kitList[index].RabbitID;
ViewRabbit viewRabbit = new ViewRabbit();
viewRabbit.rabbitID = kitID;
viewRabbit.Show();
}
}
internal class Kit
{
public Guid RabbitID { get; set; }
public string RabbitName { get; set; }
public string Color { get; set; }
public Kit(Guid rabbitID, string rabbitName, string color)
{
RabbitID = rabbitID;
RabbitName = rabbitName;
Color = color;
}
}
private void smallPedigreeUC1_DoubleClick(object sender, EventArgs e)
{
ViewPedigree viewPedigree = new ViewPedigree(rabbitID);
viewPedigree.Show();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void btnAddLitter_Click(object sender, EventArgs e)
{
AddALitter addALitter = new AddALitter(rabbitID);
addALitter.Show();
}
private void bRemoveBreeding_Click(object sender, EventArgs e)
{
DialogResult dialogResult = MessageBox.Show("Removing this breeding will mark it as unsuccessful. Are you sure you want to continue?", "Remove Breeding?", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Guid breedingID = Guid.Empty;
foreach (Breeding b in BreedingList.breedings)
{
if (b.DamID == rabbitID)
{
//breedingID = b.BreedingID; break;
b.isSuccessful = false;
b.isActive = false;
}
}
//if (breedingID != Guid.Empty)
//{
// BreedingList.breedings.RemoveAll(r => r.BreedingID == breedingID);
//}
foreach (Rabbit r in RabbitList.rabbits)
{
if (r.RabbitID == rabbitID)
{
r.PregnantStatus = false;
}
}
UpdateJson.UpdateRabbits();
UpdateJson.UpdateBreedings();
//string fileName = Properties.Settings.Default.RabbitFile;
//var json = JsonConvert.SerializeObject(RabbitList.rabbits);
//System.IO.File.WriteAllText(fileName, json);
}
else if (dialogResult == DialogResult.No)
{
// do nothing
}
}
}
}

126
Kindlebox/ViewRabbit.resx Normal file
View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>78</value>
</metadata>
</root>

46
Kindlebox/ViewRabbitForm.Designer.cs generated Normal file
View File

@ -0,0 +1,46 @@
namespace Kindlebox
{
partial class ViewRabbitForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// ViewRabbitForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1160, 841);
this.Name = "ViewRabbitForm";
this.Text = "ViewRabbitForm";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kindlebox
{
public partial class ViewRabbitForm : Form
{
public ViewRabbitForm()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
</packages>