/*
* static void ReLayout(Control parent_control)
* {
* foreach (Control control in parent_control.Controls)
* {
* ReLayout(control);
*
* control.ResumeLayout(false);
* control.PerformLayout();
* }
*
* parent_control.ResumeLayout(false);
* }*/
/// <summary>
/// 保存字体设置信息到配置参数存储
/// </summary>
public void SaveFontSetting()
{
if (this.MainForm != null && this.MainForm.AppInfo != null)
{
{
// Create the FontConverter.
System.ComponentModel.TypeConverter converter =
System.ComponentModel.TypeDescriptor.GetConverter(typeof(Font));
string strFontString = converter.ConvertToString(this.Font);
this.MainForm.AppInfo.SetString(
this.FormName,
"default_font",
strFontString);
}
{
// Create the ColorConverter.
System.ComponentModel.TypeConverter converter =
System.ComponentModel.TypeDescriptor.GetConverter(typeof(Color));
string strFontColor = converter.ConvertToString(this.ForeColor);
MainForm.AppInfo.SetString(
this.FormName,
"default_font_color",
strFontColor);
}
}
}