Example #1
0
        public MainForm()
        {
            InitializeComponent();
            if (log.IsInfoEnabled)
            {
                log.Info("Initializing mainform");
            }

            this.Text = string.Format(this.Text, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
            _worker.WorkerReportsProgress      = true;
            _worker.WorkerSupportsCancellation = true;
            StringCollection args = new StringCollection();

            args.AddRange(Environment.GetCommandLineArgs());
            if (args.Contains("--standalone"))
            {
                string configPath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "AppData");
                _config = new CubeConfig(configPath);
            }
            else
            {
                _config = new CubeConfig();
            }
            _uploader = new UploadManager(_config.DataPath);
            // if we're logging, might as well log some of the DirectShow info as well
            if (Directory.Exists(Path.Combine(_config.DataPath, "logs")))
            {
                camControl.DirectShowLogFilepath = Path.Combine(_config.DataPath, "logs\\DirectShow.log");
            }
        }
Example #2
0
        public ConfigManager(ref CubeConfig config)
        {
            if (log.IsInfoEnabled)
            {
                log.Info("Initializing object");
            }

            InitializeComponent();
            _config = config;
        }
Example #3
0
        public UserEmailDialog(CubeConfig config)
        {
            if (log.IsInfoEnabled)
            {
                log.Info("initializing form");
            }

            InitializeComponent();
            lError.Text         = "";
            _config             = config;
            btnCancel.BackColor = _buttonBackBlue;
            btnOK.BackColor     = _buttonBackBlue;

            btnCancel.ForeColor = _darkTextBlue;
            btnOK.ForeColor     = _darkTextBlue;
        }