58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
using KellyReport_D.Properties;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace KellyReport_D
|
|
{
|
|
public partial class JQSalesSummaryPanel : UserControl
|
|
{
|
|
public JQSalesSummaryPanel()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
override
|
|
protected void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
this.step1Lab.Text = Resources.Step1;
|
|
this.step1DescLab.Text = Resources.STEP1_DESC;
|
|
this.step1NoteLab.Text = Resources.STEP1_NOTE;
|
|
this.initForecastBtn.Text = Resources.INIT_FORECAST;
|
|
|
|
this.step2Lab.Text = Resources.Step2;
|
|
this.step2DescLab.Text = Resources.STEP2_DESC;
|
|
this.importSalesBtn.Text = Resources.IMPORT_SALES;
|
|
}
|
|
|
|
private void panel1_Resize(object sender, EventArgs e)
|
|
{
|
|
initForecastBtn.Left = (buttonWrapper1.ClientSize.Width - initForecastBtn.Width) / 2;
|
|
initForecastBtn.Top = (buttonWrapper1.ClientSize.Height - initForecastBtn.Height) / 2; // 可选:垂直居中
|
|
}
|
|
|
|
private void JQSalesSummaryPanel_Resize(object sender, EventArgs e)
|
|
{
|
|
//this.step2DescLab.Size = new Size(this.Width, 65);
|
|
int width = this.Width;
|
|
// 预留内边距
|
|
int padding = this.step2DescLab.Padding.Vertical + 4;
|
|
// 计算文本所需高度
|
|
Size textSize = TextRenderer.MeasureText(
|
|
this.step2DescLab.Text,
|
|
this.step2DescLab.Font,
|
|
new Size(width, int.MaxValue),
|
|
TextFormatFlags.WordBreak
|
|
);
|
|
step2DescLab.Size = new Size(width, textSize.Height + padding);
|
|
}
|
|
}
|
|
}
|