Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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;
     }
 }
Exemplo 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;
     }
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }