コード例 #1
0
 void TorrentUser_StoppedSeeding(TorrentUser sender, EventArgs e)
 {
     SeedTorrents(this.torrentPaths);
     this.StoppedSeeding -= TorrentUser_StoppedSeeding;
 }
コード例 #2
0
 void torrentUser_StatusUpdate(TorrentUser sender, TorrentStatusUpdateEventArgs e)
 {
     statusStripUpdate(sender, e);
 }
コード例 #3
0
 public QuietSeed(MainWindow parent)
 {
     this.parent      = parent;
     this.torrentUser = parent.torrentUser;
 }
コード例 #4
0
        public MainWindow(string[] entryArgs)
        {
            foreach (string arg in entryArgs)
            {
                if (arg.Contains("+dev"))
                {
                    this.devIndex = true;
                }
                if (arg.Contains("+debug"))
                {
                    this.debugMode = true;
                }
            }

            protectionManager = new ProtectionManager(this);

            Application.ApplicationExit += Application_ApplicationExit;

            if (!checkRequirements())
            {
                Environment.Exit(0);
            }

            if (Properties.Settings.Default.firstRun)
            {
                migrateSettings();
            }

            InitializeComponent();
            this.listBox1.DrawItem += listBox1_DrawItem;


            setLocalAppDataFolder();
            this.label3.Text         = "FH2 Community Updater v." + Application.ProductVersion;
            this.toolTip1.ShowAlways = true;
            this.toolTip1.SetToolTip(linkLabel1, @"http://www.forgottenhonor.com/modules.php?name=Forums");

            this.torrentUser = new TorrentUser(this);

            this.torrentUser.StatusUpdate += torrentUser_StatusUpdate;

            while (this.confirmIndex() == false)
            {
                continue;
            }

            BackgroundWorker infoWorker = new BackgroundWorker();

            infoWorker.DoWork += new DoWorkEventHandler(
                delegate(object o, DoWorkEventArgs args)
            {
                this.contentManager = new ContentManager(this, this.workingIndex);
            });

            infoWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
                delegate(object o, RunWorkerCompletedEventArgs args)
            {
                if (args.Error != null)
                {
                    if (args.Error.GetType() == (typeof(XmlException)))
                    {
                        MessageBox.Show("There was an error in the server index.\nIf this error persists, please leave a message on the forums.");
                        Environment.Exit(5);
                    }
                    else
                    {
                        throw args.Error;
                    }
                }
                afterRunWorker();
            });
            var some = unlimitedToolStripMenuItem.GetCurrentParent();

            some.ItemClicked += some_ItemClicked;

            infoWorker.RunWorkerAsync();
        }