Removing unused TC2 classes
This commit is contained in:
1 parent
865a12213c
commit
e00015dccf
3 files changed
-364
No files matched your search
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
using BCG;
|
||||
using BCG.Utilities;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
[ProtoBuf.ProtoContract(Name="FormConfig")]
|
||||
[Serializable]
|
||||
public class FormConfig
|
||||
{
|
||||
public FormConfig() { width = -1; }
|
||||
|
||||
[ProtoBuf.ProtoMember(2)]
|
||||
public int left { get; set; }
|
||||
|
||||
[ProtoBuf.ProtoMember(4)]
|
||||
public int top { get; set; }
|
||||
|
||||
[ProtoBuf.ProtoMember(6)]
|
||||
public int height { get; set; }
|
||||
|
||||
[ProtoBuf.ProtoMember(8)]
|
||||
public int width { get; set; }
|
||||
|
||||
public FormConfig(int left, int top, int height, int width)
|
||||
{this.left = left;this.top = top; this.height= height; this.width= width;}
|
||||
}
|
||||
|
||||
[ProtoBuf.ProtoContract(Name="FormLocationWidthAndHeights")]
|
||||
public class FormLocationWidthAndHeights
|
||||
{
|
||||
[ProtoBuf.ProtoMember(2)]
|
||||
public FormConfig[] form_location_width_and_heights { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
/// <summary>
|
||||
/// This class encapsulates the size part of the spread
|
||||
/// leg. This includes +/-, size, up arrow, down arrow
|
||||
/// 3/7/12 : Fixed the bug where enterring the size through
|
||||
/// the numpad would always result in a +ve size (in myEdit)
|
||||
/// </summary>
|
||||
public class SpreadPositionGUI : System.Windows.Forms.UserControl
|
||||
{
|
||||
private BCG.ValueEntryGUI myValueEntryGUI;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
|
||||
public Control layoutContainer;
|
||||
|
||||
public GUIChange onPositionChange;
|
||||
public double position
|
||||
{
|
||||
get
|
||||
{
|
||||
if (myValueEntryGUI != null && !DesignMode)
|
||||
return (double) myValueEntryGUI.currentValue;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (myValueEntryGUI != null && !DesignMode )
|
||||
{
|
||||
myValueEntryGUI.currentValue = value;
|
||||
myValueEntryGUI.flip = value < 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Size minSize
|
||||
{get{return myValueEntryGUI.minSize;}}
|
||||
|
||||
public ValueEntryGUIConfig config
|
||||
{
|
||||
set{myValueEntryGUI.config = value;}
|
||||
get{return myValueEntryGUI.config;}
|
||||
}
|
||||
|
||||
private Guid myGuid = Guid.NewGuid();
|
||||
public SpreadPositionGUI()
|
||||
{
|
||||
// This call is required by the Windows.Forms Form Designer.
|
||||
InitializeComponent();
|
||||
|
||||
myValueEntryGUI.currentValue = 0;
|
||||
myValueEntryGUI.onValueDown += new GUIChange(myDown);
|
||||
myValueEntryGUI.onValueUp += new GUIChange(myUp);
|
||||
myValueEntryGUI.onValueEdit += new GUIChange(myEdit);
|
||||
myValueEntryGUI.onValueFlip += new GUIChange(myFlip);
|
||||
}
|
||||
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return myGuid.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
SpreadPositionGUI rhs = obj as SpreadPositionGUI;
|
||||
if(rhs == null)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
return this.myGuid.Equals(rhs.myGuid);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
void myUp(object sender, object value )
|
||||
{myMove(sender,value,1);}
|
||||
|
||||
void myDown(object sender, object value )
|
||||
{myMove(sender,value,-1);}
|
||||
|
||||
void myMove(object sender, object value, int move)
|
||||
{
|
||||
ValueEntryGUI g = (ValueEntryGUI) sender;
|
||||
|
||||
double v = (double) g.currentValue;
|
||||
|
||||
if (v < 0)
|
||||
move *= -1;
|
||||
|
||||
v += move;
|
||||
|
||||
if (v != 0)
|
||||
{
|
||||
g.currentValue = v;
|
||||
g.flip = v < 0;
|
||||
if (onPositionChange != null)
|
||||
onPositionChange(this,v);
|
||||
}
|
||||
}
|
||||
|
||||
void myEdit(object sender, object value)
|
||||
{
|
||||
using (TCNumPad tcNumPad = new TCNumPad("Size"))
|
||||
{
|
||||
tcNumPad.Left = Cursor.Position.X;
|
||||
tcNumPad.Top = Cursor.Position.Y;
|
||||
|
||||
if (tcNumPad.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ValueEntryGUI g = (ValueEntryGUI)sender;
|
||||
/// TCNumPad does not have the +/- sign, this
|
||||
/// ensures the sign from the spread is carried
|
||||
/// over after qty manipulations via the num pad
|
||||
g.currentValue = ((double)g.currentValue < 0 ? -1.0 : 1.0) * tcNumPad.asNumber;
|
||||
g.flip = (double)g.currentValue < 0;
|
||||
if (onPositionChange != null)
|
||||
onPositionChange(this, (double)g.currentValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void myFlip(object sender, object value )
|
||||
{
|
||||
ValueEntryGUI g = (ValueEntryGUI) sender;
|
||||
g.flip = !g.flip;
|
||||
g.currentValue = - (double) g.currentValue;
|
||||
if (onPositionChange != null)
|
||||
onPositionChange(this,(double) g.currentValue);
|
||||
}
|
||||
|
||||
#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.myValueEntryGUI = new BCG.ValueEntryGUI();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// myValueEntryGUI
|
||||
//
|
||||
this.myValueEntryGUI.config = null;
|
||||
this.myValueEntryGUI.currentValue = "0";
|
||||
this.myValueEntryGUI.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.myValueEntryGUI.flip = false;
|
||||
this.myValueEntryGUI.Location = new System.Drawing.Point(0, 0);
|
||||
this.myValueEntryGUI.Name = "myValueEntryGUI";
|
||||
this.myValueEntryGUI.Size = new System.Drawing.Size(56, 16);
|
||||
this.myValueEntryGUI.TabIndex = 0;
|
||||
//
|
||||
// SpreadPositionGUI
|
||||
//
|
||||
this.Controls.Add(this.myValueEntryGUI);
|
||||
this.Name = "SpreadPositionGUI";
|
||||
this.Size = new System.Drawing.Size(56, 16);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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 forserialized 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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="myValueEntryGUI.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="myValueEntryGUI.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="myValueEntryGUI.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>SpreadPositionGUI</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in new issue
Block a user