Inheritance: TorrentXMLHandler
Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            TorrentXMLHandler.Initialize(); //Initialize data source (read XML file)

            timer.Interval = (double)SettingsHandler.GetAutoHandleTime();
            timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
            if(SettingsHandler.GetAutoHandleBool())
                timer.Start();

            Arrow.Visible = false;
            StatusLabel.Visible = false;
            ArrowText.Visible = false;
            notifyIcon.Visible = false;

            dgvh = new DataGridViewHandler(dataGridView);

            tb.RunWorkerCompleted += new RunWorkerCompletedEventHandler(tb_BuildCompleted);
            tb.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChange);
            dgvh.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChange);
            dgvh.RunWorkerCompleted += new RunWorkerCompletedEventHandler(data_RunWorkerCompleted);
            dh.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChange);
            dh.RunWorkerCompleted += new RunWorkerCompletedEventHandler(dh_RunWorkerCompleted);

            try
            {
                if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
                {
                    System.Deployment.Application.ApplicationDeployment ad =
                    System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
                    string version = ad.CurrentVersion.ToString();

                    if (SettingsHandler.GetCurrentVersion().CompareTo(version) < 0)
                    {
                        UpdatedInformationWindow uw = new UpdatedInformationWindow();
                        uw.ShowDialog();
                        SettingsHandler.SetCurrentVersion(version);
                    }
                }
            }
            catch (Exception) { }
        }
Ejemplo n.º 2
0
        /*GENERAL*/
        private void RefreshData()
        {
            Thread.Sleep(100);

            dataGridViewProgressBar.Visible = false;
            StatusLabel.Visible = false;
            ProcessTorrentsButton.Enabled = true;
            RefreshButton.Enabled = true;
            DeleteButton.Enabled = true;

            dgvh.ResumeLayout();

            if (timer.Enabled == false && SettingsHandler.GetAutoHandleBool())
                timer.Start();

            try
            {
                dgvh = new DataGridViewHandler(dataGridView);
            }
            catch { }
        }
Ejemplo n.º 3
0
        private void RefreshData()
        {
            lock (lockingobject)
            {
                dgvh = new DataGridViewHandler(dataGridView);
                dgvh.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChange);
                dgvh.RunWorkerCompleted += new RunWorkerCompletedEventHandler(data_RunWorkerCompleted);

                dataGridViewProgressBar.Visible = false;
                StatusLabel.Visible = false;

                if (timer.Enabled == false)
                    timer.Start();
            }
        }