public SmartForm()
 {
     this.formProps   = new FormProps();
     this.Load       += new EventHandler(this.SmartFormLoad);
     this.Shown      += new EventHandler(this.SmartFormShown);
     this.FormClosed += new FormClosedEventHandler(this.SmartFormClosed);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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;
     }
 }
Exemple #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;
     }
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }