123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089 |
- 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;
- using LYFZ.Software.MainBusiness.DoorCityProcess;
- using System.Collections;
- using System.IO;
- using LYFZ.ComponentLibrary;
- namespace LYFZ.Software.MainBusiness.ReportPrint
- {
- public partial class OrdersReportPrintFormMain : LYFZ.Software.UI.ReportPrint.OrdersReportPrintFormMain
- {
- public OrdersReportPrintFormMain()
- {
- }
- protected override void buttonEx1_Click(object sender, EventArgs e)
- {
- //LYFZ.Software.MainBusiness.DoorCityProcess.TestFrom frm = new TestFrom();
- //frm.Show();
- //LYFZ.Software.MainBusiness.ReportPrint.SetSmallForm.PrintPreviewSmallForm frm = new SetSmallForm.PrintPreviewSmallForm();
- //frm.ShowDialog(); return;
- //LYFZ.Software.MainBusiness.DataSe.ShopMessageSetFormMain ShopMessage = new DataSe.ShopMessageSetFormMain();
- //ShopMessage.Show();
- //PublicCodeClasses.OrderProcessSendSMS("201411230001", EnumPermissions.ProcessSendSMS.CustomerOrderFulfillment);
- //new ReportPrint.ReportFixedFormat().PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.儿童预约单, StrOrd_Number: "H_201412240005");
- //测试固定格式
- //ReportFixedFormat rpf = new ReportFixedFormat();
- //this.panlModel.BackgroundImageLayout = ImageLayout.Zoom;
- //Image img = rpf.CameraControlBookFixedFormat();
- //this.panlModel.Size = img.Size;
- //this.panlModel.BackgroundImage = img;
- //this.Size = new Size(this.panlModel.Width + this.panlModel.Location.X, this.panlModel.Height);
- }
- private string _panelsize = "";
- /// <summary>
- /// 绘版的大小
- /// </summary>
- private string PancelSize
- { set { _panelsize = value; } get { return _panelsize; } }
- private bool _isprint = true;
- /// <summary>
- /// 是否打印图片背景(true:打印出背景图片; false:不打印出背景图片)
- /// </summary>
- public bool IsPrint
- { get { return _isprint; } set { _isprint = value; } }
- private int _lbladdcount = 0;
- /// <summary>
- /// 当前创建label的数量(即为label Name的更始编号)
- /// </summary>
- private int lbAddCount
- { set { _lbladdcount = value; } get { return _lbladdcount; } }
- private string _picturepatht = "";
- /// <summary>
- /// 选择的图片路径
- /// </summary>
- private string PicturePath
- { set { _picturepatht = value; } get { return _picturepatht; } }
- /// <summary>
- /// 储存每个label的字间距设置
- /// </summary>
- private Hashtable htData_Pitch = new Hashtable();
- /// <summary>
- /// 储存每个label的对齐方式设置
- /// </summary>
- private Hashtable htData_Align = new Hashtable();
- /// <summary>
- /// 储存每个label的Decimal类型的金钱格式设置
- /// </summary>
- private Hashtable htData_Money = new Hashtable();
- /// <summary>
- /// 储存每个label的DateTime类型的日期格式设置
- /// </summary>
- private Hashtable htData_Date = new Hashtable();
- /// <summary>
- /// 储存每个label的DateTime类型的日期格式设置
- /// </summary>
- private Hashtable htData_ToUpper = new Hashtable();
- /// <summary>
- /// 窗体加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void OrdersReportPrintFormMain_Load(object sender, EventArgs e)
- {
- if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- this.cmbQueryText.Items.Add(new ListItem("订单报表", "OrderReport_Children"));
- this.cmbQueryText.Items.Add(new ListItem("订单派工", "OrderSendWork_Children"));
- this.cmbQueryText.Items.Add(new ListItem("订单明细", "OrderDetails_Children"));
- this.cmbQueryText.Items.Add(new ListItem("收款凭据", "FinancePayment_Children"));
- }
- else if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- this.cmbQueryText.Items.Add(new ListItem("订单报表", "OrderReport_Wedding"));
- this.cmbQueryText.Items.Add(new ListItem("订单派工", "OrderSendWork_Wedding"));
- this.cmbQueryText.Items.Add(new ListItem("订单明细", "OrderDetails_Wedding"));
- this.cmbQueryText.Items.Add(new ListItem("收款凭据", "FinancePayment_Wedding"));
- }
- else if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.旗舰版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- //this.cmbQueryText.Items.Add(new ListItem("订单报表_全能版", "OrderReport_Almighty"));
- this.cmbQueryText.Items.Add(new ListItem("订单报表_儿童版", "OrderReport_Children"));
- this.cmbQueryText.Items.Add(new ListItem("订单报表_婚纱版", "OrderReport_Wedding"));
- this.cmbQueryText.Items.Add(new ListItem("订单派工_儿童版", "OrderSendWork_Children"));
- this.cmbQueryText.Items.Add(new ListItem("订单派工_婚纱版", "OrderSendWork_Wedding"));
- this.cmbQueryText.Items.Add(new ListItem("订单明细_儿童版", "OrderDetails_Children"));
- this.cmbQueryText.Items.Add(new ListItem("订单明细_婚纱版", "OrderDetails_Wedding"));
- this.cmbQueryText.Items.Add(new ListItem("收款凭据_儿童版", "FinancePayment_Children"));
- this.cmbQueryText.Items.Add(new ListItem("收款凭据_婚纱版", "FinancePayment_Wedding"));
- }
- }
- /// <summary>
- /// 选择图片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnView_Click(object sender, EventArgs e)
- {
- this.openFileDialog1.Filter = "所有文件(*.*)|*.*";
- this.openFileDialog1.Multiselect = false;
- this.openFileDialog1.FileName = "";
- this.openFileDialog1.FilterIndex = 2;
- if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
- {
- PicturePath = this.openFileDialog1.FileName;
- //Image image = Image.FromFile(PicturePath);
- //this.panlModel.BackgroundImageLayout = ImageLayout.Zoom;
- //this.panlModel.BackgroundImage = image;
- //this.panlModel.Size =System.Drawing.Image.FromStream(fs).Size;
- FileStream fs = new FileStream(PicturePath, FileMode.Open, FileAccess.Read);
- this.panlModel.BackgroundImage = System.Drawing.Image.FromStream(fs);
- this.panlModel.BackgroundImageLayout = ImageLayout.Zoom;
- fs.Close();
- this.PancelSize = this.panlModel.Size.Width + "," + this.panlModel.Size.Height;
- }
- }
- /// <summary>
- /// 下拉列表更改事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void cmbQueryText_SelectedIndexChanged(object sender, EventArgs e)
- {
- this.treevListData.Nodes.Clear();
- this.panlModel.Controls.Clear();
- this.listArray.Clear();
- this.htData_Pitch.Clear();
- this.htData_Money.Clear();
- this.htData_Date.Clear();
- this.htData_Align.Clear();
- this.htData_ToUpper.Clear();
- if (this.cmbQueryText.Text.Trim() != "")
- {
- ListItem li = (ListItem)this.cmbQueryText.SelectedItem;
- string strKey = li.StrText; //得到选中项key(Prod_Name)
- string strValue = li.StrValue.ToString(); //得到选中项value (Prod_Class)
- string QueryTag = strValue.Split('_')[0].Trim();
- string Version = strValue.Split('_')[1].Trim();
- string QueryText = strKey;
- if (QueryText.IndexOf('_') != -1)
- {
- QueryText = QueryText.Substring(0, QueryText.IndexOf('_'));
- }
- switch (QueryText)
- {
- case "订单报表":
- case "订单派工":
- new LYFZ.Software.MainBusiness.ReportPrint.ReportGenerationColumnClass().Order_GenerationColumn(this.treevListData, Version, QueryTag); break;
- case "收款凭据":
- new LYFZ.Software.MainBusiness.ReportPrint.ReportGenerationColumnClass().Order_GenerationColumn(this.treevListData, Version, QueryTag); break;
- }
- DataTable tbl = new LYFZ.BLL.BLL_ErpReportModel().GetList("Rmd_EnglishName='" + strValue + "'").Tables[0];
- if (tbl.Rows.Count > 0)
- {
- if (tbl.Rows[0]["Rmd_StrJion"].ToString().Trim() != "")
- {
- Json.JsontoDataTable jdt = new Json.JsontoDataTable();
- DataTable tbl_ModelJion = jdt.toObject(tbl.Rows[0]["Rmd_ModelJion"].ToString().Trim());
- this.panlModel.Name = tbl_ModelJion.Rows[0]["Name"].ToString().Trim();
- this.IsPrint = tbl_ModelJion.Rows[0]["IsPrint"].ToString().Trim() == "true" ? true : false;
- this.panlModel.Size = new Size(Convert.ToInt32(tbl_ModelJion.Rows[0]["SizeWidth"].ToString().Trim()), Convert.ToInt32(tbl_ModelJion.Rows[0]["SizeHigh"].ToString().Trim()));
- this.PancelSize = tbl_ModelJion.Rows[0]["SizeWidth"].ToString().Trim() + "," + tbl_ModelJion.Rows[0]["SizeHigh"].ToString().Trim();
- this.PicturePath = tbl.Rows[0]["Rmd_PhotoPath"].ToString().Trim();
- #region 把服务上的图片下载出来
- if (!System.IO.File.Exists(PicturePath))
- { MessageBoxCustom.Show("报表背景图片不存在"); PanlModelClear(true); return; }
- string SavePath = "C:\\LYFZ.Print\\" + PicturePath.Substring(PicturePath.LastIndexOf(@"\") + 1, PicturePath.Length - (PicturePath.LastIndexOf(@"\") + 1));//图片名如:78.jpg
- System.IO.File.Copy(PicturePath, SavePath, true);
- #endregion
- this.PicturePath = SavePath;
- this.panlModel.BackgroundImage = null;
- FileStream fs = new FileStream(SavePath, FileMode.Open, FileAccess.Read);
- panlModel.BackgroundImage = System.Drawing.Image.FromStream(fs);
- this.panlModel.BackgroundImageLayout = ImageLayout.Zoom;
- fs.Close();
- DataTable tbl_Jion = jdt.toObject(tbl.Rows[0]["Rmd_StrJion"].ToString().Trim());
- for (int i = 0; i < tbl_Jion.Rows.Count; i++)
- {
- lbAddCount++;
- Label lb = new Label();
- lb.Text = SetWordSpacing(tbl_Jion.Rows[i]["Value"].ToString().Trim(), Convert.ToInt32(tbl_Jion.Rows[i]["WordPitch"].ToString().Trim()));//
- lb.Tag = tbl_Jion.Rows[i]["Column"].ToString().Trim() + "|" + tbl_Jion.Rows[i]["Type"].ToString().Trim();
- lb.Name = tbl_Jion.Rows[i]["Column"].ToString().Trim() + (lbAddCount + 1);
- lb.Font = new System.Drawing.Font("微软雅黑", float.Parse(tbl_Jion.Rows[i]["FontSize"].ToString().Trim()));
- lb.Location = new Point(Convert.ToInt32(tbl_Jion.Rows[i]["LocationWidth"].ToString().Trim()), Convert.ToInt32(tbl_Jion.Rows[i]["LocationHigh"].ToString().Trim()));//坐标
- lb.Size = new Size(Convert.ToInt32(tbl_Jion.Rows[i]["SizeWidth"].ToString().Trim()), Convert.ToInt32(tbl_Jion.Rows[i]["SizeHigh"].ToString().Trim()));
- // 储存每个label的字间距设置WordPitch
- htData_Pitch[lb.Name] = tbl_Jion.Rows[i]["WordPitch"].ToString().Trim();
- // 储存每个label的对齐方式设置
- htData_Align[lb.Name] = tbl_Jion.Rows[i]["Align"].ToString().Trim();
- // 储存每个label的Decimal类型的金钱格式设置
- htData_Money[lb.Name] = tbl_Jion.Rows[i]["MoneyFormat"].ToString().Trim();
- // 储存每个label的DateTime类型的日期格式设置
- htData_Date[lb.Name] = tbl_Jion.Rows[i]["DateFormat"].ToString().Trim();
- /// 储存每个label的DateTime类型的日期格式设置
- htData_ToUpper[lb.Name] = tbl_Jion.Rows[i]["ToUpper"].ToString().Trim();
- listArray.Add(lb.Name);
- lb.ContextMenuStrip = contxtMenu;
- lb.AutoSize = false;
- RestoreBackColor();
- lb.BackColor = SetBackColor(EnumBackColor.Drag);// SetBackColor(EnumBackColor.Create);
- if (!IsTouch(lb))//如果不会覆盖,添加到Panel
- {
- this.panlModel.Controls.Add(lb);
- lb.BringToFront();
- SetControlProperty(lb);
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 窗体大小发生变化
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void OrdersReportPrintFormMain_Resize(object sender, EventArgs e)
- {
- if (this.Width > 800)
- {
- this.btnView.Location = new Point(this.Width - 500, 10);
- if (this.PancelSize != "")
- { this.panlModel.Size = new Size(Convert.ToInt32(this.PancelSize.Split(',')[0].Trim()), Convert.ToInt32(this.PancelSize.Split(',')[1].Trim())); }
- else
- { this.panlModel.Size = new Size(this.Width - 215, this.Size.Height - 50); }
- }
- else
- {
- this.btnView.Location = new Point(424, 10);
- if (this.PancelSize != "")
- { this.panlModel.Size = new Size(Convert.ToInt32(this.PancelSize.Split(',')[0].Trim()), Convert.ToInt32(this.PancelSize.Split(',')[1].Trim())); }
- else
- { this.panlModel.Size = new Size(674, 385); }
- }
- this.btnReset.Location = new Point(this.btnView.Location.X + this.btnView.Width + 10, 10);
- this.btnPreview.Location = new Point(this.btnReset.Location.X + this.btnReset.Width + 10, 10);
- this.btnSave.Location = new Point(this.btnPreview.Location.X + this.btnPreview.Width + 10, 10);
- this.btnClose.Location = new Point(this.btnSave.Location.X + this.btnSave.Width + 10, 10);
- }
- /// <summary>
- /// 预览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnPreview_Click(object sender, EventArgs e)
- {
- Hashtable htData = new Hashtable();
- ArrayList alist = new ArrayList();
- htData["Alist"] = alist;
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.拍照明细表, htData);
- }
- /// <summary>
- /// 重置绘板
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnReset_Click(object sender, EventArgs e)
- {
- this.panlModel.Controls.Clear();
- this.listArray.Clear();
- this.htData_Pitch.Clear();
- this.htData_Money.Clear();
- this.htData_Date.Clear();
- this.htData_Align.Clear();
- this.panlModel.BackgroundImage = null;
- }
- /// <summary>
- /// 保存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnSave_Click(object sender, EventArgs e)
- {
- ListItem li = (ListItem)this.cmbQueryText.SelectedItem;
- string strKey = li.StrText; //得到选中项key(Prod_Name)
- string strValue = li.StrValue.ToString(); //得到选中项value (Prod_Class)
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- string StrJion = "";
- int ForCount = 0;
- foreach (Control control in panlModel.Controls)
- {
- if (control is Label)
- {
- if (ForCount > 0)
- { StrJion += ","; }
- StrJion += "{Name:\"" + control.Name.Trim() + "\"";
- StrJion += ",Value:\"" + control.Text.Trim() + "\"";
- StrJion += ",Column:\"" + control.Tag.ToString().Trim().Split('|')[0].Trim() + "\"";
- StrJion += ",Type:\"" + control.Tag.ToString().Trim().Split('|')[1].Trim() + "\"";
- StrJion += ",LocationWidth:\"" + control.Location.X + "\"";
- StrJion += ",LocationHigh:\"" + control.Location.Y + "\"";
- string Align = htData_Align.ContainsKey(control.Name) ? htData_Align[control.Name].ToString().Trim() : "Left";
- StrJion += ",Align:\"" + Align + "\"";
- string WordPitch = htData_Pitch.ContainsKey(control.Name) ? htData_Pitch[control.Name].ToString().Trim() : "0";
- StrJion += ",WordPitch:\"" + WordPitch + "\"";
- StrJion += ",SizeWidth:\"" + control.Size.Width + "\"";
- StrJion += ",SizeHigh:\"" + control.Size.Height + "\"";
- StrJion += ",FontSize:\"" + control.Font.Size + "\"";
- string DateFormat = "";
- string MoneyFormat = "";
- string ToUpper = "";
- switch (control.Tag.ToString().Trim().Split('|')[1].Trim())
- {
- case "DateTime":
- DateFormat = htData_Date.ContainsKey(control.Name) ? htData_Date[control.Name].ToString().Trim() : "yyyy-MM-dd";
- StrJion += ",DateFormat:\"" + DateFormat + "\"";
- StrJion += ",MoneyFormat:\"" + MoneyFormat + "\"";
- StrJion += ",ToUpper:\"" + ToUpper + "\"";
- break;
- case "Decimal":
- DateFormat = "";
- StrJion += ",DateFormat:\"" + DateFormat + "\"";
- MoneyFormat = htData_Money.ContainsKey(control.Name) ? htData_Money[control.Name].ToString().Trim() : "#.00";
- StrJion += ",MoneyFormat:\"" + MoneyFormat + "\"";
- ToUpper = htData_ToUpper.ContainsKey(control.Name) ? htData_ToUpper[control.Name].ToString().Trim() : "False";
- StrJion += ",ToUpper:\"" + ToUpper + "\"";
- break;
- case "Image":
- break;
- default:
- StrJion += ",DateFormat:\"" + DateFormat + "\"";
- StrJion += ",MoneyFormat:\"" + MoneyFormat + "\"";
- StrJion += ",ToUpper:\"" + ToUpper + "\"";
- break;
- }
- StrJion += "}";
- ForCount++;
- }
- }
- if (StrJion != "")
- {
- StrJion = ":[" + StrJion + "]";
- string ModelJion = ":[{Name:\"" + panlModel.Name + "\"";
- ModelJion += ",IsPrint:\"" + this.IsPrint + "\"";
- ModelJion += ",SizeWidth:\"" + panlModel.Size.Width + "\"";
- ModelJion += ",SizeHigh:\"" + panlModel.Size.Height + "\"}]";
- LYFZ.BLL.BLL_ErpReportModel rmbll =new BLL.BLL_ErpReportModel ();
- #region 如果以存有则删除
- DataTable tbl = rmbll.GetList("Rmd_EnglishName='" + strValue + "'").Tables[0];
- if (System.IO.File.Exists(tbl.Rows[0]["Rmd_PhotoPath"].ToString().Trim()))
- {
- System.IO.FileInfo fi = new System.IO.FileInfo(tbl.Rows[0]["Rmd_PhotoPath"].ToString().Trim());
- try
- {
- fi.Delete();
- }
- catch { }
- }
- #endregion
- #region 上传图片
- if (!System.IO.File.Exists(PicturePath))
- { MessageBoxCustom.Show("图片路径错误"); }
- string ImagePath = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetReportModelPiece();
- string SavePath = ImagePath + @"\" + PicturePath.Substring(PicturePath.LastIndexOf(@"\") + 1, PicturePath.Length - (PicturePath.LastIndexOf(@"\") + 1));//图片名如:78.jpg
- System.IO.File.Copy(PicturePath, SavePath, true);
- #endregion
- LYFZ.Model.Model_ErpReportModel model =rmbll.DataRowToModel(tbl.Rows[0]);
- model.Rmd_PhotoPath = SavePath;
- model.Rmd_ModelJion = ModelJion;
- model.Rmd_StrJion = StrJion;
- model.Rmd_UpdateDateTime = SDateTime.Now;
- model.Rmd_UpdateName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- clist.Add(rmbll.GetUpdateCommandInfo(model));
- if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) > 0)
- { MessageBoxCustom.Show("保存成功"); }
- else
- { MessageBoxCustom.Show("保存失败"); return; }
- }
- });
- }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnClose_Click(object sender, EventArgs e)
- { this.Close(); }
- /// <summary>
- /// 用鼠标双击节点时间发生
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void treevListData_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- if (this.treevListData.SelectedNode != null)
- {
- if (this.treevListData.SelectedNode.Level > 0)
- {
- lbAddCount++;
- Label lb = new Label();
- lb.Location = new Point(20, 20);
- lb.Text = e.Node.Text;
- lb.Tag = e.Node.Name + "|" + e.Node.Tag;
- lb.Name = e.Node.Name + (lbAddCount + 1);
- lb.Font = new System.Drawing.Font("宋体", 12);
- lb.ContextMenuStrip = contxtMenu;
- lb.AutoSize = false;
- RestoreBackColor();
- lb.BackColor = SetBackColor(EnumBackColor.Create);
- if (!IsTouch(lb))//如果不会覆盖,添加到Panel
- {
- this.panlModel.Controls.Add(lb);
- lb.BringToFront();
- SetControlProperty(lb);
- }
- }
- }
- }
- /// <summary>
- /// 右键菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void contxtMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
- {
- ToolStripItem item = e.ClickedItem;
- if (item.Text == "删除")
- {
- Label lbl = (Label)panlModel.Controls[item.Name];
- ControlRemovelbl(lbl);
- }
- else if (item.Text == "全部删除")
- {
- PanlModelClear();
- }
- else if (item.Text == "模板设置")
- {
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.ModelSetSuperSmallForm ModelSet = new SuperSmallForm.ModelSetSuperSmallForm();
- ModelSet.OldSize = this.panlModel.Size.Width + "," + this.panlModel.Size.Height;
- ModelSet.OldIsPrint = this.IsPrint;
- ModelSet.ShowDialog();
- this.PancelSize = ModelSet.SetSize;
- this.IsPrint = ModelSet.IsPrint;
- if (this.PancelSize != "")
- { this.panlModel.Size = new Size(Convert.ToInt32(this.PancelSize.Split(',')[0].Trim()), Convert.ToInt32(this.PancelSize.Split(',')[1].Trim())); }
- }
- else if (item.Text == "图片大小设置")
- {
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.ImageSizeSetSuperSmallForm ImageSizeSet = new SuperSmallForm.ImageSizeSetSuperSmallForm();
- ImageSizeSet.OldSize = this.panlModel.Size.Width + "," + this.panlModel.Size.Height;
- ImageSizeSet.ShowDialog();
- string StrImageSize = ImageSizeSet.SetSize;
- if (StrImageSize != "")
- { pulb.Size = new Size(Convert.ToInt32(StrImageSize.Split(',')[0].Trim()), Convert.ToInt32(StrImageSize.Split(',')[1].Trim())); }
- }
- else if (item.Text == "字体")
- {
- //FontDialog fd = new FontDialog();
- //fd.ShowDialog().ToString();
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.SetFontSizeSuperSmallForm SetFontSize = new SuperSmallForm.SetFontSizeSuperSmallForm();
- SetFontSize.OldFontSize = pulb.Font.Size;
- SetFontSize.ShowDialog();
- if (SetFontSize.NewFontSize != "")
- { pulb.Font = new Font("微软雅黑", float.Parse(SetFontSize.NewFontSize)); }
- }
- else if (item.Text == "字间距")
- {
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.WordSpacingSuperSmallForm WordSpacing = new SuperSmallForm.WordSpacingSuperSmallForm();
- if (!htData_Pitch.ContainsKey(pulb.Name))
- { WordSpacing.OldSpacing = 0; }
- else
- { WordSpacing.OldSpacing = Convert.ToInt32(htData_Pitch[pulb.Name].ToString()); }
- WordSpacing.ShowDialog();
- if (htData_Pitch.ContainsKey(pulb.Name))
- { htData_Pitch[pulb.Name] = WordSpacing.NewSpacing; pulb.Text = SetWordSpacing(pulb.Text.Trim(), WordSpacing.NewSpacing); }
- }
- else if (item.Text == "文字左对齐")
- {
- htData_Align[pulb.Name] = "Left"; pulb.TextAlign = ContentAlignment.MiddleLeft;
- }
- else if (item.Text == "文字右对齐")
- {
- htData_Align[pulb.Name] = "Right"; pulb.TextAlign = ContentAlignment.MiddleRight;
- }
- else if (item.Text == "日期格式设置")
- {
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.DateSetSuperSmallForm DateSet = new SuperSmallForm.DateSetSuperSmallForm();
- DateSet.ShowDialog();
- try
- { pulb.Text = Convert.ToDateTime(pulb.Text).ToString(DateSet.SetDateTime); }
- catch { }
- }
- else if (item.Text == "金额格式设置")
- {
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.DecimalSetSuperSmallForm DecimalSet = new SuperSmallForm.DecimalSetSuperSmallForm();
- DecimalSet.OldDecimal = pulb.Text.ToString().Trim();
- DecimalSet.ShowDialog();
- try
- {
- if (DecimalSet.SetDecimal != "")
- { htData_Money[pulb.Name] = DecimalSet.SetDecimal; pulb.Text = Convert.ToDecimal(pulb.Text).ToString(DecimalSet.SetDecimal); }
- }
- catch { }
- }
- else if (item.Text == "大写显示")
- {
- try
- {
- if (LYFZ.Command.Command_Validate.IsNumeric(pulb.Text.Trim()) == false)
- { MessageBoxCustom.Show("请先设置值为整数或小数"); }
- else { htData_ToUpper[pulb.Name] = "True"; pulb.Text = LYFZ.Software.MainBusiness.ReportPrint.ReportPrintDataClass.ConversionAmount(pulb.Text); }
- }
- catch { }
- }
- else if (item.Text == "小写显示")
- {
- try
- { htData_ToUpper[pulb.Name] = "False"; pulb.Text = "5000.00"; }
- catch { }
- }
- else if (item.Text == "设置值")
- {
- LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm.SettingValueSuperSmallForm SettingValue = new SuperSmallForm.SettingValueSuperSmallForm();
- SettingValue.LoadType = pulb.Tag.ToString().Trim().Split('|')[1];
- SettingValue.ShowDialog();
- if (SettingValue.StrText != "")
- {
- if (pulb.Tag.ToString().Trim().Split('|')[1].Trim() != "DateTime") { pulb.Text = SetWordSpacing(SettingValue.StrText, Convert.ToInt32(htData_Pitch[pulb.Name])); }
- else { pulb.Text = SettingValue.StrText; }
- }
- }
- }
- /// <summary>
- /// Panel的右键——删除全部
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void panlModel_MouseDown(object sender, MouseEventArgs e)
- {
- //点鼠标右键删除
- if (e.Button == MouseButtons.Right)
- {
- contxtMenu.Items.Clear();
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "全部删除";
- item.Name = "AllDelete";
- contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- item.Text = "模板设置";
- item.Name = "ModelSet";
- contxtMenu.Items.Add(item);
- lbAddCount = 0;
- }
- }
- /// <summary>
- /// 设置文件间隔
- /// </summary>
- /// <param name="str">文本内容</param>
- /// <param name="interval">字符间隔</param>
- /// <returns></returns>
- private static String SetWordSpacing(String str, int interval)
- {
- StringBuilder sb = new StringBuilder();
- StringBuilder sb1 = new StringBuilder();
- for (int i = 0; i < interval; i++)
- { sb.Append(" "); }
- str = str.Replace(" ", "");
- for (int i = 0; i < str.Length; i++)
- {
- if (i == str.Length - 1)
- { sb1.Append(str.Substring(i, 1)); break; }
- sb1.Append(str.Substring(i, 1)).Append(sb.ToString());
- }
- return str = string.Concat(sb1);
- }
- /// <summary>
- /// 清空模板所有参数
- /// </summary>
- /// <param name="isClearBackImage">是否清除背景图片(true:清除;false:不清除)</param>
- private void PanlModelClear(bool isClearBackImage = false)
- {
- if (isClearBackImage)
- { panlModel.BackgroundImage = null; }
- panlModel.Controls.Clear();
- this.IsPrint = true;
- listArray.Clear();
- htData_Pitch.Clear();
- htData_Money.Clear();
- htData_Date.Clear();
- htData_Align.Clear();
- htData_ToUpper.Clear();
- }
- /// <summary>
- /// 删除模板上的某个控件
- /// </summary>
- private void ControlRemovelbl(Label lbl)
- {
- listArray.Remove(lbl.Name);
- if (htData_Pitch.ContainsKey(lbl.Name))
- { htData_Pitch.Remove(lbl.Name); }
- if (htData_Money.ContainsKey(lbl.Name))
- { htData_Money.Remove(lbl.Name); }
- if (htData_Date.ContainsKey(lbl.Name))
- { htData_Date.Remove(lbl.Name); }
- if (htData_Align.ContainsKey(lbl.Name))
- { htData_Align.Remove(lbl.Name); }
- if (htData_ToUpper.ContainsKey(lbl.Name))
- { htData_ToUpper.Remove(lbl.Name); }
- panlModel.Controls.Remove(lbl);
- }
- private Label pulb;
- const int Band = 5;
- const int MinWidth = 10;
- const int MinHeight = 10;
- private EnumMousePointPosition m_MousePointPosition;
- private Point p, p1;
- /// <summary>
- /// 还原背景颜色
- /// </summary>
- private void RestoreBackColor()
- {
- foreach (Control control in panlModel.Controls)
- {
- if (control is Label)
- {
- //数组大于0说明有移动过的lbl
- if (listArray.Count > 0)
- {
- foreach (string Strtemp in listArray)
- {
- if (Strtemp == control.Name)
- { control.BackColor = SetBackColor(EnumBackColor.Drag); break; }
- else { control.BackColor = SetBackColor(EnumBackColor.Create); }
- }
- }
- else { control.BackColor = SetBackColor(EnumBackColor.Create); }
- }
- }
- }
- /// <summary>
- /// 在指定坐标上是否有控件存在
- /// 如果没有返回false,有则再指定坐标上再加参数,再检索
- /// </summary>
- /// <param name="c"></param>
- /// <returns></returns>
- private bool IsTouch(Control c)
- {
- foreach (Control con in this.panlModel.Controls)
- {
- //如果在这个范围内,表示此控件会存在覆盖
- if (c.Location.X == con.Location.X && c.Location.Y == con.Location.Y)
- {
- c.Location = new Point(c.Location.X + 4, c.Location.Y + 20);
- IsTouch(c);
- }
- }
- return false;
- }
- /// <summary>
- /// 当前选中的Label显示在最上层
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MyClick(object sender, EventArgs e)
- {
- Label lb = ((Label)sender);
- RestoreBackColor();
- lb.BackColor = SetBackColor(EnumBackColor.Uppermost);
- lb.BringToFront();
- }
- /// <summary>
- /// 定义自己的 MyMouseDown 事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MyMouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
- {
- p.X = e.X; p.Y = e.Y; p1.X = e.X; p1.Y = e.Y;
- //点鼠标右键删除
- if (e.Button == MouseButtons.Right)
- {
- Label lb = ((Label)sender);
- this.contxtMenu.Items.Clear();
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "删除";
- item.Name = lb.Name;
- this.contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- item.Text = "设置值";
- item.Name = "SetValue";
- this.contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- item.Text = "字体";
- item.Name = "Fonts";
- this.contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- item.Text = "字间距";
- item.Name = "Spacing";
- this.contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- item.Text = "文字左对齐";
- item.Name = "LeftAlign";
- this.contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- item.Text = "文字右对齐";
- item.Name = "RightAlign";
- this.contxtMenu.Items.Add(item);
- if (lb.Tag.ToString().Split('|')[1].Trim() == "DateTime")
- {
- item = new ToolStripMenuItem();
- item.Text = "日期格式设置";
- item.Name = "SetDateTime";
- this.contxtMenu.Items.Add(item);
- }
- if (lb.Tag.ToString().Split('|')[1].Trim() == "Decimal")
- {
- item = new ToolStripMenuItem();
- item.Text = "金额格式设置";
- item.Name = "SetDecimal";
- this.contxtMenu.Items.Add(item);
- item = new ToolStripMenuItem();
- if (htData_ToUpper.ContainsKey(lb.Name))
- {
- if (htData_ToUpper[lb.Name].ToString().Trim() == "True")
- { item.Text = "小写显示"; }
- else { item.Text = "大写显示"; }
- }
- else { item.Text = "大写显示"; }
- item.Name = "ToUpperAmout";
- this.contxtMenu.Items.Add(item);
- }
- if (lb.Tag.ToString().Split('|')[1].Trim() == "Image")
- {
- item = new ToolStripMenuItem();
- item.Text = "图片大小设置";
- item.Name = "SetImageSize";
- this.contxtMenu.Items.Add(item);
- }
- this.contxtMenu.RightToLeft = System.Windows.Forms.RightToLeft.No;
- pulb = lb;
- }
- }
- /// <summary>
- /// 定义自己的 MyMouseEnter 事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MyMouseEnter(object sender, System.EventArgs e)
- {
- try
- { Label lCtrl = (sender as Label); lCtrl.BorderStyle = BorderStyle.FixedSingle; }
- catch { }
- }
- /// <summary>
- /// 定义自己的 MyMouseLeave 事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MyMouseLeave(object sender, System.EventArgs e)
- {
- m_MousePointPosition = EnumMousePointPosition.MouseSizeNone;
- this.Cursor = Cursors.Arrow;
- try
- { Label lCtrl = (sender as Label); lCtrl.BorderStyle = BorderStyle.None; }
- catch { }
- }
- /// <summary>
- /// 设计一个函数,确定光标在控件不同位置的样式
- /// </summary>
- /// <param name="size"></param>
- /// <param name="e"></param>
- /// <returns></returns>
- private EnumMousePointPosition MousePointPosition(Size size, System.Windows.Forms.MouseEventArgs e)
- {
- if ((e.X >= -1 * Band) | (e.X <= size.Width) | (e.Y >= -1 * Band) | (e.Y <= size.Height))
- {
- if (e.X < Band)
- {
- if (e.Y < Band) { return EnumMousePointPosition.MouseSizeTopLeft; }
- else
- {
- if (e.Y > -1 * Band + size.Height)
- { return EnumMousePointPosition.MouseSizeBottomLeft; }
- else
- { return EnumMousePointPosition.MouseSizeLeft; }
- }
- }
- else
- {
- if (e.X > -1 * Band + size.Width)
- {
- if (e.Y < Band)
- { return EnumMousePointPosition.MouseSizeTopRight; }
- else
- {
- if (e.Y > -1 * Band + size.Height)
- { return EnumMousePointPosition.MouseSizeBottomRight; }
- else
- { return EnumMousePointPosition.MouseSizeRight; }
- }
- }
- else
- {
- if (e.Y < Band)
- { return EnumMousePointPosition.MouseSizeTop; }
- else
- {
- if (e.Y > -1 * Band + size.Height)
- { return EnumMousePointPosition.MouseSizeBottom; }
- else
- { return EnumMousePointPosition.MouseDrag; }
- }
- }
- }
- }
- else
- { return EnumMousePointPosition.MouseSizeNone; }
- }
- /// <summary>
- /// 定义自己的 MyMouseMove 事件,在这个事件里,会使用上面设计的函数
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MyMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
- {
- Control lCtrl = (sender as Control);
- if (e.Button == MouseButtons.Left)
- {
- switch (m_MousePointPosition)
- {
- case EnumMousePointPosition.MouseDrag:
- lCtrl.Left = lCtrl.Left + e.X - p.X;
- lCtrl.Top = lCtrl.Top + e.Y - p.Y;
- #region 把移动过的lbl写记录
- if (e.Clicks == 0)
- {
- if (listArray.Count <= 0)
- { lCtrl.BackColor = SetBackColor(EnumBackColor.Drag); listArray.Add(lCtrl.Name); }
- else
- {
- bool Isbol = true;
- foreach (string strtmep in listArray)
- {
- if (strtmep == lCtrl.Name)
- { Isbol = false; break; }
- }
- if (Isbol)
- { lCtrl.BackColor = SetBackColor(EnumBackColor.Drag); listArray.Add(lCtrl.Name); }
- }
- }
- #endregion
- break;
- case EnumMousePointPosition.MouseSizeBottom:
- lCtrl.Height = lCtrl.Height + e.Y - p1.Y;
- p1.X = e.X;
- p1.Y = e.Y; //'记录光标拖动的当前点
- break;
- case EnumMousePointPosition.MouseSizeBottomRight:
- lCtrl.Width = lCtrl.Width + e.X - p1.X;
- lCtrl.Height = lCtrl.Height + e.Y - p1.Y;
- p1.X = e.X;
- p1.Y = e.Y; //'记录光标拖动的当前点
- break;
- case EnumMousePointPosition.MouseSizeRight:
- lCtrl.Width = lCtrl.Width + e.X - p1.X;
- // lCtrl.Height = lCtrl.Height + e.Y - p1.Y;
- p1.X = e.X;
- p1.Y = e.Y; //'记录光标拖动的当前点
- break;
- case EnumMousePointPosition.MouseSizeTop:
- lCtrl.Top = lCtrl.Top + (e.Y - p.Y);
- lCtrl.Height = lCtrl.Height - (e.Y - p.Y);
- break;
- case EnumMousePointPosition.MouseSizeLeft:
- lCtrl.Left = lCtrl.Left + e.X - p.X;
- lCtrl.Width = lCtrl.Width - (e.X - p.X);
- break;
- case EnumMousePointPosition.MouseSizeBottomLeft:
- lCtrl.Left = lCtrl.Left + e.X - p.X;
- lCtrl.Width = lCtrl.Width - (e.X - p.X);
- lCtrl.Height = lCtrl.Height + e.Y - p1.Y;
- p1.X = e.X;
- p1.Y = e.Y; //'记录光标拖动的当前点
- break;
- case EnumMousePointPosition.MouseSizeTopRight:
- lCtrl.Top = lCtrl.Top + (e.Y - p.Y);
- lCtrl.Width = lCtrl.Width + (e.X - p1.X);
- lCtrl.Height = lCtrl.Height - (e.Y - p.Y);
- p1.X = e.X;
- p1.Y = e.Y; //'记录光标拖动的当前点
- break;
- case EnumMousePointPosition.MouseSizeTopLeft:
- lCtrl.Left = lCtrl.Left + e.X - p.X;
- lCtrl.Top = lCtrl.Top + (e.Y - p.Y);
- lCtrl.Width = lCtrl.Width - (e.X - p.X);
- lCtrl.Height = lCtrl.Height - (e.Y - p.Y);
- break;
- default:
- break;
- }
- if (lCtrl.Width < MinWidth) lCtrl.Width = MinWidth;
- if (lCtrl.Height < MinHeight) lCtrl.Height = MinHeight;
- }
- else
- {
- m_MousePointPosition = MousePointPosition(lCtrl.Size, e); //'判断光标的位置状态
- switch (m_MousePointPosition) //'改变光标
- {
- case EnumMousePointPosition.MouseSizeNone:
- this.Cursor = Cursors.Arrow; //'箭头
- break;
- case EnumMousePointPosition.MouseDrag:
- this.Cursor = Cursors.SizeAll; //'四方向
- break;
- case EnumMousePointPosition.MouseSizeBottom:
- this.Cursor = Cursors.SizeNS; //'南北
- break;
- case EnumMousePointPosition.MouseSizeTop:
- this.Cursor = Cursors.SizeNS; //'南北
- break;
- case EnumMousePointPosition.MouseSizeLeft:
- this.Cursor = Cursors.SizeWE; //'东西
- break;
- case EnumMousePointPosition.MouseSizeRight:
- this.Cursor = Cursors.SizeWE; //'东西
- break;
- case EnumMousePointPosition.MouseSizeBottomLeft:
- this.Cursor = Cursors.SizeNESW; //'东北到南西
- break;
- case EnumMousePointPosition.MouseSizeBottomRight:
- this.Cursor = Cursors.SizeNWSE; //'东南到西北
- break;
- case EnumMousePointPosition.MouseSizeTopLeft:
- this.Cursor = Cursors.SizeNWSE; //'东南到西北
- break;
- case EnumMousePointPosition.MouseSizeTopRight:
- this.Cursor = Cursors.SizeNESW; //'东北到南西
- break;
- default:
- break;
- }
- }
- }
- /// <summary>
- /// 制作一个初始化过程,将界面 panel1 上的所有控件都绑定 MyMouseDown、 MyMouseLeave、
- /// MyMouseMove 事件,记得在 Form 初始化或者 Form_Load 时先执行它。
- /// </summary>
- private void initProperty()
- {
- for (int i = 0; i < this.panlModel.Controls.Count; i++)
- { SetControlProperty(this.panlModel.Controls[i]); }
- }
- /// <summary>
- /// 写事件
- /// </summary>
- /// <param name="control"></param>
- public void SetControlProperty(Control control)
- {
- control.MouseDown += new System.Windows.Forms.MouseEventHandler(MyMouseDown);
- control.MouseLeave += new System.EventHandler(MyMouseLeave);
- control.MouseMove += new System.Windows.Forms.MouseEventHandler(MyMouseMove);
- control.MouseEnter += new System.EventHandler(MyMouseEnter);
- control.Click += new EventHandler(MyClick);
- }
- /// <summary>
- /// 存储过拖动过的Label
- /// </summary>
- private ArrayList listArray = new ArrayList();
- /// <summary>
- /// 返回颜色
- /// </summary>
- /// <param name="tempEnum">要返回的枚举属性</param>
- /// <returns></returns>
- private Color SetBackColor(EnumBackColor tempEnum)
- {
- Color ReturnColor = new Color();
- switch (tempEnum)
- {
- case EnumBackColor.Create: ReturnColor = Color.Gainsboro; break; //创建Label时的背景颜色,说明未拖动过
- case EnumBackColor.Drag: ReturnColor = Color.Transparent; break; //拖动后的背景颜色
- case EnumBackColor.Uppermost: ReturnColor = Color.LightSkyBlue; break; //当前选中的Label,也就是在最上层的Label
- }
- return ReturnColor;
- }
- /// <summary>
- /// 枚举设置背景颜色属性
- /// </summary>
- private enum EnumBackColor
- {
- /// <summary>
- /// Color.Gainsboro
- /// </summary>
- Create, //创建Label时的背景颜色,说明未拖动过
- /// <summary>
- /// Color.Transparent
- /// </summary>
- Drag, //拖动后的背景颜色
- /// <summary>
- /// Color.LightSkyBlue
- /// </summary>
- Uppermost, //当前选中的Label,也就是在最上层的Label
- }
- private void InitializeComponent()
- {
- this.plExMainContainer.SuspendLayout();
- this.plFormMainContent.SuspendLayout();
- this.SuspendLayout();
- //
- // treevListData
- //
- this.treevListData.LineColor = System.Drawing.Color.Black;
- //
- // OrdersReportPrintFormMain
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.ClientSize = new System.Drawing.Size(710, 510);
- this.Name = "OrdersReportPrintFormMain";
- this.Controls.SetChildIndex(this.btnAppFormMaximize, 0);
- this.Controls.SetChildIndex(this.btnAppFormExit, 0);
- this.Controls.SetChildIndex(this.btnAppFormMinimize, 0);
- this.Controls.SetChildIndex(this.btnAppFormMenu, 0);
- this.Controls.SetChildIndex(this.btnAppFormSkin, 0);
- this.Controls.SetChildIndex(this.plFormMainContent, 0);
- this.plExMainContainer.ResumeLayout(false);
- this.plFormMainContent.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- }
- public enum EnumMousePointPosition
- {
- MouseSizeNone = 0, //'无
- MouseSizeRight = 1, //'拉伸右边框
- MouseSizeLeft = 2, //'拉伸左边框
- MouseSizeBottom = 3, //'拉伸下边框
- MouseSizeTop = 4, //'拉伸上边框
- MouseSizeTopLeft = 5, //'拉伸左上角
- MouseSizeTopRight = 6, //'拉伸右上角
- MouseSizeBottomLeft = 7, //'拉伸左下角
- MouseSizeBottomRight = 8, //'拉伸右下角
- MouseDrag = 9 // '鼠标拖动
- }
- }
|