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