コード例 #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));
        }