56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.PrintGoods
|
|
{
|
|
public partial class SetRowXY : Form
|
|
{
|
|
public SetRowXY()
|
|
{
|
|
InitializeComponent();
|
|
this.StartPosition = FormStartPosition.CenterScreen;
|
|
}
|
|
|
|
private void SetRowXY_Load(object sender, EventArgs e)
|
|
{
|
|
SetOffsetToControl();
|
|
|
|
}
|
|
|
|
#region XY 位置偏移
|
|
private void SetOffsetToControl()
|
|
{
|
|
string offset = string.Empty;
|
|
offset = PrintHelper.GetRegistData("BillOffset");
|
|
for (int i = 1; i < 7; i++)
|
|
{
|
|
if (offset.Split(',').Length > i + 1)
|
|
(groupBox1.Controls.Find("textY" + i, true)[0] as TextBox).Text = offset.Split(',')[i + 1];
|
|
}
|
|
}
|
|
|
|
private void BtnSet1_Click(object sender, EventArgs e)
|
|
{
|
|
string billoffset = PrintHelper.GetRegistData("BillOffset").Split(',')[0] + "," +
|
|
PrintHelper.GetRegistData("BillOffset").Split(',')[1];
|
|
for (int i = 1; i < 7; i++)
|
|
{
|
|
TextBox _textY = groupBox1.Controls.Find("textY" + i, true)[0] as TextBox;
|
|
if (!string.IsNullOrEmpty(_textY.Text))
|
|
billoffset += "," + _textY.Text;
|
|
else
|
|
billoffset += ",0";
|
|
}
|
|
PrintHelper.WriteRegedit("BillOffset", billoffset);
|
|
MessageBox.Show("保存成功!");
|
|
}
|
|
#endregion
|
|
}
|
|
}
|