public FileUploadProgressCtrl(ConfigurationDetails configuration, ServerCommunications communications, Logger logger) { _configuration = configuration; _communications = communications; _logger = logger; InitializeComponent(); }
public MessageHistoryCtrl(ConfigurationDetails configuration, ServerCommunications communications, Logger logger) { _configuration = configuration; _communications = communications; _logger = logger; InitializeComponent(); }
static void Main() { _logger = new Logger(); try { _configuration = new ConfigurationDetails(); _communications = new ServerCommunications(_configuration); } catch (Exception ex) { string msg = string.Format("An error occurred loading configuration. {0}", ex.Message); _logger.LogError(msg); MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MessagesForm(_configuration, _communications, _logger)); }