How can I show labels on sharpmap using PostgreSQL in c#? - c#

VectorLayer v = new VectorLayer("Point", new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", "GhanaRegions", "Geometry", "id"));
VectorLayer v1 = new VectorLayer("Point", new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", "ghanalocation", "geometry", "id"));
v.Style.EnableOutline = true;
v.Style.Outline = Pens.Black;
v.Style.Fill = Brushes.Red;
v1.Style.PointColor = Brushes.White;
SharpMap.Layers.LabelLayer layLabel = new SharpMap.Layers.LabelLayer("Name");
layLabel.DataSource = new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", "citie33", "geometry", "id");
layLabel.Enabled = true;
layLabel.LabelColumn = "Name";
layLabel.MaxVisible = 2;
layLabel.MaxVisible = 190;
layLabel.MinVisible = 130;
layLabel.MultipartGeometryBehaviour = SharpMap.Layers.LabelLayer.MultipartGeometryBehaviourEnum.Largest;
layLabel.LabelFilter = SharpMap.Rendering.LabelCollisionDetection.ThoroughCollisionDetection;
layLabel.PriorityColumn = "id";
layLabel.Style.ForeColor = Color.Beige;
layLabel.Style.Font = new Font(FontFamily.GenericSerif, 12);
layLabel.Style.BackColor = new System.Drawing.SolidBrush(Color.FromArgb(128, 255, 0, 0));
layLabel.Style.HorizontalAlignment = SharpMap.Styles.LabelStyle.HorizontalAlignmentEnum.Center;
// map.Layers.Add(v1);
map.Layers.Add(v);
layLabel.Style.CollisionDetection = true;
map.ZoomToExtents();
pictureBox1.Image = map.GetMap();

Related

Removing the cell borders from header in DataGridView C#

enter image description here
I am using a DataGridView in C# and I wanted to remove the Cell Border of DataGridView.
dataGrid = new DataGridView();
dataGrid.BackgroundColor = Control.DefaultBackColor;
dataGrid.AdvancedColumnHeadersBorderStyle = DataGridViewAdvancedCellBorderStyle.None;
dataGrid.AdvancedRowHeadersBorderStyle = DataGridViewAdvancedCellBorderStyle.None;
dataGrid.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(dataGrid_CellClick);
dataGrid.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(dataGrid_CellMouseEnter);
dataGrid.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(dataGrid_DataBindingComplete);
dataGrid.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(dataGrid_CellPainting);
dataGrid.DataSource = this._lstWorklet;
dataGrid.Columns.Add("Action", "Action");
dataGrid.Size = new System.Drawing.Size(1018, 434);
dataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
dataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dataGrid.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
dataGrid.DefaultCellStyle.SelectionBackColor = dataGrid.DefaultCellStyle.BackColor;
dataGrid.DefaultCellStyle.SelectionForeColor = dataGrid.DefaultCellStyle.ForeColor;
dataGrid.ReadOnly = true;
dataGrid.RowTemplate.Height = 48;
dataGrid.ColumnHeadersHeight = 48;
dataGrid.RowHeadersVisible = false;
dataGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGrid.ColumnHeadersDefaultCellStyle.Font = new Font(dataGrid.Font, FontStyle.Bold);
dataGrid.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dataGrid.MultiSelect = false;

requests[0]' (oneof), oneof field 'kind' is already set. Cannot set 'updateCell encountered when generating checkbox

I'm trying to generate a checkbox from C#.net using google sheets API but I'm encountering the oneof field kind is already set error. I tried combining extendedValue and DataValidation. Please see code snippet below:
ConditionValue conditionValueTrue = new ConditionValue();
conditionValueTrue.UserEnteredValue = "TRUE";
ConditionValue conditionValueFalse = new ConditionValue();
conditionValueFalse.UserEnteredValue = "FALSE";
ConditionValue[] validValues = { conditionValueTrue, conditionValueFalse };
BooleanCondition bc = new BooleanCondition();
bc.Type = "BOOLEAN";
bc.Values = validValues;
DataValidationRule dataValidationRule = new DataValidationRule();
dataValidationRule.Condition = bc;
dataValidationRule.ShowCustomUi = true;
GridRange validationRange = new GridRange();
validationRange.StartColumnIndex = 7;
validationRange.EndColumnIndex = 7;
validationRange.SheetId = 0;
SetDataValidationRequest setDataValidationRequest = new SetDataValidationRequest();
setDataValidationRequest.Rule = dataValidationRule;
setDataValidationRequest.Range = validationRange;
ExtendedValue extendedValue = new ExtendedValue();
extendedValue.BoolValue = true;
BatchUpdateSpreadsheetRequest busr = new BatchUpdateSpreadsheetRequest();
busr.Requests = new List<Request>();
Request r = new Request();
busr.Requests.Add(r);
r.UpdateCells = new UpdateCellsRequest();
r.SetDataValidation = setDataValidationRequest;
var gc = new GridCoordinate();
gc.ColumnIndex = 7;
gc.RowIndex = row;
gc.SheetId = 0;
r.UpdateCells.Start = gc;
r.UpdateCells.Fields = "*";
r.UpdateCells.Rows = new List<RowData>();
var rd = new RowData();
r.UpdateCells.Rows.Add(rd);
rd.Values = new List<CellData>();
var cd = new CellData();
cd.UserEnteredValue = extendedValue;
rd.Values.Add(cd);
SpreadsheetsResource.BatchUpdateRequest bur = _sheetsService.Spreadsheets.BatchUpdate(busr, SpreadsheetId);
bur.Execute();

Sitcone in c# could not be found in etc

i get sitcon cant be foundt
Warning MSB3245 Could not resolve this reference. Could not locate the assembly "Siticone.UI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
and
Error CS0400 The type or namespace name 'Siticone' could not be found in the global namespace (are you missing an assembly reference?)
my code is here
{
// Token: 0x02000002 RID: 2
public partial class Register : global::System.Windows.Forms.Form
{
// Token: 0x06000011 RID: 17 RVA: 0x0000215C File Offset: 0x0000035C
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x06000012 RID: 18 RVA: 0x00002194 File Offset: 0x00000394
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
Siticone.UI.AnimatorNS.Animation animation2 = new Siticone.UI.AnimatorNS.Animation();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Register));
this.siticoneDragControl1 = new Siticone.UI.WinForms.SiticoneDragControl(this.components);
this.siticoneControlBox1 = new Siticone.UI.WinForms.SiticoneControlBox();
this.siticoneControlBox2 = new Siticone.UI.WinForms.SiticoneControlBox();
this.siticoneTransition1 = new Siticone.UI.WinForms.SiticoneTransition();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.siticoneRoundedButton1 = new Siticone.UI.WinForms.SiticoneRoundedButton();
this.siticoneRoundedButton2 = new Siticone.UI.WinForms.SiticoneRoundedButton();
this.siticoneImageButton1 = new Siticone.UI.WinForms.SiticoneImageButton();
this.email = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.password = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.username = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.license = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.siticoneShadowForm = new Siticone.UI.WinForms.SiticoneShadowForm(this.components);
this.SuspendLayout();
//
// siticoneDragControl1
//
this.siticoneDragControl1.TargetControl = this;
//
// siticoneControlBox1
//
this.siticoneControlBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.siticoneControlBox1.BorderRadius = 10;
this.siticoneTransition1.SetDecoration(this.siticoneControlBox1, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneControlBox1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.siticoneControlBox1.HoveredState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(17)))), ((int)(((byte)(35)))));
this.siticoneControlBox1.HoveredState.IconColor = System.Drawing.Color.White;
this.siticoneControlBox1.HoveredState.Parent = this.siticoneControlBox1;
this.siticoneControlBox1.IconColor = System.Drawing.Color.White;
this.siticoneControlBox1.Location = new System.Drawing.Point(367, 5);
this.siticoneControlBox1.Margin = new System.Windows.Forms.Padding(4);
this.siticoneControlBox1.Name = "siticoneControlBox1";
this.siticoneControlBox1.ShadowDecoration.Parent = this.siticoneControlBox1;
this.siticoneControlBox1.Size = new System.Drawing.Size(60, 36);
this.siticoneControlBox1.TabIndex = 1;
this.siticoneControlBox1.Click += new System.EventHandler(this.siticoneControlBox1_Click);
//
// siticoneControlBox2
//
this.siticoneControlBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.siticoneControlBox2.BorderRadius = 10;
this.siticoneControlBox2.ControlBoxType = Siticone.UI.WinForms.Enums.ControlBoxType.MinimizeBox;
this.siticoneTransition1.SetDecoration(this.siticoneControlBox2, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneControlBox2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.siticoneControlBox2.HoveredState.Parent = this.siticoneControlBox2;
this.siticoneControlBox2.IconColor = System.Drawing.Color.White;
this.siticoneControlBox2.Location = new System.Drawing.Point(306, 5);
this.siticoneControlBox2.Margin = new System.Windows.Forms.Padding(4);
this.siticoneControlBox2.Name = "siticoneControlBox2";
this.siticoneControlBox2.ShadowDecoration.Parent = this.siticoneControlBox2;
this.siticoneControlBox2.Size = new System.Drawing.Size(60, 36);
this.siticoneControlBox2.TabIndex = 2;
//
// siticoneTransition1
//
this.siticoneTransition1.AnimationType = Siticone.UI.AnimatorNS.AnimationType.Rotate;
this.siticoneTransition1.Cursor = null;
animation2.AnimateOnlyDifferences = true;
animation2.BlindCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.BlindCoeff")));
animation2.LeafCoeff = 0F;
animation2.MaxTime = 1F;
animation2.MinTime = 0F;
animation2.MosaicCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.MosaicCoeff")));
animation2.MosaicShift = ((System.Drawing.PointF)(resources.GetObject("animation2.MosaicShift")));
animation2.MosaicSize = 0;
animation2.Padding = new System.Windows.Forms.Padding(50);
animation2.RotateCoeff = 1F;
animation2.RotateLimit = 0F;
animation2.ScaleCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.ScaleCoeff")));
animation2.SlideCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.SlideCoeff")));
animation2.TimeCoeff = 0F;
animation2.TransparencyCoeff = 1F;
this.siticoneTransition1.DefaultAnimation = animation2;
//
// label1
//
this.label1.AutoSize = true;
this.siticoneTransition1.SetDecoration(this.label1, Siticone.UI.AnimatorNS.DecorationType.None);
this.label1.Font = new System.Drawing.Font("Segoe UI Light", 10F);
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(-1, 167);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(0, 23);
this.label1.TabIndex = 22;
//
// label2
//
this.label2.AutoSize = true;
this.siticoneTransition1.SetDecoration(this.label2, Siticone.UI.AnimatorNS.DecorationType.None);
this.label2.Font = new System.Drawing.Font("Segoe UI Semibold", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.label2.Location = new System.Drawing.Point(13, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(152, 23);
this.label2.TabIndex = 27;
this.label2.Text = "Auth.GG | Register";
//
// siticoneRoundedButton1
//
this.siticoneRoundedButton1.BorderColor = System.Drawing.Color.DodgerBlue;
this.siticoneRoundedButton1.BorderThickness = 1;
this.siticoneRoundedButton1.CheckedState.Parent = this.siticoneRoundedButton1;
this.siticoneRoundedButton1.CustomImages.Parent = this.siticoneRoundedButton1;
this.siticoneTransition1.SetDecoration(this.siticoneRoundedButton1, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneRoundedButton1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.siticoneRoundedButton1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.siticoneRoundedButton1.ForeColor = System.Drawing.Color.White;
this.siticoneRoundedButton1.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(218)))), ((int)(((byte)(223)))));
this.siticoneRoundedButton1.HoveredState.Parent = this.siticoneRoundedButton1;
this.siticoneRoundedButton1.Location = new System.Drawing.Point(46, 349);
this.siticoneRoundedButton1.Margin = new System.Windows.Forms.Padding(4);
this.siticoneRoundedButton1.Name = "siticoneRoundedButton1";
this.siticoneRoundedButton1.ShadowDecoration.Parent = this.siticoneRoundedButton1;
this.siticoneRoundedButton1.Size = new System.Drawing.Size(340, 33);
this.siticoneRoundedButton1.TabIndex = 26;
this.siticoneRoundedButton1.Text = "Back to Login";
this.siticoneRoundedButton1.Click += new System.EventHandler(this.siticoneRoundedButton1_Click);
//
// siticoneRoundedButton2
//
this.siticoneRoundedButton2.BorderColor = System.Drawing.Color.DodgerBlue;
this.siticoneRoundedButton2.BorderThickness = 1;
this.siticoneRoundedButton2.CheckedState.Parent = this.siticoneRoundedButton2;
this.siticoneRoundedButton2.CustomImages.Parent = this.siticoneRoundedButton2;
this.siticoneTransition1.SetDecoration(this.siticoneRoundedButton2, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneRoundedButton2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.siticoneRoundedButton2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.siticoneRoundedButton2.ForeColor = System.Drawing.Color.White;
this.siticoneRoundedButton2.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(218)))), ((int)(((byte)(223)))));
this.siticoneRoundedButton2.HoveredState.Parent = this.siticoneRoundedButton2;
this.siticoneRoundedButton2.Location = new System.Drawing.Point(46, 308);
this.siticoneRoundedButton2.Margin = new System.Windows.Forms.Padding(4);
this.siticoneRoundedButton2.Name = "siticoneRoundedButton2";
this.siticoneRoundedButton2.ShadowDecoration.Parent = this.siticoneRoundedButton2;
this.siticoneRoundedButton2.Size = new System.Drawing.Size(340, 33);
this.siticoneRoundedButton2.TabIndex = 28;
this.siticoneRoundedButton2.Text = "Register";
this.siticoneRoundedButton2.Click += new System.EventHandler(this.siticoneRoundedButton2_Click);
//
// siticoneImageButton1
//
this.siticoneImageButton1.BackColor = System.Drawing.Color.Transparent;
this.siticoneImageButton1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.siticoneImageButton1.CheckedState.Parent = this.siticoneImageButton1;
this.siticoneTransition1.SetDecoration(this.siticoneImageButton1, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneImageButton1.HoveredState.ImageSize = new System.Drawing.Size(200, 100);
this.siticoneImageButton1.HoveredState.Parent = this.siticoneImageButton1;
this.siticoneImageButton1.Image = ((System.Drawing.Image)(resources.GetObject("siticoneImageButton1.Image")));
this.siticoneImageButton1.ImageSize = new System.Drawing.Size(200, 100);
this.siticoneImageButton1.Location = new System.Drawing.Point(9, 43);
this.siticoneImageButton1.Name = "siticoneImageButton1";
this.siticoneImageButton1.PressedState.ImageSize = new System.Drawing.Size(200, 100);
this.siticoneImageButton1.PressedState.Parent = this.siticoneImageButton1;
this.siticoneImageButton1.Size = new System.Drawing.Size(406, 66);
this.siticoneImageButton1.TabIndex = 33;
//
// email
//
this.email.AllowDrop = true;
this.email.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.email.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.email, Siticone.UI.AnimatorNS.DecorationType.None);
this.email.DefaultText = "Email";
this.email.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.email.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.email.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.email.DisabledState.Parent = this.email;
this.email.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.email.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.email.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.email.FocusedState.Parent = this.email;
this.email.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.email.HoveredState.Parent = this.email;
this.email.Location = new System.Drawing.Point(56, 206);
this.email.Margin = new System.Windows.Forms.Padding(5);
this.email.Name = "email";
this.email.PasswordChar = '\0';
this.email.PlaceholderText = "";
this.email.SelectedText = "";
this.email.ShadowDecoration.Parent = this.email;
this.email.Size = new System.Drawing.Size(315, 37);
this.email.TabIndex = 34;
this.email.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// password
//
this.password.AllowDrop = true;
this.password.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.password.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.password, Siticone.UI.AnimatorNS.DecorationType.None);
this.password.DefaultText = "Password";
this.password.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.password.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.password.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.password.DisabledState.Parent = this.password;
this.password.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.password.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.password.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.password.FocusedState.Parent = this.password;
this.password.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.password.HoveredState.Parent = this.password;
this.password.Location = new System.Drawing.Point(56, 162);
this.password.Margin = new System.Windows.Forms.Padding(5);
this.password.Name = "password";
this.password.PasswordChar = '\0';
this.password.PlaceholderText = "";
this.password.SelectedText = "";
this.password.ShadowDecoration.Parent = this.password;
this.password.Size = new System.Drawing.Size(315, 37);
this.password.TabIndex = 35;
this.password.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// username
//
this.username.AllowDrop = true;
this.username.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.username.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.username, Siticone.UI.AnimatorNS.DecorationType.None);
this.username.DefaultText = "Username";
this.username.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.username.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.username.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.username.DisabledState.Parent = this.username;
this.username.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.username.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.username.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.username.FocusedState.Parent = this.username;
this.username.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.username.HoveredState.Parent = this.username;
this.username.Location = new System.Drawing.Point(56, 116);
this.username.Margin = new System.Windows.Forms.Padding(5);
this.username.Name = "username";
this.username.PasswordChar = '\0';
this.username.PlaceholderText = "";
this.username.SelectedText = "";
this.username.ShadowDecoration.Parent = this.username;
this.username.Size = new System.Drawing.Size(315, 37);
this.username.TabIndex = 36;
this.username.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// license
//
this.license.AllowDrop = true;
this.license.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.license.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.license, Siticone.UI.AnimatorNS.DecorationType.None);
this.license.DefaultText = "License";
this.license.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.license.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.license.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.license.DisabledState.Parent = this.license;
this.license.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.license.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.license.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.license.FocusedState.Parent = this.license;
this.license.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.license.HoveredState.Parent = this.license;
this.license.Location = new System.Drawing.Point(56, 253);
this.license.Margin = new System.Windows.Forms.Padding(5);
this.license.Name = "license";
this.license.PasswordChar = '\0';
this.license.PlaceholderText = "";
this.license.SelectedText = "";
this.license.ShadowDecoration.Parent = this.license;
this.license.Size = new System.Drawing.Size(315, 37);
this.license.TabIndex = 37;
this.license.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// Register
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoValidate = System.Windows.Forms.AutoValidate.Disable;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.ClientSize = new System.Drawing.Size(432, 395);
this.Controls.Add(this.license);
this.Controls.Add(this.username);
this.Controls.Add(this.password);
this.Controls.Add(this.email);
this.Controls.Add(this.siticoneImageButton1);
this.Controls.Add(this.siticoneRoundedButton2);
this.Controls.Add(this.label2);
this.Controls.Add(this.siticoneRoundedButton1);
this.Controls.Add(this.label1);
this.Controls.Add(this.siticoneControlBox2);
this.Controls.Add(this.siticoneControlBox1);
this.siticoneTransition1.SetDecoration(this, Siticone.UI.AnimatorNS.DecorationType.BottomMirror);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Register";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Auth.GG WInform";
this.TransparencyKey = System.Drawing.Color.Maroon;
this.ResumeLayout(false);
this.PerformLayout();
}
// Token: 0x04000001 RID: 1
private global::System.ComponentModel.IContainer components = null;
// Token: 0x04000002 RID: 2
private global::Siticone.UI.WinForms.SiticoneDragControl siticoneDragControl1;
// Token: 0x04000004 RID: 4
private global::Siticone.UI.WinForms.SiticoneControlBox siticoneControlBox1;
// Token: 0x04000005 RID: 5
private global::Siticone.UI.WinForms.SiticoneControlBox siticoneControlBox2;
// Token: 0x04000009 RID: 9
private global::Siticone.UI.WinForms.SiticoneTransition siticoneTransition1;
// Token: 0x0400000A RID: 10
private global::System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private Siticone.UI.WinForms.SiticoneRoundedButton siticoneRoundedButton1;
private Siticone.UI.WinForms.SiticoneShadowForm siticoneShadowForm;
private Siticone.UI.WinForms.SiticoneRoundedButton siticoneRoundedButton2;
private Siticone.UI.WinForms.SiticoneImageButton siticoneImageButton1;
private Siticone.UI.WinForms.SiticoneRoundedTextBox license;
private Siticone.UI.WinForms.SiticoneRoundedTextBox username;
private Siticone.UI.WinForms.SiticoneRoundedTextBox password;
private Siticone.UI.WinForms.SiticoneRoundedTextBox email;
}
}```
Make sure that Siticone Library is present in your project (in bin folder) and the library is referenced "using Siticone..."
There is a newer version Siticone.Desktop.UI 2.0.04, use that one.

How to display milliseconds into “days : hours : minutes : seconds” in Infragistics UltraChart?

I'm using Infragistics UltraChart controls for displaying graphs. (Version 19.1)
My line chart graph is as below
Here Y-axis is noting but milliseconds(turn around time of Int64 type), I want to display it like "days:hh:mm:ss" format. Is it possible to display Y- axis lables in this format? while X axis is showing list of sample names (Which is of string type) The Ultra line chart data binding code is as below
ultraChartTAT.Data.DataSource = dsTAT.Tables["dtTAT"];
ultraChartTAT.Data.DataBind();
Here ultraChartTAT is an UltraChart infragistic control and dsTAT is a DataSet. The dsTAT.Tables["dtTAT"] design structure is as below
DataTable dtTAT = new DataTable("dtTAT");
dtTAT.Columns.Add("TAT", typeof(string));
dtTAT.Columns.Add("Sample1", typeof(Int64));
dtTAT.Columns.Add("Sample2", typeof(Int64));
dtTAT.Columns.Add("Sample3", typeof(Int64));
dtTAT.Columns.Add("Sample4", typeof(Int64));
dtTAT.Columns.Add("Sample5", typeof(Int64));
dtTAT.Columns.Add("Sample6", typeof(Int64));
dtTAT.Columns.Add("Sample7", typeof(Int64));
dtTAT.Columns.Add("Sample8", typeof(Int64));
For more reference take a look on this link https://stackoverflow.com/a/36329469/4524485
In case if any other information is required then add it in comment I'll update my question accordingly.
To format data for the X/Y axis labels the IRenderLabel interface can be used.
In example below the DateTimeRenderer class is using the IRenderLabel interface implementation to display Y-axis labels in the DateTime format:
For additional information see the Infragistics documentation:
http://help.infragistics.com/Help/Doc/WinForms/2011.1/CLR2.0/html/Chart_Customize_Labels_Using_the_IRenderLabel_Interface.html
DateTimeRenderer.cs
using Infragistics.UltraChart.Resources;
using System;
using System.Collections;
using System.Data;
namespace UltraGrid
{
public class DateTimeRenderer : IRenderLabel
{
readonly DataTable source;
public DateTimeRenderer(DataTable dt)
{
source = dt;
}
public string ToString(Hashtable context)
{
double dataValue = (double)context["DATA_VALUE"];
var dt = new DateTime((long)dataValue);
return dt.ToString("MM/dd/yyyy HH:mm:ss");
}
}
}
Form1.cs
using System;
using System.Collections;
using System.Data;
using System.Windows.Forms;
namespace UltraGrid
{
public partial class Form1 : Form
{
DataTable table = new DataTable("Statistics");
public Form1()
{
InitializeComponent();
// Create columns to hold sample data.
var column1 = new DataColumn("Sample", typeof(string));
var column2 = new DataColumn("Line1", typeof(Int64));
var column3 = new DataColumn("Line2", typeof(Int64));
var column4 = new DataColumn("Line3", typeof(Int64));
table.Columns.AddRange(new DataColumn[] { column1, column2, column3, column4 });
var now = DateTime.Now.Ticks;
var rnd = new Random();
for (int i = 1; i < 20; i++)
{
table.Rows.Add(new object[] { "Sample" + i.ToString(), now + rnd.Next(999, 3600000)*1000, now + rnd.Next(999, 3600000)*1000, now + rnd.Next(999, 3600000)*1000 });
}
}
private void LineChartStyles_Load(object sender, System.EventArgs e)
{
this.ultraChart1.Data.DataSource = table;
ultraChart1.Axis.Y.Labels.ItemFormatString = "<MY_VALUE>";
ultraChart1.Tooltips.FormatString = "<MY_VALUE>";
var MyLabelHashTable = new Hashtable { { "MY_VALUE", new DateTimeRenderer(table) } };
this.ultraChart1.LabelHash = MyLabelHashTable;
this.ultraChart1.Data.DataBind();
}
}
}
Form1.Designer.cs
namespace UltraGrid
{
partial class Form1
{
/// <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
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement1 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement2 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement3 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement4 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement5 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement6 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.LineChartAppearance lineChartAppearance1 = new Infragistics.UltraChart.Resources.Appearance.LineChartAppearance();
Infragistics.UltraChart.Resources.Appearance.LineAppearance lineAppearance1 = new Infragistics.UltraChart.Resources.Appearance.LineAppearance() { Thickness = 3 };
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement7 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.LineAppearance lineAppearance2 = new Infragistics.UltraChart.Resources.Appearance.LineAppearance() { Thickness = 3 };
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement8 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.LineAppearance lineAppearance3 = new Infragistics.UltraChart.Resources.Appearance.LineAppearance() { Thickness = 3 };
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement9 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
this.ultraChart1 = new Infragistics.Win.UltraWinChart.UltraChart();
((System.ComponentModel.ISupportInitialize)(this.ultraChart1)).BeginInit();
this.SuspendLayout();
this.ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.LineChart;
//
// ultraChart1
//
resources.ApplyResources(this.ultraChart1, "ultraChart1");
this.ultraChart1.Axis.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(248)))), ((int)(((byte)(220)))));
paintElement1.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
paintElement1.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(248)))), ((int)(((byte)(220)))));
this.ultraChart1.Axis.PE = paintElement1;
this.ultraChart1.Axis.X.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.X.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL>";
this.ultraChart1.Axis.X.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X.Labels.SeriesLabels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.X.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.X.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.X.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.X.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X.Labels.Visible = true;
this.ultraChart1.Axis.X.LineThickness = 1;
this.ultraChart1.Axis.X.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.X.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X.MajorGridLines.Visible = true;
this.ultraChart1.Axis.X.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.X.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X.MinorGridLines.Visible = false;
this.ultraChart1.Axis.X.Visible = true;
this.ultraChart1.Axis.X2.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.X2.Labels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.X2.Labels.ItemFormatString = "<ITEM_LABEL>";
this.ultraChart1.Axis.X2.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.X2.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.X2.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X2.Labels.Visible = false;
this.ultraChart1.Axis.X2.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X2.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.X2.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X2.MajorGridLines.Visible = true;
this.ultraChart1.Axis.X2.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X2.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.X2.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X2.MinorGridLines.Visible = false;
this.ultraChart1.Axis.X2.Visible = false;
this.ultraChart1.Axis.Y.Extent = 110;
this.ultraChart1.Axis.Y.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Y.Labels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:00.##>";
this.ultraChart1.Axis.Y.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.Y.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Y.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y.Labels.Visible = true;
this.ultraChart1.Axis.Y.LineThickness = 1;
this.ultraChart1.Axis.Y.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Y.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Y.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Y.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Y.TickmarkInterval = 50D;
this.ultraChart1.Axis.Y.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.Smart;
this.ultraChart1.Axis.Y.Visible = true;
this.ultraChart1.Axis.Y2.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Y2.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Y2.Labels.ItemFormatString = "<DATA_VALUE:00.##>";
this.ultraChart1.Axis.Y2.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Y2.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y2.Labels.Visible = false;
this.ultraChart1.Axis.Y2.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y2.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Y2.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y2.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Y2.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y2.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Y2.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y2.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Y2.Visible = false;
this.ultraChart1.Axis.Z.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Z.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z.Labels.ItemFormatString = "";
this.ultraChart1.Axis.Z.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Z.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z.Labels.Visible = true;
this.ultraChart1.Axis.Z.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Z.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Z.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Z.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Z.Visible = false;
this.ultraChart1.Axis.Z2.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Z2.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z2.Labels.ItemFormatString = "";
this.ultraChart1.Axis.Z2.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Z2.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z2.Labels.Visible = false;
this.ultraChart1.Axis.Z2.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z2.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Z2.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z2.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Z2.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z2.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Z2.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z2.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Z2.Visible = false;
this.ultraChart1.Border.CornerRadius = 5;
this.ultraChart1.ColorModel.AlphaLevel = ((byte)(150));
this.ultraChart1.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.CustomLinear;
paintElement2.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement2.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(108)))), ((int)(((byte)(162)))), ((int)(((byte)(36)))));
paintElement2.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement2.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(244)))), ((int)(((byte)(17)))));
paintElement2.Stroke = System.Drawing.Color.Transparent;
paintElement3.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement3.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(108)))), ((int)(((byte)(176)))));
paintElement3.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement3.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(53)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
paintElement3.Stroke = System.Drawing.Color.Transparent;
paintElement4.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement4.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(0)))), ((int)(((byte)(5)))));
paintElement4.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement4.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(117)))), ((int)(((byte)(16)))));
paintElement4.Stroke = System.Drawing.Color.Transparent;
paintElement5.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement5.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(190)))), ((int)(((byte)(2)))));
paintElement5.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement5.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(81)))));
paintElement5.Stroke = System.Drawing.Color.Transparent;
paintElement6.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement6.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(122)))), ((int)(((byte)(10)))));
paintElement6.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement6.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(208)))), ((int)(((byte)(66)))));
paintElement6.Stroke = System.Drawing.Color.Transparent;
this.ultraChart1.ColorModel.Skin.PEs.AddRange(new Infragistics.UltraChart.Resources.Appearance.PaintElement[] {
paintElement2,
paintElement3,
paintElement4,
paintElement5,
paintElement6});
this.ultraChart1.Data.EmptyStyle.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dash;
this.ultraChart1.Data.SwapRowsAndColumns = true;
this.ultraChart1.ForeColor = System.Drawing.SystemColors.ControlText;
this.ultraChart1.Legend.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Legend.Location = Infragistics.UltraChart.Shared.Styles.LegendLocation.Top;
this.ultraChart1.Legend.Visible = true;
lineAppearance1.IconAppearance.CharacterFont = new System.Drawing.Font("Microsoft Sans Serif", 12F);
paintElement7.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
lineAppearance1.IconAppearance.PE = paintElement7;
lineAppearance1.Key = "Monday";
paintElement8.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
lineAppearance2.IconAppearance.PE = paintElement8;
lineAppearance2.Key = "Tuesday";
lineAppearance2.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dash;
paintElement9.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
lineAppearance3.IconAppearance.PE = paintElement9;
lineAppearance3.Key = "Wednesday";
lineAppearance3.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
lineChartAppearance1.LineAppearances.Add(lineAppearance1);
lineChartAppearance1.LineAppearances.Add(lineAppearance2);
lineChartAppearance1.LineAppearances.Add(lineAppearance3);
this.ultraChart1.LineChart = lineChartAppearance1;
this.ultraChart1.Name = "ultraChart1";
this.ultraChart1.Tooltips.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F);
this.ultraChart1.Tooltips.HighlightFillColor = System.Drawing.Color.DimGray;
this.ultraChart1.Tooltips.HighlightOutlineColor = System.Drawing.Color.DarkGray;
//
// Form1
//
this.BackColor = System.Drawing.Color.White;
resources.ApplyResources(this, "$this");
this.Controls.Add(this.ultraChart1);
this.Name = "Form1";
this.Load += new System.EventHandler(this.LineChartStyles_Load);
((System.ComponentModel.ISupportInitialize)(this.ultraChart1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Infragistics.Win.UltraWinChart.UltraChart ultraChart1;
}
}

WinForm Control ListView "Arithmetic operation resulted in an overflow."

Application goes well in XP,but when it change to Win7,the problem began.
i have checked up all my app codes,but find nothing.
ok,if i just put a single ListView in a new window,and run,also the same problem.
my english is not good,im tired with it,plz help me. thx very much.
public frmChooseBoxes(int flag, string complex)
{
otbList = Ocean_Turnover_BoxManager.GetOcean_Turnover_BoxesBySql("select * from Ocean_Turnover_Box where Status in (2,3) order by boxnum");
//初始化选择框
if (complex != "")
{
myNums = complex;
string[] numbers = complex.Split(',');
nList = new List<string>();
foreach (string number in numbers)
{
nList.Add(number);
}
}
else
{
nList = null;
}
InitializeComponent();
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmChooseBoxes));
this.btnExit = new System.Windows.Forms.Button();
this.btnRemoveAll = new System.Windows.Forms.Button();
this.btnRemoveSingle = new System.Windows.Forms.Button();
this.btnAddAll = new System.Windows.Forms.Button();
this.btnAddSingle = new System.Windows.Forms.Button();
this.btnConfirm = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lvSelectBoxes = new System.Windows.Forms.ListView();
this.lvBox = new System.Windows.Forms.ListView();
this.label3 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtBoxNoChk = new System.Windows.Forms.TextBox();
this.lblBoxNoS = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(375, 302);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(75, 23);
this.btnExit.TabIndex = 15;
this.btnExit.Text = "退出";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnRemoveAll
//
this.btnRemoveAll.Location = new System.Drawing.Point(216, 212);
this.btnRemoveAll.Name = "btnRemoveAll";
this.btnRemoveAll.Size = new System.Drawing.Size(30, 23);
this.btnRemoveAll.TabIndex = 14;
this.btnRemoveAll.Text = "<<";
this.btnRemoveAll.UseVisualStyleBackColor = true;
this.btnRemoveAll.Click += new System.EventHandler(this.btnRemoveAll_Click);
//
// btnRemoveSingle
//
this.btnRemoveSingle.Location = new System.Drawing.Point(216, 183);
this.btnRemoveSingle.Name = "btnRemoveSingle";
this.btnRemoveSingle.Size = new System.Drawing.Size(30, 23);
this.btnRemoveSingle.TabIndex = 13;
this.btnRemoveSingle.Text = "<";
this.btnRemoveSingle.UseVisualStyleBackColor = true;
this.btnRemoveSingle.Click += new System.EventHandler(this.btnRemoveSingle_Click);
//
// btnAddAll
//
this.btnAddAll.Location = new System.Drawing.Point(216, 96);
this.btnAddAll.Name = "btnAddAll";
this.btnAddAll.Size = new System.Drawing.Size(30, 23);
this.btnAddAll.TabIndex = 12;
this.btnAddAll.Text = ">>";
this.btnAddAll.UseVisualStyleBackColor = true;
this.btnAddAll.Click += new System.EventHandler(this.btnAddAll_Click);
//
// btnAddSingle
//
this.btnAddSingle.Location = new System.Drawing.Point(216, 67);
this.btnAddSingle.Name = "btnAddSingle";
this.btnAddSingle.Size = new System.Drawing.Size(30, 23);
this.btnAddSingle.TabIndex = 11;
this.btnAddSingle.Text = ">";
this.btnAddSingle.UseVisualStyleBackColor = true;
this.btnAddSingle.Click += new System.EventHandler(this.btnAddSingle_Click);
//
// btnConfirm
//
this.btnConfirm.Location = new System.Drawing.Point(269, 302);
this.btnConfirm.Name = "btnConfirm";
this.btnConfirm.Size = new System.Drawing.Size(75, 23);
this.btnConfirm.TabIndex = 8;
this.btnConfirm.Text = "确定";
this.btnConfirm.UseVisualStyleBackColor = true;
this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(15, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 16);
this.label1.TabIndex = 16;
this.label1.Text = "周转箱列表:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(267, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(92, 16);
this.label2.TabIndex = 17;
this.label2.Text = "已选择周转箱:";
//
// lvSelectBoxes
//
this.lvSelectBoxes.CheckBoxes = true;
this.lvSelectBoxes.Location = new System.Drawing.Point(269, 44);
this.lvSelectBoxes.Name = "lvSelectBoxes";
this.lvSelectBoxes.Size = new System.Drawing.Size(180, 228);
this.lvSelectBoxes.TabIndex = 18;
this.lvSelectBoxes.UseCompatibleStateImageBehavior = false;
this.lvSelectBoxes.View = System.Windows.Forms.View.List;
//
// lvBox
//
this.lvBox.Location = new System.Drawing.Point(12, 28);
this.lvBox.Name = "lvBox";
this.lvBox.Size = new System.Drawing.Size(180, 244);
this.lvBox.TabIndex = 19;
this.lvBox.UseCompatibleStateImageBehavior = false;
this.lvBox.View = System.Windows.Forms.View.List;
//
// label3
//
this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(267, 25);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(221, 12);
this.label3.TabIndex = 20;
this.label3.Text = "注:选中复选框表示此箱已满,不可再用";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtBoxNoChk);
this.groupBox1.Controls.Add(this.lblBoxNoS);
this.groupBox1.Location = new System.Drawing.Point(12, 279);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(180, 44);
this.groupBox1.TabIndex = 21;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "筛选箱号:";
//
// txtBoxNoChk
//
this.txtBoxNoChk.Location = new System.Drawing.Point(78, 16);
this.txtBoxNoChk.MaxLength = 5;
this.txtBoxNoChk.Name = "txtBoxNoChk";
this.txtBoxNoChk.Size = new System.Drawing.Size(95, 21);
this.txtBoxNoChk.TabIndex = 1;
this.txtBoxNoChk.TextChanged += new System.EventHandler(this.txtBoxNoChk_TextChanged);
//
// lblBoxNoS
//
this.lblBoxNoS.AutoSize = true;
this.lblBoxNoS.Location = new System.Drawing.Point(7, 23);
this.lblBoxNoS.Name = "lblBoxNoS";
this.lblBoxNoS.Size = new System.Drawing.Size(65, 12);
this.lblBoxNoS.TabIndex = 0;
this.lblBoxNoS.Text = "匹配箱号:";
//
// frmChooseBoxes
//
this.ClientSize = new System.Drawing.Size(492, 346);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.lvBox);
this.Controls.Add(this.lvSelectBoxes);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnRemoveAll);
this.Controls.Add(this.btnRemoveSingle);
this.Controls.Add(this.btnAddAll);
this.Controls.Add(this.btnAddSingle);
this.Controls.Add(this.btnConfirm);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmChooseBoxes";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "选择箱号";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmChooseBoxes_FormClosing);
this.Load += new System.EventHandler(this.frmChooseBoxes_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
ok,guys i finally find the answer,its the DotNetSkin.dll that cause the problem.
it cant work well in win7 or server2003,when i commend all the code in relation with it.The Application goes well.
thanks anyway :)

Categories