예제 #1
0
 public frmMain(TwinkleBaseXtraForm splashScreenForm, Credentials creds)
 {
     InitializeComponent();
     _dragger     = new FormDragger();
     _sliderAgent = new SlidePanelAgent(ucUserInfo.Width);
     try
     {
         //throw new ServerException("Huesos, axaxa!");
         _mainModel = new MainModel();
         ucMails.Init(_mainModel.BOServiceClient, creds);
         ucScheduler.Init(_mainModel.BOServiceClient);
     }
     catch (ServerException ex)
     {
         TwinkleMessageBox.ShowError(ex.Message);
         Load += (s, e) => Close();
         return;
     }
     finally
     {
         splashScreenForm?.Invoke(new Action(() => splashScreenForm.Close()));
         splashScreenForm?.Dispose();
     }
     InitEvents();
     InitStatusStrip();
 }
예제 #2
0
 public frmMails(TwinkleBaseXtraForm splashScreenForm, Credentials creds)
 {
     try
     {
         //throw new Exception("Huesos, axaxa!");
         InitializeComponent();
         //ucMails.Init(creds);
         InitEvents();
     }
     catch (ServerException ex)
     {
         TwinkleMessageBox.ShowError(ex.Message);
     }
     finally
     {
         splashScreenForm?.Invoke(new Action(() => splashScreenForm.Close()));
         splashScreenForm?.Dispose();
     }
 }