상속: IDisposable
예제 #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();
            }
        }
예제 #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();
        }
예제 #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();
            }
        }
예제 #4
0
        public SettingsForm(ClassRegistry classRegistry)
        {
            _classRegistry = classRegistry;

            InitializeComponent();
        }
예제 #5
0
        public SettingsForm(ClassRegistry classRegistry)
        {
            this.ClassRegistry = classRegistry;

            InitializeComponent();
        }