Inheritance: IDisposable
Beispiel #1
0
        public Program()
        {
            var firstRun = false;

            InitializeComponent();

            if (Properties.Settings.Default.FirstRun)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.Reload();
                Properties.Settings.Default.FirstRun = false;
                firstRun = true;
            }
            _classRegistry = new ClassRegistry();
            _settingsForm  = new SettingsForm(_classRegistry);

            if (_classRegistry.Config.CheckForUpdates)
            {
                System.Threading.ThreadPool.QueueUserWorkItem(CheckForUpdates);
            }
            _classRegistry.UTorrent.TorrentAdded     += utorrent_TorrentAdded;
            _classRegistry.UTorrent.DownloadComplete += utorrent_DownloadComplete;
            _classRegistry.UTorrent.WebUiError       += utorrent_LogOnError;
            _classRegistry.UTorrent.UpdatedList      += uTorrent_UpdatedList;
            _classRegistry.UTorrent.Start();

            if (firstRun)
            {
                _settingsForm.Show();
            }
        }
Beispiel #2
0
        public Program()
        {
            bool firstRun = false;
            InitializeComponent();

            if (Properties.Settings.Default.FirstRun)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.Reload();
                Properties.Settings.Default.FirstRun = false;
                firstRun = true;
            }
            this.ClassRegistry = new ClassRegistry();
            this.settingsForm = new SettingsForm(this.ClassRegistry);

            if (this.ClassRegistry.Config.CheckForUpdates)
            {
                System.Threading.ThreadPool.QueueUserWorkItem(this.CheckForUpdates);
            }
            this.ClassRegistry.uTorrent.TorrentAdded += new WebUIAPI.TorrentAddedEventHandler(this.utorrent_TorrentAdded);
            this.ClassRegistry.uTorrent.DownloadComplete += new WebUIAPI.DownloadFinishedEventHandler(this.utorrent_DownloadComplete);
            this.ClassRegistry.uTorrent.WebUIError += new WebUIAPI.WebUIErrorEventHandler(this.utorrent_LogOnError);
            this.ClassRegistry.uTorrent.UpdatedList += new WebUIAPI.UpdatedListEventHandler(this.uTorrent_UpdatedList);
            this.ClassRegistry.uTorrent.Start();

            if (firstRun)
                this.settingsForm.Show();
        }
Beispiel #3
0
        public Program()
        {
            bool firstRun = false;

            InitializeComponent();

            if (Properties.Settings.Default.FirstRun)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.Reload();
                Properties.Settings.Default.FirstRun = false;
                firstRun = true;
            }
            this.ClassRegistry = new ClassRegistry();
            this.settingsForm  = new SettingsForm(this.ClassRegistry);

            if (this.ClassRegistry.Config.CheckForUpdates)
            {
                System.Threading.ThreadPool.QueueUserWorkItem(this.CheckForUpdates);
            }
            this.ClassRegistry.uTorrent.TorrentAdded     += new WebUIAPI.TorrentAddedEventHandler(this.utorrent_TorrentAdded);
            this.ClassRegistry.uTorrent.DownloadComplete += new WebUIAPI.DownloadFinishedEventHandler(this.utorrent_DownloadComplete);
            this.ClassRegistry.uTorrent.WebUIError       += new WebUIAPI.WebUIErrorEventHandler(this.utorrent_LogOnError);
            this.ClassRegistry.uTorrent.UpdatedList      += new WebUIAPI.UpdatedListEventHandler(this.uTorrent_UpdatedList);
            this.ClassRegistry.uTorrent.Start();

            if (firstRun)
            {
                this.settingsForm.Show();
            }
        }
        public SettingsForm(ClassRegistry classRegistry)
        {
            _classRegistry = classRegistry;

            InitializeComponent();
        }
        public SettingsForm(ClassRegistry classRegistry)
        {
            this.ClassRegistry = classRegistry;

            InitializeComponent();
        }