示例#1
0
 public SmartForm()
 {
     this.formProps   = new FormProps();
     this.Load       += new EventHandler(this.SmartFormLoad);
     this.Shown      += new EventHandler(this.SmartFormShown);
     this.FormClosed += new FormClosedEventHandler(this.SmartFormClosed);
 }
示例#2
0
 public SmartForm()
 {
     this.formProps = new FormProps();
     this.Load += new EventHandler(this.SmartFormLoad);
     this.Shown += new EventHandler(this.SmartFormShown);
     this.FormClosed += new FormClosedEventHandler(this.SmartFormClosed);
 }
示例#3
0
 public SmartForm()
 {
     this.formProps   = new FormProps();
     this.Load       += new EventHandler(this.SmartFormLoad);
     this.FormClosed += new FormClosedEventHandler(this.SmartFormClosed);
     EventManager.AddEventHandler(this, EventType.ApplyTheme);
     ScaleHelper.AdjustForHighDPI(this);
 }
示例#4
0
 public SmartForm()
 {
     this.formProps = new FormProps();
     this.formGuid = Guid.Empty.ToString().ToUpper();
     this.Load += new EventHandler(this.SmartFormLoad);
     this.Shown += new EventHandler(this.SmartFormShown);
     this.FormClosing += new FormClosingEventHandler(this.SmartFormClosing);
 }
示例#5
0
 public SmartForm()
 {
     this.formProps    = new FormProps();
     this.formGuid     = Guid.Empty.ToString().ToUpper();
     this.Load        += new EventHandler(this.SmartFormLoad);
     this.Shown       += new EventHandler(this.SmartFormShown);
     this.FormClosing += new FormClosingEventHandler(this.SmartFormClosing);
 }
示例#6
0
 /// <summary>
 /// Load the form state from a setting file and applies it
 /// </summary>
 private void SmartFormLoad(Object sender, EventArgs e)
 {
     if (File.Exists(this.FormPropsFile))
     {
         Object obj = ObjectSerializer.Deserialize(this.FormPropsFile, this.formProps);
         this.formProps = (FormProps)obj;
     }
     if (!this.formProps.WindowSize.IsEmpty)
     {
         this.Size = this.formProps.WindowSize;
     }
 }
示例#7
0
 /// <summary>
 /// Load the form state from a setting file and applies it
 /// </summary>
 private void SmartFormLoad(Object sender, EventArgs e)
 {
     if (File.Exists(this.FormPropsFile))
     {
         Object obj = ObjectSerializer.Deserialize(this.FormPropsFile, this.formProps);
         this.formProps = (FormProps)obj;
     }
     if (!this.formProps.WindowSize.IsEmpty)
     {
         this.Size = this.formProps.WindowSize;
     }
 }
示例#8
0
 /// <summary>
 /// Load the form state from a setting file and applies it
 /// </summary>
 private void SmartFormLoad(Object sender, EventArgs e)
 {
     ScaleHelper.AdjustForHighDPI(this);
     if (!String.IsNullOrEmpty(this.formGuid) && File.Exists(this.FormPropsFile))
     {
         Object obj = ObjectSerializer.Deserialize(this.FormPropsFile, this.formProps);
         this.formProps = (FormProps)obj;
         if (!this.formProps.WindowSize.IsEmpty)
         {
             this.Size = this.formProps.WindowSize;
         }
     }
     if (!String.IsNullOrEmpty(this.helpLink))
     {
         this.HelpButton         = true;
         this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.SmartFormHelpButtonClick);
     }
     ApplyProps?.Invoke(this);
 }
示例#9
0
 /// <summary>
 /// Load the form state from a setting file and applies it
 /// </summary>
 private void SmartFormLoad(Object sender, EventArgs e)
 {
     this.ApplyTheming();
     if (this.StartPosition == FormStartPosition.CenterParent)
     {
         this.CenterToParent();
     }
     if (!String.IsNullOrEmpty(this.formGuid) && File.Exists(this.FormPropsFile))
     {
         Object obj = ObjectSerializer.Deserialize(this.FormPropsFile, this.formProps);
         this.formProps = (FormProps)obj;
         if (!this.formProps.WindowSize.IsEmpty && this.FormBorderStyle == FormBorderStyle.Sizable)
         {
             this.Size = this.formProps.WindowSize;
         }
     }
     if (!String.IsNullOrEmpty(this.helpLink))
     {
         this.HelpButton         = true;
         this.HelpButtonClicked += new CancelEventHandler(this.SmartFormHelpButtonClick);
     }
     ApplyProps?.Invoke(this);
 }
示例#10
0
 /// <summary>
 /// Load the form state from a setting file and applies it
 /// </summary>
 private void SmartFormLoad(Object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(this.formGuid) && File.Exists(this.FormPropsFile))
     {
         Object obj = ObjectSerializer.Deserialize(this.FormPropsFile, this.formProps);
         this.formProps = (FormProps)obj;
         if (!this.formProps.WindowSize.IsEmpty)
         {
             this.Size = this.formProps.WindowSize;
         }
     }
     if (!String.IsNullOrEmpty(this.helpLink))
     {
         this.HelpButton = true;
         this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.SmartFormHelpButtonClick);
     }
     if (this.ApplyProps != null) this.ApplyProps(this);
 }