コード例 #1
0
ファイル: frmMain.cs プロジェクト: Niveladov/FredroClient
 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
ファイル: frmMails.cs プロジェクト: Niveladov/FredroClient
 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();
     }
 }