예제 #1
0
 public FileUploadProgressCtrl(ConfigurationDetails configuration, ServerCommunications communications, Logger logger)
 {
     _configuration  = configuration;
     _communications = communications;
     _logger         = logger;
     InitializeComponent();
 }
예제 #2
0
        public MessageHistoryCtrl(ConfigurationDetails configuration, ServerCommunications communications, Logger logger)
        {
            _configuration  = configuration;
            _communications = communications;
            _logger         = logger;

            InitializeComponent();
        }
예제 #3
0
        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));
        }
 public ServerCommunications(ConfigurationDetails configuration)
 {
     _configuration = configuration;
 }