|
|
|
@ -8,6 +8,7 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System; |
|
|
|
|
|
|
|
using System.ComponentModel; |
|
|
|
using System.Drawing; |
|
|
|
using System.Drawing; |
|
|
|
using System.Globalization; |
|
|
|
using System.Globalization; |
|
|
|
using System.Windows.Forms; |
|
|
|
using System.Windows.Forms; |
|
|
|
@ -40,6 +41,8 @@ namespace ReportGenerator{ |
|
|
|
private System.Windows.Forms.Label label4; |
|
|
|
private System.Windows.Forms.Label label4; |
|
|
|
private System.Windows.Forms.RadioButton radioFormSheet; |
|
|
|
private System.Windows.Forms.RadioButton radioFormSheet; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private System.Windows.Forms.ErrorProvider errorProvider; |
|
|
|
|
|
|
|
|
|
|
|
ReportGenerator generator; |
|
|
|
ReportGenerator generator; |
|
|
|
Properties customizer; |
|
|
|
Properties customizer; |
|
|
|
|
|
|
|
|
|
|
|
@ -47,12 +50,24 @@ namespace ReportGenerator{ |
|
|
|
|
|
|
|
|
|
|
|
public BaseSettingsPanel(){ |
|
|
|
public BaseSettingsPanel(){ |
|
|
|
InitializeComponent(); |
|
|
|
InitializeComponent(); |
|
|
|
Localise(); |
|
|
|
errorProvider = new ErrorProvider(); |
|
|
|
|
|
|
|
errorProvider.ContainerControl = this; |
|
|
|
|
|
|
|
this.txtFileName.KeyUp += new KeyEventHandler(OnKeyUp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Localise(); |
|
|
|
DoInit(); |
|
|
|
DoInit(); |
|
|
|
base.VisibleChanged += new EventHandler (ChangedEvent ); |
|
|
|
base.VisibleChanged += new EventHandler (ChangedEvent ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void OnKeyUp (object sender,KeyEventArgs e) { |
|
|
|
|
|
|
|
if (this.txtFileName.Text.Length == 0) { |
|
|
|
|
|
|
|
this.errorProvider.SetError(this.txtFileName,"aaaaa"); |
|
|
|
|
|
|
|
this.EnableNext = false; |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
this.errorProvider.SetError(this.txtFileName,""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void Localise() { |
|
|
|
private void Localise() { |
|
|
|
this.radioFormSheet.Text = ResourceService.GetString("SharpReport.Wizard.BaseSettings.ReportModel.FormSheet"); |
|
|
|
this.radioFormSheet.Text = ResourceService.GetString("SharpReport.Wizard.BaseSettings.ReportModel.FormSheet"); |
|
|
|
|
|
|
|
|
|
|
|
@ -115,15 +130,19 @@ namespace ReportGenerator{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ChangedEvent(object sender, EventArgs e){ |
|
|
|
void ChangedEvent(object sender, EventArgs e){ |
|
|
|
|
|
|
|
|
|
|
|
if (initDone) { |
|
|
|
if (initDone) { |
|
|
|
generator.ReportName = txtReportName.Text; |
|
|
|
generator.ReportName = txtReportName.Text; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.txtFileName.Text.EndsWith(GlobalValues.SharpReportExtension)){ |
|
|
|
|
|
|
|
generator.FileName = txtFileName.Text + GlobalValues.SharpReportExtension; |
|
|
|
|
|
|
|
} else { |
|
|
|
generator.FileName = txtFileName.Text; |
|
|
|
generator.FileName = txtFileName.Text; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
generator.Path = this.txtPath.Text; |
|
|
|
generator.Path = this.txtPath.Text; |
|
|
|
generator.GraphicsUnit = (GraphicsUnit)Enum.Parse(typeof(GraphicsUnit),this.cboGraphicsUnit.Text); |
|
|
|
generator.GraphicsUnit = (GraphicsUnit)Enum.Parse(typeof(GraphicsUnit),this.cboGraphicsUnit.Text); |
|
|
|
SetSuccessor (this,new EventArgs()); |
|
|
|
SetSuccessor (this,new EventArgs()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -155,22 +174,17 @@ namespace ReportGenerator{ |
|
|
|
|
|
|
|
|
|
|
|
///<summary>Browse for Report Folder</summary>
|
|
|
|
///<summary>Browse for Report Folder</summary>
|
|
|
|
void Button1Click(object sender, System.EventArgs e) { |
|
|
|
void Button1Click(object sender, System.EventArgs e) { |
|
|
|
try { |
|
|
|
|
|
|
|
ICSharpCode.SharpDevelop.Gui.FolderDialog ff = new ICSharpCode.SharpDevelop.Gui.FolderDialog(); |
|
|
|
ICSharpCode.SharpDevelop.Gui.FolderDialog ff = new ICSharpCode.SharpDevelop.Gui.FolderDialog(); |
|
|
|
ff.DisplayDialog(String.Empty); |
|
|
|
ff.DisplayDialog(String.Empty); |
|
|
|
if (!String.IsNullOrEmpty(ff.Path)) { |
|
|
|
if (!String.IsNullOrEmpty(ff.Path)) { |
|
|
|
if (!ff.Path.EndsWith(@"\")){ |
|
|
|
if (!ff.Path.EndsWith(@"\")){ |
|
|
|
this.txtPath.Text = ff.Path + @"\"; |
|
|
|
this.txtPath.Text = ff.Path + @"\"; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
this.txtPath.Text = ff.Path; |
|
|
|
this.txtPath.Text = ff.Path; |
|
|
|
} |
|
|
|
} |
|
|
|
generator.Path = this.txtPath.Text; |
|
|
|
generator.Path = this.txtPath.Text; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception ) { |
|
|
|
|
|
|
|
throw ; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#region Windows Forms Designer generated code
|
|
|
|
#region Windows Forms Designer generated code
|
|
|
|
|