Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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;
     }
 }
Esempio n. 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;
     }
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }