Commit cacc7e66 authored by 花桃白音's avatar 花桃白音

just savedata

parent c3fdfd1f
No preview for this file type
......@@ -38,6 +38,7 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
......@@ -145,11 +146,22 @@
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// button8
//
this.button8.Location = new System.Drawing.Point(418, 477);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(75, 23);
this.button8.TabIndex = 11;
this.button8.Text = "校验卡片";
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(884, 511);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.pictureBox1);
......@@ -180,6 +192,7 @@
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
}
}
......@@ -322,6 +322,32 @@ namespace cardvisa
//
*/
}
private void button8_Click(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(1000, 256);
Graphics g = Graphics.FromImage(bmp);
long index = 0;
int picked = 0;
List<int> sets = new List<int>();
List<string> picksets = new List<string>();
for (var i = 0; i < cdbh.cardlist.Count; i++)
{
while (cdbh.cardlist[i] > index)
{
sets.Add(picked);
picked = 0;
index += 100000;
}
picked++;
}
Pen p = new Pen(Color.Black);
for (var j = 1; j < sets.Count; j++)
{
g.DrawLine(p, new Point(j*1, 256 - sets[j - 1]),new Point((j+1)*1, 256 - sets[j]));
}
picViewer.SetImage(bmp);
picked = 0;
}
public void refreshlist()
{
listBox1.Items.Clear();
......@@ -1090,6 +1116,8 @@ namespace cardvisa
{
picViewer.Location = new Point(Location.X + Size.Width, Location.Y);
}
}
[Table(Name = "main.datas")]
public class datas
......@@ -1424,6 +1452,10 @@ namespace cardvisa
if (packDIY) { cdd.ot = 4; }
return cdd;
}
public string DataToString()
{
return cmdd.getInsertcmd(); ;
}
}
public class CDBTableHelper
{
......
......@@ -21,5 +21,9 @@ namespace cardvisa
{
pictureBox1.Image = Image.FromFile(path);
}
public void SetImage(Bitmap bmp)
{
pictureBox1.Image = bmp;
}
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment