Пример #1
0
        public MainWindow()
        {
            this.InitializeComponent();
            this.importSettingsToolStripMenuItem.Visible = false;
            MainWindow.Instance = this;
            this.DatagridCells();
            this.btnStop.Visible = false;
            this.unlockTumblRipperToolStripMenuItem.Visible = false;
            ToolStripNumberControl str = this.toolStripNumberControl1;
            int maxConcurrentDownloads = Downloader.GetInstance().MaxConcurrentDownloads;

            str.Text = maxConcurrentDownloads.ToString(CultureInfo.InvariantCulture);
            if (TumblRipper2.classes.Settings.GetSettings().Licence == "free")
            {
                this.toolStripNumberControl1.Text    = "1";
                this.toolStripNumberControl1.Visible = false;
                this.toolStripLabel1.Visible         = false;
                this.Text = string.Concat(this.Text, " freeware");
                this.unlockTumblRipperToolStripMenuItem.Visible = true;
            }
            BlogDownloader.GetInstance().DownloadStatusChange += new BlogDownloader.DownloadStatusChangeHandler(this.MainWindow_DownloadStatusChange);
        }
Пример #2
0
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(MainWindow));

            this.tableLayoutPanel1     = new TableLayoutPanel();
            this.toolStrip1            = new ToolStrip();
            this.toolStripButton1      = new ToolStripButton();
            this.toolStripSeparator1   = new ToolStripSeparator();
            this.toolStripSplitButton1 = new ToolStripButton();
            this.toolStripSeparator3   = new ToolStripSeparator();
            this.btnStart                           = new ToolStripButton();
            this.btnStop                            = new ToolStripButton();
            this.toolStripSeparator2                = new ToolStripSeparator();
            this.toolStripLabel1                    = new ToolStripLabel();
            this.toolStripNumberControl1            = new ToolStripNumberControl();
            this.dataGridView1                      = new DataGridView();
            this.contextMenuStrip1                  = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.toolStripMenuItem1                 = new ToolStripMenuItem();
            this.toolStripMenuItem2                 = new ToolStripMenuItem();
            this.toolStripSeparator4                = new ToolStripSeparator();
            this.toolStripMenuItem3                 = new ToolStripMenuItem();
            this.runCompleteScanToolStripMenuItem   = new ToolStripMenuItem();
            this.toolStripSeparator5                = new ToolStripSeparator();
            this.openFolderToolStripMenuItem        = new ToolStripMenuItem();
            this.openSiteToolStripMenuItem          = new ToolStripMenuItem();
            this.statusStrip1                       = new StatusStrip();
            this.menuStrip1                         = new MenuStrip();
            this.fileToolStripMenuItem              = new ToolStripMenuItem();
            this.newToolStripMenuItem               = new ToolStripMenuItem();
            this.settingsToolStripMenuItem          = new ToolStripMenuItem();
            this.exitToolStripMenuItem              = new ToolStripMenuItem();
            this.editToolStripMenuItem              = new ToolStripMenuItem();
            this.editToolStripMenuItem1             = new ToolStripMenuItem();
            this.deleteToolStripMenuItem            = new ToolStripMenuItem();
            this.helpToolStripMenuItem              = new ToolStripMenuItem();
            this.sendDebugInfoToolStripMenuItem     = new ToolStripMenuItem();
            this.aboutToolStripMenuItem             = new ToolStripMenuItem();
            this.importSettingsToolStripMenuItem    = new ToolStripMenuItem();
            this.unlockTumblRipperToolStripMenuItem = new ToolStripMenuItem();
            this.tableLayoutPanel1.SuspendLayout();
            this.toolStrip1.SuspendLayout();
            ((ISupportInitialize)this.dataGridView1).BeginInit();
            this.contextMenuStrip1.SuspendLayout();
            this.menuStrip1.SuspendLayout();
            base.SuspendLayout();
            this.tableLayoutPanel1.ColumnCount = 1;
            this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
            this.tableLayoutPanel1.Controls.Add(this.toolStrip1);
            this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 1);
            this.tableLayoutPanel1.Controls.Add(this.statusStrip1, 0, 2);
            this.tableLayoutPanel1.Dock     = DockStyle.Fill;
            this.tableLayoutPanel1.Location = new Point(0, 24);
            this.tableLayoutPanel1.Name     = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 3;
            this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f));
            this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100f));
            this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
            this.tableLayoutPanel1.Size     = new System.Drawing.Size(773, 340);
            this.tableLayoutPanel1.TabIndex = 0;
            this.toolStrip1.Dock            = DockStyle.Fill;
            this.toolStrip1.GripStyle       = ToolStripGripStyle.Hidden;
            this.toolStrip1.Items.AddRange(new ToolStripItem[] { this.toolStripButton1, this.toolStripSeparator1, this.toolStripSplitButton1, this.toolStripSeparator3, this.btnStart, this.btnStop, this.toolStripSeparator2, this.toolStripLabel1, this.toolStripNumberControl1 });
            this.toolStrip1.Location    = new Point(0, 0);
            this.toolStrip1.Name        = "toolStrip1";
            this.toolStrip1.Size        = new System.Drawing.Size(773, 40);
            this.toolStrip1.TabIndex    = 0;
            this.toolStrip1.Text        = "toolStrip1";
            this.toolStripButton1.Image = (Image)resources.GetObject("toolStripButton1.Image");
            this.toolStripButton1.ImageTransparentColor = Color.Magenta;
            this.toolStripButton1.Name       = "toolStripButton1";
            this.toolStripButton1.Size       = new System.Drawing.Size(93, 37);
            this.toolStripButton1.Text       = "New Tumblr";
            this.toolStripButton1.Click     += new EventHandler(this.newToolStripMenuItem_Click);
            this.toolStripSeparator1.Name    = "toolStripSeparator1";
            this.toolStripSeparator1.Size    = new System.Drawing.Size(6, 40);
            this.toolStripSplitButton1.Image = (Image)resources.GetObject("toolStripSplitButton1.Image");
            this.toolStripSplitButton1.ImageTransparentColor = Color.Magenta;
            this.toolStripSplitButton1.Name   = "toolStripSplitButton1";
            this.toolStripSplitButton1.Size   = new System.Drawing.Size(92, 37);
            this.toolStripSplitButton1.Text   = "Open Folder";
            this.toolStripSplitButton1.Click += new EventHandler(this.toolStripSplitButton1_Click);
            this.toolStripSeparator3.Name     = "toolStripSeparator3";
            this.toolStripSeparator3.Size     = new System.Drawing.Size(6, 40);
            this.btnStart.Image                 = (Image)resources.GetObject("btnStart.Image");
            this.btnStart.ImageScaling          = ToolStripItemImageScaling.None;
            this.btnStart.ImageTransparentColor = Color.Magenta;
            this.btnStart.Name   = "btnStart";
            this.btnStart.Size   = new System.Drawing.Size(48, 37);
            this.btnStart.Text   = "Run";
            this.btnStart.Click += new EventHandler(this.toolStripButton2_Click);
            this.btnStop.Image   = (Image)resources.GetObject("btnStop.Image");
            this.btnStop.ImageTransparentColor = Color.Magenta;
            this.btnStop.Name                              = "btnStop";
            this.btnStop.Size                              = new System.Drawing.Size(51, 37);
            this.btnStop.Text                              = "Stop";
            this.btnStop.Click                            += new EventHandler(this.btnStop_Click);
            this.toolStripSeparator2.Name                  = "toolStripSeparator2";
            this.toolStripSeparator2.Size                  = new System.Drawing.Size(6, 40);
            this.toolStripLabel1.Name                      = "toolStripLabel1";
            this.toolStripLabel1.Size                      = new System.Drawing.Size(106, 37);
            this.toolStripLabel1.Text                      = "Download Threads";
            this.toolStripNumberControl1.Name              = "toolStripNumberControl1";
            this.toolStripNumberControl1.Size              = new System.Drawing.Size(41, 37);
            this.toolStripNumberControl1.Text              = "0";
            this.toolStripNumberControl1.ValueChanged     += new EventHandler(this.toolStripNumberControl1_ValueChanged);
            this.dataGridView1.AllowUserToAddRows          = false;
            this.dataGridView1.AllowUserToDeleteRows       = false;
            this.dataGridView1.AllowUserToOrderColumns     = true;
            this.dataGridView1.AllowUserToResizeRows       = false;
            this.dataGridView1.AutoSizeColumnsMode         = DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridView1.ContextMenuStrip            = this.contextMenuStrip1;
            this.dataGridView1.Dock                        = DockStyle.Fill;
            this.dataGridView1.Location                    = new Point(3, 43);
            this.dataGridView1.Name                        = "dataGridView1";
            this.dataGridView1.ReadOnly                    = true;
            this.dataGridView1.Size                        = new System.Drawing.Size(767, 274);
            this.dataGridView1.TabIndex                    = 1;
            this.dataGridView1.CellDoubleClick            += new DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
            this.dataGridView1.ColumnWidthChanged         += new DataGridViewColumnEventHandler(this.dataGridView1_ColumnWidthChanged);
            this.dataGridView1.DataError                  += new DataGridViewDataErrorEventHandler(this.dataGridView1_DataError);
            this.dataGridView1.KeyDown                    += new KeyEventHandler(this.dataGridView1_KeyDown);
            this.contextMenuStrip1.Items.AddRange(new ToolStripItem[] { this.toolStripMenuItem1, this.toolStripMenuItem2, this.toolStripSeparator4, this.toolStripMenuItem3, this.runCompleteScanToolStripMenuItem, this.toolStripSeparator5, this.openFolderToolStripMenuItem, this.openSiteToolStripMenuItem });
            this.contextMenuStrip1.Name                  = "contextMenuStrip1";
            this.contextMenuStrip1.Size                  = new System.Drawing.Size(178, 148);
            this.contextMenuStrip1.Opening              += new CancelEventHandler(this.contextMenuStrip1_Opening);
            this.toolStripMenuItem1.Name                 = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size                 = new System.Drawing.Size(177, 22);
            this.toolStripMenuItem1.Text                 = "Edit";
            this.toolStripMenuItem1.Click               += new EventHandler(this.toolStripMenuItem1_Click);
            this.toolStripMenuItem2.Name                 = "toolStripMenuItem2";
            this.toolStripMenuItem2.Size                 = new System.Drawing.Size(177, 22);
            this.toolStripMenuItem2.Text                 = "Delete";
            this.toolStripMenuItem2.Click               += new EventHandler(this.toolStripMenuItem2_Click);
            this.toolStripSeparator4.Name                = "toolStripSeparator4";
            this.toolStripSeparator4.Size                = new System.Drawing.Size(174, 6);
            this.toolStripMenuItem3.Name                 = "toolStripMenuItem3";
            this.toolStripMenuItem3.Size                 = new System.Drawing.Size(177, 22);
            this.toolStripMenuItem3.Text                 = "Run Update";
            this.toolStripMenuItem3.Click               += new EventHandler(this.toolStripMenuItem3_Click);
            this.runCompleteScanToolStripMenuItem.Name   = "runCompleteScanToolStripMenuItem";
            this.runCompleteScanToolStripMenuItem.Size   = new System.Drawing.Size(177, 22);
            this.runCompleteScanToolStripMenuItem.Text   = "Run Complete scan";
            this.runCompleteScanToolStripMenuItem.Click += new EventHandler(this.runCompleteScanToolStripMenuItem_Click);
            this.toolStripSeparator5.Name                = "toolStripSeparator5";
            this.toolStripSeparator5.Size                = new System.Drawing.Size(174, 6);
            this.openFolderToolStripMenuItem.Name        = "openFolderToolStripMenuItem";
            this.openFolderToolStripMenuItem.Size        = new System.Drawing.Size(177, 22);
            this.openFolderToolStripMenuItem.Text        = "Open Folder";
            this.openFolderToolStripMenuItem.Click      += new EventHandler(this.openFolderToolStripMenuItem_Click);
            this.openSiteToolStripMenuItem.Name          = "openSiteToolStripMenuItem";
            this.openSiteToolStripMenuItem.Size          = new System.Drawing.Size(177, 22);
            this.openSiteToolStripMenuItem.Text          = "Open Site";
            this.openSiteToolStripMenuItem.Click        += new EventHandler(this.openSiteToolStripMenuItem_Click);
            this.statusStrip1.Location = new Point(0, 320);
            this.statusStrip1.Name     = "statusStrip1";
            this.statusStrip1.Size     = new System.Drawing.Size(773, 20);
            this.statusStrip1.TabIndex = 2;
            this.statusStrip1.Text     = "statusStrip1";
            this.menuStrip1.Items.AddRange(new ToolStripItem[] { this.fileToolStripMenuItem, this.editToolStripMenuItem, this.helpToolStripMenuItem, this.unlockTumblRipperToolStripMenuItem });
            this.menuStrip1.Location = new Point(0, 0);
            this.menuStrip1.Name     = "menuStrip1";
            this.menuStrip1.Size     = new System.Drawing.Size(773, 24);
            this.menuStrip1.TabIndex = 1;
            this.menuStrip1.Text     = "menuStrip1";
            this.fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.newToolStripMenuItem, this.settingsToolStripMenuItem, this.exitToolStripMenuItem });
            this.fileToolStripMenuItem.Name       = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size       = new System.Drawing.Size(37, 20);
            this.fileToolStripMenuItem.Text       = "File";
            this.newToolStripMenuItem.Name        = "newToolStripMenuItem";
            this.newToolStripMenuItem.Size        = new System.Drawing.Size(152, 22);
            this.newToolStripMenuItem.Text        = "New";
            this.newToolStripMenuItem.Click      += new EventHandler(this.newToolStripMenuItem_Click);
            this.settingsToolStripMenuItem.Name   = "settingsToolStripMenuItem";
            this.settingsToolStripMenuItem.Size   = new System.Drawing.Size(152, 22);
            this.settingsToolStripMenuItem.Text   = "Settings";
            this.settingsToolStripMenuItem.Click += new EventHandler(this.settingsToolStripMenuItem_Click);
            this.exitToolStripMenuItem.Name       = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size       = new System.Drawing.Size(152, 22);
            this.exitToolStripMenuItem.Text       = "Exit";
            this.exitToolStripMenuItem.Click     += new EventHandler(this.exitToolStripMenuItem_Click);
            this.editToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.editToolStripMenuItem1, this.deleteToolStripMenuItem });
            this.editToolStripMenuItem.Name     = "editToolStripMenuItem";
            this.editToolStripMenuItem.Size     = new System.Drawing.Size(39, 20);
            this.editToolStripMenuItem.Text     = "Edit";
            this.editToolStripMenuItem1.Name    = "editToolStripMenuItem1";
            this.editToolStripMenuItem1.Size    = new System.Drawing.Size(107, 22);
            this.editToolStripMenuItem1.Text    = "Edit";
            this.editToolStripMenuItem1.Click  += new EventHandler(this.editToolStripMenuItem1_Click);
            this.deleteToolStripMenuItem.Name   = "deleteToolStripMenuItem";
            this.deleteToolStripMenuItem.Size   = new System.Drawing.Size(107, 22);
            this.deleteToolStripMenuItem.Text   = "Delete";
            this.deleteToolStripMenuItem.Click += new EventHandler(this.deleteToolStripMenuItem_Click);
            this.helpToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.sendDebugInfoToolStripMenuItem, this.aboutToolStripMenuItem, this.importSettingsToolStripMenuItem });
            this.helpToolStripMenuItem.Name                = "helpToolStripMenuItem";
            this.helpToolStripMenuItem.Size                = new System.Drawing.Size(44, 20);
            this.helpToolStripMenuItem.Text                = "Help";
            this.sendDebugInfoToolStripMenuItem.Name       = "sendDebugInfoToolStripMenuItem";
            this.sendDebugInfoToolStripMenuItem.Size       = new System.Drawing.Size(162, 22);
            this.sendDebugInfoToolStripMenuItem.Text       = "Send Debug Info";
            this.sendDebugInfoToolStripMenuItem.Click     += new EventHandler(this.sendDebugInfoToolStripMenuItem_Click);
            this.aboutToolStripMenuItem.Name               = "aboutToolStripMenuItem";
            this.aboutToolStripMenuItem.Size               = new System.Drawing.Size(162, 22);
            this.aboutToolStripMenuItem.Text               = "About";
            this.aboutToolStripMenuItem.Click             += new EventHandler(this.aboutToolStripMenuItem_Click);
            this.importSettingsToolStripMenuItem.Name      = "importSettingsToolStripMenuItem";
            this.importSettingsToolStripMenuItem.Size      = new System.Drawing.Size(162, 22);
            this.importSettingsToolStripMenuItem.Text      = "ImportSettings";
            this.importSettingsToolStripMenuItem.Click    += new EventHandler(this.importSettingsToolStripMenuItem_Click);
            this.unlockTumblRipperToolStripMenuItem.Name   = "unlockTumblRipperToolStripMenuItem";
            this.unlockTumblRipperToolStripMenuItem.Size   = new System.Drawing.Size(128, 20);
            this.unlockTumblRipperToolStripMenuItem.Text   = "Unlock TumblRipper";
            this.unlockTumblRipperToolStripMenuItem.Click += new EventHandler(this.unlockTumblRipperToolStripMenuItem_Click);
            this.AllowDrop           = true;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize          = new System.Drawing.Size(773, 364);
            base.Controls.Add(this.tableLayoutPanel1);
            base.Controls.Add(this.menuStrip1);
            base.Icon          = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            base.MainMenuStrip = this.menuStrip1;
            base.Name          = "MainWindow";
            this.Text          = "TumblRipper";
            base.FormClosing  += new FormClosingEventHandler(this.MainWindow_FormClosing);
            base.Load         += new EventHandler(this.MainWindow_Load);
            base.DragDrop     += new DragEventHandler(this.Form1_DragDrop);
            base.DragEnter    += new DragEventHandler(this.Form1_DragEnter);
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            ((ISupportInitialize)this.dataGridView1).EndInit();
            this.contextMenuStrip1.ResumeLayout(false);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }