Exemplo n.º 1
0
 public void OpenForm(bool isFirstOpen)
 {
     if (this.FormState != ClientBaseForm.ClientBaseFormState.Closing)
     {
         this.SetHeaderColor(false);
         if (isFirstOpen)
         {
             this.SetFontToControl(Settings.Default.Default_Font);
             this.isRaiseEventIDoFontChanged = true;
             this.FormState = ClientBaseForm.ClientBaseFormState.Showed;
             if (this._IDoShownDelay != null)
             {
                 this._IDoShownDelay();
             }
         }
         else if (this.FormState != ClientBaseForm.ClientBaseFormState.Opening)
         {
             this.SetAutoRepaint(true);
             if (!ApplicationInfo.IsAreadyLogin)
             {
                 return;
             }
             this.FormState = ClientBaseForm.ClientBaseFormState.Showed;
             this.IsWidthChanged = false;
             if (this.MyFont != Settings.Default.Default_Font)
             {
                 this.isRaiseEventIDoFontChanged = false;
                 this.SetFontToControl(Settings.Default.Default_Font);
                 this.isRaiseEventIDoFontChanged = true;
                 this.IsWidthChanged = true;
             }
             if (this._IDoReActivated != null)
             {
                 Rectangle workingArea = ((frmMain)base.Parent).GetWorkingArea();
                 if (!this.IsWidthChanged)
                 {
                     this.IsWidthChanged = (workingArea.Width > 0 && workingArea.Width != base.Width);
                 }
                 if (this.IsWidthChanged)
                 {
                     base.Width = workingArea.Width;
                 }
                 if (!this.IsHeightChanged)
                 {
                     this.IsHeightChanged = (workingArea.Height > 0 && workingArea.Height != base.Height);
                 }
                 if (this.IsHeightChanged)
                 {
                     base.Height = workingArea.Height;
                 }
                 this._IDoReActivated();
             }
         }
         this.isAllowRender = true;
     }
 }
Exemplo n.º 2
0
 protected override void OnClosing(CancelEventArgs e)
 {
     this.FormState = ClientBaseForm.ClientBaseFormState.Closing;
     this.isLoadingData = true;
     if (this.timerLoading != null)
     {
         this.timerLoading.Enabled = false;
     }
     base.OnClosing(e);
 }
Exemplo n.º 3
0
 public void HideForm()
 {
     this.isAllowRender = false;
     this.FormState = ClientBaseForm.ClientBaseFormState.Hide;
     this.SetAutoRepaint(false);
     this.IsLoadingData = false;
     base.Hide();
 }