From: <du...@us...> - 2007-02-01 19:51:15
|
Revision: 74 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=74&view=rev Author: dukus Date: 2007-02-01 11:51:14 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Added proiect saving and opening.Some form design. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Form1.resx trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/OptionForm.Designer.cs trunk/plugins/mpinstaler/MPInstaler/OptionForm.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-01 19:51:14 UTC (rev 74) @@ -28,59 +28,65 @@ /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openProiectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveProiectAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.buildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.windowPluginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.windowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.procesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.subtitleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.tagReadersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.externalPlayersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.skinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.componentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mediaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.fullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.bossview = new System.Windows.Forms.ListView(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); - this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.toolStripComboBox1 = new System.Windows.Forms.ToolStripMenuItem(); - this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.menuStrip1.SuspendLayout(); - this.contextMenuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.components = new System.ComponentModel.Container(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openProiectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveProiectAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.buildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.windowPluginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.windowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.procesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.subtitleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tagReadersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.externalPlayersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.skinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.componentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mediaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.fullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bossview = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripComboBox1 = new System.Windows.Forms.ToolStripMenuItem(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.tabPage_Skin = new System.Windows.Forms.TabPage(); + this.tabPage_Plugin = new System.Windows.Forms.TabPage(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage_Other = new System.Windows.Forms.TabPage(); + this.tabPage_Language = new System.Windows.Forms.TabPage(); + this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.menuStrip1.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.addToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(675, 24); - this.menuStrip1.TabIndex = 1; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(675, 24); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripMenuItem, this.openProiectToolStripMenuItem, this.sToolStripMenuItem, @@ -90,252 +96,314 @@ this.optionsToolStripMenuItem, this.toolStripSeparator2, this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); - this.fileToolStripMenuItem.Text = "File"; - // - // newToolStripMenuItem - // - this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.newToolStripMenuItem.Text = "New Proiect"; - this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); - // - // openProiectToolStripMenuItem - // - this.openProiectToolStripMenuItem.Name = "openProiectToolStripMenuItem"; - this.openProiectToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.openProiectToolStripMenuItem.Text = "Open Proiect .."; - this.openProiectToolStripMenuItem.Click += new System.EventHandler(this.openProiectToolStripMenuItem_Click); - // - // sToolStripMenuItem - // - this.sToolStripMenuItem.Name = "sToolStripMenuItem"; - this.sToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.sToolStripMenuItem.Text = "Save Proiect"; - this.sToolStripMenuItem.Click += new System.EventHandler(this.sToolStripMenuItem_Click); - // - // saveProiectAsToolStripMenuItem - // - this.saveProiectAsToolStripMenuItem.Name = "saveProiectAsToolStripMenuItem"; - this.saveProiectAsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.saveProiectAsToolStripMenuItem.Text = "Save Proiect As.."; - // - // buildToolStripMenuItem - // - this.buildToolStripMenuItem.Name = "buildToolStripMenuItem"; - this.buildToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.buildToolStripMenuItem.Text = "Build"; - this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(165, 6); - // - // optionsToolStripMenuItem - // - this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.optionsToolStripMenuItem.Text = "Options"; - this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(165, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.exitToolStripMenuItem.Text = "Exit"; - // - // addToolStripMenuItem - // - this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.newToolStripMenuItem.Text = "New Proiect"; + this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); + // + // openProiectToolStripMenuItem + // + this.openProiectToolStripMenuItem.Name = "openProiectToolStripMenuItem"; + this.openProiectToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.openProiectToolStripMenuItem.Text = "Open Proiect .."; + this.openProiectToolStripMenuItem.Click += new System.EventHandler(this.openProiectToolStripMenuItem_Click); + // + // sToolStripMenuItem + // + this.sToolStripMenuItem.Name = "sToolStripMenuItem"; + this.sToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.sToolStripMenuItem.Text = "Save Proiect"; + this.sToolStripMenuItem.Click += new System.EventHandler(this.sToolStripMenuItem_Click); + // + // saveProiectAsToolStripMenuItem + // + this.saveProiectAsToolStripMenuItem.Name = "saveProiectAsToolStripMenuItem"; + this.saveProiectAsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.saveProiectAsToolStripMenuItem.Text = "Save Proiect As.."; + this.saveProiectAsToolStripMenuItem.Click += new System.EventHandler(this.saveProiectAsToolStripMenuItem_Click); + // + // buildToolStripMenuItem + // + this.buildToolStripMenuItem.Name = "buildToolStripMenuItem"; + this.buildToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.buildToolStripMenuItem.Text = "Build"; + this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(165, 6); + // + // optionsToolStripMenuItem + // + this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.optionsToolStripMenuItem.Text = "Options"; + this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(165, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.exitToolStripMenuItem.Text = "Exit"; + // + // addToolStripMenuItem + // + this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.windowPluginToolStripMenuItem, this.skinToolStripMenuItem, this.languageToolStripMenuItem}); - this.addToolStripMenuItem.Name = "addToolStripMenuItem"; - this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20); - this.addToolStripMenuItem.Text = "Add"; - // - // windowPluginToolStripMenuItem - // - this.windowPluginToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addToolStripMenuItem.Name = "addToolStripMenuItem"; + this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20); + this.addToolStripMenuItem.Text = "Add"; + // + // windowPluginToolStripMenuItem + // + this.windowPluginToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.windowToolStripMenuItem, this.procesToolStripMenuItem, this.subtitleToolStripMenuItem, this.tagReadersToolStripMenuItem, this.externalPlayersToolStripMenuItem}); - this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; - this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); - this.windowPluginToolStripMenuItem.Text = "Plugin"; - // - // windowToolStripMenuItem - // - this.windowToolStripMenuItem.Name = "windowToolStripMenuItem"; - this.windowToolStripMenuItem.Size = new System.Drawing.Size(160, 22); - this.windowToolStripMenuItem.Text = "Window"; - this.windowToolStripMenuItem.Click += new System.EventHandler(this.windowToolStripMenuItem_Click); - // - // procesToolStripMenuItem - // - this.procesToolStripMenuItem.Name = "procesToolStripMenuItem"; - this.procesToolStripMenuItem.Size = new System.Drawing.Size(160, 22); - this.procesToolStripMenuItem.Text = "Process"; - this.procesToolStripMenuItem.Click += new System.EventHandler(this.procesToolStripMenuItem_Click); - // - // subtitleToolStripMenuItem - // - this.subtitleToolStripMenuItem.Name = "subtitleToolStripMenuItem"; - this.subtitleToolStripMenuItem.Size = new System.Drawing.Size(160, 22); - this.subtitleToolStripMenuItem.Text = "Subtitle"; - this.subtitleToolStripMenuItem.Click += new System.EventHandler(this.subtitleToolStripMenuItem_Click); - // - // tagReadersToolStripMenuItem - // - this.tagReadersToolStripMenuItem.Name = "tagReadersToolStripMenuItem"; - this.tagReadersToolStripMenuItem.Size = new System.Drawing.Size(160, 22); - this.tagReadersToolStripMenuItem.Text = "TagReaders"; - this.tagReadersToolStripMenuItem.Click += new System.EventHandler(this.tagReadersToolStripMenuItem_Click); - // - // externalPlayersToolStripMenuItem - // - this.externalPlayersToolStripMenuItem.Name = "externalPlayersToolStripMenuItem"; - this.externalPlayersToolStripMenuItem.Size = new System.Drawing.Size(160, 22); - this.externalPlayersToolStripMenuItem.Text = "ExternalPlayers"; - this.externalPlayersToolStripMenuItem.Click += new System.EventHandler(this.externalPlayersToolStripMenuItem_Click); - // - // skinToolStripMenuItem - // - this.skinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.windowPluginToolStripMenuItem.Text = "Plugin"; + // + // windowToolStripMenuItem + // + this.windowToolStripMenuItem.Name = "windowToolStripMenuItem"; + this.windowToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.windowToolStripMenuItem.Text = "Window"; + this.windowToolStripMenuItem.Click += new System.EventHandler(this.windowToolStripMenuItem_Click); + // + // procesToolStripMenuItem + // + this.procesToolStripMenuItem.Name = "procesToolStripMenuItem"; + this.procesToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.procesToolStripMenuItem.Text = "Process"; + this.procesToolStripMenuItem.Click += new System.EventHandler(this.procesToolStripMenuItem_Click); + // + // subtitleToolStripMenuItem + // + this.subtitleToolStripMenuItem.Name = "subtitleToolStripMenuItem"; + this.subtitleToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.subtitleToolStripMenuItem.Text = "Subtitle"; + this.subtitleToolStripMenuItem.Click += new System.EventHandler(this.subtitleToolStripMenuItem_Click); + // + // tagReadersToolStripMenuItem + // + this.tagReadersToolStripMenuItem.Name = "tagReadersToolStripMenuItem"; + this.tagReadersToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.tagReadersToolStripMenuItem.Text = "TagReaders"; + this.tagReadersToolStripMenuItem.Click += new System.EventHandler(this.tagReadersToolStripMenuItem_Click); + // + // externalPlayersToolStripMenuItem + // + this.externalPlayersToolStripMenuItem.Name = "externalPlayersToolStripMenuItem"; + this.externalPlayersToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.externalPlayersToolStripMenuItem.Text = "ExternalPlayers"; + this.externalPlayersToolStripMenuItem.Click += new System.EventHandler(this.externalPlayersToolStripMenuItem_Click); + // + // skinToolStripMenuItem + // + this.skinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.componentToolStripMenuItem, this.mediaToolStripMenuItem, this.fullToolStripMenuItem}); - this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; - this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); - this.skinToolStripMenuItem.Text = "Skin"; - // - // componentToolStripMenuItem - // - this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; - this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); - this.componentToolStripMenuItem.Text = "Component"; - this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); - // - // mediaToolStripMenuItem - // - this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; - this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); - this.mediaToolStripMenuItem.Text = "Media"; - this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); - // - // fullToolStripMenuItem - // - this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; - this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); - this.fullToolStripMenuItem.Text = "Full"; - this.fullToolStripMenuItem.Visible = false; - // - // languageToolStripMenuItem - // - this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); - this.languageToolStripMenuItem.Text = "Language"; - this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); - // - // bossview - // - this.bossview.CheckBoxes = true; - this.bossview.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; + this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.skinToolStripMenuItem.Text = "Skin"; + // + // componentToolStripMenuItem + // + this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; + this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.componentToolStripMenuItem.Text = "Component"; + this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); + // + // mediaToolStripMenuItem + // + this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; + this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.mediaToolStripMenuItem.Text = "Media"; + this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); + // + // fullToolStripMenuItem + // + this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; + this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.fullToolStripMenuItem.Text = "Full"; + this.fullToolStripMenuItem.Visible = false; + // + // languageToolStripMenuItem + // + this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; + this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.languageToolStripMenuItem.Text = "Language"; + this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); + // + // bossview + // + this.bossview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.bossview.CheckBoxes = true; + this.bossview.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, this.columnHeader3, this.columnHeader4, this.columnHeader5}); - this.bossview.ContextMenuStrip = this.contextMenuStrip1; - this.bossview.FullRowSelect = true; - this.bossview.GridLines = true; - this.bossview.Location = new System.Drawing.Point(12, 40); - this.bossview.Name = "bossview"; - this.bossview.Size = new System.Drawing.Size(663, 267); - this.bossview.TabIndex = 2; - this.bossview.UseCompatibleStateImageBehavior = false; - this.bossview.View = System.Windows.Forms.View.Details; - // - // columnHeader1 - // - this.columnHeader1.Text = "File"; - this.columnHeader1.Width = 116; - // - // columnHeader2 - // - this.columnHeader2.Text = "Type"; - this.columnHeader2.Width = 115; - // - // columnHeader3 - // - this.columnHeader3.Text = "Subtype"; - this.columnHeader3.Width = 108; - // - // columnHeader4 - // - this.columnHeader4.Text = "Path"; - this.columnHeader4.Width = 170; - // - // columnHeader5 - // - this.columnHeader5.Text = "Id"; - // - // contextMenuStrip1 - // - this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bossview.ContextMenuStrip = this.contextMenuStrip1; + this.bossview.FullRowSelect = true; + this.bossview.GridLines = true; + this.bossview.Location = new System.Drawing.Point(12, 40); + this.bossview.Name = "bossview"; + this.bossview.Size = new System.Drawing.Size(663, 227); + this.bossview.TabIndex = 2; + this.bossview.UseCompatibleStateImageBehavior = false; + this.bossview.View = System.Windows.Forms.View.Details; + this.bossview.SelectedIndexChanged += new System.EventHandler(this.bossview_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "File"; + this.columnHeader1.Width = 116; + // + // columnHeader2 + // + this.columnHeader2.Text = "Type"; + this.columnHeader2.Width = 115; + // + // columnHeader3 + // + this.columnHeader3.Text = "Subtype"; + this.columnHeader3.Width = 108; + // + // columnHeader4 + // + this.columnHeader4.Text = "Source"; + this.columnHeader4.Width = 170; + // + // columnHeader5 + // + this.columnHeader5.Text = "Id"; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripComboBox1}); - this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(153, 48); - // - // toolStripComboBox1 - // - this.toolStripComboBox1.Name = "toolStripComboBox1"; - this.toolStripComboBox1.Size = new System.Drawing.Size(152, 22); - this.toolStripComboBox1.Text = "Remove"; - this.toolStripComboBox1.Click += new System.EventHandler(this.toolStripComboBox1_Click); - // - // openFileDialog1 - // - this.openFileDialog1.Filter = "\"Dll files|*.dll|All files|*.*\""; - // - // saveFileDialog1 - // - this.saveFileDialog1.DefaultExt = "xml"; - // - // groupBox1 - // - this.groupBox1.Location = new System.Drawing.Point(213, 322); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(450, 97); - this.groupBox1.TabIndex = 3; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Properties"; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(675, 431); - this.Controls.Add(this.bossview); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.Name = "Form1"; - this.Text = "Form1"; - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.contextMenuStrip1.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(125, 26); + // + // toolStripComboBox1 + // + this.toolStripComboBox1.Name = "toolStripComboBox1"; + this.toolStripComboBox1.Size = new System.Drawing.Size(124, 22); + this.toolStripComboBox1.Text = "Remove"; + this.toolStripComboBox1.Click += new System.EventHandler(this.toolStripComboBox1_Click); + // + // openFileDialog1 + // + this.openFileDialog1.Filter = "\"Dll files|*.dll|All files|*.*\""; + // + // saveFileDialog1 + // + this.saveFileDialog1.CreatePrompt = true; + this.saveFileDialog1.DefaultExt = "xml"; + this.saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + // + // tabPage_Skin + // + this.tabPage_Skin.Location = new System.Drawing.Point(4, 22); + this.tabPage_Skin.Name = "tabPage_Skin"; + this.tabPage_Skin.Padding = new System.Windows.Forms.Padding(3); + this.tabPage_Skin.Size = new System.Drawing.Size(643, 120); + this.tabPage_Skin.TabIndex = 1; + this.tabPage_Skin.Text = "Properties"; + this.tabPage_Skin.UseVisualStyleBackColor = true; + // + // tabPage_Plugin + // + this.tabPage_Plugin.Location = new System.Drawing.Point(4, 22); + this.tabPage_Plugin.Name = "tabPage_Plugin"; + this.tabPage_Plugin.Padding = new System.Windows.Forms.Padding(3); + this.tabPage_Plugin.Size = new System.Drawing.Size(643, 120); + this.tabPage_Plugin.TabIndex = 0; + this.tabPage_Plugin.Text = "Properties"; + this.tabPage_Plugin.UseVisualStyleBackColor = true; + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage_Plugin); + this.tabControl1.Controls.Add(this.tabPage_Skin); + this.tabControl1.Controls.Add(this.tabPage_Other); + this.tabControl1.Controls.Add(this.tabPage_Language); + this.tabControl1.Controls.Add(this.tabPage_Proiect); + this.tabControl1.Location = new System.Drawing.Point(12, 273); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(651, 146); + this.tabControl1.TabIndex = 3; + // + // tabPage_Other + // + this.tabPage_Other.Location = new System.Drawing.Point(4, 22); + this.tabPage_Other.Name = "tabPage_Other"; + this.tabPage_Other.Size = new System.Drawing.Size(643, 120); + this.tabPage_Other.TabIndex = 2; + this.tabPage_Other.Text = "Properties"; + this.tabPage_Other.UseVisualStyleBackColor = true; + // + // tabPage_Language + // + this.tabPage_Language.Location = new System.Drawing.Point(4, 22); + this.tabPage_Language.Name = "tabPage_Language"; + this.tabPage_Language.Size = new System.Drawing.Size(643, 120); + this.tabPage_Language.TabIndex = 3; + this.tabPage_Language.Text = "Properties"; + this.tabPage_Language.UseVisualStyleBackColor = true; + // + // tabPage_Proiect + // + this.tabPage_Proiect.Location = new System.Drawing.Point(4, 22); + this.tabPage_Proiect.Name = "tabPage_Proiect"; + this.tabPage_Proiect.Size = new System.Drawing.Size(643, 120); + this.tabPage_Proiect.TabIndex = 4; + this.tabPage_Proiect.Text = "Proiect Properties"; + this.tabPage_Proiect.UseVisualStyleBackColor = true; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(675, 431); + this.Controls.Add(this.bossview); + this.Controls.Add(this.tabControl1); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.contextMenuStrip1.ResumeLayout(false); + this.tabControl1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -373,8 +441,13 @@ private System.Windows.Forms.SaveFileDialog saveFileDialog1; private System.Windows.Forms.ToolStripMenuItem languageToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem buildToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem toolStripComboBox1; - private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ToolStripMenuItem toolStripComboBox1; + private System.Windows.Forms.TabPage tabPage_Skin; + private System.Windows.Forms.TabPage tabPage_Plugin; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage_Other; + private System.Windows.Forms.TabPage tabPage_Language; + private System.Windows.Forms.TabPage tabPage_Proiect; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-01 19:51:14 UTC (rev 74) @@ -11,239 +11,290 @@ namespace MPInstaler { - public partial class Form1 : Form - { - private MPinstalerStruct _struct = new MPinstalerStruct(); - public Form1() + public partial class Form1 : Form { - InitializeComponent(); - } + private MPinstalerStruct _struct = new MPinstalerStruct(); + private string proiect_file_name = "Untitled"; + public Form1() + { + InitializeComponent(); + } - private void button1_Click(object sender, EventArgs e) - { - } + private void button1_Click(object sender, EventArgs e) + { + } - private void sToolStripMenuItem_Click(object sender, EventArgs e) - { - Stream myStream; + private void sToolStripMenuItem_Click(object sender, EventArgs e) + { + saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + if (Path.GetFileName(proiect_file_name) == "Untitled") + { + if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) + { + proiect_file_name = saveFileDialog1.FileName; + save_proiect_file(proiect_file_name); + } + } else save_proiect_file(proiect_file_name); + } - if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) - { - if ((myStream = saveFileDialog1.OpenFile()) != null) + private void windowToolStripMenuItem_Click(object sender, EventArgs e) { - // Code to write the stream goes here. - XmlDocument doc = new XmlDocument(); - XmlWriter writer = null; - _struct.AddFileList(bossview); - try - { - // Create an XmlWriterSettings object with the correct options. - XmlWriterSettings settings = new XmlWriterSettings(); - string st = string.Empty; - settings.Indent = true; - settings.IndentChars = ("\t"); - settings.OmitXmlDeclaration = true; - // Create the XmlWriter object and write some content. - writer = XmlWriter.Create(myStream, settings); - writer.WriteStartElement("MPinstaler"); - writer.WriteElementString("ver", "1.00.000"); - writer.WriteStartElement("FileList"); - for (int i = 0; i < _struct.FileList.Count; i++) + addplugin(1); + } + + private void addplugin(int type) + { + /* + 1 - 10 PLUGINS + 1 - window + 2 - process + 3 - subtitle + 4 - tagreader + 5 - external player + */ + string fil; + openFileDialog1.Filter = "Dll files|*.dll|All files|*.*"; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) { - MPIFileList it=(MPIFileList)_struct.FileList[i]; - writer.WriteStartElement("File"); - writer.WriteElementString("FileName",Path.GetFileName(it.FileName)); - writer.WriteElementString("Type", it.Type); - writer.WriteElementString("SubType", it.SubType); - writer.WriteElementString("Path", Path.GetDirectoryName(it.FileName)); - writer.WriteElementString("Id", it.ID); - writer.WriteEndElement(); - st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; + fil = openFileDialog1.FileName; + switch (type) + { + case 1: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_WINDOW_SUBTYPE, Path.GetFullPath(fil), "01010"); + break; + case 2: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PROCESS_SUBTYPE, Path.GetFullPath(fil), "01020"); + break; + case 3: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_SUBTITLE_SUBTYPE, Path.GetFullPath(fil), "01030"); + break; + case 4: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_TAGREADER_SUBTYPE, Path.GetFullPath(fil), "01040"); + break; + case 5: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PLAYER_SUBTYPE, Path.GetFullPath(fil), "01050"); + break; + default: + break; + } } - writer.WriteEndElement(); - writer.WriteStartElement("Option"); - writer.WriteElementString("BuildFileName", _struct.BuildFileName); - writer.WriteEndElement(); - writer.WriteEndElement(); - writer.Flush(); + } - //------------------------------------- - //------------------------------------- - } - finally - { - if (writer != null) - writer.Close(); - } - myStream.Close(); + private void addskin(int type) + { + // string fil; + openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; + openFileDialog1.Multiselect = true; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + foreach (string fil in openFileDialog1.FileNames) + switch (type) + { + case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02010"); + break; + case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02020"); + break; + default: + break; + } + } + } + private void subtitleToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(3); } - } + private void procesToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(2); + } - } + private void tagReadersToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(4); + } - private void windowToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(1); - } + private void externalPlayersToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(5); + } - private void addplugin(int type) - { - /* - 1 - 10 PLUGINS - 1 - window - 2 - process - 3 - subtitle - 4 - tagreader - 5 - external player - */ - string fil; - openFileDialog1.Filter = "Dll files|*.dll|All files|*.*"; - if (openFileDialog1.ShowDialog(this) == DialogResult.OK) - { - fil = openFileDialog1.FileName; - switch (type) + private void addrow(string file, string type, string subtype, string path, string id) { - case 1: - addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_WINDOW_SUBTYPE, Path.GetDirectoryName(fil), "01010"); - break; - case 2: - addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PROCESS_SUBTYPE, Path.GetDirectoryName(fil), "01020"); - break; - case 3: - addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_SUBTITLE_SUBTYPE, Path.GetDirectoryName(fil), "01030"); - break; - case 4: - addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_TAGREADER_SUBTYPE, Path.GetDirectoryName(fil), "01040"); - break; - case 5: - addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PLAYER_SUBTYPE, Path.GetDirectoryName(fil), "01050"); - break; - default: - break; + ListViewItem item1 = new ListViewItem(file, 0); + item1.SubItems.Add(type); + item1.SubItems.Add(subtype); + item1.SubItems.Add(path); + item1.SubItems.Add(id); + bossview.Items.AddRange(new ListViewItem[] { item1 }); } - } - } - private void addskin(int type) - { -// string fil; - openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; - openFileDialog1.Multiselect = true; - if (openFileDialog1.ShowDialog(this) == DialogResult.OK) - { - foreach(string fil in openFileDialog1.FileNames) - switch (type) + private void openProiectToolStripMenuItem_Click(object sender, EventArgs e) { - case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetDirectoryName(fil), "02010"); - break; - case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetDirectoryName(fil), "02020"); - break; - default: - break; + string fil; + openFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + fil = openFileDialog1.FileName; + XmlDocument doc = new XmlDocument(); + doc.Load(fil); + XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); + bossview.Items.Clear(); + XmlNodeList fileList = ver.SelectNodes("FileList/File"); + foreach (XmlNode nodefile in fileList) + { + addrow(nodefile.SelectSingleNode("FileName").InnerText, + nodefile.SelectSingleNode("Type").InnerText, + nodefile.SelectSingleNode("SubType").InnerText, + nodefile.SelectSingleNode("Source").InnerText, + nodefile.SelectSingleNode("Id").InnerText); + } + _struct.BuildFileName = ver.SelectSingleNode("Option/BuildFileName").InnerText; + _struct.ProiectdFileName = fil; + } + _struct.AddFileList(bossview); } - } - } - private void subtitleToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(3); - } + private void languageToolStripMenuItem_Click(object sender, EventArgs e) + { + Form2 StrForm = new Form2(); + StrForm.ShowDialog(); + } - private void procesToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(2); - } + private void optionsToolStripMenuItem_Click(object sender, EventArgs e) + { + OptionForm opForm = new OptionForm(); + opForm.ShowDialog(); + } - private void tagReadersToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(4); - } + private void buildToolStripMenuItem_Click(object sender, EventArgs e) + { + Build_dialog buildfrm = new Build_dialog(this._struct); + buildfrm.ShowDialog(); + this._struct = buildfrm._struct; + } - private void externalPlayersToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(5); - } + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + bossview.Items.Clear(); + _struct.Clear(); + } - private void addrow(string file, string type, string subtype, string path, string id) - { - ListViewItem item1 = new ListViewItem(file, 0); - item1.SubItems.Add(type); - item1.SubItems.Add(subtype); - item1.SubItems.Add(path); - item1.SubItems.Add(id); - bossview.Items.AddRange(new ListViewItem[] { item1 }); - } - - private void openProiectToolStripMenuItem_Click(object sender, EventArgs e) - { - string fil; - openFileDialog1.Filter = "XML files|*.xml|All files|*.*"; - if (openFileDialog1.ShowDialog(this) == DialogResult.OK) - { - fil = openFileDialog1.FileName; - XmlDocument doc = new XmlDocument(); - doc.Load(fil); - XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); - bossview.Items.Clear(); - XmlNodeList fileList = ver.SelectNodes("FileList/File"); - foreach (XmlNode nodefile in fileList) + private void componentToolStripMenuItem_Click(object sender, EventArgs e) { - addrow(nodefile.SelectSingleNode("FileName").InnerText, - nodefile.SelectSingleNode("Type").InnerText, - nodefile.SelectSingleNode("SubType").InnerText, - nodefile.SelectSingleNode("Path").InnerText, - nodefile.SelectSingleNode("Id").InnerText); + addskin(1); } - _struct.BuildFileName=ver.SelectSingleNode("Option/BuildFileName").InnerText; - } - _struct.AddFileList(bossview); - } - private void languageToolStripMenuItem_Click(object sender, EventArgs e) - { - Form2 StrForm = new Form2(); - StrForm.ShowDialog(); - } + private void mediaToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(2); + } - private void optionsToolStripMenuItem_Click(object sender, EventArgs e) - { - OptionForm opForm = new OptionForm(); - opForm.ShowDialog(); - } + private void toolStripComboBox1_Click(object sender, EventArgs e) + { + for (int i = 0; i < bossview.Items.Count; i++) + if (bossview.Items[i].Selected) bossview.Items.RemoveAt(i); + } - private void buildToolStripMenuItem_Click(object sender, EventArgs e) - { - Build_dialog buildfrm = new Build_dialog(this._struct); - buildfrm.ShowDialog(); - this._struct = buildfrm._struct; - } + private void save_proiect_file(string fil) + { + Stream myStream; + if ((myStream = File.Open(fil,FileMode.Create, FileAccess.Write, FileShare.None)) != null) + { + // Code to write the stream goes here. + XmlDocument doc = new XmlDocument(); + XmlWriter writer = null; + _struct.AddFileList(bossview); + try + { + // Create an XmlWriterSettings object with the correct options. + XmlWriterSettings settings = new XmlWriterSettings(); + string st = string.Empty; + settings.Indent = true; + settings.IndentChars = ("\t"); + settings.OmitXmlDeclaration = true; + // Create the XmlWriter object and write some content. + writer = XmlWriter.Create(myStream, settings); + writer.WriteStartElement("MPinstaler"); + writer.WriteElementString("ver", "1.00.000"); + writer.WriteStartElement("FileList"); + for (int i = 0; i < _struct.FileList.Count; i++) + { + MPIFileList it = (MPIFileList)_struct.FileList[i]; + writer.WriteStartElement("File"); + writer.WriteElementString("FileName", Path.GetFileName(it.FileName)); + writer.WriteElementString("Type", it.Type); + writer.WriteElementString("SubType", it.SubType); + writer.WriteElementString("Source", Path.GetFullPath(it.FileName)); + writer.WriteElementString("Id", it.ID); + writer.WriteEndElement(); + st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; + } + writer.WriteEndElement(); + writer.WriteStartElement("Option"); + writer.WriteElementString("BuildFileName", _struct.BuildFileName); + writer.WriteElementString("ProiectFileName", Path.GetFullPath(_struct.ProiectdFileName)); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.Flush(); - private void newToolStripMenuItem_Click(object sender, EventArgs e) - { - bossview.Items.Clear(); - _struct.Clear(); - } + //------------------------------------- + //------------------------------------- + } + finally + { + if (writer != null) + writer.Close(); + } + myStream.Close(); - private void componentToolStripMenuItem_Click(object sender, EventArgs e) - { - addskin(1); - } + } - private void mediaToolStripMenuItem_Click(object sender, EventArgs e) - { - addskin(2); - } + } - private void toolStripComboBox1_Click(object sender, EventArgs e) - { - for (int i = 0; i < bossview.Items.Count; i++) - if (bossview.Items[i].Selected) bossview.Items.RemoveAt(i); - } + private void saveProiectAsToolStripMenuItem_Click(object sender, EventArgs e) + { + saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) + { + proiect_file_name = saveFileDialog1.FileName; + _struct.ProiectdFileName = proiect_file_name; + save_proiect_file(proiect_file_name); + } + } + private void Form1_Load(object sender, EventArgs e) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Proiect); + } + private void bossview_SelectedIndexChanged(object sender, EventArgs e) + { + if (bossview.SelectedItems.Count > 0) + { + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.PLUGIN_TYPE) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Plugin); + tabControl1.Controls.Add(tabPage_Proiect); + } + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_TYPE) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Skin); + tabControl1.Controls.Add(tabPage_Proiect); + } + } + else + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Proiect); + } - } + } + + } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-02-01 19:51:14 UTC (rev 74) @@ -127,6 +127,6 @@ <value>271, 17</value> </metadata> <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>401, 17</value> + <value>397, 17</value> </metadata> </root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user 2007-02-01 19:51:14 UTC (rev 74) @@ -12,5 +12,9 @@ <ApplicationRevision>1</ApplicationRevision> <FallbackCulture>en-US</FallbackCulture> <VerifyUploadedFiles>false</VerifyUploadedFiles> + <EnableSecurityDebugging>false</EnableSecurityDebugging> </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <EnableUnmanagedDebugging>true</EnableUnmanagedDebugging> + </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-01 19:51:14 UTC (rev 74) @@ -26,6 +26,7 @@ public const string SKIN_XML_SUBTYPE = "Genskin"; string _builFileName = string.Empty; + string _proiectFileName = string.Empty; public ArrayList FileList = new ArrayList(); public MPinstalerStruct() { @@ -36,13 +37,18 @@ get { return _builFileName; } set { _builFileName = value; } } + public string ProiectdFileName + { + get { return _proiectFileName; } + set { _proiectFileName = value; } + } public void AddFileList(ListView lst) { FileList.Clear(); for (int i = 0; i < lst.Items.Count; i++) { - FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text + @"\" + lst.Items[i].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); + FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); } } public void Clear() @@ -59,10 +65,10 @@ foreach (MPIFileList file in FileList) { + MessageBox.Show(file.FileName); if (!string.IsNullOrEmpty(file.FileName)&&File.Exists(file.FileName)) { FileStream fs = File.OpenRead(Path.GetFullPath(file.FileName)); - byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length); @@ -74,6 +80,18 @@ } } + if (File.Exists(ProiectdFileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); + byte[] buffer = new byte[fs.Length... [truncated message content] |
From: <du...@us...> - 2007-02-03 17:49:21
|
Revision: 85 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=85&view=rev Author: dukus Date: 2007-02-03 09:49:17 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Build form remaked Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs 2007-02-03 07:03:39 UTC (rev 84) +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs 2007-02-03 17:49:17 UTC (rev 85) @@ -28,81 +28,106 @@ /// </summary> private void InitializeComponent() { - this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // saveFileDialog1 - // - this.saveFileDialog1.DefaultExt = "mpi"; - this.saveFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*"; - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(12, 23); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(484, 20); - this.textBox1.TabIndex = 0; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(9, 7); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(58, 13); - this.label1.TabIndex = 1; - this.label1.Text = "File name :"; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(502, 23); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(27, 23); - this.button1.TabIndex = 2; - this.button1.Text = "..."; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(12, 136); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 3; - this.button2.Text = "Build"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // button3 - // - this.button3.Location = new System.Drawing.Point(421, 136); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 23); - this.button3.TabIndex = 4; - this.button3.Text = "OK"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); - // - // Build_dialog - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(537, 171); - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.label1); - this.Controls.Add(this.textBox1); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "Build_dialog"; - this.Text = "Build"; - this.ResumeLayout(false); - this.PerformLayout(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.SuspendLayout(); + // + // saveFileDialog1 + // + this.saveFileDialog1.DefaultExt = "mpi"; + this.saveFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(12, 23); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(452, 20); + this.textBox1.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(9, 7); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(58, 13); + this.label1.TabIndex = 1; + this.label1.Text = "File name :"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(469, 20); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(27, 23); + this.button1.TabIndex = 2; + this.button1.Text = "..."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(12, 220); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 3; + this.button2.Text = "Build"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(421, 220); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 4; + this.button3.Text = "Close"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // listBox1 + // + this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listBox1.FormattingEnabled = true; + this.listBox1.HorizontalScrollbar = true; + this.listBox1.Location = new System.Drawing.Point(12, 54); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(484, 134); + this.listBox1.TabIndex = 5; + // + // progressBar1 + // + this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.progressBar1.Location = new System.Drawing.Point(12, 198); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(484, 16); + this.progressBar1.TabIndex = 6; + // + // Build_dialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(502, 255); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.label1); + this.Controls.Add(this.textBox1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Build_dialog"; + this.Text = "Build"; + this.Load += new System.EventHandler(this.Build_dialog_Load); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -114,5 +139,7 @@ private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.ProgressBar progressBar1; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-02-03 07:03:39 UTC (rev 84) +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-02-03 17:49:17 UTC (rev 85) @@ -40,11 +40,16 @@ private void button2_Click(object sender, EventArgs e) { _struct.BuildFileName = textBox1.Text; - _struct.BuilFile(); + _struct.BuilFile(listBox1,progressBar1); } public void onbuild() { } + + private void Build_dialog_Load(object sender, EventArgs e) + { + listBox1.Items.Clear(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-03 07:03:39 UTC (rev 84) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-03 17:49:17 UTC (rev 85) @@ -12,169 +12,193 @@ namespace MPInstaler { - public class MPinstalerStruct - { - - public const string PLUGIN_TYPE = "Plugin"; - public const string PLUGIN_WINDOW_SUBTYPE = "Window"; - public const string PLUGIN_PROCESS_SUBTYPE = "Process"; - public const string PLUGIN_SUBTITLE_SUBTYPE = "Subtitle"; - public const string PLUGIN_TAGREADER_SUBTYPE = "TagReader"; - public const string PLUGIN_PLAYER_SUBTYPE = "External Player"; - public const string SKIN_TYPE = "Skin"; - public const string SKIN_MEDIA_TYPE = "Media"; - public const string SKIN_XML_SUBTYPE = "Genskin"; - - string _builFileName = string.Empty; - string _proiectFileName = string.Empty; - public ArrayList FileList = new ArrayList(); - public MPinstalerStruct() - { - - } - public string BuildFileName + public class MPinstalerStruct { - get { return _builFileName; } - set { _builFileName = value; } - } - public string ProiectdFileName - { - get { return _proiectFileName; } - set { _proiectFileName = value; } - } - - public void AddFileList(ListView lst) - { - FileList.Clear(); - for (int i = 0; i < lst.Items.Count; i++) - { - FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); - } - } - public void Clear() - { - FileList.Clear(); - BuildFileName = string.Empty; - } - public void BuilFile() - { - ZipOutputStream s = new ZipOutputStream(File.Create(_builFileName)); + public const string PLUGIN_TYPE = "Plugin"; + public const string PLUGIN_WINDOW_SUBTYPE = "Window"; + public const string PLUGIN_PROCESS_SUBTYPE = "Process"; + public const string PLUGIN_SUBTITLE_SUBTYPE = "Subtitle"; + public const string PLUGIN_TAGREADER_SUBTYPE = "TagReader"; + public const string PLUGIN_PLAYER_SUBTYPE = "External Player"; + public const string SKIN_TYPE = "Skin"; + public const string SKIN_MEDIA_TYPE = "Media"; + public const string SKIN_XML_SUBTYPE = "Genskin"; - s.SetLevel(5); // 0 - store only to 9 - means best compression + string _builFileName = string.Empty; + string _proiectFileName = string.Empty; + public ArrayList FileList = new ArrayList(); + public MPinstalerStruct() + { - foreach (MPIFileList file in FileList) - { - MessageBox.Show(file.FileName); - if (!string.IsNullOrEmpty(file.FileName)&&File.Exists(file.FileName)) + } + public string BuildFileName { - FileStream fs = File.OpenRead(Path.GetFullPath(file.FileName)); - byte[] buffer = new byte[fs.Length]; - fs.Read(buffer, 0, buffer.Length); + get { return _builFileName; } + set { _builFileName = value; } + } + public string ProiectdFileName + { + get { return _proiectFileName; } + set { _proiectFileName = value; } + } - ZipEntry entry = new ZipEntry(GetZipEntry(file)); + public void AddFileList(ListView lst) + { + FileList.Clear(); + for (int i = 0; i < lst.Items.Count; i++) + { + FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); + } + } + public void Clear() + { + FileList.Clear(); + BuildFileName = string.Empty; + } - s.PutNextEntry(entry); + public void BuilFile(ListBox ls, ProgressBar pb) + { + ZipOutputStream s = new ZipOutputStream(File.Create(_builFileName)); + ls.Items.Clear(); + s.SetLevel(5); // 0 - store only to 9 - means best compression + pb.Value = 0; + pb.Maximum = FileList.Count; + ls.Items.Add("Build file :" + _builFileName); + foreach (MPIFileList file in FileList) + { + ls.Items.Add("Adding file :" + file.FileName); + pb.Value++; + ls.Refresh(); + ls.Update(); + if (!string.IsNullOrEmpty(file.FileName) && File.Exists(file.FileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(file.FileName)); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); - s.Write(buffer, 0, buffer.Length); - } + ZipEntry entry = new ZipEntry(GetZipEntry(file)); - } - if (File.Exists(ProiectdFileName)) - { - FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); - byte[] buffer = new byte[fs.Length]; - fs.Read(buffer, 0, buffer.Length); + s.PutNextEntry(entry); - ZipEntry entry = new ZipEntry("instaler.xmp"); + s.Write(buffer, 0, buffer.Length); + } - s.PutNextEntry(entry); + } + if (File.Exists(ProiectdFileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); - s.Write(buffer, 0, buffer.Length); - } - s.Finish(); - s.Close(); - } + ZipEntry entry = new ZipEntry("instaler.xmp"); - public string GetZipEntry(MPIFileList flst) - { - string ret = string.Empty; - if (flst.Type == PLUGIN_TYPE) - { - ret="Release"+@"\"+"Plugins"+@"\"; - switch (flst.SubType) + s.PutNextEntry(entry); + + s.Write(buffer, 0, buffer.Length); + } + s.Finish(); + s.Close(); + } + public void LoadFromFile(string fil) { - case PLUGIN_WINDOW_SUBTYPE: - ret += "Windows"; - break; - case PLUGIN_PLAYER_SUBTYPE: - ret += "ExternalPlayers"; - break; - case PLUGIN_PROCESS_SUBTYPE: - ret += "Process"; - break; - case PLUGIN_SUBTITLE_SUBTYPE: - ret += "Subtitle"; - break; - case PLUGIN_TAGREADER_SUBTYPE: - ret += "TagReaders"; - break; } - ret += @"\" + Path.GetFileName(flst.FileName); - } + public string GetZipEntry(MPIFileList flst) + { + string ret = string.Empty; + if (flst.Type == PLUGIN_TYPE) + { + ret = "Release" + @"\" + "Plugins" + @"\"; + switch (flst.SubType) + { + case PLUGIN_WINDOW_SUBTYPE: + ret += "Windows"; + break; + case PLUGIN_PLAYER_SUBTYPE: + ret += "ExternalPlayers"; + break; + case PLUGIN_PROCESS_SUBTYPE: + ret += "Process"; + break; + case PLUGIN_SUBTITLE_SUBTYPE: + ret += "Subtitle"; + break; + case PLUGIN_TAGREADER_SUBTYPE: + ret += "TagReaders"; + break; - if (flst.Type == SKIN_TYPE) - { - ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); - } + } + ret += @"\" + Path.GetFileName(flst.FileName); + } - if (flst.Type == SKIN_MEDIA_TYPE) - { - ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType +@"\"+"Media"+ @"\" + Path.GetFileName(flst.FileName); - } + if (flst.Type == SKIN_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + } - return ret; + if (flst.Type == SKIN_MEDIA_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); + } + + return ret; + } } - } - public class MPIFileList - { - string _FileName = string.Empty; - string _Type = string.Empty; - string _SubType = string.Empty; - string _Id = string.Empty; - - public MPIFileList(string fn,string ty, string sty,string i) + public class MPIFileList { - FileName = fn; - Type = ty; - SubType = sty; - ID = i; - } - public string FileName - { - get { return _FileName; } - set { _FileName = value; } - } + string _FileName = string.Empty; + string _Type = string.Empty; + string _SubType = string.Empty; + string _Id = string.Empty; + string _Op = string.Empty; + + public MPIFileList(string fn, string ty, string sty, string i) + { + FileName = fn; + Type = ty; + SubType = sty; + ID = i; + Option = String.Empty; + } - public string Type - { - get { return _Type; } - set { _Type = value; } - } + public MPIFileList(string fn, string ty, string sty, string i,string o) + { + FileName = fn; + Type = ty; + SubType = sty; + ID = i; + Option = o; + } + public string FileName + { + get { return _FileName; } + set { _FileName = value; } + } - public string SubType - { - get { return _SubType; } - set { _SubType = value; } + public string Type + { + get { return _Type; } + set { _Type = value; } + } + + public string SubType + { + get { return _SubType; } + set { _SubType = value; } + } + public string ID + { + get { return _Id; } + set { _Id = value; } + } + public string Option + { + get { return _Op; } + set { _Op = value; } + } + } - public string ID - { - get { return _Id; } - set { _Id = value; } - } - - } } Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-02-12 18:58:48
|
Revision: 112 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=112&view=rev Author: dukus Date: 2007-02-12 09:42:33 -0800 (Mon, 12 Feb 2007) Log Message: ----------- Text type added Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler.suo Removed Paths: ------------- trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form2.cs trunk/plugins/mpinstaler/MPInstaler/Form2.resx Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-12 17:42:33 UTC (rev 112) @@ -52,6 +52,10 @@ this.mediaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.otherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.textToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.bossview = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); @@ -66,13 +70,22 @@ this.tabPage_Skin = new System.Windows.Forms.TabPage(); this.tabPage_Plugin = new System.Windows.Forms.TabPage(); this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage_Other = new System.Windows.Forms.TabPage(); + this.tabPage_Text = new System.Windows.Forms.TabPage(); + this.textt_comboBox1 = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); this.tabPage_Language = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); - this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.label2 = new System.Windows.Forms.Label(); + this.proiectt_textBox1 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.proiectt_textBox2 = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.proiectt_textBox3 = new System.Windows.Forms.TextBox(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); + this.tabPage_Text.SuspendLayout(); + this.tabPage_Proiect.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -166,7 +179,10 @@ this.windowPluginToolStripMenuItem, this.skinToolStripMenuItem, this.languageToolStripMenuItem, - this.textToolStripMenuItem}); + this.textToolStripMenuItem, + this.otherToolStripMenuItem, + this.settingsToolStripMenuItem, + this.textToolStripMenuItem1}); this.addToolStripMenuItem.Name = "addToolStripMenuItem"; this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20); this.addToolStripMenuItem.Text = "Add"; @@ -180,7 +196,7 @@ this.tagReadersToolStripMenuItem, this.externalPlayersToolStripMenuItem}); this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; - this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.windowPluginToolStripMenuItem.Text = "Plugin"; // // windowToolStripMenuItem @@ -225,43 +241,69 @@ this.mediaToolStripMenuItem, this.fullToolStripMenuItem}); this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; - this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.skinToolStripMenuItem.Text = "Skin"; // // componentToolStripMenuItem // this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; - this.componentToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.componentToolStripMenuItem.Text = "Component"; this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); // // mediaToolStripMenuItem // this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; - this.mediaToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.mediaToolStripMenuItem.Text = "Media"; this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); // // fullToolStripMenuItem // + this.fullToolStripMenuItem.Enabled = false; this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; - this.fullToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.fullToolStripMenuItem.Text = "Full"; this.fullToolStripMenuItem.Visible = false; // // languageToolStripMenuItem // this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.languageToolStripMenuItem.Text = "Language"; this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); // + // textToolStripMenuItem + // + this.textToolStripMenuItem.Name = "textToolStripMenuItem"; + this.textToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.textToolStripMenuItem.Text = "Text"; + this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click); + // + // otherToolStripMenuItem + // + this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; + this.otherToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.otherToolStripMenuItem.Text = "Other"; + // + // settingsToolStripMenuItem + // + this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.settingsToolStripMenuItem.Text = "Settings"; + // + // textToolStripMenuItem1 + // + this.textToolStripMenuItem1.Name = "textToolStripMenuItem1"; + this.textToolStripMenuItem1.Size = new System.Drawing.Size(132, 22); + this.textToolStripMenuItem1.Text = "Text"; + this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click); + // // bossview // this.bossview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.bossview.CheckBoxes = true; this.bossview.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, @@ -272,6 +314,7 @@ this.bossview.ContextMenuStrip = this.contextMenuStrip1; this.bossview.FullRowSelect = true; this.bossview.GridLines = true; + this.bossview.HideSelection = false; this.bossview.Location = new System.Drawing.Point(12, 40); this.bossview.Name = "bossview"; this.bossview.Size = new System.Drawing.Size(651, 227); @@ -340,7 +383,7 @@ this.tabPage_Skin.Padding = new System.Windows.Forms.Padding(3); this.tabPage_Skin.Size = new System.Drawing.Size(643, 120); this.tabPage_Skin.TabIndex = 1; - this.tabPage_Skin.Text = "Properties"; + this.tabPage_Skin.Text = "Skin Properties"; this.tabPage_Skin.UseVisualStyleBackColor = true; // // tabPage_Plugin @@ -350,7 +393,7 @@ this.tabPage_Plugin.Padding = new System.Windows.Forms.Padding(3); this.tabPage_Plugin.Size = new System.Drawing.Size(643, 120); this.tabPage_Plugin.TabIndex = 0; - this.tabPage_Plugin.Text = "Properties"; + this.tabPage_Plugin.Text = "Plugin Properties"; this.tabPage_Plugin.UseVisualStyleBackColor = true; // // tabControl1 @@ -359,7 +402,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.tabControl1.Controls.Add(this.tabPage_Plugin); this.tabControl1.Controls.Add(this.tabPage_Skin); - this.tabControl1.Controls.Add(this.tabPage_Other); + this.tabControl1.Controls.Add(this.tabPage_Text); this.tabControl1.Controls.Add(this.tabPage_Language); this.tabControl1.Controls.Add(this.tabPage_Proiect); this.tabControl1.Location = new System.Drawing.Point(12, 273); @@ -368,15 +411,40 @@ this.tabControl1.Size = new System.Drawing.Size(651, 146); this.tabControl1.TabIndex = 3; // - // tabPage_Other + // tabPage_Text // - this.tabPage_Other.Location = new System.Drawing.Point(4, 22); - this.tabPage_Other.Name = "tabPage_Other"; - this.tabPage_Other.Size = new System.Drawing.Size(643, 120); - this.tabPage_Other.TabIndex = 2; - this.tabPage_Other.Text = "Properties"; - this.tabPage_Other.UseVisualStyleBackColor = true; + this.tabPage_Text.Controls.Add(this.textt_comboBox1); + this.tabPage_Text.Controls.Add(this.label1); + this.tabPage_Text.Location = new System.Drawing.Point(4, 22); + this.tabPage_Text.Name = "tabPage_Text"; + this.tabPage_Text.Size = new System.Drawing.Size(643, 120); + this.tabPage_Text.TabIndex = 2; + this.tabPage_Text.Text = "Text Properties"; + this.tabPage_Text.UseVisualStyleBackColor = true; // + // textt_comboBox1 + // + this.textt_comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.textt_comboBox1.FormattingEnabled = true; + this.textt_comboBox1.Items.AddRange(new object[] { + "LOG", + "EULA", + "READ ME"}); + this.textt_comboBox1.Location = new System.Drawing.Point(43, 18); + this.textt_comboBox1.Name = "textt_comboBox1"; + this.textt_comboBox1.Size = new System.Drawing.Size(111, 21); + this.textt_comboBox1.TabIndex = 1; + this.textt_comboBox1.TextChanged += new System.EventHandler(this.tab_text_change); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 21); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(34, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Type:"; + // // tabPage_Language // this.tabPage_Language.Location = new System.Drawing.Point(4, 22); @@ -388,6 +456,12 @@ // // tabPage_Proiect // + this.tabPage_Proiect.Controls.Add(this.proiectt_textBox3); + this.tabPage_Proiect.Controls.Add(this.label4); + this.tabPage_Proiect.Controls.Add(this.proiectt_textBox2); + this.tabPage_Proiect.Controls.Add(this.label3); + this.tabPage_Proiect.Controls.Add(this.proiectt_textBox1); + this.tabPage_Proiect.Controls.Add(this.label2); this.tabPage_Proiect.Location = new System.Drawing.Point(4, 22); this.tabPage_Proiect.Name = "tabPage_Proiect"; this.tabPage_Proiect.Size = new System.Drawing.Size(643, 120); @@ -395,12 +469,55 @@ this.tabPage_Proiect.Text = "Proiect Properties"; this.tabPage_Proiect.UseVisualStyleBackColor = true; // - // textToolStripMenuItem + // label2 // - this.textToolStripMenuItem.Name = "textToolStripMenuItem"; - this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.textToolStripMenuItem.Text = "Text"; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(3, 12); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Name :"; // + // proiectt_textBox1 + // + this.proiectt_textBox1.Location = new System.Drawing.Point(94, 5); + this.proiectt_textBox1.Name = "proiectt_textBox1"; + this.proiectt_textBox1.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox1.TabIndex = 1; + this.proiectt_textBox1.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 40); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(44, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Author :"; + // + // proiectt_textBox2 + // + this.proiectt_textBox2.Location = new System.Drawing.Point(94, 33); + this.proiectt_textBox2.Name = "proiectt_textBox2"; + this.proiectt_textBox2.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox2.TabIndex = 3; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(3, 66); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(73, 13); + this.label4.TabIndex = 4; + this.label4.Text = "Update URL :"; + // + // proiectt_textBox3 + // + this.proiectt_textBox3.Location = new System.Drawing.Point(94, 59); + this.proiectt_textBox3.Name = "proiectt_textBox3"; + this.proiectt_textBox3.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox3.TabIndex = 5; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -417,6 +534,10 @@ this.menuStrip1.PerformLayout(); this.contextMenuStrip1.ResumeLayout(false); this.tabControl1.ResumeLayout(false); + this.tabPage_Text.ResumeLayout(false); + this.tabPage_Text.PerformLayout(); + this.tabPage_Proiect.ResumeLayout(false); + this.tabPage_Proiect.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -460,11 +581,22 @@ private System.Windows.Forms.TabPage tabPage_Skin; private System.Windows.Forms.TabPage tabPage_Plugin; private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage_Other; + private System.Windows.Forms.TabPage tabPage_Text; private System.Windows.Forms.TabPage tabPage_Language; private System.Windows.Forms.TabPage tabPage_Proiect; private System.Windows.Forms.ColumnHeader columnHeader6; private System.Windows.Forms.ToolStripMenuItem textToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem otherToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem textToolStripMenuItem1; + private System.Windows.Forms.ComboBox textt_comboBox1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox proiectt_textBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox proiectt_textBox2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox proiectt_textBox3; + private System.Windows.Forms.Label label4; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-12 17:42:33 UTC (rev 112) @@ -79,7 +79,18 @@ } } } - + private void addtext() + { + openFileDialog1.Filter = "txt files|*.txt|All files|*.*"; + openFileDialog1.Multiselect = true; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + foreach (string fil in openFileDialog1.FileNames) + { + addrow(Path.GetFileName(fil), MPinstalerStruct.TEXT_TYPE, MPinstalerStruct.TEXT_LOG_TYPE, Path.GetFullPath(fil), "03010", ""); + } + } +} private void addskin(int type) { // string fil; @@ -147,6 +158,7 @@ if (openFileDialog1.ShowDialog(this) == DialogResult.OK) { fil = openFileDialog1.FileName; + proiect_file_name = fil; XmlDocument doc = new XmlDocument(); doc.Load(fil); XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); @@ -161,14 +173,21 @@ nodefile.SelectSingleNode("Id").InnerText); } _struct.BuildFileName = ver.SelectSingleNode("Option/BuildFileName").InnerText; + _struct.Name = ver.SelectSingleNode("Option/ProiectName").InnerText; + _struct.Author = ver.SelectSingleNode("Option/Author").InnerText; + _struct.UpdateURL = ver.SelectSingleNode("Option/UpdateURL").InnerText; _struct.ProiectdFileName = fil; } _struct.AddFileList(bossview); + proiectt_textBox1.Text = _struct.Name; + proiectt_textBox2.Text = _struct.Author; + proiectt_textBox2.Text = _struct.UpdateURL; } private void languageToolStripMenuItem_Click(object sender, EventArgs e) { Form2 StrForm = new Form2(); + //StrForm.baseDir = "D:\\Program Files\\Team MediaPortal\\MediaPortal\\" ; StrForm.ShowDialog(); } @@ -246,6 +265,9 @@ writer.WriteStartElement("Option"); writer.WriteElementString("BuildFileName", _struct.BuildFileName); writer.WriteElementString("ProiectFileName", Path.GetFullPath(_struct.ProiectdFileName)); + writer.WriteElementString("ProiectName", _struct.Name); + writer.WriteElementString("Author", _struct.Author); + writer.WriteElementString("UpdateURL", _struct.UpdateURL); writer.WriteEndElement(); writer.WriteEndElement(); writer.Flush(); @@ -280,6 +302,10 @@ { tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Proiect); + textt_comboBox1.Items.Clear(); + textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_LOG_TYPE); + textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_README_TYPE); + textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_EULA_TYPE); } private void bossview_SelectedIndexChanged(object sender, EventArgs e) @@ -298,6 +324,14 @@ tabControl1.Controls.Add(tabPage_Skin); tabControl1.Controls.Add(tabPage_Proiect); } + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.TEXT_TYPE) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Text); + tabControl1.Controls.Add(tabPage_Proiect); + textt_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; + } + } else { @@ -307,5 +341,29 @@ } + private void textToolStripMenuItem1_Click(object sender, EventArgs e) + { + + } + + private void textToolStripMenuItem_Click(object sender, EventArgs e) + { + addtext(); + } + + private void tab_text_change(object sender, EventArgs e) + { + if (bossview.SelectedItems.Count > 0) + { + bossview.SelectedItems[0].SubItems[2].Text = textt_comboBox1.Text; + } + } + + private void proiectt_textBox1_TextChanged(object sender, EventArgs e) + { + _struct.Name = proiectt_textBox1.Text; + } + + } } \ No newline at end of file Deleted: trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs 2007-02-12 17:42:33 UTC (rev 112) @@ -1,137 +0,0 @@ -namespace MPInstaler -{ - partial class Form2 - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.languageComboBox = new System.Windows.Forms.ComboBox(); - this.listView1 = new System.Windows.Forms.ListView(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(80, 289); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(65, 23); - this.button1.TabIndex = 0; - this.button1.Text = "Add"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(186, 289); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Remove"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // languageComboBox - // - this.languageComboBox.FormattingEnabled = true; - this.languageComboBox.Location = new System.Drawing.Point(12, 22); - this.languageComboBox.Name = "languageComboBox"; - this.languageComboBox.Size = new System.Drawing.Size(372, 21); - this.languageComboBox.TabIndex = 2; - // - // listView1 - // - this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.listView1.FullRowSelect = true; - this.listView1.GridLines = true; - this.listView1.Location = new System.Drawing.Point(12, 68); - this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(372, 179); - this.listView1.TabIndex = 3; - this.listView1.UseCompatibleStateImageBehavior = false; - this.listView1.View = System.Windows.Forms.View.Details; - this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); - // - // columnHeader1 - // - this.columnHeader1.Text = "Id"; - // - // columnHeader2 - // - this.columnHeader2.Text = "Value"; - this.columnHeader2.Width = 308; - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(12, 253); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(62, 20); - this.textBox1.TabIndex = 4; - // - // textBox2 - // - this.textBox2.Location = new System.Drawing.Point(80, 253); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(304, 20); - this.textBox2.TabIndex = 5; - // - // Form2 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(396, 333); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.listView1); - this.Controls.Add(this.languageComboBox); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Name = "Form2"; - this.Text = "String Editor"; - this.Load += new System.EventHandler(this.Form2_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.ComboBox languageComboBox; - private System.Windows.Forms.ListView listView1; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.TextBox textBox2; - } -} \ No newline at end of file Deleted: trunk/plugins/mpinstaler/MPInstaler/Form2.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form2.cs 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/Form2.cs 2007-02-12 17:42:33 UTC (rev 112) @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using System.IO; - -namespace MPInstaler -{ - public partial class Form2 : Form - { - string LanguageDirectory = ""; - public Form2() - { - InitializeComponent(); - } - - private void button1_Click(object sender, EventArgs e) - { - ListViewItem item1 = new ListViewItem(textBox1.Text, 0); - item1.SubItems.Add(textBox2.Text); - listView1.Items.AddRange(new ListViewItem[] { item1 }); - - } - - private void listView1_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void button2_Click(object sender, EventArgs e) - { - foreach (int index in listView1.SelectedIndices) - { - listView1.Items.RemoveAt(index); - } - } - - private void Form2_Load(object sender, EventArgs e) - { - if (Directory.Exists(LanguageDirectory)) - { - string[] folders = Directory.GetDirectories(LanguageDirectory, "*.*"); - - foreach (string folder in folders) - { - string fileName = folder.Substring(folder.LastIndexOf(@"\") + 1); - - // - // Exclude cvs folder - // - if (fileName.ToLower() != "cvs") - { - if (fileName.Length > 0) - { - fileName = fileName.Substring(0, 1).ToUpper() + fileName.Substring(1); - languageComboBox.Items.Add(fileName); - } - } - } - } - } - } -} \ No newline at end of file Deleted: trunk/plugins/mpinstaler/MPInstaler/Form2.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form2.resx 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/Form2.resx 2007-02-12 17:42:33 UTC (rev 112) @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-12 17:42:33 UTC (rev 112) @@ -60,6 +60,10 @@ <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2595.36012, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\Program Files\Team MediaPortal\MediaPortal\Utils.DLL</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="Build dialog.cs"> @@ -75,11 +79,11 @@ <Compile Include="Form1.Designer.cs"> <DependentUpon>Form1.cs</DependentUpon> </Compile> - <Compile Include="Form2.cs"> + <Compile Include="Language dialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Form2.Designer.cs"> - <DependentUpon>Form2.cs</DependentUpon> + <Compile Include="Language dialog.Designer.cs"> + <DependentUpon>Language dialog.cs</DependentUpon> </Compile> <Compile Include="OptionForm.cs"> <SubType>Form</SubType> @@ -97,9 +101,9 @@ <SubType>Designer</SubType> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Form2.resx"> + <EmbeddedResource Include="Language dialog.resx"> <SubType>Designer</SubType> - <DependentUpon>Form2.cs</DependentUpon> + <DependentUpon>Language dialog.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="OptionForm.resx"> <SubType>Designer</SubType> Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-11 09:17:50 UTC (rev 111) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-12 17:42:33 UTC (rev 112) @@ -24,14 +24,42 @@ public const string SKIN_TYPE = "Skin"; public const string SKIN_MEDIA_TYPE = "Media"; public const string SKIN_XML_SUBTYPE = "Genskin"; + public const string TEXT_TYPE = "Text"; + public const string TEXT_EULA_TYPE = "EULA"; + public const string TEXT_LOG_TYPE = "Log"; + public const string TEXT_README_TYPE = "Ream_me"; string _builFileName = string.Empty; string _proiectFileName = string.Empty; + string _author = string.Empty; + string _update = string.Empty; + string _name = string.Empty; public ArrayList FileList = new ArrayList(); public MPinstalerStruct() { } + public string UpdateURL + { + get { return _update; } + set + { + if (value == null) _update = ""; else _update = value; + } + } + public string Author + { + get { return _author; } + set + { + if (value ==null) _author = "";else _author = value; + } + } + public string Name + { + get { return _name; } + set { _name = value; } + } public string BuildFileName { get { return _builFileName; } Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-02-18 09:42:55
|
Revision: 121 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=121&view=rev Author: dukus Date: 2007-02-18 01:42:47 -0800 (Sun, 18 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler.suo Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.resx trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs trunk/plugins/mpinstaler/MPInstaler/start_form.cs trunk/plugins/mpinstaler/MPInstaler/start_form.resx trunk/plugins/mpinstaler/MPInstaler/wizard/ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.resx trunk/plugins/mpinstaler/MPInstaler/wizard_background.png Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-17 19:02:54 UTC (rev 120) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -75,12 +75,14 @@ this.label1 = new System.Windows.Forms.Label(); this.tabPage_Language = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.proiectt_textBox3 = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.proiectt_textBox2 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.proiectt_textBox1 = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); - this.proiectt_textBox1 = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.proiectt_textBox2 = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.proiectt_textBox3 = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.proiectt_textBox4 = new System.Windows.Forms.TextBox(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); @@ -456,6 +458,8 @@ // // tabPage_Proiect // + this.tabPage_Proiect.Controls.Add(this.proiectt_textBox4); + this.tabPage_Proiect.Controls.Add(this.label5); this.tabPage_Proiect.Controls.Add(this.proiectt_textBox3); this.tabPage_Proiect.Controls.Add(this.label4); this.tabPage_Proiect.Controls.Add(this.proiectt_textBox2); @@ -469,23 +473,31 @@ this.tabPage_Proiect.Text = "Proiect Properties"; this.tabPage_Proiect.UseVisualStyleBackColor = true; // - // label2 + // proiectt_textBox3 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 12); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(41, 13); - this.label2.TabIndex = 0; - this.label2.Text = "Name :"; + this.proiectt_textBox3.Location = new System.Drawing.Point(94, 59); + this.proiectt_textBox3.Name = "proiectt_textBox3"; + this.proiectt_textBox3.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox3.TabIndex = 5; + this.proiectt_textBox3.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); // - // proiectt_textBox1 + // label4 // - this.proiectt_textBox1.Location = new System.Drawing.Point(94, 5); - this.proiectt_textBox1.Name = "proiectt_textBox1"; - this.proiectt_textBox1.Size = new System.Drawing.Size(298, 20); - this.proiectt_textBox1.TabIndex = 1; - this.proiectt_textBox1.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(3, 66); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(73, 13); + this.label4.TabIndex = 4; + this.label4.Text = "Update URL :"; // + // proiectt_textBox2 + // + this.proiectt_textBox2.Location = new System.Drawing.Point(94, 33); + this.proiectt_textBox2.Name = "proiectt_textBox2"; + this.proiectt_textBox2.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox2.TabIndex = 3; + this.proiectt_textBox2.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + // // label3 // this.label3.AutoSize = true; @@ -495,29 +507,40 @@ this.label3.TabIndex = 2; this.label3.Text = "Author :"; // - // proiectt_textBox2 + // proiectt_textBox1 // - this.proiectt_textBox2.Location = new System.Drawing.Point(94, 33); - this.proiectt_textBox2.Name = "proiectt_textBox2"; - this.proiectt_textBox2.Size = new System.Drawing.Size(298, 20); - this.proiectt_textBox2.TabIndex = 3; + this.proiectt_textBox1.Location = new System.Drawing.Point(94, 5); + this.proiectt_textBox1.Name = "proiectt_textBox1"; + this.proiectt_textBox1.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox1.TabIndex = 1; + this.proiectt_textBox1.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); // - // label4 + // label2 // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(3, 66); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(73, 13); - this.label4.TabIndex = 4; - this.label4.Text = "Update URL :"; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(3, 12); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Name :"; // - // proiectt_textBox3 + // label5 // - this.proiectt_textBox3.Location = new System.Drawing.Point(94, 59); - this.proiectt_textBox3.Name = "proiectt_textBox3"; - this.proiectt_textBox3.Size = new System.Drawing.Size(298, 20); - this.proiectt_textBox3.TabIndex = 5; + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(5, 92); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(48, 13); + this.label5.TabIndex = 6; + this.label5.Text = "Version :"; // + // proiectt_textBox4 + // + this.proiectt_textBox4.Location = new System.Drawing.Point(94, 85); + this.proiectt_textBox4.Name = "proiectt_textBox4"; + this.proiectt_textBox4.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox4.TabIndex = 7; + this.proiectt_textBox4.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -597,6 +620,8 @@ private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox proiectt_textBox3; private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox proiectt_textBox4; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-17 19:02:54 UTC (rev 120) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -15,6 +15,7 @@ { private MPinstalerStruct _struct = new MPinstalerStruct(); private string proiect_file_name = "Untitled"; + private bool _loading = false; public Form1() { InitializeComponent(); @@ -29,12 +30,13 @@ saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; if (Path.GetFileName(proiect_file_name) == "Untitled") { + _struct.AddFileList(bossview); if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) { proiect_file_name = saveFileDialog1.FileName; - save_proiect_file(proiect_file_name); + _struct.SaveToFile(proiect_file_name); } - } else save_proiect_file(proiect_file_name); + } else _struct.SaveToFile(proiect_file_name); } private void windowToolStripMenuItem_Click(object sender, EventArgs e) @@ -131,6 +133,17 @@ addplugin(5); } + private void addrow(MPIFileList list) + { + ListViewItem item1 = new ListViewItem(Path.GetFileName(list.FileName), 0); + item1.SubItems.Add(list.Type); + item1.SubItems.Add(list.SubType); + item1.SubItems.Add(list.FileName); + item1.SubItems.Add(list.ID); + item1.SubItems.Add(list.Option); + bossview.Items.AddRange(new ListViewItem[] { item1 }); + } + private void addrow(string file, string type, string subtype, string path, string id) { ListViewItem item1 = new ListViewItem(file, 0); @@ -151,39 +164,35 @@ item1.SubItems.Add(op); bossview.Items.AddRange(new ListViewItem[] { item1 }); } + private void openProiectToolStripMenuItem_Click(object sender, EventArgs e) { string fil; openFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; if (openFileDialog1.ShowDialog(this) == DialogResult.OK) { + bossview.Items.Clear(); fil = openFileDialog1.FileName; proiect_file_name = fil; - XmlDocument doc = new XmlDocument(); - doc.Load(fil); - XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); - bossview.Items.Clear(); - XmlNodeList fileList = ver.SelectNodes("FileList/File"); - foreach (XmlNode nodefile in fileList) + _struct.LoadFromFile(fil); + _struct.ProiectdFileName = fil; + loadProperties(); + for (int i=0;i<_struct.FileList.Count;i++) { - addrow(nodefile.SelectSingleNode("FileName").InnerText, - nodefile.SelectSingleNode("Type").InnerText, - nodefile.SelectSingleNode("SubType").InnerText, - nodefile.SelectSingleNode("Source").InnerText, - nodefile.SelectSingleNode("Id").InnerText); + addrow((MPIFileList)_struct.FileList[i]); } - _struct.BuildFileName = ver.SelectSingleNode("Option/BuildFileName").InnerText; - _struct.Name = ver.SelectSingleNode("Option/ProiectName").InnerText; - _struct.Author = ver.SelectSingleNode("Option/Author").InnerText; - _struct.UpdateURL = ver.SelectSingleNode("Option/UpdateURL").InnerText; - _struct.ProiectdFileName = fil; } - _struct.AddFileList(bossview); - proiectt_textBox1.Text = _struct.Name; - proiectt_textBox2.Text = _struct.Author; - proiectt_textBox2.Text = _struct.UpdateURL; } + private void loadProperties() + { + _loading = true; + proiectt_textBox1.Text = _struct.Name; + proiectt_textBox2.Text = _struct.Author; + proiectt_textBox3.Text = _struct.UpdateURL; + proiectt_textBox4.Text = _struct.Version; + _loading = false; + } private void languageToolStripMenuItem_Click(object sender, EventArgs e) { Form2 StrForm = new Form2(); @@ -208,6 +217,7 @@ { bossview.Items.Clear(); _struct.Clear(); + loadProperties(); } private void componentToolStripMenuItem_Click(object sender, EventArgs e) @@ -226,66 +236,7 @@ if (bossview.Items[i].Selected) bossview.Items.RemoveAt(i); } - private void save_proiect_file(string fil) - { - Stream myStream; - if ((myStream = File.Open(fil,FileMode.Create, FileAccess.Write, FileShare.None)) != null) - { - // Code to write the stream goes here. - XmlDocument doc = new XmlDocument(); - XmlWriter writer = null; - _struct.AddFileList(bossview); - try - { - // Create an XmlWriterSettings object with the correct options. - XmlWriterSettings settings = new XmlWriterSettings(); - string st = string.Empty; - settings.Indent = true; - settings.IndentChars = ("\t"); - settings.OmitXmlDeclaration = true; - // Create the XmlWriter object and write some content. - writer = XmlWriter.Create(myStream, settings); - writer.WriteStartElement("MPinstaler"); - writer.WriteElementString("ver", "1.00.000"); - writer.WriteStartElement("FileList"); - for (int i = 0; i < _struct.FileList.Count; i++) - { - MPIFileList it = (MPIFileList)_struct.FileList[i]; - writer.WriteStartElement("File"); - writer.WriteElementString("FileName", Path.GetFileName(it.FileName)); - writer.WriteElementString("Type", it.Type); - writer.WriteElementString("SubType", it.SubType); - writer.WriteElementString("Source", Path.GetFullPath(it.FileName)); - writer.WriteElementString("Id", it.ID); - writer.WriteElementString("Option", it.Option); - writer.WriteEndElement(); - st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; - } - writer.WriteEndElement(); - writer.WriteStartElement("Option"); - writer.WriteElementString("BuildFileName", _struct.BuildFileName); - writer.WriteElementString("ProiectFileName", Path.GetFullPath(_struct.ProiectdFileName)); - writer.WriteElementString("ProiectName", _struct.Name); - writer.WriteElementString("Author", _struct.Author); - writer.WriteElementString("UpdateURL", _struct.UpdateURL); - writer.WriteEndElement(); - writer.WriteEndElement(); - writer.Flush(); - //------------------------------------- - //------------------------------------- - } - finally - { - if (writer != null) - writer.Close(); - } - myStream.Close(); - - } - - } - private void saveProiectAsToolStripMenuItem_Click(object sender, EventArgs e) { saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; @@ -293,7 +244,8 @@ { proiect_file_name = saveFileDialog1.FileName; _struct.ProiectdFileName = proiect_file_name; - save_proiect_file(proiect_file_name); + _struct.AddFileList(bossview); + _struct.SaveToFile(proiect_file_name); } } @@ -361,7 +313,13 @@ private void proiectt_textBox1_TextChanged(object sender, EventArgs e) { - _struct.Name = proiectt_textBox1.Text; + if (!_loading) + { + _struct.Name = proiectt_textBox1.Text; + _struct.Author = proiectt_textBox2.Text; + _struct.UpdateURL = proiectt_textBox3.Text; + _struct.Version = proiectt_textBox4.Text; + } } Added: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,161 @@ +namespace MPInstaler +{ + partial class Form2 + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.languageComboBox = new System.Windows.Forms.ComboBox(); + this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(15, 279); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(65, 21); + this.button1.TabIndex = 0; + this.button1.Text = "Add"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(311, 279); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 21); + this.button2.TabIndex = 1; + this.button2.Text = "Remove"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // languageComboBox + // + this.languageComboBox.FormattingEnabled = true; + this.languageComboBox.Location = new System.Drawing.Point(12, 22); + this.languageComboBox.Name = "languageComboBox"; + this.languageComboBox.Size = new System.Drawing.Size(372, 21); + this.languageComboBox.TabIndex = 2; + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.listView1.FullRowSelect = true; + this.listView1.GridLines = true; + this.listView1.Location = new System.Drawing.Point(12, 68); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(372, 179); + this.listView1.TabIndex = 3; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "Id"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Value"; + this.columnHeader2.Width = 308; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(12, 253); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(62, 20); + this.textBox1.TabIndex = 4; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(80, 253); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(304, 20); + this.textBox2.TabIndex = 5; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(107, 279); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 21); + this.button3.TabIndex = 6; + this.button3.Text = "Save"; + this.button3.UseVisualStyleBackColor = true; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(209, 279); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 21); + this.button4.TabIndex = 7; + this.button4.Text = "Cancel"; + this.button4.UseVisualStyleBackColor = true; + // + // Form2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(396, 325); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.listView1); + this.Controls.Add(this.languageComboBox); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Name = "Form2"; + this.Text = "String Editor"; + this.Load += new System.EventHandler(this.Form2_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.ComboBox languageComboBox; + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.IO; +using System.Globalization; +using MediaPortal.Configuration; + + +namespace MPInstaler +{ + public partial class Form2 : Form + { + public string baseDir; + string LanguageDirectory = Config.GetFolder(Config.Dir.Language); + public Form2() + { + InitializeComponent(); + } + private void LoadLanguages() + { + // Get system language + string strLongLanguage = CultureInfo.CurrentCulture.EnglishName; + int iTrimIndex = strLongLanguage.IndexOf(" ", 0, strLongLanguage.Length); + string strShortLanguage = strLongLanguage.Substring(0, iTrimIndex); + + bool bExactLanguageFound = false; + if (Directory.Exists(LanguageDirectory)) + { + string[] folders = Directory.GetDirectories(LanguageDirectory, "*.*"); + + foreach (string folder in folders) + { + string fileName = folder.Substring(folder.LastIndexOf(@"\") + 1); + + // + // Exclude cvs folder + // + if (fileName.ToLower() != "cvs") + { + if (fileName.Length > 0) + { + fileName = fileName.Substring(0, 1).ToUpper() + fileName.Substring(1); + languageComboBox.Items.Add(fileName); + + // Check language file to user region language + if (fileName.ToLower() == strLongLanguage.ToLower()) + { + languageComboBox.Text = fileName; + bExactLanguageFound = true; + } + else if (!bExactLanguageFound && (fileName.ToLower() == strShortLanguage.ToLower())) + { + languageComboBox.Text = fileName; + } + } + } + } + } + + if (languageComboBox.Text == "") + { + languageComboBox.Text = "English"; + } + } + + private void button1_Click(object sender, EventArgs e) + { + ListViewItem item1 = new ListViewItem(textBox1.Text, 0); + item1.SubItems.Add(textBox2.Text); + listView1.Items.AddRange(new ListViewItem[] { item1 }); + + } + + private void listView1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void button2_Click(object sender, EventArgs e) + { + foreach (int index in listView1.SelectedIndices) + { + listView1.Items.RemoveAt(index); + } + } + + private void Form2_Load(object sender, EventArgs e) + { + + LoadLanguages(); + } + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/Language dialog.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.resx (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.resx 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-17 19:02:54 UTC (rev 120) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-18 09:42:47 UTC (rev 121) @@ -55,9 +55,11 @@ <HintPath>D:\Program Files\Team MediaPortal\MediaPortal\ICSharpCode.SharpZipLib.DLL</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.Configuration.Install" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> + <Reference Include="System.Management" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="Utils, Version=1.0.2595.36012, Culture=neutral, processorArchitecture=MSIL"> @@ -85,6 +87,7 @@ <Compile Include="Language dialog.Designer.cs"> <DependentUpon>Language dialog.cs</DependentUpon> </Compile> + <Compile Include="MPpackageStruct.cs" /> <Compile Include="OptionForm.cs"> <SubType>Form</SubType> </Compile> @@ -122,6 +125,10 @@ <SubType>Designer</SubType> <DependentUpon>start_form.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="wizard\wizard_1.resx"> + <SubType>Designer</SubType> + <DependentUpon>wizard_1.cs</DependentUpon> + </EmbeddedResource> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> @@ -149,6 +156,12 @@ <Compile Include="start_form.Designer.cs"> <DependentUpon>start_form.cs</DependentUpon> </Compile> + <Compile Include="wizard\wizard_1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="wizard\wizard_1.Designer.cs"> + <DependentUpon>wizard_1.cs</DependentUpon> + </Compile> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-17 19:02:54 UTC (rev 120) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -34,6 +34,8 @@ string _author = string.Empty; string _update = string.Empty; string _name = string.Empty; + string _version = string.Empty; + public ArrayList FileList = new ArrayList(); public MPinstalerStruct() { @@ -47,14 +49,21 @@ if (value == null) _update = ""; else _update = value; } } - public string Author + + public string Version { - get { return _author; } + get { return _version; } set { - if (value ==null) _author = "";else _author = value; + if (value == null) _version = ""; else _version = value; } } + + public string Author + { + get { return _author; } + set {_author = value; } + } public string Name { get { return _name; } @@ -83,8 +92,72 @@ { FileList.Clear(); BuildFileName = string.Empty; + ProiectdFileName = string.Empty; + Author = string.Empty; + Name = string.Empty; + Version = string.Empty; } + public bool SaveToFile(string fil) + { + Stream myStream; + if ((myStream = File.Open(fil, FileMode.Create, FileAccess.Write, FileShare.None)) != null) + { + // Code to write the stream goes here. + XmlDocument doc = new XmlDocument(); + XmlWriter writer = null; + try + { + // Create an XmlWriterSettings object with the correct options. + XmlWriterSettings settings = new XmlWriterSettings(); + string st = string.Empty; + settings.Indent = true; + settings.IndentChars = ("\t"); + settings.OmitXmlDeclaration = true; + // Create the XmlWriter object and write some content. + writer = XmlWriter.Create(myStream, settings); + writer.WriteStartElement("MPinstaler"); + writer.WriteElementString("ver", "1.00.000"); + writer.WriteStartElement("FileList"); + for (int i = 0; i < this.FileList.Count; i++) + { + MPIFileList it = (MPIFileList)this.FileList[i]; + writer.WriteStartElement("File"); + writer.WriteElementString("FileName", Path.GetFileName(it.FileName)); + writer.WriteElementString("Type", it.Type); + writer.WriteElementString("SubType", it.SubType); + writer.WriteElementString("Source", Path.GetFullPath(it.FileName)); + writer.WriteElementString("Id", it.ID); + writer.WriteElementString("Option", it.Option); + writer.WriteEndElement(); + //st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; + } + writer.WriteEndElement(); + writer.WriteStartElement("Option"); + writer.WriteElementString("BuildFileName", this.BuildFileName); + writer.WriteElementString("ProiectFileName", Path.GetFullPath(this.ProiectdFileName)); + writer.WriteElementString("ProiectName", this.Name); + writer.WriteElementString("Author", this.Author); + writer.WriteElementString("UpdateURL", this.UpdateURL); + writer.WriteElementString("Version", this.Version); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.Flush(); + + //------------------------------------- + //------------------------------------- + } + finally + { + if (writer != null) + writer.Close(); + } + myStream.Close(); + + } + return true; + } + public void BuilFile(ListBox ls, ProgressBar pb) { ZipOutputStream s = new ZipOutputStream(File.Create(_builFileName)); @@ -128,10 +201,31 @@ s.Finish(); s.Close(); } + public void LoadFromFile(string fil) { + XmlDocument doc = new XmlDocument(); + doc.Load(fil); + XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); + XmlNodeList fileList = ver.SelectNodes("FileList/File"); + foreach (XmlNode nodefile in fileList) + { + this.FileList.Add(new MPIFileList( + nodefile.SelectSingleNode("Source").InnerText, + nodefile.SelectSingleNode("Type").InnerText, + nodefile.SelectSingleNode("SubType").InnerText, + nodefile.SelectSingleNode("Id").InnerText, + nodefile.SelectSingleNode("Option").InnerText)); + } + XmlNode nodeoption = ver.SelectSingleNode("Option"); + this.BuildFileName = nodeoption.SelectSingleNode("BuildFileName").InnerText; + this.Name = nodeoption.SelectSingleNode("ProiectName").InnerText; + this.Author = nodeoption.SelectSingleNode("Author").InnerText; + this.UpdateURL = nodeoption.SelectSingleNode("UpdateURL").InnerText; + this.Version = nodeoption.SelectSingleNode("Version").InnerText; } + public string GetZipEntry(MPIFileList flst) { string ret = string.Empty; @@ -170,6 +264,11 @@ ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); } + if (flst.Type == TEXT_TYPE) + { + ret = "Release" + @"\" + "Text" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + } + return ret; } } @@ -200,6 +299,7 @@ ID = i; Option = o; } + public string FileName { get { return _FileName; } Added: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using ICSharpCode.SharpZipLib.Zip; + +namespace MPInstaler +{ + public class MPpackageStruct + { + public MPinstalerStruct _intalerStruct= new MPinstalerStruct(); + public bool isValid = false; + public MPpackageStruct() + { + + } + + public void LoadFromFile(string fil) + { + byte[] data = new byte[2048]; + int nb = data.Length; + + ZipEntry entry; + try + { + if (File.Exists(fil)) + { + ZipInputStream s = new ZipInputStream(File.OpenRead(fil)); + while ((entry = s.GetNextEntry()) != null) + { + if (entry.Name == "instaler.xmp") + { + string tpf =Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP"))+@"\" +"instaler.xmp" ; + isValid = true; + FileStream fs = new FileStream(tpf, FileMode.Create); + while ((nb = s.Read(data, 0, data.Length)) > 0) + { + fs.Write(data, 0, nb); + //progressBar.Value = +nb; + } + fs.Close(); + _intalerStruct.LoadFromFile(tpf); + } + } + s.Close(); + } + } + catch (Exception) + { + isValid = false; + } + } + } +} Added: trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,93 @@ +namespace MPInstaler +{ + partial class start_form + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(86, 50); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(121, 32); + this.button1.TabIndex = 0; + this.button1.Text = "Manage package"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(86, 118); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(121, 32); + this.button2.TabIndex = 1; + this.button2.Text = "Install package"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(86, 184); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(121, 32); + this.button3.TabIndex = 2; + this.button3.Text = "Control panel"; + this.button3.UseVisualStyleBackColor = true; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + this.openFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*"; + // + // start_form + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(292, 266); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Name = "start_form"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/start_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace MPInstaler +{ + public partial class start_form : Form + { + public start_form() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + Form1 create_dlg = new Form1(); + this.Hide(); + create_dlg.ShowDialog(); + this.Show(); + } + + private void button2_Click(object sender, EventArgs e) + { + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + this.Hide(); + install_Package(openFileDialog1.FileName); + this.Show(); + } + } + + private void install_Package(string fil) + { + wizard_1 wiz = new wizard_1(); + wiz.package.LoadFromFile(fil); + if (wiz.package.isValid) + { + wiz.nextStep(); + } + else + MessageBox.Show("Invalid package !"); + + + } + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/start_form.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.resx (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.resx 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>39, 17</value> + </metadata> +</root> \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-02-18 09:42:47 UTC (rev 121) @@ -0,0 +1,127 @@ +namespace MPInstaler +{ + partial class wizard_1 + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(wizard_1)); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.button_back = new System.Windows.Forms.Button(); + this.button_next = new System.Windows.Forms.Button(); + this.button_cancel = new System.Windows.Forms.Button(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Location = new System.Drawing.Point(165, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(334, 298); + this.panel1.TabIndex = 0; + // + // panel2 + // + this.panel2.Controls.Add(this.pictureBox1); + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(168, 298); + this.panel2.TabIndex = 1; + // + // pictureBox1 + // + this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(168, 298); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 5; + this.pictureBox1.TabStop = false; + // + // button_back + // + this.button_back.Location = new System.Drawing.Point(223, 314); + this.button_back.Name = "button_back"; + this.button_back.Size = new System.Drawing.Size(75, 23); + this.button_... [truncated message content] |
From: <du...@us...> - 2007-02-20 19:42:00
|
Revision: 127 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=127&view=rev Author: dukus Date: 2007-02-20 11:41:57 -0800 (Tue, 20 Feb 2007) Log Message: ----------- Wizard added Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-19 16:06:40 UTC (rev 126) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-20 19:41:57 UTC (rev 127) @@ -206,6 +206,7 @@ { XmlDocument doc = new XmlDocument(); doc.Load(fil); + FileList.Clear(); XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); XmlNodeList fileList = ver.SelectNodes("FileList/File"); foreach (XmlNode nodefile in fileList) @@ -225,6 +226,19 @@ this.Version = nodeoption.SelectSingleNode("Version").InnerText; } + + public MPIFileList FindList(string typ, string stpy) + { + MPIFileList fs=new MPIFileList(); + for (int i = 0; i < FileList.Count; i++) + { + if ((((MPIFileList)FileList[i]).Type == typ) && (((MPIFileList)FileList[i]).SubType == stpy)) + { + fs = (MPIFileList)FileList[i]; + } + } + return fs; + } public string GetZipEntry(MPIFileList flst) { @@ -281,7 +295,16 @@ string _SubType = string.Empty; string _Id = string.Empty; string _Op = string.Empty; - + + public MPIFileList() + { + FileName = String.Empty;; + Type = String.Empty; + SubType = String.Empty; + ID = String.Empty; + Option = String.Empty; + } + public MPIFileList(string fn, string ty, string sty, string i) { FileName = fn; Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-19 16:06:40 UTC (rev 126) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-20 19:41:57 UTC (rev 127) @@ -9,17 +9,74 @@ public class MPpackageStruct { public MPinstalerStruct _intalerStruct= new MPinstalerStruct(); + public string FileName = String.Empty; + public string txt_EULA = String.Empty; + public string txt_log = String.Empty; + public string txt_readme = String.Empty; public bool isValid = false; public MPpackageStruct() { + txt_EULA = String.Empty; + txt_log = String.Empty; + txt_readme = String.Empty; } + public void load() + { + if (isValid) + { + byte[] data = new byte[2048]; + int nb = data.Length; + ZipEntry entry; + try + { + if (File.Exists(FileName)) + { + ZipInputStream s = new ZipInputStream(File.OpenRead(FileName)); + while ((entry = s.GetNextEntry()) != null) + { + if (Path.GetFileName(entry.Name) == Path.GetFileName(_intalerStruct.FindList(MPinstalerStruct.TEXT_TYPE,MPinstalerStruct.TEXT_EULA_TYPE).FileName)) + { + txt_EULA = String.Empty; + while ((nb = s.Read(data, 0, data.Length)) > 0) + { + txt_EULA += new ASCIIEncoding().GetString(data, 0, data.Length); + } + } + if (Path.GetFileName(entry.Name) == Path.GetFileName(_intalerStruct.FindList(MPinstalerStruct.TEXT_TYPE, MPinstalerStruct.TEXT_LOG_TYPE).FileName)) + { + txt_log = String.Empty; + while ((nb = s.Read(data, 0, data.Length)) > 0) + { + txt_log += new ASCIIEncoding().GetString(data, 0, data.Length); + } + } + if (Path.GetFileName(entry.Name) == Path.GetFileName(_intalerStruct.FindList(MPinstalerStruct.TEXT_TYPE, MPinstalerStruct.TEXT_README_TYPE).FileName)) + { + txt_readme = String.Empty; + while ((nb = s.Read(data, 0, data.Length)) > 0) + { + txt_readme += new ASCIIEncoding().GetString(data, 0, data.Length); + } + } + + } + s.Close(); + } + } + catch (Exception) + { + } + } + } + + public void LoadFromFile(string fil) { + FileName = fil; byte[] data = new byte[2048]; int nb = data.Length; - ZipEntry entry; try { @@ -36,13 +93,13 @@ while ((nb = s.Read(data, 0, data.Length)) > 0) { fs.Write(data, 0, nb); - //progressBar.Value = +nb; } fs.Close(); _intalerStruct.LoadFromFile(tpf); } } s.Close(); + load(); } } catch (Exception) Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-02-19 16:06:40 UTC (rev 126) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-02-20 19:41:57 UTC (rev 127) @@ -35,6 +35,10 @@ this.button_back = new System.Windows.Forms.Button(); this.button_next = new System.Windows.Forms.Button(); this.button_cancel = new System.Windows.Forms.Button(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.title_label = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); @@ -42,6 +46,9 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.title_label); + this.panel1.Controls.Add(this.richTextBox1); this.panel1.Location = new System.Drawing.Point(165, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(334, 298); @@ -83,6 +90,7 @@ this.button_next.TabIndex = 3; this.button_next.Text = "Next >"; this.button_next.UseVisualStyleBackColor = true; + this.button_next.Click += new System.EventHandler(this.button_next_Click); // // button_cancel // @@ -93,6 +101,35 @@ this.button_cancel.Text = "Cancel"; this.button_cancel.UseVisualStyleBackColor = true; // + // richTextBox1 + // + this.richTextBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; + this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.richTextBox1.Location = new System.Drawing.Point(3, 74); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.ReadOnly = true; + this.richTextBox1.Size = new System.Drawing.Size(331, 224); + this.richTextBox1.TabIndex = 0; + this.richTextBox1.Text = ""; + // + // title_label + // + this.title_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.title_label.Location = new System.Drawing.Point(9, 9); + this.title_label.Name = "title_label"; + this.title_label.Size = new System.Drawing.Size(313, 30); + this.title_label.TabIndex = 1; + this.title_label.Text = "label1"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(35, 13); + this.label2.TabIndex = 2; + this.label2.Text = "label2"; + // // wizard_1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -109,6 +146,8 @@ this.Name = "wizard_1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "wizard_1"; + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); @@ -123,5 +162,8 @@ private System.Windows.Forms.Button button_next; private System.Windows.Forms.Button button_cancel; private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label title_label; + private System.Windows.Forms.RichTextBox richTextBox1; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-02-19 16:06:40 UTC (rev 126) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-02-20 19:41:57 UTC (rev 127) @@ -17,16 +17,107 @@ package = new MPpackageStruct(); InitializeComponent(); } + public void nextStep() { + step++; + test_next_step(); switch (step) { - case 0: + case 1: { + this.Text = "MediaPortal extension instaler"; + button_back.Visible = false; + title_label.Text = package._intalerStruct.Name; + label2.Visible = false; + richTextBox1.Text = String.Format(" Name : {0} \n\n Author : {1} \n\n Version : {2}", package._intalerStruct.Name,package._intalerStruct.Author,package._intalerStruct.Version); this.ShowDialog(); break; } + case 2: + { + label2.Visible = true; + label2.Text = "License Agreement"; + button_next.Text = "I Agree"; + button_back.Visible = true; + richTextBox1.Text = package.txt_EULA; + break; + } + case 3: + { + label2.Visible = true; + label2.Text = "Change log"; + button_next.Text = "Next"; + button_back.Visible = true; + richTextBox1.Text = package.txt_log; + break; + } + case 4: + { + label2.Visible = true; + label2.Text = "Read me"; + button_back.Visible = true; + richTextBox1.Text = package.txt_readme; + break; + } + case 5: + { + label2.Visible = true; + label2.Text = "Instaling ..."; + button_next.Text = "Next"; + button_back.Visible = true; + richTextBox1.Text = ""; + break; + } + case 6: + { + label2.Visible = true; + label2.Text = "Instaling ..."; + button_next.Visible = false; + button_back.Visible = true; + richTextBox1.Text = ""; + richTextBox1.Visible = false; + break; + } + } } + + private void test_next_step() + { + switch (step) + { + case 1: + break; + case 2: + if (String.IsNullOrEmpty(package.txt_EULA)) + { + step++; + test_step(); + } + break; + case 3: + if (String.IsNullOrEmpty(package.txt_log)) + { + step++; + test_step(); + } + break; + case 4: + if (String.IsNullOrEmpty(package.txt_readme)) + { + step++; + test_step(); + } + break; + default: + break; + } + } + + private void button_next_Click(object sender, EventArgs e) + { + nextStep(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-02-25 14:59:32
|
Revision: 139 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=139&view=rev Author: dukus Date: 2007-02-25 06:59:25 -0800 (Sun, 25 Feb 2007) Log Message: ----------- First working Version. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs trunk/plugins/mpinstaler/MPInstaler/start_form.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler.suo Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -75,16 +75,19 @@ this.label1 = new System.Windows.Forms.Label(); this.tabPage_Language = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.proiectt_textBox4 = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); this.proiectt_textBox3 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.proiectt_textBox2 = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.proiectt_textBox1 = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.proiectt_textBox4 = new System.Windows.Forms.TextBox(); + this.skint_comboBox1 = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); + this.tabPage_Skin.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage_Text.SuspendLayout(); this.tabPage_Proiect.SuspendLayout(); @@ -198,7 +201,7 @@ this.tagReadersToolStripMenuItem, this.externalPlayersToolStripMenuItem}); this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; - this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.windowPluginToolStripMenuItem.Text = "Plugin"; // // windowToolStripMenuItem @@ -243,20 +246,20 @@ this.mediaToolStripMenuItem, this.fullToolStripMenuItem}); this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; - this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.skinToolStripMenuItem.Text = "Skin"; // // componentToolStripMenuItem // this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; - this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.componentToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.componentToolStripMenuItem.Text = "Component"; this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); // // mediaToolStripMenuItem // this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; - this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.mediaToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.mediaToolStripMenuItem.Text = "Media"; this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); // @@ -264,40 +267,40 @@ // this.fullToolStripMenuItem.Enabled = false; this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; - this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.fullToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.fullToolStripMenuItem.Text = "Full"; this.fullToolStripMenuItem.Visible = false; // // languageToolStripMenuItem // this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.languageToolStripMenuItem.Text = "Language"; this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); // // textToolStripMenuItem // this.textToolStripMenuItem.Name = "textToolStripMenuItem"; - this.textToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.textToolStripMenuItem.Text = "Text"; this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click); // // otherToolStripMenuItem // this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; - this.otherToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.otherToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.otherToolStripMenuItem.Text = "Other"; // // settingsToolStripMenuItem // this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.settingsToolStripMenuItem.Text = "Settings"; // // textToolStripMenuItem1 // this.textToolStripMenuItem1.Name = "textToolStripMenuItem1"; - this.textToolStripMenuItem1.Size = new System.Drawing.Size(132, 22); + this.textToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); this.textToolStripMenuItem1.Text = "Text"; this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click); // @@ -380,6 +383,8 @@ // // tabPage_Skin // + this.tabPage_Skin.Controls.Add(this.label6); + this.tabPage_Skin.Controls.Add(this.skint_comboBox1); this.tabPage_Skin.Location = new System.Drawing.Point(4, 22); this.tabPage_Skin.Name = "tabPage_Skin"; this.tabPage_Skin.Padding = new System.Windows.Forms.Padding(3); @@ -432,7 +437,7 @@ "LOG", "EULA", "READ ME"}); - this.textt_comboBox1.Location = new System.Drawing.Point(43, 18); + this.textt_comboBox1.Location = new System.Drawing.Point(6, 28); this.textt_comboBox1.Name = "textt_comboBox1"; this.textt_comboBox1.Size = new System.Drawing.Size(111, 21); this.textt_comboBox1.TabIndex = 1; @@ -441,7 +446,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 21); + this.label1.Location = new System.Drawing.Point(3, 12); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(34, 13); this.label1.TabIndex = 0; @@ -473,6 +478,23 @@ this.tabPage_Proiect.Text = "Proiect Properties"; this.tabPage_Proiect.UseVisualStyleBackColor = true; // + // proiectt_textBox4 + // + this.proiectt_textBox4.Location = new System.Drawing.Point(94, 85); + this.proiectt_textBox4.Name = "proiectt_textBox4"; + this.proiectt_textBox4.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox4.TabIndex = 7; + this.proiectt_textBox4.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(5, 92); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(48, 13); + this.label5.TabIndex = 6; + this.label5.Text = "Version :"; + // // proiectt_textBox3 // this.proiectt_textBox3.Location = new System.Drawing.Point(94, 59); @@ -524,22 +546,23 @@ this.label2.TabIndex = 0; this.label2.Text = "Name :"; // - // label5 + // skint_comboBox1 // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(5, 92); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(48, 13); - this.label5.TabIndex = 6; - this.label5.Text = "Version :"; + this.skint_comboBox1.FormattingEnabled = true; + this.skint_comboBox1.Location = new System.Drawing.Point(6, 30); + this.skint_comboBox1.Name = "skint_comboBox1"; + this.skint_comboBox1.Size = new System.Drawing.Size(141, 21); + this.skint_comboBox1.TabIndex = 0; + this.skint_comboBox1.TextChanged += new System.EventHandler(this.tab_skin_change); // - // proiectt_textBox4 + // label6 // - this.proiectt_textBox4.Location = new System.Drawing.Point(94, 85); - this.proiectt_textBox4.Name = "proiectt_textBox4"; - this.proiectt_textBox4.Size = new System.Drawing.Size(298, 20); - this.proiectt_textBox4.TabIndex = 7; - this.proiectt_textBox4.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 14); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(34, 13); + this.label6.TabIndex = 1; + this.label6.Text = "Skin :"; // // Form1 // @@ -556,6 +579,8 @@ this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.contextMenuStrip1.ResumeLayout(false); + this.tabPage_Skin.ResumeLayout(false); + this.tabPage_Skin.PerformLayout(); this.tabControl1.ResumeLayout(false); this.tabPage_Text.ResumeLayout(false); this.tabPage_Text.PerformLayout(); @@ -622,6 +647,8 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.TextBox proiectt_textBox4; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox skint_comboBox1; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -8,6 +8,7 @@ using System.Xml; using System.IO; using ICSharpCode.SharpZipLib.Zip; +using MediaPortal.Configuration; namespace MPInstaler { @@ -103,9 +104,9 @@ foreach (string fil in openFileDialog1.FileNames) switch (type) { - case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02010",""); + case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, "BlueTwo", Path.GetFullPath(fil), "02010", ""); break; - case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02020",""); + case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, "BlueTwo", Path.GetFullPath(fil), "02020", ""); break; default: break; @@ -258,6 +259,46 @@ textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_LOG_TYPE); textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_README_TYPE); textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_EULA_TYPE); + skint_comboBox1.Items.Clear(); + string SkinDirectory = Config.GetFolder(Config.Dir.Skin); + if (Directory.Exists(SkinDirectory)) + { + string[] skinFolders = Directory.GetDirectories(SkinDirectory, "*.*"); + + foreach (string skinFolder in skinFolders) + { + bool isInvalidDirectory = false; + string[] invalidDirectoryNames = new string[] { "cvs" }; + + string directoryName = skinFolder.Substring(SkinDirectory.Length + 1); + + if (directoryName != null && directoryName.Length > 0) + { + foreach (string invalidDirectory in invalidDirectoryNames) + { + if (invalidDirectory.Equals(directoryName.ToLower())) + { + isInvalidDirectory = true; + break; + } + } + + if (isInvalidDirectory == false) + { + // + // Check if we have a home.xml located in the directory, if so we consider it as a + // valid skin directory + // + string filename = Path.Combine(SkinDirectory, Path.Combine(directoryName, "references.xml")); + if (File.Exists(filename)) + { + skint_comboBox1.Items.Add(directoryName); + } + } + } + } + } + } private void bossview_SelectedIndexChanged(object sender, EventArgs e) @@ -270,11 +311,12 @@ tabControl1.Controls.Add(tabPage_Plugin); tabControl1.Controls.Add(tabPage_Proiect); } - if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_TYPE) + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_TYPE || bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_MEDIA_TYPE) { tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Skin); tabControl1.Controls.Add(tabPage_Proiect); + skint_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; } if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.TEXT_TYPE) { @@ -311,6 +353,14 @@ } } + private void tab_skin_change(object sender, EventArgs e) + { + if (bossview.SelectedItems.Count > 0) + { + bossview.SelectedItems[0].SubItems[2].Text =skint_comboBox1.Text; + } + } + private void proiectt_textBox1_TextChanged(object sender, EventArgs e) { if (!_loading) Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-25 14:59:25 UTC (rev 139) @@ -36,6 +36,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -125,6 +126,10 @@ <SubType>Designer</SubType> <DependentUpon>start_form.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="wizard\controlp.resx"> + <SubType>Designer</SubType> + <DependentUpon>controlp.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="wizard\wizard_1.resx"> <SubType>Designer</SubType> <DependentUpon>wizard_1.cs</DependentUpon> @@ -133,6 +138,7 @@ <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> + <None Include="app.config" /> <None Include="MPInstaler_TemporaryKey.pfx" /> <BaseApplicationManifest Include="Properties\app.manifest" /> <None Include="Properties\Settings.settings"> @@ -156,6 +162,12 @@ <Compile Include="start_form.Designer.cs"> <DependentUpon>start_form.cs</DependentUpon> </Compile> + <Compile Include="wizard\controlp.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="wizard\controlp.Designer.cs"> + <DependentUpon>controlp.cs</DependentUpon> + </Compile> <Compile Include="wizard\wizard_1.cs"> <SubType>Form</SubType> </Compile> Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -9,7 +9,9 @@ using System.Xml; using System.IO; using ICSharpCode.SharpZipLib.Zip; +using MediaPortal.Configuration; + namespace MPInstaler { public class MPinstalerStruct @@ -183,7 +185,9 @@ s.PutNextEntry(entry); s.Write(buffer, 0, buffer.Length); + ls.Items.Add("Added file :" + GetZipEntry(file)); } + else ls.Items.Add("Error : File not found !"); } if (File.Exists(ProiectdFileName)) @@ -285,9 +289,53 @@ return ret; } + + public static string GetDirEntry(MPIFileList flst) + { + string ret = string.Empty; + if (flst.Type == PLUGIN_TYPE) + { + ret = Config.GetFolder(Config.Dir.Plugins) + @"\"; + switch (flst.SubType) + { + case PLUGIN_WINDOW_SUBTYPE: + ret += "Windows"; + break; + case PLUGIN_PLAYER_SUBTYPE: + ret += "ExternalPlayers"; + break; + case PLUGIN_PROCESS_SUBTYPE: + ret += "Process"; + break; + case PLUGIN_SUBTITLE_SUBTYPE: + ret += "Subtitle"; + break; + case PLUGIN_TAGREADER_SUBTYPE: + ret += "TagReaders"; + break; + + } + ret += @"\" + Path.GetFileName(flst.FileName); + } + + if (flst.Type == SKIN_TYPE) + { + ret = Config.GetFolder(Config.Dir.Skin) + @"\"+ flst.SubType + @"\" + Path.GetFileName(flst.FileName); + } + + if (flst.Type == SKIN_MEDIA_TYPE) + { + ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); + } + + if (flst.Type == TEXT_TYPE) + { + ret = Config.GetFolder(Config.Dir.Base) + @"\" + Path.GetFileName(flst.FileName); + } + return ret; + } } - public class MPIFileList { string _FileName = string.Empty; Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -1,8 +1,12 @@ using System; using System.Collections.Generic; +using System.Collections; using System.Text; using System.IO; +using System.Xml; using ICSharpCode.SharpZipLib.Zip; +using System.Windows.Forms; +using MediaPortal.Configuration; namespace MPInstaler { @@ -21,7 +25,56 @@ txt_readme = String.Empty; } - + + public void instal_file(ProgressBar pb, MPIFileList fl) + { + string fil = FileName; + byte[] data = new byte[2048]; + int nb = data.Length; + ZipEntry entry; + try + { + if (File.Exists(fil)) + { + ZipInputStream s = new ZipInputStream(File.OpenRead(fil)); + while ((entry = s.GetNextEntry()) != null) + { + //MessageBox.Show(entry.Name); + if (Path.GetFileName(entry.Name) ==Path.GetFileName(fl.FileName)) + { + string tpf =Path.GetFullPath(MPinstalerStruct.GetDirEntry(fl)) ; + //MessageBox.Show(tpf); + FileStream fs = new FileStream(tpf, FileMode.Create); + if (pb != null) + { + pb.Minimum = 0; + pb.Maximum = (int)entry.Size; + pb.Value = 0; + } + while ((nb = s.Read(data, 0, data.Length)) > 0) + { + if (pb != null) + { + //MessageBox.Show(String.Format("{0} {1} {2}",pb.Minimum,pb.Value,pb.Maximum)); + pb.Value += nb; + pb.Refresh(); + pb.Update(); + } + fs.Write(data, 0, nb); + } + fs.Close(); + } + } + s.Close(); + load(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + public void load() { if (isValid) @@ -108,4 +161,105 @@ } } } + + public class MPInstallHelper + { + public ArrayList lst = new ArrayList(); + string InstalDir = Config.GetFolder(Config.Dir.Base) + @"\" + "Instaler"; + string FileName = ""; + public MPInstallHelper() + { + FileName = InstalDir + @"\" + "config.xml"; + if (!Directory.Exists(InstalDir)) + { + Directory.CreateDirectory(InstalDir); + } + //LoadFromFile(); + } + + public void Add(MPpackageStruct pk) + { + lst.Add(pk); + File.Copy(pk.FileName,InstalDir+@"\"+Path.GetFileName(pk.FileName),true); + } + + public void SaveToFile() + { + Stream myStream; + if ((myStream = File.Open(FileName, FileMode.Create, FileAccess.Write, FileShare.None)) != null) + { + // Code to write the stream goes here. + XmlDocument doc = new XmlDocument(); + XmlWriter writer = null; + try + { + // Create an XmlWriterSettings object with the correct options. + XmlWriterSettings settings = new XmlWriterSettings(); + string st = string.Empty; + settings.Indent = true; + settings.IndentChars = ("\t"); + settings.OmitXmlDeclaration = true; + // Create the XmlWriter object and write some content. + writer = XmlWriter.Create(myStream, settings); + writer.WriteStartElement("MPinstalerS"); + writer.WriteElementString("ver", "1.00.000"); + writer.WriteStartElement("ExtensionList"); + for (int i = 0; i < this.lst.Count; i++) + { + MPpackageStruct it = (MPpackageStruct)this.lst[i]; + writer.WriteStartElement("Extension"); + writer.WriteElementString("FileName", Path.GetFileName(it.FileName)); + writer.WriteElementString("Name", it._intalerStruct.Name); + writer.WriteElementString("URL", it._intalerStruct.UpdateURL); + writer.WriteElementString("Version", it._intalerStruct.Version); + writer.WriteElementString("Author", it._intalerStruct.Author); + writer.WriteEndElement(); + } + writer.WriteEndElement(); + writer.WriteStartElement("Option"); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.Flush(); + } + finally + { + if (writer != null) + writer.Close(); + } + myStream.Close(); + } + } + + public void LoadFromFile() + { + XmlDocument doc = new XmlDocument(); + if (File.Exists(FileName)) + { + doc.Load(FileName); + lst.Clear(); + XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstalerS"); + XmlNodeList fileList = ver.SelectNodes("ExtensionList/Extension"); + foreach (XmlNode nodefile in fileList) + { + MPpackageStruct pkg = new MPpackageStruct(); + pkg.FileName = nodefile.SelectSingleNode("FileName").InnerText; + pkg._intalerStruct.Name = nodefile.SelectSingleNode("Name").InnerText; + pkg._intalerStruct.Author = nodefile.SelectSingleNode("Author").InnerText; + pkg._intalerStruct.Version = nodefile.SelectSingleNode("Version").InnerText; + pkg._intalerStruct.UpdateURL = nodefile.SelectSingleNode("URL").InnerText; + this.lst.Add(pkg); + } + //XmlNode nodeoption = ver.SelectSingleNode("Option"); + //this.BuildFileName = nodeoption.SelectSingleNode("BuildFileName").InnerText; + } + } + + } + + public class MPInstallHelperStruct + { + public MPInstallHelperStruct() + { + } + } } Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -62,10 +62,10 @@ this.button3.TabIndex = 2; this.button3.Text = "Control panel"; this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); // // openFileDialog1 // - this.openFileDialog1.FileName = "openFileDialog1"; this.openFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*"; // // start_form Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -39,12 +39,20 @@ wiz.package.LoadFromFile(fil); if (wiz.package.isValid) { - wiz.nextStep(); + wiz.nextStep(1); } else MessageBox.Show("Invalid package !"); } + + private void button3_Click(object sender, EventArgs e) + { + controlp cnt = new controlp(); + this.Hide(); + cnt.ShowDialog(); + this.Show(); + } } } \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -0,0 +1,154 @@ +namespace MPInstaler +{ + partial class controlp + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.button4 = new System.Windows.Forms.Button(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2, + this.columnHeader3, + this.columnHeader4}); + this.listView1.GridLines = true; + this.listView1.HideSelection = false; + this.listView1.Location = new System.Drawing.Point(-1, -3); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(632, 304); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button1.Enabled = false; + this.button1.Location = new System.Drawing.Point(12, 321); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Uninstall"; + this.button1.UseVisualStyleBackColor = true; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.Location = new System.Drawing.Point(542, 321); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 2; + this.button2.Text = "Close"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button3.Enabled = false; + this.button3.Location = new System.Drawing.Point(104, 321); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 3; + this.button3.Text = "Update"; + this.button3.UseVisualStyleBackColor = true; + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + this.columnHeader1.Width = 179; + // + // columnHeader2 + // + this.columnHeader2.Text = "Author"; + this.columnHeader2.Width = 194; + // + // columnHeader3 + // + this.columnHeader3.Text = "Version"; + this.columnHeader3.Width = 202; + // + // button4 + // + this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button4.Location = new System.Drawing.Point(196, 321); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Reinstal"; + this.button4.UseVisualStyleBackColor = true; + // + // columnHeader4 + // + this.columnHeader4.Text = "File"; + // + // controlp + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(629, 366); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.listView1); + this.Name = "controlp"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Control panel"; + this.Shown += new System.EventHandler(this.controlp_Shown); + this.Load += new System.EventHandler(this.controlp_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.Button button4; + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace MPInstaler +{ + public partial class controlp : Form + { + public MPInstallHelper lst = new MPInstallHelper(); + public controlp() + { + InitializeComponent(); + } + + private void button2_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void controlp_Load(object sender, EventArgs e) + { + listView1.Items.Clear(); + lst.LoadFromFile(); + LoadToListview(); + } + private void controlp_Shown(object sender, EventArgs e) + { + + } + public void LoadToListview() + { + listView1.Items.Clear(); + for (int i = 0; i < lst.lst.Count; i++) + { + MPpackageStruct pk = (MPpackageStruct)lst.lst[i]; + ListViewItem item1 = new ListViewItem(pk._intalerStruct.Name, 0); + item1.SubItems.Add(pk._intalerStruct.Author); + item1.SubItems.Add(pk._intalerStruct.Version); + item1.SubItems.Add(Path.GetFileName(pk.FileName)); + listView1.Items.AddRange(new ListViewItem[] { item1 }); + MessageBox.Show(pk.FileName); + } + } + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-02-25 14:59:25 UTC (rev 139) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -30,14 +30,16 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(wizard_1)); this.panel1 = new System.Windows.Forms.Panel(); + this.progressBar2 = new System.Windows.Forms.ProgressBar(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.label2 = new System.Windows.Forms.Label(); + this.title_label = new System.Windows.Forms.Label(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.panel2 = new System.Windows.Forms.Panel(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.button_back = new System.Windows.Forms.Button(); this.button_next = new System.Windows.Forms.Button(); this.button_cancel = new System.Windows.Forms.Button(); - this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.title_label = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -46,6 +48,8 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.progressBar2); + this.panel1.Controls.Add(this.progressBar1); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.title_label); this.panel1.Controls.Add(this.richTextBox1); @@ -54,6 +58,49 @@ this.panel1.Size = new System.Drawing.Size(334, 298); this.panel1.TabIndex = 0; // + // progressBar2 + // + this.progressBar2.Location = new System.Drawing.Point(14, 143); + this.progressBar2.Name = "progressBar2"; + this.progressBar2.Size = new System.Drawing.Size(308, 14); + this.progressBar2.TabIndex = 4; + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(14, 123); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(308, 14); + this.progressBar1.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(35, 13); + this.label2.TabIndex = 2; + this.label2.Text = "label2"; + // + // title_label + // + this.title_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.title_label.Location = new System.Drawing.Point(9, 9); + this.title_label.Name = "title_label"; + this.title_label.Size = new System.Drawing.Size(313, 30); + this.title_label.TabIndex = 1; + this.title_label.Text = "label1"; + // + // richTextBox1 + // + this.richTextBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; + this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.richTextBox1.Location = new System.Drawing.Point(3, 74); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.ReadOnly = true; + this.richTextBox1.Size = new System.Drawing.Size(331, 224); + this.richTextBox1.TabIndex = 0; + this.richTextBox1.Text = ""; + // // panel2 // this.panel2.Controls.Add(this.pictureBox1); @@ -81,6 +128,7 @@ this.button_back.TabIndex = 2; this.button_back.Text = "< Back"; this.button_back.UseVisualStyleBackColor = true; + this.button_back.Click += new System.EventHandler(this.button_back_Click); // // button_next // @@ -100,36 +148,8 @@ this.button_cancel.TabIndex = 4; this.button_cancel.Text = "Cancel"; this.button_cancel.UseVisualStyleBackColor = true; + this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click); // - // richTextBox1 - // - this.richTextBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; - this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.richTextBox1.Location = new System.Drawing.Point(3, 74); - this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.ReadOnly = true; - this.richTextBox1.Size = new System.Drawing.Size(331, 224); - this.richTextBox1.TabIndex = 0; - this.richTextBox1.Text = ""; - // - // title_label - // - this.title_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.title_label.Location = new System.Drawing.Point(9, 9); - this.title_label.Name = "title_label"; - this.title_label.Size = new System.Drawing.Size(313, 30); - this.title_label.TabIndex = 1; - this.title_label.Text = "label1"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(9, 49); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(35, 13); - this.label2.TabIndex = 2; - this.label2.Text = "label2"; - // // wizard_1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -165,5 +185,7 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.Label title_label; private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.ProgressBar progressBar2; + private System.Windows.Forms.ProgressBar progressBar1; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-02-25 14:14:27 UTC (rev 138) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-02-25 14:59:25 UTC (rev 139) @@ -5,6 +5,7 @@ using System.Drawing; using System.Text; using System.Windows.Forms; +using MediaPortal.Configuration; namespace MPInstaler { @@ -18,25 +19,30 @@ InitializeComponent(); } - public void nextStep() + public void nextStep(int m) { - step++; - test_next_step(); + step+=m; + test_next_step(m); switch (step) { case 1: { this.Text = "MediaPortal extension instaler"; button_back.Visible = false; + progressBar1.Visible = false; + progressBar2.Visible = false; title_label.Text = package._intalerStruct.Name; label2.Visible = false; + button_next.Text = "Next"; richTextBox1.Text = String.Format(" Name : {0} \n\n Author : {1} \n\n Version : {2}", package._intalerStruct.Name,package._intalerStruct.Author,package._intalerStruct.Version); - this.ShowDialog(); + if (!this.Visible) this.ShowDialog(); break; } case 2: { label2.Visible = true; + progressBar1.Visible = false; + progressBar2.Visible = false; label2.Text = "License Agreement"; button_next.Text = "I Agree"; button_back.Visible = true; @@ -46,6 +52,8 @@ case 3: { label2.Visible = true; + progressBar1.Visible = false; + progressBar2.Visible = false; label2.Text = "Change log"; button_next.Text = "Next"; button_back.Visible = true; @@ -54,6 +62,8 @@ } case 4: { + progressBar1.Visible = false; + progressBar2.Visible = false; label2.Visible = true; label2.Text = "Read me"; button_back.Visible = true; @@ -62,29 +72,59 @@ } case 5: { + progressBar1.Visible = false; + progressBar2.Visible = false; label2.Visible = true; label2.Text = "Instaling ..."; button_next.Text = "Next"; button_back.Visible = true; - richTextBox1.Text = ""; + richTextBox1.Text = String.Format("Intall paths : \nPlugins : {0}\nSkin : {1}", Config.GetFolder(Config.Dir.Plugins), Config.GetFolder(Config.Dir.Skin)); break; } case 6: { label2.Visible = true; + progressBar1.Visible = true; + progressBar2.Visible = true; label2.Text = "Instaling ..."; button_next.Visible = false; button_back.Visible = true; richTextBox1.Text = ""; richTextBox1.Visible = false; + install(); break; } } } - private void test_next_step() + private void install() { + MPInstallHelper inst = new MPInstallHelper(); + button_next.Visible = false; + button_back.Visible = false; + button_cancel.Enabled = false; + if (progressBar1 != null) + { + progressBar1.Minimum = 0; + progressBar1.Maximum = package._intalerStruct.FileList.Count; + } + for (int i = 0; i < package._intalerStruct.FileList.Count; i++) + { + package.instal_file(progressBar2,(MPIFileList) package._intalerStruct.FileList[i]); + progressBar1.Value++; + this.Refresh(); + this.Update(); + } + button_next.Visible = false; + button_cancel.Enabled = true; + inst.Add(package); + inst.SaveToFile(); + button_cancel.Text = "Finish"; + } + + private void test_next_step(int m) + { switch (step) { case 1: @@ -92,22 +132,22 @@ case 2: if (String.IsNullOrEmpty(package.txt_EULA)) { - step++; - test_step(); + step+=m; + test_next_step(m); } break; case 3: if (String.IsNullOrEmpty(package.txt_log)) { - step++; - test_step(); + step+=m; + test_next_step(m); } break; case 4: if (String.IsNullOrEmpty(package.txt_readme)) { - step++; - test_step(); + step+=m; + test_next_step(m); } break; default: @@ -117,7 +157,17 @@ private void button_next_Click(object sender, EventArgs e) { - nextStep(); + nextStep(1); } + + private void button_cancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void button_back_Click(object sender, EventArgs e) + { + nextStep(-1); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-02-28 20:40:36
|
Revision: 145 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=145&view=rev Author: dukus Date: 2007-02-28 12:36:51 -0800 (Wed, 28 Feb 2007) Log Message: ----------- Reinstall, New type : Others Minor bug Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/start_form.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -68,6 +68,8 @@ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.tabPage_Skin = new System.Windows.Forms.TabPage(); + this.label6 = new System.Windows.Forms.Label(); + this.skint_comboBox1 = new System.Windows.Forms.ComboBox(); this.tabPage_Plugin = new System.Windows.Forms.TabPage(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage_Text = new System.Windows.Forms.TabPage(); @@ -83,14 +85,20 @@ this.label3 = new System.Windows.Forms.Label(); this.proiectt_textBox1 = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); - this.skint_comboBox1 = new System.Windows.Forms.ComboBox(); - this.label6 = new System.Windows.Forms.Label(); + this.tabPage_Thumbs = new System.Windows.Forms.TabPage(); + this.thumbst_comboBox1 = new System.Windows.Forms.ComboBox(); + this.label7 = new System.Windows.Forms.Label(); + this.tabPage_Other = new System.Windows.Forms.TabPage(); + this.label8 = new System.Windows.Forms.Label(); + this.othert_comboBox1 = new System.Windows.Forms.ComboBox(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabPage_Skin.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage_Text.SuspendLayout(); this.tabPage_Proiect.SuspendLayout(); + this.tabPage_Thumbs.SuspendLayout(); + this.tabPage_Other.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -185,9 +193,9 @@ this.skinToolStripMenuItem, this.languageToolStripMenuItem, this.textToolStripMenuItem, - this.otherToolStripMenuItem, this.settingsToolStripMenuItem, - this.textToolStripMenuItem1}); + this.textToolStripMenuItem1, + this.otherToolStripMenuItem}); this.addToolStripMenuItem.Name = "addToolStripMenuItem"; this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20); this.addToolStripMenuItem.Text = "Add"; @@ -252,14 +260,14 @@ // componentToolStripMenuItem // this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; - this.componentToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.componentToolStripMenuItem.Text = "Component"; this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); // // mediaToolStripMenuItem // this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; - this.mediaToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.mediaToolStripMenuItem.Text = "Media"; this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); // @@ -267,7 +275,7 @@ // this.fullToolStripMenuItem.Enabled = false; this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; - this.fullToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.fullToolStripMenuItem.Text = "Full"; this.fullToolStripMenuItem.Visible = false; // @@ -290,6 +298,7 @@ this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; this.otherToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.otherToolStripMenuItem.Text = "Other"; + this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click); // // settingsToolStripMenuItem // @@ -301,7 +310,7 @@ // this.textToolStripMenuItem1.Name = "textToolStripMenuItem1"; this.textToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); - this.textToolStripMenuItem1.Text = "Text"; + this.textToolStripMenuItem1.Text = "Thumbs"; this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click); // // bossview @@ -393,6 +402,24 @@ this.tabPage_Skin.Text = "Skin Properties"; this.tabPage_Skin.UseVisualStyleBackColor = true; // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 14); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(34, 13); + this.label6.TabIndex = 1; + this.label6.Text = "Skin :"; + // + // skint_comboBox1 + // + this.skint_comboBox1.FormattingEnabled = true; + this.skint_comboBox1.Location = new System.Drawing.Point(6, 30); + this.skint_comboBox1.Name = "skint_comboBox1"; + this.skint_comboBox1.Size = new System.Drawing.Size(141, 21); + this.skint_comboBox1.TabIndex = 0; + this.skint_comboBox1.TextChanged += new System.EventHandler(this.tab_skin_change); + // // tabPage_Plugin // this.tabPage_Plugin.Location = new System.Drawing.Point(4, 22); @@ -412,6 +439,8 @@ this.tabControl1.Controls.Add(this.tabPage_Text); this.tabControl1.Controls.Add(this.tabPage_Language); this.tabControl1.Controls.Add(this.tabPage_Proiect); + this.tabControl1.Controls.Add(this.tabPage_Thumbs); + this.tabControl1.Controls.Add(this.tabPage_Other); this.tabControl1.Location = new System.Drawing.Point(12, 273); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; @@ -546,24 +575,79 @@ this.label2.TabIndex = 0; this.label2.Text = "Name :"; // - // skint_comboBox1 + // tabPage_Thumbs // - this.skint_comboBox1.FormattingEnabled = true; - this.skint_comboBox1.Location = new System.Drawing.Point(6, 30); - this.skint_comboBox1.Name = "skint_comboBox1"; - this.skint_comboBox1.Size = new System.Drawing.Size(141, 21); - this.skint_comboBox1.TabIndex = 0; - this.skint_comboBox1.TextChanged += new System.EventHandler(this.tab_skin_change); + this.tabPage_Thumbs.Controls.Add(this.thumbst_comboBox1); + this.tabPage_Thumbs.Controls.Add(this.label7); + this.tabPage_Thumbs.Location = new System.Drawing.Point(4, 22); + this.tabPage_Thumbs.Name = "tabPage_Thumbs"; + this.tabPage_Thumbs.Padding = new System.Windows.Forms.Padding(3); + this.tabPage_Thumbs.Size = new System.Drawing.Size(643, 120); + this.tabPage_Thumbs.TabIndex = 5; + this.tabPage_Thumbs.Text = "Thumbs Properties"; + this.tabPage_Thumbs.UseVisualStyleBackColor = true; // - // label6 + // thumbst_comboBox1 // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(6, 14); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(34, 13); - this.label6.TabIndex = 1; - this.label6.Text = "Skin :"; + this.thumbst_comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.thumbst_comboBox1.FormattingEnabled = true; + this.thumbst_comboBox1.Items.AddRange(new object[] { + "TV\\Logos", + "TV\\Recorded", + "TV\\Shows", + "Music\\Albums", + "Music\\Artists", + "Music\\Genre", + "Videos\\Actors", + "Videos\\Genre", + "Videos\\Title", + "Radio", + "ExternalDisplay"}); + this.thumbst_comboBox1.Location = new System.Drawing.Point(9, 30); + this.thumbst_comboBox1.Name = "thumbst_comboBox1"; + this.thumbst_comboBox1.Size = new System.Drawing.Size(177, 21); + this.thumbst_comboBox1.TabIndex = 1; + this.thumbst_comboBox1.TextChanged += new System.EventHandler(this.tab_thumbs_change); // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(6, 14); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(55, 13); + this.label7.TabIndex = 0; + this.label7.Text = "Directory :"; + // + // tabPage_Other + // + this.tabPage_Other.Controls.Add(this.othert_comboBox1); + this.tabPage_Other.Controls.Add(this.label8); + this.tabPage_Other.Location = new System.Drawing.Point(4, 22); + this.tabPage_Other.Name = "tabPage_Other"; + this.tabPage_Other.Padding = new System.Windows.Forms.Padding(3); + this.tabPage_Other.Size = new System.Drawing.Size(643, 120); + this.tabPage_Other.TabIndex = 6; + this.tabPage_Other.Text = "Properties"; + this.tabPage_Other.UseVisualStyleBackColor = true; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(6, 12); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(98, 13); + this.label8.TabIndex = 0; + this.label8.Text = "Directory (relative) :"; + // + // othert_comboBox1 + // + this.othert_comboBox1.FormattingEnabled = true; + this.othert_comboBox1.Location = new System.Drawing.Point(9, 28); + this.othert_comboBox1.Name = "othert_comboBox1"; + this.othert_comboBox1.Size = new System.Drawing.Size(269, 21); + this.othert_comboBox1.TabIndex = 1; + this.othert_comboBox1.TextChanged += new System.EventHandler(this.tab_other_change); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -586,6 +670,10 @@ this.tabPage_Text.PerformLayout(); this.tabPage_Proiect.ResumeLayout(false); this.tabPage_Proiect.PerformLayout(); + this.tabPage_Thumbs.ResumeLayout(false); + this.tabPage_Thumbs.PerformLayout(); + this.tabPage_Other.ResumeLayout(false); + this.tabPage_Other.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -649,6 +737,12 @@ private System.Windows.Forms.TextBox proiectt_textBox4; private System.Windows.Forms.Label label6; private System.Windows.Forms.ComboBox skint_comboBox1; + private System.Windows.Forms.TabPage tabPage_Thumbs; + private System.Windows.Forms.ComboBox thumbst_comboBox1; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TabPage tabPage_Other; + private System.Windows.Forms.ComboBox othert_comboBox1; + private System.Windows.Forms.Label label8; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -114,6 +114,19 @@ } } + private void addother(string ty, string sty) + { + // string fil; + openFileDialog1.Filter = "All files|*.*|xml files|*.xml|png files|*.png|bmp files|*.bmp|jpeg files|*.jpg"; + openFileDialog1.Multiselect = true; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + foreach (string fil in openFileDialog1.FileNames) + addrow(Path.GetFileName(fil), ty, sty, Path.GetFullPath(fil), "04010", ""); + + } + } + private void subtitleToolStripMenuItem_Click(object sender, EventArgs e) { addplugin(3); @@ -305,27 +318,32 @@ { if (bossview.SelectedItems.Count > 0) { + tabControl1.Controls.Clear(); if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.PLUGIN_TYPE) { - tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Plugin); - tabControl1.Controls.Add(tabPage_Proiect); } if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_TYPE || bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_MEDIA_TYPE) { - tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Skin); - tabControl1.Controls.Add(tabPage_Proiect); skint_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; } if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.TEXT_TYPE) { - tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Text); - tabControl1.Controls.Add(tabPage_Proiect); textt_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; } - + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.THUMBS_TYPE) + { + tabControl1.Controls.Add(tabPage_Thumbs); + thumbst_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; + } + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.OTHER_TYPE) + { + tabControl1.Controls.Add(tabPage_Other); + othert_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; + } + tabControl1.Controls.Add(tabPage_Proiect); } else { @@ -337,7 +355,7 @@ private void textToolStripMenuItem1_Click(object sender, EventArgs e) { - + addother(MPinstalerStruct.THUMBS_TYPE,thumbst_comboBox1.Text); } private void textToolStripMenuItem_Click(object sender, EventArgs e) @@ -361,6 +379,22 @@ } } + private void tab_thumbs_change(object sender, EventArgs e) + { + if (bossview.SelectedItems.Count > 0) + { + bossview.SelectedItems[0].SubItems[2].Text = thumbst_comboBox1.Text; + } + } + + private void tab_other_change(object sender, EventArgs e) + { + if (bossview.SelectedItems.Count > 0) + { + bossview.SelectedItems[0].SubItems[2].Text = othert_comboBox1.Text; + } + } + private void proiectt_textBox1_TextChanged(object sender, EventArgs e) { if (!_loading) @@ -372,6 +406,11 @@ } } + private void otherToolStripMenuItem_Click(object sender, EventArgs e) + { + addother(MPinstalerStruct.OTHER_TYPE, ""); + } + } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -30,6 +30,8 @@ public const string TEXT_EULA_TYPE = "EULA"; public const string TEXT_LOG_TYPE = "Log"; public const string TEXT_README_TYPE = "Ream_me"; + public const string THUMBS_TYPE = "Thumbs"; + public const string OTHER_TYPE = "Other"; string _builFileName = string.Empty; string _proiectFileName = string.Empty; @@ -98,6 +100,7 @@ Author = string.Empty; Name = string.Empty; Version = string.Empty; + UpdateURL = string.Empty; } public bool SaveToFile(string fil) @@ -105,6 +108,7 @@ Stream myStream; if ((myStream = File.Open(fil, FileMode.Create, FileAccess.Write, FileShare.None)) != null) { + this.ProiectdFileName = fil; // Code to write the stream goes here. XmlDocument doc = new XmlDocument(); XmlWriter writer = null; @@ -286,6 +290,15 @@ { ret = "Release" + @"\" + "Text" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); } + + if (flst.Type == THUMBS_TYPE) + { + ret = "Release" + @"\" + "Thumbs" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + } + if (flst.Type == OTHER_TYPE) + { + ret = "Release" + @"\" + "Other" + @"\" + Path.GetFileName(flst.FileName); + } return ret; } @@ -328,6 +341,17 @@ ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); } + if (flst.Type == THUMBS_TYPE) + { + ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType +@"\" + Path.GetFileName(flst.FileName); + } + if (flst.Type == OTHER_TYPE) + { + if (String.IsNullOrEmpty(flst.SubType)) + ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + else + ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + } if (flst.Type == TEXT_TYPE) { ret = Config.GetFolder(Config.Dir.Base) + @"\" + Path.GetFileName(flst.FileName); Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -179,8 +179,14 @@ public void Add(MPpackageStruct pk) { + for (int i = 0; i < lst.Count; i++) + { + if (((MPpackageStruct)lst[i])._intalerStruct.Name.Trim() == pk._intalerStruct.Name.Trim()) + lst.RemoveAt(i); + } lst.Add(pk); - File.Copy(pk.FileName,InstalDir+@"\"+Path.GetFileName(pk.FileName),true); + if (Path.GetFullPath(pk.FileName) != Path.GetFullPath(InstalDir + @"\" + Path.GetFileName(pk.FileName))) + File.Copy(pk.FileName, InstalDir + @"\" + Path.GetFileName(pk.FileName), true); } public void SaveToFile() Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -43,8 +43,6 @@ } else MessageBox.Show("Invalid package !"); - - } private void button3_Click(object sender, EventArgs e) Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -29,14 +29,14 @@ private void InitializeComponent() { this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.button4 = new System.Windows.Forms.Button(); - this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.SuspendLayout(); // // listView1 @@ -49,15 +49,38 @@ this.columnHeader2, this.columnHeader3, this.columnHeader4}); + this.listView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.listView1.FullRowSelect = true; this.listView1.GridLines = true; this.listView1.HideSelection = false; this.listView1.Location = new System.Drawing.Point(-1, -3); + this.listView1.MultiSelect = false; this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(632, 304); this.listView1.TabIndex = 0; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; + this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + this.columnHeader1.Width = 179; + // + // columnHeader2 + // + this.columnHeader2.Text = "Author"; + this.columnHeader2.Width = 194; + // + // columnHeader3 + // + this.columnHeader3.Text = "Version"; + this.columnHeader3.Width = 202; + // + // columnHeader4 + // + this.columnHeader4.Text = "File"; + // // button1 // this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -91,21 +114,6 @@ this.button3.Text = "Update"; this.button3.UseVisualStyleBackColor = true; // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - this.columnHeader1.Width = 179; - // - // columnHeader2 - // - this.columnHeader2.Text = "Author"; - this.columnHeader2.Width = 194; - // - // columnHeader3 - // - this.columnHeader3.Text = "Version"; - this.columnHeader3.Width = 202; - // // button4 // this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -113,13 +121,10 @@ this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 23); this.button4.TabIndex = 4; - this.button4.Text = "Reinstal"; + this.button4.Text = "Reinstall"; this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); // - // columnHeader4 - // - this.columnHeader4.Text = "File"; - // // controlp // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -6,6 +6,7 @@ using System.Drawing; using System.Text; using System.Windows.Forms; +using MediaPortal.Configuration; namespace MPInstaler { @@ -43,8 +44,36 @@ item1.SubItems.Add(pk._intalerStruct.Version); item1.SubItems.Add(Path.GetFileName(pk.FileName)); listView1.Items.AddRange(new ListViewItem[] { item1 }); - MessageBox.Show(pk.FileName); } } + + private void listView1_SelectedIndexChanged(object sender, EventArgs e) + { + if (listView1.SelectedItems.Count > 0) + { + button1.Enabled = true; + button2.Enabled = true; + button3.Enabled = true; + } + else + { + button1.Enabled = false; + button2.Enabled = false; + button3.Enabled = false; + } + } + + private void button4_Click(object sender, EventArgs e) + { + wizard_1 wiz = new wizard_1(); + wiz.package.LoadFromFile(Config.GetFolder(Config.Dir.Base) + @"\" + "Instaler" + @"\" + listView1.SelectedItems[0].SubItems[3].Text); + if (wiz.package.isValid) + { + wiz.nextStep(1); + } + else + MessageBox.Show("Invalid package !"); + + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-02-28 14:22:45 UTC (rev 144) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-02-28 20:36:51 UTC (rev 145) @@ -31,9 +31,10 @@ button_back.Visible = false; progressBar1.Visible = false; progressBar2.Visible = false; + label2.Visible = false; title_label.Text = package._intalerStruct.Name; - label2.Visible = false; button_next.Text = "Next"; + richTextBox1.Visible = true; richTextBox1.Text = String.Format(" Name : {0} \n\n Author : {1} \n\n Version : {2}", package._intalerStruct.Name,package._intalerStruct.Author,package._intalerStruct.Version); if (!this.Visible) this.ShowDialog(); break; @@ -46,6 +47,7 @@ label2.Text = "License Agreement"; button_next.Text = "I Agree"; button_back.Visible = true; + richTextBox1.Visible = true; richTextBox1.Text = package.txt_EULA; break; } @@ -57,6 +59,7 @@ label2.Text = "Change log"; button_next.Text = "Next"; button_back.Visible = true; + richTextBox1.Visible = true; richTextBox1.Text = package.txt_log; break; } @@ -67,6 +70,7 @@ label2.Visible = true; label2.Text = "Read me"; button_back.Visible = true; + richTextBox1.Visible = true; richTextBox1.Text = package.txt_readme; break; } @@ -75,13 +79,25 @@ progressBar1.Visible = false; progressBar2.Visible = false; label2.Visible = true; + label2.Text = "Select skin"; + button_next.Text = "Next"; + button_back.Visible = true; + richTextBox1.Visible = false; + break; + } + case 6: + { + progressBar1.Visible = false; + progressBar2.Visible = false; + label2.Visible = true; label2.Text = "Instaling ..."; button_next.Text = "Next"; button_back.Visible = true; + richTextBox1.Visible = true; richTextBox1.Text = String.Format("Intall paths : \nPlugins : {0}\nSkin : {1}", Config.GetFolder(Config.Dir.Plugins), Config.GetFolder(Config.Dir.Skin)); break; } - case 6: + case 7: { label2.Visible = true; progressBar1.Visible = true; @@ -101,6 +117,7 @@ private void install() { MPInstallHelper inst = new MPInstallHelper(); + inst.LoadFromFile(); button_next.Visible = false; button_back.Visible = false; button_cancel.Enabled = false; @@ -150,6 +167,10 @@ test_next_step(m); } break; + case 5: + step += m; + test_next_step(m); + break; default: break; } Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-01 20:28:15
|
Revision: 151 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=151&view=rev Author: dukus Date: 2007-03-01 12:27:59 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Online tab in control panel Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Program.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Program.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-03-01 18:20:23 UTC (rev 150) +++ trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-03-01 20:27:59 UTC (rev 151) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; +using Microsoft.Win32; namespace MPInstaler { Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-01 18:20:23 UTC (rev 150) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-01 20:27:59 UTC (rev 151) @@ -37,6 +37,20 @@ this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.listView2 = new System.Windows.Forms.ListView(); + this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); + this.button5 = new System.Windows.Forms.Button(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); this.SuspendLayout(); // // listView1 @@ -53,10 +67,10 @@ this.listView1.FullRowSelect = true; this.listView1.GridLines = true; this.listView1.HideSelection = false; - this.listView1.Location = new System.Drawing.Point(-1, -3); + this.listView1.Location = new System.Drawing.Point(3, 0); this.listView1.MultiSelect = false; this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(632, 304); + this.listView1.Size = new System.Drawing.Size(685, 277); this.listView1.TabIndex = 0; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; @@ -85,7 +99,7 @@ // this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button1.Enabled = false; - this.button1.Location = new System.Drawing.Point(12, 321); + this.button1.Location = new System.Drawing.Point(6, 294); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 1; @@ -95,7 +109,7 @@ // button2 // this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Location = new System.Drawing.Point(542, 321); + this.button2.Location = new System.Drawing.Point(604, 294); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 2; @@ -107,7 +121,7 @@ // this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button3.Enabled = false; - this.button3.Location = new System.Drawing.Point(104, 321); + this.button3.Location = new System.Drawing.Point(88, 294); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 23); this.button3.TabIndex = 3; @@ -117,7 +131,8 @@ // button4 // this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.button4.Location = new System.Drawing.Point(196, 321); + this.button4.Enabled = false; + this.button4.Location = new System.Drawing.Point(169, 294); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 23); this.button4.TabIndex = 4; @@ -125,21 +140,128 @@ this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Location = new System.Drawing.Point(1, 1); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(696, 364); + this.tabControl1.TabIndex = 5; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.linkLabel1); + this.tabPage1.Controls.Add(this.listView1); + this.tabPage1.Controls.Add(this.button2); + this.tabPage1.Controls.Add(this.button4); + this.tabPage1.Controls.Add(this.button1); + this.tabPage1.Controls.Add(this.button3); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(688, 338); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Local"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.button5); + this.tabPage2.Controls.Add(this.listView2); + this.tabPage2.Controls.Add(this.label1); + this.tabPage2.Controls.Add(this.comboBox1); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(688, 338); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Online"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "d:\\MPExtension_list.xml"}); + this.comboBox1.Location = new System.Drawing.Point(6, 21); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(675, 21); + this.comboBox1.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 5); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(46, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Provider"; + // + // listView2 + // + this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader5, + this.columnHeader6, + this.columnHeader7}); + this.listView2.Location = new System.Drawing.Point(7, 48); + this.listView2.Name = "listView2"; + this.listView2.Size = new System.Drawing.Size(672, 220); + this.listView2.TabIndex = 2; + this.listView2.UseCompatibleStateImageBehavior = false; + this.listView2.View = System.Windows.Forms.View.Details; + // + // columnHeader5 + // + this.columnHeader5.Text = "Name"; + this.columnHeader5.Width = 111; + // + // columnHeader6 + // + this.columnHeader6.Text = "Author"; + this.columnHeader6.Width = 170; + // + // columnHeader7 + // + this.columnHeader7.Text = "Version"; + this.columnHeader7.Width = 91; + // + // button5 + // + this.button5.Location = new System.Drawing.Point(10, 286); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(215, 23); + this.button5.TabIndex = 3; + this.button5.Text = "Download && Install"; + this.button5.UseVisualStyleBackColor = true; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(7, 321); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(113, 13); + this.linkLabel1.TabIndex = 5; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "http://dukus.extra.hu/"; + // // controlp // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(629, 366); - this.Controls.Add(this.button4); - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.listView1); + this.ClientSize = new System.Drawing.Size(696, 366); + this.Controls.Add(this.tabControl1); this.Name = "controlp"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Control panel"; this.Shown += new System.EventHandler(this.controlp_Shown); this.Load += new System.EventHandler(this.controlp_Load); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); this.ResumeLayout(false); } @@ -155,5 +277,16 @@ private System.Windows.Forms.ColumnHeader columnHeader3; private System.Windows.Forms.ColumnHeader columnHeader4; private System.Windows.Forms.Button button4; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.ListView listView2; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.ColumnHeader columnHeader7; + private System.Windows.Forms.LinkLabel linkLabel1; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-04 14:21:13
|
Revision: 153 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=153&view=rev Author: dukus Date: 2007-03-04 06:21:06 -0800 (Sun, 04 Mar 2007) Log Message: ----------- Online update. Manny changes. First release. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/Program.cs trunk/plugins/mpinstaler/MPInstaler/start_form.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler.suo Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs trunk/plugins/mpinstaler/MPInstaler/download_form.cs Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -53,9 +53,9 @@ this.fullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.otherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.textToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.otherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bossview = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); @@ -89,8 +89,10 @@ this.thumbst_comboBox1 = new System.Windows.Forms.ComboBox(); this.label7 = new System.Windows.Forms.Label(); this.tabPage_Other = new System.Windows.Forms.TabPage(); + this.othert_comboBox1 = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); - this.othert_comboBox1 = new System.Windows.Forms.ComboBox(); + this.proiectt_textBox5 = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabPage_Skin.SuspendLayout(); @@ -209,7 +211,7 @@ this.tagReadersToolStripMenuItem, this.externalPlayersToolStripMenuItem}); this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; - this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.windowPluginToolStripMenuItem.Text = "Plugin"; // // windowToolStripMenuItem @@ -254,7 +256,7 @@ this.mediaToolStripMenuItem, this.fullToolStripMenuItem}); this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; - this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.skinToolStripMenuItem.Text = "Skin"; // // componentToolStripMenuItem @@ -282,37 +284,37 @@ // languageToolStripMenuItem // this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.languageToolStripMenuItem.Text = "Language"; this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); // // textToolStripMenuItem // this.textToolStripMenuItem.Name = "textToolStripMenuItem"; - this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.textToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.textToolStripMenuItem.Text = "Text"; this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click); // - // otherToolStripMenuItem - // - this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; - this.otherToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.otherToolStripMenuItem.Text = "Other"; - this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click); - // // settingsToolStripMenuItem // this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.settingsToolStripMenuItem.Text = "Settings"; // // textToolStripMenuItem1 // this.textToolStripMenuItem1.Name = "textToolStripMenuItem1"; - this.textToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); + this.textToolStripMenuItem1.Size = new System.Drawing.Size(132, 22); this.textToolStripMenuItem1.Text = "Thumbs"; this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click); // + // otherToolStripMenuItem + // + this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; + this.otherToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.otherToolStripMenuItem.Text = "Other"; + this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click); + // // bossview // this.bossview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -492,6 +494,8 @@ // // tabPage_Proiect // + this.tabPage_Proiect.Controls.Add(this.label9); + this.tabPage_Proiect.Controls.Add(this.proiectt_textBox5); this.tabPage_Proiect.Controls.Add(this.proiectt_textBox4); this.tabPage_Proiect.Controls.Add(this.label5); this.tabPage_Proiect.Controls.Add(this.proiectt_textBox3); @@ -630,6 +634,15 @@ this.tabPage_Other.Text = "Properties"; this.tabPage_Other.UseVisualStyleBackColor = true; // + // othert_comboBox1 + // + this.othert_comboBox1.FormattingEnabled = true; + this.othert_comboBox1.Location = new System.Drawing.Point(9, 28); + this.othert_comboBox1.Name = "othert_comboBox1"; + this.othert_comboBox1.Size = new System.Drawing.Size(269, 21); + this.othert_comboBox1.TabIndex = 1; + this.othert_comboBox1.TextChanged += new System.EventHandler(this.tab_other_change); + // // label8 // this.label8.AutoSize = true; @@ -639,15 +652,24 @@ this.label8.TabIndex = 0; this.label8.Text = "Directory (relative) :"; // - // othert_comboBox1 + // proiectt_textBox5 // - this.othert_comboBox1.FormattingEnabled = true; - this.othert_comboBox1.Location = new System.Drawing.Point(9, 28); - this.othert_comboBox1.Name = "othert_comboBox1"; - this.othert_comboBox1.Size = new System.Drawing.Size(269, 21); - this.othert_comboBox1.TabIndex = 1; - this.othert_comboBox1.TextChanged += new System.EventHandler(this.tab_other_change); + this.proiectt_textBox5.Location = new System.Drawing.Point(398, 21); + this.proiectt_textBox5.Multiline = true; + this.proiectt_textBox5.Name = "proiectt_textBox5"; + this.proiectt_textBox5.Size = new System.Drawing.Size(229, 84); + this.proiectt_textBox5.TabIndex = 8; + this.proiectt_textBox5.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(395, 5); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(66, 13); + this.label9.TabIndex = 9; + this.label9.Text = "Description :"; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -743,6 +765,8 @@ private System.Windows.Forms.TabPage tabPage_Other; private System.Windows.Forms.ComboBox othert_comboBox1; private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox proiectt_textBox5; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -21,6 +21,19 @@ { InitializeComponent(); } + public Form1(string fil) + { + proiect_file_name = fil; + InitializeComponent(); + _struct.LoadFromFile(fil); + _struct.ProiectdFileName = fil; + loadProperties(); + this.Text = proiect_file_name; + for (int i = 0; i < _struct.FileList.Count; i++) + { + addrow((MPIFileList)_struct.FileList[i]); + } + } private void button1_Click(object sender, EventArgs e) { @@ -191,6 +204,7 @@ _struct.LoadFromFile(fil); _struct.ProiectdFileName = fil; loadProperties(); + this.Text = proiect_file_name; for (int i=0;i<_struct.FileList.Count;i++) { addrow((MPIFileList)_struct.FileList[i]); @@ -205,6 +219,7 @@ proiectt_textBox2.Text = _struct.Author; proiectt_textBox3.Text = _struct.UpdateURL; proiectt_textBox4.Text = _struct.Version; + proiectt_textBox5.Text = _struct.Description; _loading = false; } private void languageToolStripMenuItem_Click(object sender, EventArgs e) @@ -260,6 +275,7 @@ _struct.ProiectdFileName = proiect_file_name; _struct.AddFileList(bossview); _struct.SaveToFile(proiect_file_name); + this.Text = proiect_file_name; } } @@ -403,6 +419,7 @@ _struct.Author = proiectt_textBox2.Text; _struct.UpdateURL = proiectt_textBox3.Text; _struct.Version = proiectt_textBox4.Text; + _struct.Description = proiectt_textBox5.Text; } } Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-03-04 14:21:06 UTC (rev 153) @@ -75,6 +75,12 @@ <Compile Include="Build dialog.Designer.cs"> <DependentUpon>Build dialog.cs</DependentUpon> </Compile> + <Compile Include="download_form.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="download_form.Designer.cs"> + <DependentUpon>download_form.cs</DependentUpon> + </Compile> <Compile Include="MPinstalerStruct.cs" /> <Compile Include="Form1.cs"> <SubType>Form</SubType> @@ -101,6 +107,10 @@ <SubType>Designer</SubType> <DependentUpon>Build dialog.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="download_form.resx"> + <SubType>Designer</SubType> + <DependentUpon>download_form.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Form1.resx"> <SubType>Designer</SubType> <DependentUpon>Form1.cs</DependentUpon> Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -39,7 +39,9 @@ string _update = string.Empty; string _name = string.Empty; string _version = string.Empty; + string _description = string.Empty; + public ArrayList Uninstall = new ArrayList(); public ArrayList FileList = new ArrayList(); public MPinstalerStruct() { @@ -68,6 +70,12 @@ get { return _author; } set {_author = value; } } + + public string Description + { + get { return _description; } + set { _description = value; } + } public string Name { get { return _name; } @@ -146,6 +154,8 @@ writer.WriteElementString("Author", this.Author); writer.WriteElementString("UpdateURL", this.UpdateURL); writer.WriteElementString("Version", this.Version); + writer.WriteElementString("Description", this.Description); + writer.WriteEndElement(); writer.WriteEndElement(); writer.Flush(); @@ -172,6 +182,20 @@ pb.Value = 0; pb.Maximum = FileList.Count; ls.Items.Add("Build file :" + _builFileName); + if (File.Exists(ProiectdFileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); + + ZipEntry entry = new ZipEntry("instaler.xmp"); + + s.PutNextEntry(entry); + + s.Write(buffer, 0, buffer.Length); + } + else ls.Items.Add("Error : Proiect file not found !"); + foreach (MPIFileList file in FileList) { ls.Items.Add("Adding file :" + file.FileName); @@ -194,18 +218,6 @@ else ls.Items.Add("Error : File not found !"); } - if (File.Exists(ProiectdFileName)) - { - FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); - byte[] buffer = new byte[fs.Length]; - fs.Read(buffer, 0, buffer.Length); - - ZipEntry entry = new ZipEntry("instaler.xmp"); - - s.PutNextEntry(entry); - - s.Write(buffer, 0, buffer.Length); - } s.Finish(); s.Close(); } @@ -232,7 +244,9 @@ this.Author = nodeoption.SelectSingleNode("Author").InnerText; this.UpdateURL = nodeoption.SelectSingleNode("UpdateURL").InnerText; this.Version = nodeoption.SelectSingleNode("Version").InnerText; - + XmlNode node_des = nodeoption.SelectSingleNode("Description"); + if (node_des != null) + this._description = node_des.InnerText; } public MPIFileList FindList(string typ, string stpy) @@ -424,4 +438,33 @@ } } + + public class UninstallInfo + { + private DateTime _date; + private string _path; + + public UninstallInfo(string fil) + { + Path = System.IO.Path.GetFullPath(fil); + Date = System.IO.File.GetCreationTime(fil); + } + public UninstallInfo(string fil, string dt) + { + Path = fil; + Date = DateTime.FromFileTime(long.Parse(dt)); + } + public DateTime Date + { + get { return _date; } + set { _date = value; } + } + + public string Path + { + get { return _path; } + set { _path = value; } + } + + } } Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -3,11 +3,15 @@ using System.Collections; using System.Text; using System.IO; +using System.Net; using System.Xml; using ICSharpCode.SharpZipLib.Zip; using System.Windows.Forms; using MediaPortal.Configuration; +using MediaPortal.Util; +using MediaPortal; + namespace MPInstaler { public class MPpackageStruct @@ -26,7 +30,7 @@ } - public void instal_file(ProgressBar pb, MPIFileList fl) + public void instal_file(ProgressBar pb,ListBox lb, MPIFileList fl) { string fil = FileName; byte[] data = new byte[2048]; @@ -63,6 +67,13 @@ fs.Write(data, 0, nb); } fs.Close(); + this._intalerStruct.Uninstall.Add(new UninstallInfo(tpf)); + if (lb != null) + { + lb.Items.Add(tpf); + lb.Refresh(); + lb.Update(); + } } } s.Close(); @@ -170,10 +181,6 @@ public MPInstallHelper() { FileName = InstalDir + @"\" + "config.xml"; - if (!Directory.Exists(InstalDir)) - { - Directory.CreateDirectory(InstalDir); - } //LoadFromFile(); } @@ -189,8 +196,22 @@ File.Copy(pk.FileName, InstalDir + @"\" + Path.GetFileName(pk.FileName), true); } + public int IndexOf(MPpackageStruct pk) + { + for (int i = 0; i < lst.Count; i++) + { + if (((MPpackageStruct)lst[i])._intalerStruct.Name.Trim() == pk._intalerStruct.Name.Trim()) + return i; + } + return -1; + } + public void SaveToFile() { + if (!Directory.Exists(InstalDir)) + { + Directory.CreateDirectory(InstalDir); + } Stream myStream; if ((myStream = File.Open(FileName, FileMode.Create, FileAccess.Write, FileShare.None)) != null) { @@ -219,7 +240,17 @@ writer.WriteElementString("URL", it._intalerStruct.UpdateURL); writer.WriteElementString("Version", it._intalerStruct.Version); writer.WriteElementString("Author", it._intalerStruct.Author); + writer.WriteElementString("Description", it._intalerStruct.Description); + writer.WriteStartElement("Uninstall"); + for (int j = 0; j < it._intalerStruct.Uninstall.Count; j++) + { + writer.WriteStartElement("FileInfo"); + writer.WriteElementString("FileName", ((UninstallInfo)it._intalerStruct.Uninstall[j]).Path); + writer.WriteElementString("Date", Path.GetFileName(((UninstallInfo)it._intalerStruct.Uninstall[j]).Date.ToFileTime().ToString())); + writer.WriteEndElement(); + } writer.WriteEndElement(); + writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteStartElement("Option"); @@ -235,7 +266,36 @@ myStream.Close(); } } - + + public static bool Download(string url, string fil) + { + int code = 0; + + if (!Win32API.IsConnectedToInternet(ref code)) + { + return false; + } + using (WebClient client = new WebClient()) + { + try + { + client.DownloadFile(url,fil ); + return true; + } + catch (Exception ex) + { + return false; + } + } + return false; + } + + public void LoadFromFile(string fil) + { + FileName = fil; + LoadFromFile(); + } + public void LoadFromFile() { XmlDocument doc = new XmlDocument(); @@ -253,6 +313,14 @@ pkg._intalerStruct.Author = nodefile.SelectSingleNode("Author").InnerText; pkg._intalerStruct.Version = nodefile.SelectSingleNode("Version").InnerText; pkg._intalerStruct.UpdateURL = nodefile.SelectSingleNode("URL").InnerText; + XmlNode node_des = nodefile.SelectSingleNode("Description"); + XmlNodeList uninstallList = nodefile.SelectNodes("Uninstall/FileInfo"); + foreach (XmlNode un in uninstallList) + { + pkg._intalerStruct.Uninstall.Add(new UninstallInfo(un.SelectSingleNode("FileName").InnerText, un.SelectSingleNode("Date").InnerText)); + } + if (node_des != null) + pkg._intalerStruct.Description = node_des.InnerText; this.lst.Add(pkg); } //XmlNode nodeoption = ver.SelectSingleNode("Option"); Modified: trunk/plugins/mpinstaler/MPInstaler/Program.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -1,7 +1,9 @@ using System; +using System.IO; using System.Collections.Generic; using System.Windows.Forms; using Microsoft.Win32; +using MediaPortal.Configuration; namespace MPInstaler { @@ -11,11 +13,41 @@ /// The main entry point for the application. /// </summary> [STAThread] - static void Main() + static void Main(string[] args) { + string fil = String.Empty; + if (args.Length > 0) + fil = args[0]; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new start_form()); + if (File.Exists(Config.GetFolder(Config.Dir.Base) + @"\MediaPortal.exe")) + { + if (!String.IsNullOrEmpty(fil)) + { + if (Path.GetExtension(fil) == ".mpi") + { + wizard_1 wiz = new wizard_1(); + wiz.package.LoadFromFile(fil); + if (wiz.package.isValid) + { + wiz.starStep(); + } + else + MessageBox.Show("Invalid package !"); + } + if (Path.GetExtension(fil) == ".xmp") + { + Form1 create_dlg = new Form1(Path.GetFullPath(fil)); + create_dlg.ShowDialog(); + } + } + else + Application.Run(new start_form()); + } + else + { + MessageBox.Show(Config.GetFolder(Config.Dir.Base) + @"\MediaPortal.exe not found. Program Exit....."); + } } } } \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -0,0 +1,87 @@ +namespace MPInstaler +{ + partial class download_form + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(166, 77); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(110, 25); + this.button1.TabIndex = 0; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(12, 34); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(419, 23); + this.progressBar1.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(69, 13); + this.label1.TabIndex = 2; + this.label1.Text = "Downloading"; + // + // download_form + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(443, 114); + this.Controls.Add(this.label1); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.button1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "download_form"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Download"; + this.Shown += new System.EventHandler(this.download_form_Shown); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/download_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Net; + +namespace MPInstaler +{ + public partial class download_form : Form + { + string source = string.Empty; + string dest = string.Empty; + WebClient client = new WebClient(); + public download_form(string s, string d) + { + InitializeComponent(); + source = s; + dest = d; + client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressCallback); + client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadEnd); + progressBar1.Minimum = 0; + progressBar1.Maximum = 100; + progressBar1.Value = 0; + } + + private void download_form_Shown(object sender, EventArgs e) + { + if (!String.IsNullOrEmpty(source) && !String.IsNullOrEmpty(dest)) + { + client.DownloadFileAsync(new System.Uri(source), dest); + //client.DownloadFile(new System.Uri(source), dest); + } + } + private void DownloadProgressCallback(object sender, DownloadProgressChangedEventArgs e) + { + // Displays the operation identifier, and the transfer progress. + //Console.WriteLine("{0} downloaded {1} of {2} bytes. {3} % complete...", + // (string)e.UserState, + // e.BytesReceived, + // e.TotalBytesToReceive, + // e.ProgressPercentage); + progressBar1.Value = e.ProgressPercentage; + } + private void DownloadEnd(object sender, AsyncCompletedEventArgs e) + { + if (e.Error!=null) + MessageBox.Show(e.Error.Message); + button1.Enabled = false; + this.Close(); + } + + private void button1_Click(object sender, EventArgs e) + { + client.CancelAsync(); + this.Close(); + } + } +} \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -39,7 +39,7 @@ wiz.package.LoadFromFile(fil); if (wiz.package.isValid) { - wiz.nextStep(1); + wiz.starStep(); } else MessageBox.Show("Invalid package !"); Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -39,15 +39,16 @@ this.button4 = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); + this.button5 = new System.Windows.Forms.Button(); this.listView2 = new System.Windows.Forms.ListView(); this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); - this.button5 = new System.Windows.Forms.Button(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.columnHeader8 = new System.Windows.Forms.ColumnHeader(); + this.label1 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -105,6 +106,7 @@ this.button1.TabIndex = 1; this.button1.Text = "Uninstall"; this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // @@ -166,6 +168,16 @@ this.tabPage1.Text = "Local"; this.tabPage1.UseVisualStyleBackColor = true; // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(7, 321); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(113, 13); + this.linkLabel1.TabIndex = 5; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "http://dukus.extra.hu/"; + // // tabPage2 // this.tabPage2.Controls.Add(this.button5); @@ -180,31 +192,24 @@ this.tabPage2.Text = "Online"; this.tabPage2.UseVisualStyleBackColor = true; // - // comboBox1 + // button5 // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { - "d:\\MPExtension_list.xml"}); - this.comboBox1.Location = new System.Drawing.Point(6, 21); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(675, 21); - this.comboBox1.TabIndex = 0; + this.button5.Location = new System.Drawing.Point(10, 286); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(215, 23); + this.button5.TabIndex = 3; + this.button5.Text = "Download && Install"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(7, 5); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(46, 13); - this.label1.TabIndex = 1; - this.label1.Text = "Provider"; - // // listView2 // this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader5, this.columnHeader6, - this.columnHeader7}); + this.columnHeader7, + this.columnHeader8}); + this.listView2.FullRowSelect = true; this.listView2.Location = new System.Drawing.Point(7, 48); this.listView2.Name = "listView2"; this.listView2.Size = new System.Drawing.Size(672, 220); @@ -227,25 +232,30 @@ this.columnHeader7.Text = "Version"; this.columnHeader7.Width = 91; // - // button5 + // columnHeader8 // - this.button5.Location = new System.Drawing.Point(10, 286); - this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(215, 23); - this.button5.TabIndex = 3; - this.button5.Text = "Download && Install"; - this.button5.UseVisualStyleBackColor = true; + this.columnHeader8.Text = "File"; // - // linkLabel1 + // label1 // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Location = new System.Drawing.Point(7, 321); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(113, 13); - this.linkLabel1.TabIndex = 5; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "http://dukus.extra.hu/"; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 5); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(46, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Provider"; // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "http://dukus.extra.hu"}); + this.comboBox1.Location = new System.Drawing.Point(6, 21); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(675, 21); + this.comboBox1.TabIndex = 0; + this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); + // // controlp // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -288,5 +298,6 @@ private System.Windows.Forms.ColumnHeader columnHeader6; private System.Windows.Forms.ColumnHeader columnHeader7; private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.ColumnHeader columnHeader8; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -13,6 +13,7 @@ public partial class controlp : Form { public MPInstallHelper lst = new MPInstallHelper(); + public MPInstallHelper lst_online = new MPInstallHelper(); public controlp() { InitializeComponent(); @@ -33,17 +34,23 @@ { } + public void LoadToListview() { - listView1.Items.Clear(); - for (int i = 0; i < lst.lst.Count; i++) + LoadToListview(lst, listView1); + } + + public void LoadToListview(MPInstallHelper mpih, ListView lv) + { + lv.Items.Clear(); + for (int i = 0; i < mpih.lst.Count; i++) { - MPpackageStruct pk = (MPpackageStruct)lst.lst[i]; + MPpackageStruct pk = (MPpackageStruct)mpih.lst[i]; ListViewItem item1 = new ListViewItem(pk._intalerStruct.Name, 0); item1.SubItems.Add(pk._intalerStruct.Author); item1.SubItems.Add(pk._intalerStruct.Version); item1.SubItems.Add(Path.GetFileName(pk.FileName)); - listView1.Items.AddRange(new ListViewItem[] { item1 }); + lv.Items.AddRange(new ListViewItem[] { item1 }); } } @@ -53,13 +60,13 @@ { button1.Enabled = true; button2.Enabled = true; - button3.Enabled = true; + button4.Enabled = true; } else { button1.Enabled = false; button2.Enabled = false; - button3.Enabled = false; + button4.Enabled = false; } } @@ -69,11 +76,73 @@ wiz.package.LoadFromFile(Config.GetFolder(Config.Dir.Base) + @"\" + "Instaler" + @"\" + listView1.SelectedItems[0].SubItems[3].Text); if (wiz.package.isValid) { - wiz.nextStep(1); + wiz.starStep(); } else MessageBox.Show("Invalid package !"); } + + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + //MPExtensionFileList.xml + //Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP"))+@"\" + + string temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + "MPExtensionFileList.xml"; + if (MPInstallHelper.Download(comboBox1.Text + "/" + "MPExtensionFileList.xml",temp_file)) + { + if (File.Exists(temp_file)) + { + lst_online.LoadFromFile(temp_file); + LoadToListview(lst_online, listView2); + } + else MessageBox.Show("File read error"); + } + else + { + MessageBox.Show("Download Error!"); + } + } + + private void button5_Click(object sender, EventArgs e) + { + if (listView2.SelectedItems.Count > 0) + { + string file_name = listView2.SelectedItems[0].SubItems[3].Text; + string temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + file_name; + download_form dw = new download_form(comboBox1.Text+"/"+file_name,temp_file); + dw.Text = listView2.SelectedItems[0].SubItems[3].Text; + dw.ShowDialog(); + if (File.Exists(temp_file)) + { + wizard_1 wiz = new wizard_1(); + wiz.package.LoadFromFile(temp_file); + if (wiz.package.isValid) + { + wiz.starStep(); + listView1.Items.Clear(); + lst.LoadFromFile(); + LoadToListview(); + } + else + MessageBox.Show("Invalid package !"); + } + } + } + + private void button1_Click(object sender, EventArgs e) + { + wizard_1 wiz = new wizard_1(); + wiz.package.LoadFromFile(Config.GetFolder(Config.Dir.Base) + @"\" + "Instaler" + @"\" + listView1.SelectedItems[0].SubItems[3].Text); + if (wiz.package.isValid) + { + wiz.uninstall(listView1.SelectedItems[0].Text); + listView1.Items.Clear(); + lst.LoadFromFile(); + LoadToListview(); + } + else + MessageBox.Show("Invalid package !"); + + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -40,6 +40,7 @@ this.button_back = new System.Windows.Forms.Button(); this.button_next = new System.Windows.Forms.Button(); this.button_cancel = new System.Windows.Forms.Button(); + this.listBox1 = new System.Windows.Forms.ListBox(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -48,6 +49,7 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.listBox1); this.panel1.Controls.Add(this.progressBar2); this.panel1.Controls.Add(this.progressBar1); this.panel1.Controls.Add(this.label2); @@ -150,6 +152,15 @@ this.button_cancel.UseVisualStyleBackColor = true; this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click); // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.HorizontalScrollbar = true; + this.listBox1.Location = new System.Drawing.Point(14, 174); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(308, 108); + this.listBox1.TabIndex = 5; + // // wizard_1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -187,5 +198,6 @@ private System.Windows.Forms.RichTextBox richTextBox1; private System.Windows.Forms.ProgressBar progressBar2; private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.ListBox listBox1; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-02 21:08:07 UTC (rev 152) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-04 14:21:06 UTC (rev 153) @@ -13,11 +13,21 @@ { public int step = 0; public MPpackageStruct package; + MPInstallHelper inst = new MPInstallHelper(); public wizard_1() { package = new MPpackageStruct(); InitializeComponent(); } + public void starStep() + { + inst.LoadFromFile(); + if (inst.IndexOf(package) < 0) + nextStep(1); + else + if (MessageBox.Show("Extension already installed. Do you want continue ?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) + nextStep(1); + } public void nextStep(int m) { @@ -31,11 +41,13 @@ button_back.Visible = false; progressBar1.Visible = false; progressBar2.Visible = false; + listBox1.Items.Clear(); + listBox1.Visible = false; label2.Visible = false; title_label.Text = package._intalerStruct.Name; button_next.Text = "Next"; richTextBox1.Visible = true; - richTextBox1.Text = String.Format(" Name : {0} \n\n Author : {1} \n\n Version : {2}", package._intalerStruct.Name,package._intalerStruct.Author,package._intalerStruct.Version); + richTextBox1.Text = String.Format(" Name : {0} \n\n Author : {1} \n\n Version : {2} \n\n Description :\n {3} \n", package._intalerStruct.Name, package._intalerStruct.Author, package._intalerStruct.Version, package._intalerStruct.Description); if (!this.Visible) this.ShowDialog(); break; } @@ -44,6 +56,7 @@ label2.Visible = true; progressBar1.Visible = false; progressBar2.Visible = false; + listBox1.Visible = false; label2.Text = "License Agreement"; button_next.Text = "I Agree"; button_back.Visible = true; @@ -56,6 +69,7 @@ label2.Visible = true; progressBar1.Visible = false; progressBar2.Visible = false; + listBox1.Visible = false; label2.Text = "Change log"; button_next.Text = "Next"; button_back.Visible = true; @@ -67,6 +81,7 @@ { progressBar1.Visible = false; progressBar2.Visible = false; + listBox1.Visible = false; label2.Visible = true; label2.Text = "Read me"; button_back.Visible = true; @@ -78,6 +93,7 @@ { progressBar1.Visible = false; progressBar2.Visible = false; + listBox1.Visible = false; label2.Visible = true; label2.Text = "Select skin"; button_next.Text = "Next"; @@ -89,12 +105,17 @@ { progressBar1.Visible = false; progressBar2.Visible = false; + listBox1.Visible = false; label2.Visible = true; label2.Text = "Instaling ..."; button_next.Text = "Next"; button_back.Visible = true; richTextBox1.Visible = true; - richTextBox1.Text = String.Format("Intall paths : \nPlugins : {0}\nSkin : {1}", Config.GetFolder(Config.Dir.Plugins), Config.GetFolder(Config.Dir.Skin)); + richTextBox1.Text = String.Format("Intall paths : \n"); + foreach (Config.Dir option in Enum.GetValues(typeof(Config.Dir))) + { + richTextBox1.Text += String.Format("{0} - {1}\n", option, Config.GetFolder(option)); + } break; } case 7: @@ -102,6 +123,7 @@ label2.Visible = true; progressBar1.Visible = true; progressBar2.Visible = true; + listBox1.Visible = true; ; label2.Text = "Instaling ..."; button_next.Visible = false; button_back.Visible = true; @@ -116,8 +138,6 @@ private void install() { - MPInstallHelper inst = new MPInstallHelper(); - inst.LoadFromFile(); button_next.Visible = false; button_back.Visible = false; button_cancel.Enabled = false; @@ -128,7 +148,7 @@ } for (int i = 0; i < package._intalerStruct.FileList.Count; i++) { - package.instal_file(progressBar2,(MPIFileList) package._intalerStruct.FileList[i]); + package.instal_file(progressBar2,listBox1,(MPIFileList) package._intalerStruct.FileList[i]); progressBar1.Value++; this.Refresh(); this.Update(); @@ -190,5 +210,66 @@ { nextStep(-1); } + + internal void uninstall(string tit) + { + inst.LoadFromFile(); + int index = -1; + int ind=-1; + foreach (MPpackageStruct p in inst.lst) + { + ind++; + if (p._intalerStruct.Name.Trim() == tit.Trim()) + { + index = ind; + break; + } + } + if (index > -1) + if (((MPpackageStruct)inst.lst[index])._intalerStruct.Uninstall.Count>0) + { + if (MessageBox.Show("Uninstalling extension." + tit + "\nDo you want continue ?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + if (!this.Visible) this.Show(); + MPpackageStruct p = (MPpackageStruct)inst.lst[index]; + label2.Visible = true; + progressBar1.Visible = true; + progressBar2.Visible = false; + listBox1.Visible = true; + this.Text = "Uninstalling "+p._intalerStruct.Name; + title_label.Text = p._intalerStruct.Name; + label2.Text = "Uninstalling ..."; + button_next.Visible = false; + button_back.Visible = false; + richTextBox1.Text = ""; + richTextBox1.Visible = false; + progressBar1.Maximum = p._intalerStruct.Uninstall.Count; + for (int i = 0; i < p._intalerStruct.Uninstall.Count; i++) + { + UninstallInfo u = (UninstallInfo)p._intalerStruct.Uninstall[i]; + progressBar1.Value++; + progressBar1.Update(); + progressBar1.Refresh(); + if (System.IO.File.Exists(u.Path)) + { + if (System.IO.File.GetCreationTime(u.Path) == u.Date) + { + listBox1.Items.Add(u.Path); + }else + listBox1.Items.Add("File date changed :"+u.Path); + } + else listBox1.Items.Add("File not found :"+u.Path); + } + inst.lst.RemoveAt(index); + inst.SaveToFile(); + } + } + else + MessageBox.Show("Uninstall information not found !"); + else + MessageBox.Show("Uninstall information not found !"); + + button_cancel.Text = "Finish"; + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-05 18:46:40
|
Revision: 159 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=159&view=rev Author: dukus Date: 2007-03-05 10:46:39 -0800 (Mon, 05 Mar 2007) Log Message: ----------- When installing skin and media create directory if not exist Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-05 06:56:19 UTC (rev 158) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-05 18:46:39 UTC (rev 159) @@ -368,7 +368,7 @@ } if (flst.Type == TEXT_TYPE) { - ret = Config.GetFolder(Config.Dir.Base) + @"\" + Path.GetFileName(flst.FileName); + ret = Config.GetFolder(Config.Dir.Base) + @"\" +"Docs"+ @"\" + Path.GetFileName(flst.FileName); } return ret; } Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-05 06:56:19 UTC (rev 158) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-05 18:46:39 UTC (rev 159) @@ -47,6 +47,11 @@ if (Path.GetFileName(entry.Name) ==Path.GetFileName(fl.FileName)) { string tpf =Path.GetFullPath(MPinstalerStruct.GetDirEntry(fl)) ; + if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE) + { + if (!Directory.Exists(Path.GetDirectoryName(tpf))) + Directory.CreateDirectory(Path.GetDirectoryName(tpf)); + } //MessageBox.Show(tpf); FileStream fs = new FileStream(tpf, FileMode.Create); if (pb != null) Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-05 06:56:19 UTC (rev 158) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-05 18:46:39 UTC (rev 159) @@ -254,6 +254,7 @@ { if (System.IO.File.GetCreationTime(u.Path) == u.Date) { + System.IO.File.Delete(u.Path); listBox1.Items.Add(u.Path); }else listBox1.Items.Add("File date changed :"+u.Path); Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-07 21:29:47
|
Revision: 166 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=166&view=rev Author: dukus Date: 2007-03-07 13:29:28 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/Program.cs trunk/plugins/mpinstaler/MPInstaler.suo Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/app.config trunk/plugins/mpinstaler/MPInstaler/download_form.resx Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-07 20:33:19 UTC (rev 165) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-07 21:29:28 UTC (rev 166) @@ -222,11 +222,13 @@ proiectt_textBox5.Text = _struct.Description; _loading = false; } + private void languageToolStripMenuItem_Click(object sender, EventArgs e) { Form2 StrForm = new Form2(); - //StrForm.baseDir = "D:\\Program Files\\Team MediaPortal\\MediaPortal\\" ; + StrForm.Language = _struct.Language; StrForm.ShowDialog(); + _struct.Language = StrForm.Language; } private void optionsToolStripMenuItem_Click(object sender, EventArgs e) Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-07 20:33:19 UTC (rev 165) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-07 21:29:28 UTC (rev 166) @@ -38,6 +38,7 @@ this.textBox2 = new System.Windows.Forms.TextBox(); this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.SuspendLayout(); // // button1 @@ -63,21 +64,22 @@ // languageComboBox // this.languageComboBox.FormattingEnabled = true; - this.languageComboBox.Location = new System.Drawing.Point(12, 22); + this.languageComboBox.Location = new System.Drawing.Point(216, 252); this.languageComboBox.Name = "languageComboBox"; - this.languageComboBox.Size = new System.Drawing.Size(372, 21); + this.languageComboBox.Size = new System.Drawing.Size(170, 21); this.languageComboBox.TabIndex = 2; // // listView1 // this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, - this.columnHeader2}); + this.columnHeader2, + this.columnHeader3}); this.listView1.FullRowSelect = true; this.listView1.GridLines = true; - this.listView1.Location = new System.Drawing.Point(12, 68); + this.listView1.Location = new System.Drawing.Point(12, 12); this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(372, 179); + this.listView1.Size = new System.Drawing.Size(372, 235); this.listView1.TabIndex = 3; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; @@ -86,11 +88,12 @@ // columnHeader1 // this.columnHeader1.Text = "Id"; + this.columnHeader1.Width = 68; // // columnHeader2 // this.columnHeader2.Text = "Value"; - this.columnHeader2.Width = 308; + this.columnHeader2.Width = 137; // // textBox1 // @@ -103,7 +106,7 @@ // this.textBox2.Location = new System.Drawing.Point(80, 253); this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(304, 20); + this.textBox2.Size = new System.Drawing.Size(130, 20); this.textBox2.TabIndex = 5; // // button3 @@ -114,6 +117,7 @@ this.button3.TabIndex = 6; this.button3.Text = "Save"; this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); // // button4 // @@ -121,9 +125,15 @@ this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 21); this.button4.TabIndex = 7; - this.button4.Text = "Cancel"; + this.button4.Text = "Close"; this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); // + // columnHeader3 + // + this.columnHeader3.Text = "Language"; + this.columnHeader3.Width = 155; + // // Form2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -157,5 +167,6 @@ private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; + private System.Windows.Forms.ColumnHeader columnHeader3; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-07 20:33:19 UTC (rev 165) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-07 21:29:28 UTC (rev 166) @@ -15,6 +15,8 @@ public partial class Form2 : Form { public string baseDir; + public List<LanguageString> Language; + string LanguageDirectory = Config.GetFolder(Config.Dir.Language); public Form2() { @@ -71,6 +73,7 @@ { ListViewItem item1 = new ListViewItem(textBox1.Text, 0); item1.SubItems.Add(textBox2.Text); + item1.SubItems.Add(languageComboBox.Text); listView1.Items.AddRange(new ListViewItem[] { item1 }); } @@ -90,8 +93,28 @@ private void Form2_Load(object sender, EventArgs e) { - LoadLanguages(); + foreach (LanguageString lg in Language) + { + ListViewItem item1 = new ListViewItem(lg.dwCode, 0); + item1.SubItems.Add(lg.mapSting); + item1.SubItems.Add(lg.language); + listView1.Items.AddRange(new ListViewItem[] { item1 }); + } } + + private void button3_Click(object sender, EventArgs e) + { + for(int i=0;i<listView1.Items.Count;i++) + { + Language.Clear(); + Language.Add(new LanguageString(listView1.Items[i].SubItems[2].Text, listView1.Items[i].Text, listView1.Items[i].SubItems[1].Text)); + } + } + + private void button4_Click(object sender, EventArgs e) + { + this.Close(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-07 20:33:19 UTC (rev 165) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-07 21:29:28 UTC (rev 166) @@ -43,9 +43,11 @@ public ArrayList Uninstall = new ArrayList(); public ArrayList FileList = new ArrayList(); + public List<LanguageString> Language; + public MPinstalerStruct() { - + Language = new List<LanguageString>(); } public string UpdateURL { @@ -147,6 +149,16 @@ //st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; } writer.WriteEndElement(); + writer.WriteStartElement("StringList"); + foreach(LanguageString lg in Language) + { + writer.WriteStartElement("string"); + writer.WriteElementString("language", lg.language); + writer.WriteElementString("id", lg.dwCode); + writer.WriteElementString("value", lg.mapSting); + writer.WriteEndElement(); + } + writer.WriteEndElement(); writer.WriteStartElement("Option"); writer.WriteElementString("BuildFileName", this.BuildFileName); writer.WriteElementString("ProiectFileName", Path.GetFullPath(this.ProiectdFileName)); @@ -227,6 +239,7 @@ XmlDocument doc = new XmlDocument(); doc.Load(fil); FileList.Clear(); + Language.Clear(); XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); XmlNodeList fileList = ver.SelectNodes("FileList/File"); foreach (XmlNode nodefile in fileList) @@ -238,6 +251,13 @@ nodefile.SelectSingleNode("Id").InnerText, nodefile.SelectSingleNode("Option").InnerText)); } + XmlNodeList langList = ver.SelectNodes("StringList/string"); + foreach (XmlNode langnode in langList) + { + Language.Add(new LanguageString(langnode.SelectSingleNode("language").InnerText, + langnode.SelectSingleNode("id").InnerText, + langnode.SelectSingleNode("value").InnerText)); + } XmlNode nodeoption = ver.SelectSingleNode("Option"); this.BuildFileName = nodeoption.SelectSingleNode("BuildFileName").InnerText; this.Name = nodeoption.SelectSingleNode("ProiectName").InnerText; @@ -467,4 +487,17 @@ } } + + public class LanguageString + { + public string language; + public string mapSting; + public string dwCode; + public LanguageString(string lang,string dc, string str ) + { + language = lang; + dwCode = dc; + mapSting = str; + } + } } Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-07 20:33:19 UTC (rev 165) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-07 21:29:28 UTC (rev 166) @@ -197,6 +197,10 @@ lst.RemoveAt(i); } lst.Add(pk); + if (!Directory.Exists(InstalDir)) + { + Directory.CreateDirectory(InstalDir); + } if (Path.GetFullPath(pk.FileName) != Path.GetFullPath(InstalDir + @"\" + Path.GetFileName(pk.FileName))) File.Copy(pk.FileName, InstalDir + @"\" + Path.GetFileName(pk.FileName), true); } Modified: trunk/plugins/mpinstaler/MPInstaler/Program.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-03-07 20:33:19 UTC (rev 165) +++ trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-03-07 21:29:28 UTC (rev 166) @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Windows.Forms; using Microsoft.Win32; -using MediaPortal.Configuration; namespace MPInstaler { @@ -20,7 +19,7 @@ fil = args[0]; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - if (File.Exists(Config.GetFolder(Config.Dir.Base) + @"\MediaPortal.exe")) + if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\MediaPortal.exe")) { if (!String.IsNullOrEmpty(fil)) { @@ -46,7 +45,7 @@ } else { - MessageBox.Show(Config.GetFolder(Config.Dir.Base) + @"\MediaPortal.exe not found. Program Exit....."); + MessageBox.Show(AppDomain.CurrentDomain.BaseDirectory + @"\MediaPortal.exe not found. Program Exit....."); } } } Added: trunk/plugins/mpinstaler/MPInstaler/app.config =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/app.config (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/app.config 2007-03-07 21:29:28 UTC (rev 166) @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> +</configuration> \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/download_form.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.resx (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.resx 2007-03-07 21:29:28 UTC (rev 166) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-10 08:27:45
|
Revision: 172 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=172&view=rev Author: dukus Date: 2007-03-10 00:27:43 -0800 (Sat, 10 Mar 2007) Log Message: ----------- Language strings full support Group properties Control panel improvement Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs trunk/plugins/mpinstaler/MPInstaler.suo Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/application.ico Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -77,6 +77,8 @@ this.label1 = new System.Windows.Forms.Label(); this.tabPage_Language = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.label9 = new System.Windows.Forms.Label(); + this.proiectt_textBox5 = new System.Windows.Forms.TextBox(); this.proiectt_textBox4 = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.proiectt_textBox3 = new System.Windows.Forms.TextBox(); @@ -91,8 +93,8 @@ this.tabPage_Other = new System.Windows.Forms.TabPage(); this.othert_comboBox1 = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); - this.proiectt_textBox5 = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.proiectt_textBox6 = new System.Windows.Forms.TextBox(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabPage_Skin.SuspendLayout(); @@ -172,6 +174,7 @@ // // optionsToolStripMenuItem // + this.optionsToolStripMenuItem.Enabled = false; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); this.optionsToolStripMenuItem.Text = "Options"; @@ -187,6 +190,7 @@ this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Size = new System.Drawing.Size(168, 22); this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // // addToolStripMenuItem // @@ -211,7 +215,7 @@ this.tagReadersToolStripMenuItem, this.externalPlayersToolStripMenuItem}); this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; - this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.windowPluginToolStripMenuItem.Text = "Plugin"; // // windowToolStripMenuItem @@ -256,7 +260,7 @@ this.mediaToolStripMenuItem, this.fullToolStripMenuItem}); this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; - this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.skinToolStripMenuItem.Text = "Skin"; // // componentToolStripMenuItem @@ -284,34 +288,35 @@ // languageToolStripMenuItem // this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.languageToolStripMenuItem.Text = "Language"; this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); // // textToolStripMenuItem // this.textToolStripMenuItem.Name = "textToolStripMenuItem"; - this.textToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.textToolStripMenuItem.Text = "Text"; this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click); // // settingsToolStripMenuItem // + this.settingsToolStripMenuItem.Enabled = false; this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.settingsToolStripMenuItem.Text = "Settings"; // // textToolStripMenuItem1 // this.textToolStripMenuItem1.Name = "textToolStripMenuItem1"; - this.textToolStripMenuItem1.Size = new System.Drawing.Size(132, 22); + this.textToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); this.textToolStripMenuItem1.Text = "Thumbs"; this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click); // // otherToolStripMenuItem // this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; - this.otherToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.otherToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.otherToolStripMenuItem.Text = "Other"; this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click); // @@ -494,6 +499,8 @@ // // tabPage_Proiect // + this.tabPage_Proiect.Controls.Add(this.proiectt_textBox6); + this.tabPage_Proiect.Controls.Add(this.label10); this.tabPage_Proiect.Controls.Add(this.label9); this.tabPage_Proiect.Controls.Add(this.proiectt_textBox5); this.tabPage_Proiect.Controls.Add(this.proiectt_textBox4); @@ -511,11 +518,29 @@ this.tabPage_Proiect.Text = "Proiect Properties"; this.tabPage_Proiect.UseVisualStyleBackColor = true; // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(395, 5); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(66, 13); + this.label9.TabIndex = 9; + this.label9.Text = "Description :"; + // + // proiectt_textBox5 + // + this.proiectt_textBox5.Location = new System.Drawing.Point(398, 21); + this.proiectt_textBox5.Multiline = true; + this.proiectt_textBox5.Name = "proiectt_textBox5"; + this.proiectt_textBox5.Size = new System.Drawing.Size(229, 84); + this.proiectt_textBox5.TabIndex = 8; + this.proiectt_textBox5.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + // // proiectt_textBox4 // this.proiectt_textBox4.Location = new System.Drawing.Point(94, 85); this.proiectt_textBox4.Name = "proiectt_textBox4"; - this.proiectt_textBox4.Size = new System.Drawing.Size(298, 20); + this.proiectt_textBox4.Size = new System.Drawing.Size(76, 20); this.proiectt_textBox4.TabIndex = 7; this.proiectt_textBox4.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); // @@ -652,23 +677,22 @@ this.label8.TabIndex = 0; this.label8.Text = "Directory (relative) :"; // - // proiectt_textBox5 + // label10 // - this.proiectt_textBox5.Location = new System.Drawing.Point(398, 21); - this.proiectt_textBox5.Multiline = true; - this.proiectt_textBox5.Name = "proiectt_textBox5"; - this.proiectt_textBox5.Size = new System.Drawing.Size(229, 84); - this.proiectt_textBox5.TabIndex = 8; - this.proiectt_textBox5.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(176, 92); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(42, 13); + this.label10.TabIndex = 10; + this.label10.Text = "Group :"; // - // label9 + // proiectt_textBox6 // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(395, 5); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(66, 13); - this.label9.TabIndex = 9; - this.label9.Text = "Description :"; + this.proiectt_textBox6.Location = new System.Drawing.Point(224, 85); + this.proiectt_textBox6.Name = "proiectt_textBox6"; + this.proiectt_textBox6.Size = new System.Drawing.Size(168, 20); + this.proiectt_textBox6.TabIndex = 11; + this.proiectt_textBox6.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); // // Form1 // @@ -767,6 +791,8 @@ private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label9; private System.Windows.Forms.TextBox proiectt_textBox5; + private System.Windows.Forms.TextBox proiectt_textBox6; + private System.Windows.Forms.Label label10; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -220,6 +220,7 @@ proiectt_textBox3.Text = _struct.UpdateURL; proiectt_textBox4.Text = _struct.Version; proiectt_textBox5.Text = _struct.Description; + proiectt_textBox6.Text = _struct.Group; _loading = false; } @@ -228,6 +229,8 @@ Form2 StrForm = new Form2(); StrForm.Language = _struct.Language; StrForm.ShowDialog(); + LanguageStringComparer lsc = new LanguageStringComparer(); + StrForm.Language.Sort(lsc); _struct.Language = StrForm.Language; } @@ -239,6 +242,7 @@ private void buildToolStripMenuItem_Click(object sender, EventArgs e) { + sToolStripMenuItem_Click(sender, e); Build_dialog buildfrm = new Build_dialog(this._struct); buildfrm.ShowDialog(); this._struct = buildfrm._struct; @@ -422,6 +426,7 @@ _struct.UpdateURL = proiectt_textBox3.Text; _struct.Version = proiectt_textBox4.Text; _struct.Description = proiectt_textBox5.Text; + _struct.Group = proiectt_textBox6.Text; ; } } @@ -430,6 +435,11 @@ addother(MPinstalerStruct.OTHER_TYPE, ""); } + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Close(); + } + } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -105,9 +105,9 @@ private void button3_Click(object sender, EventArgs e) { + Language.Clear(); for(int i=0;i<listView1.Items.Count;i++) { - Language.Clear(); Language.Add(new LanguageString(listView1.Items[i].SubItems[2].Text, listView1.Items[i].Text, listView1.Items[i].SubItems[1].Text)); } } Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -40,6 +40,7 @@ string _name = string.Empty; string _version = string.Empty; string _description = string.Empty; + string _group = string.Empty; public ArrayList Uninstall = new ArrayList(); public ArrayList FileList = new ArrayList(); @@ -73,6 +74,11 @@ set {_author = value; } } + public string Group + { + get { return _group; } + set { _group = value; } + } public string Description { get { return _description; } @@ -110,7 +116,8 @@ Author = string.Empty; Name = string.Empty; Version = string.Empty; - UpdateURL = string.Empty; + UpdateURL = string.Empty; + Group = string.Empty; } public bool SaveToFile(string fil) @@ -167,7 +174,7 @@ writer.WriteElementString("UpdateURL", this.UpdateURL); writer.WriteElementString("Version", this.Version); writer.WriteElementString("Description", this.Description); - + writer.WriteElementString("Group", this.Group); writer.WriteEndElement(); writer.WriteEndElement(); writer.Flush(); @@ -267,6 +274,9 @@ XmlNode node_des = nodeoption.SelectSingleNode("Description"); if (node_des != null) this._description = node_des.InnerText; + XmlNode node_gr = nodeoption.SelectSingleNode("Group"); + if (node_gr != null) + this.Group = node_gr.InnerText; } public MPIFileList FindList(string typ, string stpy) @@ -493,11 +503,80 @@ public string language; public string mapSting; public string dwCode; + public string prefix; + public string sufix; + public LanguageString(string lang,string dc, string str ) { language = lang; dwCode = dc; mapSting = str; + prefix = string.Empty; + sufix = string.Empty; } + public LanguageString(string lang, string dc, string str, string pre, string su) + { + language = lang; + dwCode = dc; + mapSting = str; + prefix = pre; + sufix = su; + } + public LanguageString() + { + language = string.Empty; + dwCode = string.Empty; + mapSting =string.Empty; + prefix = string.Empty; + sufix = string.Empty; + } } + + public class LanguageStringComparer : IComparer<LanguageString> + { + public int Compare(LanguageString x, LanguageString y) + { + if (x == null) + { + if (y == null) + { + // If x is null and y is null, they're + // equal. + return 0; + } + else + { + // If x is null and y is not null, y + // is greater. + return -1; + } + } + else + { + // If x is not null... + // + if (y == null) + // ...and y is null, x is greater. + { + return 1; + } + else + { + if (x.language.Trim().ToUpper() == y.language.Trim().ToUpper()) + { + if (Convert.ToInt32(x.dwCode) == Convert.ToInt32(y.dwCode)) + return 0; + else if (Convert.ToInt32(x.dwCode) > Convert.ToInt32(y.dwCode)) + return 1; + else return -1; + } + else + { + return (x.language.CompareTo( y.language)); + } + + } + } + } + } } Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -90,6 +90,29 @@ MessageBox.Show(ex.Message); } } + + public void installLanguage(ListBox lb) + { + MPLanguageHelper mpih = new MPLanguageHelper(); + if (this._intalerStruct.Language.Count > 0) + { + LanguageString firstLs = this._intalerStruct.Language[0]; + mpih.Load(firstLs.language); + lb.Items.Add("Adding language :" + firstLs.language); + foreach (LanguageString ls in this._intalerStruct.Language) + { + if (firstLs.language != ls.language) + { + mpih.Language.Sort(new LanguageStringComparer()); + lb.Items.Add("Adding language :" + ls.language); + mpih.Save(); + mpih.Load(ls.language); + } + mpih.Add(ls); + } + mpih.Save(); + } + } public void load() { @@ -173,6 +196,7 @@ } catch (Exception) { + //MessageBox.Show(ex.Message+ex.StackTrace); isValid = false; } } @@ -250,6 +274,7 @@ writer.WriteElementString("Version", it._intalerStruct.Version); writer.WriteElementString("Author", it._intalerStruct.Author); writer.WriteElementString("Description", it._intalerStruct.Description); + writer.WriteElementString("Group", it._intalerStruct.Group); writer.WriteStartElement("Uninstall"); for (int j = 0; j < it._intalerStruct.Uninstall.Count; j++) { @@ -322,6 +347,9 @@ pkg._intalerStruct.Author = nodefile.SelectSingleNode("Author").InnerText; pkg._intalerStruct.Version = nodefile.SelectSingleNode("Version").InnerText; pkg._intalerStruct.UpdateURL = nodefile.SelectSingleNode("URL").InnerText; + XmlNode grup_node = nodefile.SelectSingleNode("Group"); + if (grup_node != null) + pkg._intalerStruct.Group = grup_node.InnerText; XmlNode node_des = nodefile.SelectSingleNode("Description"); XmlNodeList uninstallList = nodefile.SelectNodes("Uninstall/FileInfo"); foreach (XmlNode un in uninstallList) @@ -339,10 +367,134 @@ } - public class MPInstallHelperStruct + public class MPLanguageHelper { - public MPInstallHelperStruct() + public List<LanguageString> Language; + public string iChars; + public string fileName=string.Empty; + public bool isLoaded=false; + Encoding docencoding = null ; + public MPLanguageHelper() { + Language = new List<LanguageString>(); } + public void Add(LanguageString ls) + { + this.Language.Sort(new LanguageStringComparer()); + int idx = -1;// this.Language.BinarySearch(ls, new LanguageStringComparer()); + for (int i = 0; i < this.Language.Count; i++) + if (this.Language[i].dwCode.Trim() == ls.dwCode.Trim()) + { + idx = i; + break; + } + if (idx < 0) + this.Language.Add(ls); + else + { + this.Language[idx].language = ls.language; + this.Language[idx].prefix = ls.prefix; + this.Language[idx].sufix = ls.sufix; + this.Language[idx].mapSting = ls.mapSting; + } + + } + public void Load(string lg) + { + isLoaded = LoadMap(Config.GetFile(Config.Dir.Language, lg + @"\strings.xml")); + fileName = Config.GetFile(Config.Dir.Language, lg + @"\strings.xml"); + } + public void Save() + { + if (isLoaded) + SaveMap(fileName); + } + + public bool SaveMap(string strFileName) + { + if (strFileName == null) return false; + if (strFileName == String.Empty) return false; + try + { + this.Language.Sort(new LanguageStringComparer()); + XmlTextWriter writer = null; + writer = new XmlTextWriter(strFileName, docencoding); + writer.Formatting = Formatting.Indented; + writer.WriteStartDocument(); + writer.WriteStartElement("strings"); + if(!String.IsNullOrEmpty(this.iChars)) + writer.WriteElementString("characters", this.iChars.Trim()); + foreach (LanguageString ls in this.Language) + { + writer.WriteStartElement("string"); + if (!String.IsNullOrEmpty(ls.prefix)) + writer.WriteAttributeString("Prefix",ls.prefix); + if (!String.IsNullOrEmpty(ls.sufix)) + writer.WriteAttributeString("Suffix", ls.sufix); + writer.WriteElementString("id",ls.dwCode); + writer.WriteElementString("value", ls.mapSting); + writer.WriteEndElement(); + + } + writer.WriteEndElement(); + writer.WriteEndDocument(); + writer.Close(); + } + catch (Exception ex) + { + MessageBox.Show("Language writer error : "+ex.Message); + return false; + } + return true; + } + public bool LoadMap(string strFileName) + { +// bool isPrefixEnabled = true; + this.iChars = string.Empty; + this.Language.Clear(); + if (strFileName == null) return false; + if (strFileName == String.Empty) return false; + try + { + XmlDocument doc = new XmlDocument(); + XmlTextReader reader = new XmlTextReader(strFileName); + docencoding = reader.Encoding; + doc.Load(reader); + if (doc.DocumentElement == null) return false; + string strRoot = doc.DocumentElement.Name; + if (strRoot != "strings") return false; + XmlNode nodeChars = doc.DocumentElement.SelectSingleNode("/strings/characters"); + if (nodeChars != null) + { + iChars = nodeChars.InnerText; + } + XmlNodeList list = doc.DocumentElement.SelectNodes("/strings/string"); + foreach (XmlNode node in list) + { + //StringBuilder builder = new StringBuilder(); + LanguageString ls = new LanguageString(); + ls.dwCode = node.SelectSingleNode("id").InnerText; + + XmlAttribute prefix = node.Attributes["Prefix"]; + if (prefix != null) + ls.prefix = prefix.Value; + else ls.prefix = String.Empty; + ls.mapSting=node.SelectSingleNode("value").InnerText; + XmlAttribute suffix = node.Attributes["Suffix"]; + if (suffix != null) + ls.sufix = suffix.Value; + else + ls.sufix = String.Empty; + this.Language.Add(ls); + } + reader.Close(); + return true; + } + catch (Exception ex) + { + MessageBox.Show("Language reader error : " + ex.Message); + return false; + } + } } } Added: trunk/plugins/mpinstaler/MPInstaler/application.ico =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpinstaler/MPInstaler/application.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -28,17 +28,23 @@ /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(controlp)); this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader9 = new System.Windows.Forms.ColumnHeader(); + this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.label2 = new System.Windows.Forms.Label(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.button5 = new System.Windows.Forms.Button(); @@ -63,11 +69,13 @@ this.columnHeader1, this.columnHeader2, this.columnHeader3, - this.columnHeader4}); + this.columnHeader4, + this.columnHeader9}); this.listView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.listView1.FullRowSelect = true; this.listView1.GridLines = true; this.listView1.HideSelection = false; + this.listView1.LargeImageList = this.imageList1; this.listView1.Location = new System.Drawing.Point(3, 0); this.listView1.MultiSelect = false; this.listView1.Name = "listView1"; @@ -76,6 +84,7 @@ this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); + this.listView1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick); // // columnHeader1 // @@ -90,12 +99,23 @@ // columnHeader3 // this.columnHeader3.Text = "Version"; - this.columnHeader3.Width = 202; + this.columnHeader3.Width = 83; // // columnHeader4 // this.columnHeader4.Text = "File"; // + // columnHeader9 + // + this.columnHeader9.Text = "Group"; + this.columnHeader9.Width = 124; + // + // imageList1 + // + this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); + this.imageList1.TransparentColor = System.Drawing.Color.Transparent; + this.imageList1.Images.SetKeyName(0, "application.ico"); + // // button1 // this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -144,6 +164,9 @@ // // tabControl1 // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Location = new System.Drawing.Point(1, 1); @@ -154,6 +177,8 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.comboBox2); this.tabPage1.Controls.Add(this.linkLabel1); this.tabPage1.Controls.Add(this.listView1); this.tabPage1.Controls.Add(this.button2); @@ -168,8 +193,31 @@ this.tabPage1.Text = "Local"; this.tabPage1.UseVisualStyleBackColor = true; // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(250, 280); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(36, 13); + this.label2.TabIndex = 7; + this.label2.Text = "View :"; + // + // comboBox2 + // + this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Items.AddRange(new object[] { + "List", + "Icons"}); + this.comboBox2.Location = new System.Drawing.Point(250, 296); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(82, 21); + this.comboBox2.TabIndex = 6; + this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged); + // // linkLabel1 // + this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.linkLabel1.AutoSize = true; this.linkLabel1.Location = new System.Drawing.Point(7, 321); this.linkLabel1.Name = "linkLabel1"; @@ -194,6 +242,7 @@ // // button5 // + this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button5.Location = new System.Drawing.Point(10, 286); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(215, 23); @@ -204,6 +253,9 @@ // // listView2 // + this.listView2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader5, this.columnHeader6, @@ -299,5 +351,9 @@ private System.Windows.Forms.ColumnHeader columnHeader7; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.ColumnHeader columnHeader8; + private System.Windows.Forms.ImageList imageList1; + private System.Windows.Forms.ColumnHeader columnHeader9; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox comboBox2; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections; using System.ComponentModel; using System.IO; using System.Data; @@ -13,7 +14,11 @@ public partial class controlp : Form { public MPInstallHelper lst = new MPInstallHelper(); - public MPInstallHelper lst_online = new MPInstallHelper(); + public MPInstallHelper lst_online = new MPInstallHelper(); + private Hashtable[] groupTables; + int groupColumn = 0; + + public controlp() { InitializeComponent(); @@ -27,6 +32,7 @@ private void controlp_Load(object sender, EventArgs e) { listView1.Items.Clear(); + listView1.Sorting = SortOrder.Ascending; lst.LoadFromFile(); LoadToListview(); } @@ -50,22 +56,133 @@ item1.SubItems.Add(pk._intalerStruct.Author); item1.SubItems.Add(pk._intalerStruct.Version); item1.SubItems.Add(Path.GetFileName(pk.FileName)); + item1.SubItems.Add(pk._intalerStruct.Group); lv.Items.AddRange(new ListViewItem[] { item1 }); } + InitGroups(lv); + SetGroups(0, lv); } + private void InitGroups( ListView myListView) + { + groupTables = new Hashtable[myListView.Columns.Count]; + for (int column = 0; column < myListView.Columns.Count; column++) + { + // Create a hash table containing all the groups + // needed for a single column. + groupTables[column] = CreateGroupsTable(column,myListView); + } + + // Start with the groups created for the Title column. + SetGroups(0,myListView); + + } + private void SetGroups(int column, ListView myListView) + { + // Remove the current groups. + myListView.Groups.Clear(); + + // Retrieve the hash table corresponding to the column. + Hashtable groups = (Hashtable)groupTables[column]; + + // Copy the groups for the column to an array. + ListViewGroup[] groupsArray = new ListViewGroup[groups.Count]; + groups.Values.CopyTo(groupsArray, 0); + + // Sort the groups and add them to myListView. + Array.Sort(groupsArray, new ListViewGroupSorter(myListView.Sorting)); + myListView.Groups.AddRange(groupsArray); + + // Iterate through the items in myListView, assigning each + // one to the appropriate group. + foreach (ListViewItem item in myListView.Items) + { + // Retrieve the subitem text corresponding to the column. + string subItemText = item.SubItems[column].Text; + + // For the Title column, use only the first letter. + if (column == 0) + { + subItemText = subItemText.Substring(0, 1); + } + + // Assign the item to the matching group. + item.Group = (ListViewGroup)groups[subItemText]; + } + } + private Hashtable CreateGroupsTable(int column, ListView myListView) + { + // Create a Hashtable object. + Hashtable groups = new Hashtable(); + + // Iterate through the items in myListView. + foreach (ListViewItem item in myListView.Items) + { + // Retrieve the text value for the column. + string subItemText = item.SubItems[column].Text; + + // Use the initial letter instead if it is the first column. + if (column == 0) + { + subItemText = subItemText.Substring(0, 1); + } + + // If the groups table does not already contain a group + // for the subItemText value, add a new group using the + // subItemText value for the group header and Hashtable key. + if (!groups.Contains(subItemText)) + { + groups.Add(subItemText, new ListViewGroup(subItemText, + HorizontalAlignment.Left)); + } + } + + // Return the Hashtable object. + return groups; + } + + private class ListViewGroupSorter : IComparer + { + private SortOrder order; + + // Stores the sort order. + public ListViewGroupSorter(SortOrder theOrder) + { + order = theOrder; + } + + // Compares the groups by header value, using the saved sort + // order to return the correct value. + public int Compare(object x, object y) + { + int result = String.Compare( + ((ListViewGroup)x).Header, + ((ListViewGroup)y).Header + ); + if (order == SortOrder.Ascending) + { + return result; + } + else + { + return -result; + } + } + } + + private void listView1_SelectedIndexChanged(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { button1.Enabled = true; - button2.Enabled = true; + button3.Enabled = true; button4.Enabled = true; } else { button1.Enabled = false; - button2.Enabled = false; + button3.Enabled = false; button4.Enabled = false; } } @@ -144,5 +261,60 @@ MessageBox.Show("Invalid package !"); } + + private void listView1_ColumnClick(object sender, ColumnClickEventArgs e) + { + // Set the sort order to ascending when changing + // column groups; otherwise, reverse the sort order. + if (listView1.Sorting == SortOrder.Descending || + ((e.Column != groupColumn))) + { + listView1.Sorting = SortOrder.Ascending; + } + else + { + listView1.Sorting = SortOrder.Descending; + } + groupColumn = e.Column; + + // Set the groups to those created for the clicked column. + SetGroups(e.Column,listView1); + + } + + private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) + { + if (comboBox2.Text == "Icons") + listView1.View = System.Windows.Forms.View.LargeIcon; + else listView1.View = System.Windows.Forms.View.Details; + } } + public class ListViewGroupSorter : IComparer + { + private SortOrder order; + + // Stores the sort order. + public ListViewGroupSorter(SortOrder theOrder) + { + order = theOrder; + } + + // Compares the groups by header value, using the saved sort + // order to return the correct value. + public int Compare(object x, object y) + { + int result = String.Compare( + ((ListViewGroup)x).Header, + ((ListViewGroup)y).Header + ); + if (order == SortOrder.Ascending) + { + return result; + } + else + { + return -result; + } + } + } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-10 08:27:43 UTC (rev 172) @@ -117,4 +117,141 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACS + HQAAAk1TRnQBSQFMAwEBAAEEAQABBAEAASABAAEgAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABgAMA + ASADAAEBAQABIAYAAUAqAAEHASUBbgH/AQgBKwF/Af8BCAEvAYgB/wEJATUBmQH/AQkBNgGfAf8BCQE8 + AbAB/wEJAT4BtgH/AQoBPgG2Af8BCgE+AbYB/wEKAT4BtgH/AQoBPgG2Af8BCgE+AbYB/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EdAU0BugH/AVkBfAHMAf8BeAGQ + AdUB/wGOAaUB3AH/AaUBuAHjAf8BuwHJAeoB/wHJAdQB7AH/Ac4B1wHtAf8B0QHZAesB/wHQAdgB6QH/ + AcsB1AHnAf8BwQHMAeMB/wG3AcQB3wH/AawBuwHbAf8BnwGwAdcB/wGRAaYB0wH/AYIBmgHQAf8BdQGN + AcwB/wFjAYEByQH/AVABdgHFAf8BPQFnAcIB/wEyAV4BwAH/AScBVgG+Af8BHgFPAb0B/wEWAUgBugH/ + AQsBPwG2Af8BBwEnAXQB//8ApQABCAEpAXkB/wEIAS8BiAH/AQkBNAGWAf8BCQE2AZ8B/wEJATsBrQH/ + AQoBPgG2Af8BCQE+AbYB/wEMAT8BtgH/AQ0BQAG2Af8BDQFAAbYB/wELAT4BtgH/AQkBPgG2Af8BCgE+ + AbYB/wEJATkBpwH/AQkBNgGfAf8BCQEyAZAB/wEIAS4BhQH/AQgBKAF2Af//AJ0AAUIBTQE+BwABPgMA + ASgDAAGAAwABIAMAAQEBAAEBBgABAhYAA/8BAAH8AgABPwwAAcACAAEDDAABgAIAAQEMAAGAAgABAQwA + AYACAAEBDAABgAIAAQH/AD0AAYACAAEBDAABgAIAAQEMAAGAAgABAQwAAYACAAEBDAABgAIAAQEMAAHA + AgABAwwAAf4CAAF/DAAL +</value> + </data> </root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-09 17:26:16 UTC (rev 171) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-10 08:27:43 UTC (rev 172) @@ -153,10 +153,12 @@ this.Refresh(); this.Update(); } + package.installLanguage(listBox1); button_next.Visible = false; button_cancel.Enabled = true; inst.Add(package); inst.SaveToFile(); + label2.Text = "Done ..."; button_cancel.Text = "Finish"; } Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-13 20:15:43
|
Revision: 185 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=185&view=rev Author: dukus Date: 2007-03-13 13:14:54 -0700 (Tue, 13 Mar 2007) Log Message: ----------- Sorting bug fixed. Update option now working. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/download_form.cs trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs trunk/plugins/mpinstaler/MPInstaler/start_form.cs trunk/plugins/mpinstaler/MPInstaler/start_form.resx trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx trunk/plugins/mpinstaler/MPInstaler.suo Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/background.jpg Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -55,7 +55,7 @@ get { return _update; } set { - if (value == null) _update = ""; else _update = value; + if (value == null) _update = ""; else _update = value.Trim(); } } @@ -391,10 +391,10 @@ } if (flst.Type == OTHER_TYPE) { - if (String.IsNullOrEmpty(flst.SubType)) - ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + if (String.IsNullOrEmpty(flst.SubType.Trim())) + ret = Config.GetFolder(Config.Dir.Base) + @"\" + Path.GetFileName(flst.FileName); else - ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + ret = Config.GetFolder(Config.Dir.Base) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); } if (flst.Type == TEXT_TYPE) { Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -98,13 +98,15 @@ { LanguageString firstLs = this._intalerStruct.Language[0]; mpih.Load(firstLs.language); - lb.Items.Add("Adding language :" + firstLs.language); + if (lb != null) + lb.Items.Add("Adding language :" + firstLs.language); foreach (LanguageString ls in this._intalerStruct.Language) { if (firstLs.language != ls.language) { mpih.Language.Sort(new LanguageStringComparer()); - lb.Items.Add("Adding language :" + ls.language); + if (lb != null) + lb.Items.Add("Adding language :" + ls.language); mpih.Save(); mpih.Load(ls.language); } @@ -239,6 +241,15 @@ return -1; } + public MPpackageStruct Find(string name) + { + for (int i = 0; i < lst.Count; i++) + { + if (((MPpackageStruct)lst[i])._intalerStruct.Name.Trim() ==name.Trim()) + return (MPpackageStruct)lst[i]; + } + return null; + } public void SaveToFile() { if (!Directory.Exists(InstalDir)) Added: trunk/plugins/mpinstaler/MPInstaler/background.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpinstaler/MPInstaler/background.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -47,7 +47,7 @@ private void DownloadEnd(object sender, AsyncCompletedEventArgs e) { if (e.Error!=null) - MessageBox.Show(e.Error.Message); + MessageBox.Show(e.Error.Message+"\n"+e.Error.InnerException); button1.Enabled = false; this.Close(); } Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -28,10 +28,12 @@ /// </summary> private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(start_form)); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.button4 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 @@ -68,15 +70,27 @@ // this.openFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*"; // + // button4 + // + this.button4.Location = new System.Drawing.Point(254, 231); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(26, 23); + this.button4.TabIndex = 3; + this.button4.Text = "X"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // // start_form // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.ClientSize = new System.Drawing.Size(292, 266); + this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "start_form"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.ResumeLayout(false); @@ -89,5 +103,6 @@ private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.Button button4; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -52,5 +52,10 @@ cnt.ShowDialog(); this.Show(); } + + private void button4_Click(object sender, EventArgs e) + { + this.Close(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.resx 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.resx 2007-03-13 20:14:54 UTC (rev 185) @@ -120,4 +120,73 @@ <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>39, 17</value> </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa + HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgo + KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEKAUwDASIAAhEBAxEB/8QA + HwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIh + MUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVW + V1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKj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UuKXFGKQCYpcUtLigBtLS0UAFFLiigBBS0oooABRS4paAGEUwi + psU0imBAVpjLVgrTGWgCqy1Gy1aZajZaAKjLUbLVtlqNkpiKjLTClWmSoytAFVkqMpVtlphWgCoUpuyr + RSm7KYjmkFToKjSpkoAkUVKq0xamSgB6rUqrTFqZaQx6ipVWmLUyUAPVamVajWplpDHqKlApi1KKAFUV + IBTRTxSAUCnAUgp1AABS4oooAKXFAooAKUCkp1ACYoxS0UDAUuKBRQAClxQKKBCgUYoFLQAwrTStSUh6 + UAQFaYy1M1MNAEDLTGWp2phpgV2SmFKsNUZoArlKYUqw1RtTEQlabsqY000Af//Z +</value> + </data> </root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -53,6 +53,7 @@ this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); this.columnHeader8 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader10 = new System.Windows.Forms.ColumnHeader(); this.label1 = new System.Windows.Forms.Label(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.tabControl1.SuspendLayout(); @@ -149,6 +150,7 @@ this.button3.TabIndex = 3; this.button3.Text = "Update"; this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); // // button4 // @@ -192,6 +194,7 @@ this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Local"; this.tabPage1.UseVisualStyleBackColor = true; + this.tabPage1.Enter += new System.EventHandler(this.tabPage1_Enter); // // label2 // @@ -239,6 +242,7 @@ this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Online"; this.tabPage2.UseVisualStyleBackColor = true; + this.tabPage2.Enter += new System.EventHandler(this.tabPage2_Enter); // // button5 // @@ -260,7 +264,8 @@ this.columnHeader5, this.columnHeader6, this.columnHeader7, - this.columnHeader8}); + this.columnHeader8, + this.columnHeader10}); this.listView2.FullRowSelect = true; this.listView2.Location = new System.Drawing.Point(7, 48); this.listView2.Name = "listView2"; @@ -268,6 +273,7 @@ this.listView2.TabIndex = 2; this.listView2.UseCompatibleStateImageBehavior = false; this.listView2.View = System.Windows.Forms.View.Details; + this.listView2.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView2_ColumnClick); // // columnHeader5 // @@ -287,7 +293,12 @@ // columnHeader8 // this.columnHeader8.Text = "File"; + this.columnHeader8.Width = 131; // + // columnHeader10 + // + this.columnHeader10.Text = "Group"; + // // label1 // this.label1.AutoSize = true; @@ -355,5 +366,6 @@ private System.Windows.Forms.ColumnHeader columnHeader9; private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ColumnHeader columnHeader10; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-13 20:14:54 UTC (rev 185) @@ -91,6 +91,7 @@ // Sort the groups and add them to myListView. Array.Sort(groupsArray, new ListViewGroupSorter(myListView.Sorting)); + myListView.Groups.Clear(); myListView.Groups.AddRange(groupsArray); // Iterate through the items in myListView, assigning each @@ -202,8 +203,6 @@ private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { - //MPExtensionFileList.xml - //Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP"))+@"\" + string temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + "MPExtensionFileList.xml"; if (MPInstallHelper.Download(comboBox1.Text + "/" + "MPExtensionFileList.xml",temp_file)) { @@ -285,9 +284,113 @@ private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox2.Text == "Icons") + { + SetGroups(4, listView1); listView1.View = System.Windows.Forms.View.LargeIcon; + } else listView1.View = System.Windows.Forms.View.Details; } + + private void tabPage2_Enter(object sender, EventArgs e) + { + InitGroups(listView2); + SetGroups(0, listView2); + } + + private void tabPage1_Enter(object sender, EventArgs e) + { + InitGroups(listView1); + SetGroups(0, listView1); + } + + private void listView2_ColumnClick(object sender, ColumnClickEventArgs e) + { + // Set the sort order to ascending when changing + // column groups; otherwise, reverse the sort order. + if (listView2.Sorting == SortOrder.Descending || + ((e.Column != groupColumn))) + { + listView2.Sorting = SortOrder.Ascending; + } + else + { + listView2.Sorting = SortOrder.Descending; + } + groupColumn = e.Column; + + // Set the groups to those created for the clicked column. + SetGroups(e.Column, listView2); + } + + private void button3_Click(object sender, EventArgs e) + { + if (listView1.SelectedItems.Count > 0) + { + MPpackageStruct pk = lst.Find(listView1.SelectedItems[0].SubItems[0].Text); + if (pk != null) + { + if (!String.IsNullOrEmpty(pk._intalerStruct.UpdateURL.Trim())) + { + string file_name = "MPExtensionFileList.xml"; + string temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + file_name; + download_form dw = new download_form(pk._intalerStruct.UpdateURL + "/" + file_name, temp_file); + dw.Text = listView1.SelectedItems[0].SubItems[3].Text; + dw.ShowDialog(); + if (File.Exists(temp_file)) + { + MPInstallHelper temp_mpih = new MPInstallHelper(); + temp_mpih.LoadFromFile(temp_file); + int idx = temp_mpih.IndexOf(pk); + if (idx > -1) + { + if (((MPpackageStruct)temp_mpih.lst[idx])._intalerStruct.Version.CompareTo(pk._intalerStruct.Version) > 0) + { + if (MessageBox.Show("New version found!. Do you want download and install ?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MPpackageStruct pk1 = ((MPpackageStruct)temp_mpih.lst[idx]); + file_name = pk1.FileName; + temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + file_name; + download_form dw1 = new download_form(pk1._intalerStruct.UpdateURL + "/" + file_name, temp_file); + dw1.Text = pk1._intalerStruct.UpdateURL+"/"+pk1.FileName+"/"+pk1._intalerStruct.Version; + dw1.ShowDialog(); + if (File.Exists(temp_file)) + { + wizard_1 wiz = new wizard_1(); + wiz.package.LoadFromFile(temp_file); + if (wiz.package.isValid) + { + wiz.starStep(); + listView1.Items.Clear(); + lst.LoadFromFile(); + LoadToListview(); + } + else + MessageBox.Show("Invalid package !"); + } + } + } + else + { + MessageBox.Show("No updates were found !"); + } + } + else + { + MessageBox.Show("Wrong udapte URL !"); + } + } + } + else + { + MessageBox.Show("Update information not found !"); + } + } + else + { + MessageBox.Show("Error processing package !"); + } + } + } } public class ListViewGroupSorter : IComparer { Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-13 03:38:40 UTC (rev 184) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-13 20:14:54 UTC (rev 185) @@ -126,129 +126,129 @@ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACS HQAAAk1TRnQBSQFMAwEBAAEEAQABBAEAASABAAEgAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABgAMA - ASADAAEBAQABIAYAAUAqAAEHASUBbgH/AQgBKwF/Af8BCAEvAYgB/wEJATUBmQH/AQkBNgGfAf8BCQE8 - AbAB/wEJAT4BtgH/AQoBPgG2Af8BCgE+AbYB/wEKAT4BtgH/AQoBPgG2Af8BCgE+AbYB/wEKAT4BtgH/ - AQoBPgG2Af8BCQE6AaoB/wEJATYBnwH/AQkBNAGWAf8BCAEvAYgB/wEIASkBeQH/AQcBJAFrAf//AKEA - AQkB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GRAaYB0wH/AYIBmgHQAf8BdQGN - AcwB/wFjAYEByQH/AVABdgHFAf8BPQFnAcIB/wEyAV4BwAH/AScBVgG+Af8BHgFPAb0B/wEWAUgBugH/ - AQsBPwG2Af8BBwEnAXQB//8ApQABCAEpAXkB/wEIAS8BiAH/AQkBNAGWAf8BCQE2AZ8B/wEJATsBrQH/ - AQoBPgG2Af8BCQE+AbYB/wEMAT8BtgH/AQ0BQAG2Af8BDQFAAbYB/wELAT4BtgH/AQkBPgG2Af8BCgE+ - AbYB/wEJATkBpwH/AQkBNgGfAf8BCQEyAZAB/wEIAS4BhQH/AQgBKAF2Af//AJ0AAUIBTQE+BwABPgMA + AcsB1AHnAf8BwQHMAeMB/wG3AcQB3wH/AawBuwHbAf8BnwGwAdcB/wGRAaYB0wH/AYIBmgHQAf8BewGN + AcwB/wFpAYEByQH/AVYBfAHFAf8BQwFtAcIB/wE4AWQBwAH/AS0BXAG+Af8BJAFVAb0B/wEcAU4BugH/ + AREBRQG2Af8BDQEtAXoB//8ApQABDgEvAX8B/wEOATUBiAH/AQ8BOgGWAf8BDwE8AZ8B/wEPAUEBrQH/ + ARABRAG2Af8BDwFEAbYB/wESAUUBtgH/ARMBRgG2Af8BEwFGAbYB/wERAUQBtgH/AQ8BRAG2Af8BEAFE + AbYB/wEPAT8BpwH/AQ8BPAGfAf8BDwE4AZAB/wEOATQBhQH/AQ4BLgF8Af//AJ0AAUIBTQE+BwABPgMA ASgDAAGAAwABIAMAAQEBAAEBBgABAhYAA/8BAAH8AgABPwwAAcACAAEDDAABgAIAAQEMAAGAAgABAQwA AYACAAEBDAABgAIAAQH/AD0AAYACAAEBDAABgAIAAQEMAAGAAgABAQwAAYACAAEBDAABgAIAAQEMAAHA AgABAwwAAf4CAAF/DAAL Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-16 15:59:06
|
Revision: 189 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=189&view=rev Author: dukus Date: 2007-03-16 08:59:02 -0700 (Fri, 16 Mar 2007) Log Message: ----------- Skin installation bug fixed When update file not exist bug fixed Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/download_form.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-14 17:01:09 UTC (rev 188) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 15:59:02 UTC (rev 189) @@ -44,7 +44,7 @@ while ((entry = s.GetNextEntry()) != null) { //MessageBox.Show(entry.Name); - if (Path.GetFileName(entry.Name) ==Path.GetFileName(fl.FileName)) + if (test_file(fl,entry)) { string tpf =Path.GetFullPath(MPinstalerStruct.GetDirEntry(fl)) ; if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE) @@ -91,6 +91,25 @@ } } + bool test_file(MPIFileList fl, ZipEntry ze) + { + if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE) + { + if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName) + && ze.Name.Contains(@"\"+fl.SubType+@"\")) + { + MessageBox.Show(ze.Name); + return true; + } + else return false; + } + else + { + if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName)) + return true; + else return false; + } + } public void installLanguage(ListBox lb) { MPLanguageHelper mpih = new MPLanguageHelper(); Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-14 17:01:09 UTC (rev 188) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-16 15:59:02 UTC (rev 189) @@ -4,6 +4,7 @@ using System.Data; using System.Drawing; using System.Text; +using System.IO; using System.Windows.Forms; using System.Net; @@ -46,8 +47,12 @@ } private void DownloadEnd(object sender, AsyncCompletedEventArgs e) { - if (e.Error!=null) - MessageBox.Show(e.Error.Message+"\n"+e.Error.InnerException); + if (e.Error != null) + { + if (File.Exists(dest)) + File.Delete(dest); + MessageBox.Show(e.Error.Message + "\n" + e.Error.InnerException); + } button1.Enabled = false; this.Close(); } Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-16 19:07:20
|
Revision: 190 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=190&view=rev Author: dukus Date: 2007-03-16 12:07:02 -0700 (Fri, 16 Mar 2007) Log Message: ----------- Added Zebons suggestion Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 15:59:02 UTC (rev 189) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 19:07:02 UTC (rev 190) @@ -107,26 +107,43 @@ } } } - private void addskin(int type) - { - // string fil; - openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; - openFileDialog1.Multiselect = true; - if (openFileDialog1.ShowDialog(this) == DialogResult.OK) - { - foreach (string fil in openFileDialog1.FileNames) - switch (type) - { - case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, "BlueTwo", Path.GetFullPath(fil), "02010", ""); - break; - case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, "BlueTwo", Path.GetFullPath(fil), "02020", ""); - break; - default: - break; - } - } - } + private void addskin(int type) + { + // string fil; + string subtype; + openFileDialog1.Multiselect = true; + switch (type) + { + case 1: openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; + break; + case 2: openFileDialog1.Filter = "png files|*.png|bmp files|*.bmp|xml files|*.xml|All files|*.*"; + break; + } + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + foreach (string fil in openFileDialog1.FileNames) + { + if (Path.GetFullPath(fil).IndexOf("Skin\\") == 0) + subtype = "BlueTwo"; + else + { + subtype =Path.GetFullPath(fil).Substring(Path.GetFullPath(fil).IndexOf("Skin\\") +5); + subtype =subtype.Substring(0,subtype.IndexOf("\\")); + } + switch (type) + { + case 1: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_TYPE, subtype, Path.GetFullPath(fil), "02010", ""); + break; + case 2: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_MEDIA_TYPE, subtype, Path.GetFullPath(fil), "02020",""); + break; + default: + break; + } + } + } + } + private void addother(string ty, string sty) { // string fil; Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 15:59:02 UTC (rev 189) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 19:07:02 UTC (rev 190) @@ -34,16 +34,21 @@ this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); - this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.listView2 = new System.Windows.Forms.ListView(); + this.button5 = new System.Windows.Forms.Button(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); this.SuspendLayout(); // // button1 // - this.button1.Location = new System.Drawing.Point(15, 279); + this.button1.Location = new System.Drawing.Point(13, 279); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(65, 21); this.button1.TabIndex = 0; @@ -53,7 +58,7 @@ // // button2 // - this.button2.Location = new System.Drawing.Point(311, 279); + this.button2.Location = new System.Drawing.Point(309, 279); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 21); this.button2.TabIndex = 1; @@ -66,8 +71,9 @@ this.languageComboBox.FormattingEnabled = true; this.languageComboBox.Location = new System.Drawing.Point(216, 252); this.languageComboBox.Name = "languageComboBox"; - this.languageComboBox.Size = new System.Drawing.Size(170, 21); + this.languageComboBox.Size = new System.Drawing.Size(168, 21); this.languageComboBox.TabIndex = 2; + this.languageComboBox.SelectedIndexChanged += new System.EventHandler(this.languageComboBox_SelectedIndexChanged); // // listView1 // @@ -95,6 +101,11 @@ this.columnHeader2.Text = "Value"; this.columnHeader2.Width = 137; // + // columnHeader3 + // + this.columnHeader3.Text = "Language"; + this.columnHeader3.Width = 155; + // // textBox1 // this.textBox1.Location = new System.Drawing.Point(12, 253); @@ -111,7 +122,7 @@ // // button3 // - this.button3.Location = new System.Drawing.Point(107, 279); + this.button3.Location = new System.Drawing.Point(105, 279); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 21); this.button3.TabIndex = 6; @@ -121,7 +132,7 @@ // // button4 // - this.button4.Location = new System.Drawing.Point(209, 279); + this.button4.Location = new System.Drawing.Point(207, 279); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 21); this.button4.TabIndex = 7; @@ -129,16 +140,53 @@ this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // - // columnHeader3 + // comboBox1 // - this.columnHeader3.Text = "Language"; - this.columnHeader3.Width = 155; + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(13, 306); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(371, 21); + this.comboBox1.TabIndex = 8; // + // listView2 + // + this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader4, + this.columnHeader5}); + this.listView2.Location = new System.Drawing.Point(434, 12); + this.listView2.Name = "listView2"; + this.listView2.Size = new System.Drawing.Size(227, 311); + this.listView2.TabIndex = 9; + this.listView2.UseCompatibleStateImageBehavior = false; + this.listView2.View = System.Windows.Forms.View.Details; + // + // button5 + // + this.button5.Location = new System.Drawing.Point(390, 156); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(38, 23); + this.button5.TabIndex = 10; + this.button5.Text = "<-"; + this.button5.UseVisualStyleBackColor = true; + // + // columnHeader4 + // + this.columnHeader4.Text = "Id"; + // + // columnHeader5 + // + this.columnHeader5.Text = "Value"; + this.columnHeader5.Width = 134; + // // Form2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(396, 325); + this.ClientSize = new System.Drawing.Size(673, 335); + this.Controls.Add(this.button5); + this.Controls.Add(this.listView2); + this.Controls.Add(this.comboBox1); this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.textBox2); @@ -168,5 +216,10 @@ private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ListView listView2; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader5; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 15:59:02 UTC (rev 189) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 19:07:02 UTC (rev 190) @@ -16,11 +16,14 @@ { public string baseDir; public List<LanguageString> Language; - + public MPLanguageHelper deflang = new MPLanguageHelper(); + public MPLanguageHelper lang = new MPLanguageHelper(); string LanguageDirectory = Config.GetFolder(Config.Dir.Language); public Form2() { InitializeComponent(); + deflang.Load("English"); + lang.Load("English"); } private void LoadLanguages() { @@ -101,8 +104,24 @@ item1.SubItems.Add(lg.language); listView1.Items.AddRange(new ListViewItem[] { item1 }); } + comboBox1.Items.Clear(); + foreach (LanguageString lg in deflang.Language) + { + comboBox1.Items.Add(lg.dwCode+" - " + lg.mapSting); + } + load_lang(); } + void load_lang() + { + listView2.Items.Clear(); + foreach (LanguageString lg in lang.Language) + { + ListViewItem item1 = new ListViewItem(lg.dwCode, 0); + item1.SubItems.Add(lg.mapSting); + listView2.Items.AddRange(new ListViewItem[] { item1 }); + } + } private void button3_Click(object sender, EventArgs e) { Language.Clear(); @@ -116,5 +135,11 @@ { this.Close(); } + + private void languageComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + lang.Load(languageComboBox.Text); + load_lang(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-18 11:14:46
|
Revision: 196 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=196&view=rev Author: dukus Date: 2007-03-18 03:30:53 -0700 (Sun, 18 Mar 2007) Log Message: ----------- SVN Conflict resolved Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-17 13:53:17 UTC (rev 195) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-18 10:30:53 UTC (rev 196) @@ -98,7 +98,6 @@ if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName) && ze.Name.Contains(@"\"+fl.SubType+@"\")) { -// MessageBox.Show(ze.Name); return true; } else return false; Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-18 12:06:38
|
Revision: 193 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=193&view=rev Author: dukus Date: 2007-03-16 23:59:36 -0700 (Fri, 16 Mar 2007) Log Message: ----------- Advanced language editor Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 20:30:59 UTC (rev 192) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-17 06:59:36 UTC (rev 193) @@ -41,9 +41,9 @@ this.button4 = new System.Windows.Forms.Button(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.listView2 = new System.Windows.Forms.ListView(); - this.button5 = new System.Windows.Forms.Button(); this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); + this.button5 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 @@ -77,6 +77,9 @@ // // listView1 // + this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, @@ -154,6 +157,7 @@ this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader4, this.columnHeader5}); + this.listView2.FullRowSelect = true; this.listView2.Location = new System.Drawing.Point(434, 12); this.listView2.Name = "listView2"; this.listView2.Size = new System.Drawing.Size(227, 311); @@ -161,6 +165,15 @@ this.listView2.UseCompatibleStateImageBehavior = false; this.listView2.View = System.Windows.Forms.View.Details; // + // columnHeader4 + // + this.columnHeader4.Text = "Id"; + // + // columnHeader5 + // + this.columnHeader5.Text = "Value"; + this.columnHeader5.Width = 134; + // // button5 // this.button5.Location = new System.Drawing.Point(390, 156); @@ -169,16 +182,8 @@ this.button5.TabIndex = 10; this.button5.Text = "<-"; this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); // - // columnHeader4 - // - this.columnHeader4.Text = "Id"; - // - // columnHeader5 - // - this.columnHeader5.Text = "Value"; - this.columnHeader5.Width = 134; - // // Form2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 20:30:59 UTC (rev 192) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-17 06:59:36 UTC (rev 193) @@ -141,5 +141,16 @@ lang.Load(languageComboBox.Text); load_lang(); } + + private void button5_Click(object sender, EventArgs e) + { + foreach (ListViewItem it in listView2.SelectedItems) + { + ListViewItem item1 = new ListViewItem(it.SubItems[0].Text, 0); + item1.SubItems.Add(it.SubItems[1].Text); + item1.SubItems.Add(languageComboBox.Text); + listView1.Items.AddRange(new ListViewItem[] { item1 }); + } + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-03-19 20:39:28
|
Revision: 198 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=198&view=rev Author: dukus Date: 2007-03-19 13:32:28 -0700 (Mon, 19 Mar 2007) Log Message: ----------- More advanced language editor. Logo properties. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs Removed Paths: ------------- trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -75,7 +75,7 @@ this.tabPage_Text = new System.Windows.Forms.TabPage(); this.textt_comboBox1 = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - this.tabPage_Language = new System.Windows.Forms.TabPage(); + this.tabPage_Advanced = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); this.proiectt_textBox6 = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); @@ -95,14 +95,19 @@ this.tabPage_Other = new System.Windows.Forms.TabPage(); this.othert_comboBox1 = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label11 = new System.Windows.Forms.Label(); + this.button_browse = new System.Windows.Forms.Button(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabPage_Skin.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage_Text.SuspendLayout(); + this.tabPage_Advanced.SuspendLayout(); this.tabPage_Proiect.SuspendLayout(); this.tabPage_Thumbs.SuspendLayout(); this.tabPage_Other.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // menuStrip1 @@ -444,7 +449,7 @@ this.tabControl1.Controls.Add(this.tabPage_Plugin); this.tabControl1.Controls.Add(this.tabPage_Skin); this.tabControl1.Controls.Add(this.tabPage_Text); - this.tabControl1.Controls.Add(this.tabPage_Language); + this.tabControl1.Controls.Add(this.tabPage_Advanced); this.tabControl1.Controls.Add(this.tabPage_Proiect); this.tabControl1.Controls.Add(this.tabPage_Thumbs); this.tabControl1.Controls.Add(this.tabPage_Other); @@ -488,14 +493,17 @@ this.label1.TabIndex = 0; this.label1.Text = "Type:"; // - // tabPage_Language + // tabPage_Advanced // - this.tabPage_Language.Location = new System.Drawing.Point(4, 22); - this.tabPage_Language.Name = "tabPage_Language"; - this.tabPage_Language.Size = new System.Drawing.Size(643, 120); - this.tabPage_Language.TabIndex = 3; - this.tabPage_Language.Text = "Properties"; - this.tabPage_Language.UseVisualStyleBackColor = true; + this.tabPage_Advanced.Controls.Add(this.button_browse); + this.tabPage_Advanced.Controls.Add(this.label11); + this.tabPage_Advanced.Controls.Add(this.pictureBox1); + this.tabPage_Advanced.Location = new System.Drawing.Point(4, 22); + this.tabPage_Advanced.Name = "tabPage_Advanced"; + this.tabPage_Advanced.Size = new System.Drawing.Size(643, 120); + this.tabPage_Advanced.TabIndex = 3; + this.tabPage_Advanced.Text = "Advanced Properties"; + this.tabPage_Advanced.UseVisualStyleBackColor = true; // // tabPage_Proiect // @@ -694,6 +702,35 @@ this.label8.TabIndex = 0; this.label8.Text = "Directory (relative) :"; // + // pictureBox1 + // + this.pictureBox1.Location = new System.Drawing.Point(3, 26); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(64, 64); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + this.pictureBox1.LoadCompleted += new System.ComponentModel.AsyncCompletedEventHandler(this.pictureBox1_LoadCompleted); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(3, 10); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(37, 13); + this.label11.TabIndex = 1; + this.label11.Text = "Logo :"; + // + // button_browse + // + this.button_browse.Location = new System.Drawing.Point(0, 94); + this.button_browse.Name = "button_browse"; + this.button_browse.Size = new System.Drawing.Size(67, 23); + this.button_browse.TabIndex = 2; + this.button_browse.Text = "Browse..."; + this.button_browse.UseVisualStyleBackColor = true; + this.button_browse.Click += new System.EventHandler(this.button_browse_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -714,12 +751,15 @@ this.tabControl1.ResumeLayout(false); this.tabPage_Text.ResumeLayout(false); this.tabPage_Text.PerformLayout(); + this.tabPage_Advanced.ResumeLayout(false); + this.tabPage_Advanced.PerformLayout(); this.tabPage_Proiect.ResumeLayout(false); this.tabPage_Proiect.PerformLayout(); this.tabPage_Thumbs.ResumeLayout(false); this.tabPage_Thumbs.PerformLayout(); this.tabPage_Other.ResumeLayout(false); this.tabPage_Other.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -764,7 +804,7 @@ private System.Windows.Forms.TabPage tabPage_Plugin; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage_Text; - private System.Windows.Forms.TabPage tabPage_Language; + private System.Windows.Forms.TabPage tabPage_Advanced; private System.Windows.Forms.TabPage tabPage_Proiect; private System.Windows.Forms.ColumnHeader columnHeader6; private System.Windows.Forms.ToolStripMenuItem textToolStripMenuItem; @@ -793,6 +833,9 @@ private System.Windows.Forms.TextBox proiectt_textBox5; private System.Windows.Forms.TextBox proiectt_textBox6; private System.Windows.Forms.Label label10; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Button button_browse; + private System.Windows.Forms.Label label11; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -244,6 +244,7 @@ proiectt_textBox4.Text = _struct.Version; proiectt_textBox5.Text = _struct.Description; proiectt_textBox6.Text = _struct.Group; + pictureBox1.Image = _struct.Logo; _loading = false; } @@ -319,6 +320,7 @@ { tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Proiect); + tabControl1.Controls.Add(tabPage_Advanced); textt_comboBox1.Items.Clear(); textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_LOG_TYPE); textt_comboBox1.Items.Add(MPinstalerStruct.TEXT_README_TYPE); @@ -394,11 +396,13 @@ othert_comboBox1.Text = bossview.SelectedItems[0].SubItems[2].Text; } tabControl1.Controls.Add(tabPage_Proiect); + tabControl1.Controls.Add(tabPage_Advanced); } else { tabControl1.Controls.Clear(); tabControl1.Controls.Add(tabPage_Proiect); + tabControl1.Controls.Add(tabPage_Advanced); } } @@ -467,5 +471,21 @@ { this.Close(); } + + private void button_browse_Click(object sender, EventArgs e) + { + openFileDialog1.Filter = "All files|*.*|png files|*.png|bmp files|*.bmp|jpeg files|*.jpg"; + openFileDialog1.Multiselect = false; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + pictureBox1.Load(openFileDialog1.FileName); + _struct.Logo = pictureBox1.Image; + } + } + + private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e) + { + _struct.Logo = pictureBox1.Image; + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -44,11 +44,16 @@ this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); this.button5 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // - this.button1.Location = new System.Drawing.Point(13, 279); + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(19, 279); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(65, 21); this.button1.TabIndex = 0; @@ -58,9 +63,11 @@ // // button2 // - this.button2.Location = new System.Drawing.Point(309, 279); + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button2.Location = new System.Drawing.Point(589, 279); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 21); + this.button2.Size = new System.Drawing.Size(65, 21); this.button2.TabIndex = 1; this.button2.Text = "Remove"; this.button2.UseVisualStyleBackColor = true; @@ -68,6 +75,7 @@ // // languageComboBox // + this.languageComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.languageComboBox.FormattingEnabled = true; this.languageComboBox.Location = new System.Drawing.Point(216, 252); this.languageComboBox.Name = "languageComboBox"; @@ -86,12 +94,14 @@ this.columnHeader3}); this.listView1.FullRowSelect = true; this.listView1.GridLines = true; + this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.listView1.Location = new System.Drawing.Point(12, 12); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(372, 235); this.listView1.TabIndex = 3; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; + this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick); this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); // // columnHeader1 @@ -111,6 +121,7 @@ // // textBox1 // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.textBox1.Location = new System.Drawing.Point(12, 253); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(62, 20); @@ -118,6 +129,7 @@ // // textBox2 // + this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.textBox2.Location = new System.Drawing.Point(80, 253); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(130, 20); @@ -125,9 +137,11 @@ // // button3 // - this.button3.Location = new System.Drawing.Point(105, 279); + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button3.Location = new System.Drawing.Point(399, 279); this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 21); + this.button3.Size = new System.Drawing.Size(65, 21); this.button3.TabIndex = 6; this.button3.Text = "Save"; this.button3.UseVisualStyleBackColor = true; @@ -135,9 +149,11 @@ // // button4 // - this.button4.Location = new System.Drawing.Point(207, 279); + this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button4.Location = new System.Drawing.Point(494, 279); this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(75, 21); + this.button4.Size = new System.Drawing.Size(65, 21); this.button4.TabIndex = 7; this.button4.Text = "Close"; this.button4.UseVisualStyleBackColor = true; @@ -145,6 +161,7 @@ // // comboBox1 // + this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; this.comboBox1.Location = new System.Drawing.Point(13, 306); @@ -154,13 +171,16 @@ // // listView2 // + this.listView2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader4, this.columnHeader5}); this.listView2.FullRowSelect = true; + this.listView2.HideSelection = false; this.listView2.Location = new System.Drawing.Point(434, 12); this.listView2.Name = "listView2"; - this.listView2.Size = new System.Drawing.Size(227, 311); + this.listView2.Size = new System.Drawing.Size(227, 261); this.listView2.TabIndex = 9; this.listView2.UseCompatibleStateImageBehavior = false; this.listView2.View = System.Windows.Forms.View.Details; @@ -176,7 +196,8 @@ // // button5 // - this.button5.Location = new System.Drawing.Point(390, 156); + this.button5.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.button5.Location = new System.Drawing.Point(390, 121); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(38, 23); this.button5.TabIndex = 10; @@ -184,11 +205,50 @@ this.button5.UseVisualStyleBackColor = true; this.button5.Click += new System.EventHandler(this.button5_Click); // + // button6 + // + this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button6.Location = new System.Drawing.Point(103, 279); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(76, 21); + this.button6.TabIndex = 11; + this.button6.Text = "Add all lang."; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button7 + // + this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button7.Location = new System.Drawing.Point(304, 279); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(65, 21); + this.button7.TabIndex = 12; + this.button7.Text = "Revert"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button8 + // + this.button8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button8.Location = new System.Drawing.Point(209, 279); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(65, 21); + this.button8.TabIndex = 13; + this.button8.Text = "Clear"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // // Form2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(673, 335); + this.Controls.Add(this.button8); + this.Controls.Add(this.button7); + this.Controls.Add(this.button6); this.Controls.Add(this.button5); this.Controls.Add(this.listView2); this.Controls.Add(this.comboBox1); @@ -226,5 +286,8 @@ private System.Windows.Forms.Button button5; private System.Windows.Forms.ColumnHeader columnHeader4; private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -152,5 +152,60 @@ listView1.Items.AddRange(new ListViewItem[] { item1 }); } } + + private void button7_Click(object sender, EventArgs e) + { + LoadLanguages(); + listView1.Items.Clear(); + foreach (LanguageString lg in Language) + { + ListViewItem item1 = new ListViewItem(lg.dwCode, 0); + item1.SubItems.Add(lg.mapSting); + item1.SubItems.Add(lg.language); + listView1.Items.AddRange(new ListViewItem[] { item1 }); + } + } + + private void button6_Click(object sender, EventArgs e) + { + foreach (string lg in languageComboBox.Items) + { + MPLanguageHelper mplh = new MPLanguageHelper(); + mplh.Load(lg); + if (mplh.isLoaded) + { + int idx = -1;// this.Language.BinarySearch(ls, new LanguageStringComparer()); + for (int i = 0; i < mplh.Language.Count; i++) + if (mplh.Language[i].dwCode.Trim() == textBox1.Text.Trim()) + { + idx = i; + break; + } + if (idx > -1) + { + ListViewItem item1 = new ListViewItem(mplh.Language[idx].dwCode, 0); + item1.SubItems.Add(mplh.Language[idx].mapSting); + item1.SubItems.Add(lg); + listView1.Items.AddRange(new ListViewItem[] { item1 }); + } + } + } + } + + private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) + { + if (listView1.SelectedItems.Count > 0) + { + textBox1.Text = listView1.SelectedItems[0].SubItems[0].Text; + textBox2.Text = listView1.SelectedItems[0].SubItems[1].Text; + languageComboBox.Text = listView1.SelectedItems[0].SubItems[2].Text; + listView1.Items.Remove(listView1.SelectedItems[0]); + } + } + + private void button8_Click(object sender, EventArgs e) + { + listView1.Items.Clear(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -41,6 +41,7 @@ string _version = string.Empty; string _description = string.Empty; string _group = string.Empty; + Image _image = null; public ArrayList Uninstall = new ArrayList(); public ArrayList FileList = new ArrayList(); @@ -74,6 +75,12 @@ set {_author = value; } } + public Image Logo + { + get { return _image; } + set { _image = value; } + } + public string Group { get { return _group; } @@ -118,6 +125,7 @@ Version = string.Empty; UpdateURL = string.Empty; Group = string.Empty; + Logo = null; } public bool SaveToFile(string fil) @@ -174,7 +182,8 @@ writer.WriteElementString("UpdateURL", this.UpdateURL); writer.WriteElementString("Version", this.Version); writer.WriteElementString("Description", this.Description); - writer.WriteElementString("Group", this.Group); + writer.WriteElementString("Group", this.Group); + WriteLogoElement(writer); writer.WriteEndElement(); writer.WriteEndElement(); writer.Flush(); @@ -192,6 +201,23 @@ } return true; } + + public void WriteLogoElement(XmlWriter writer) + { + if (this.Logo != null) + { + string t = Path.GetTempFileName(); + this.Logo.Save(t, System.Drawing.Imaging.ImageFormat.Png); + FileStream fs = File.OpenRead(Path.GetFullPath(t)); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); + fs.Close(); + File.Delete(t); + writer.WriteStartElement("Logo"); + writer.WriteBase64(buffer, 0, buffer.Length); + writer.WriteEndElement(); + } + } public void BuilFile(ListBox ls, ProgressBar pb) { @@ -277,6 +303,24 @@ XmlNode node_gr = nodeoption.SelectSingleNode("Group"); if (node_gr != null) this.Group = node_gr.InnerText; + XmlNode node_logo = nodeoption.SelectSingleNode("Logo"); + if (node_logo != null) + { + byte[] buffer = Convert.FromBase64String(node_logo.InnerText); + string t = Path.GetTempFileName(); + FileStream fs = new FileStream(t, FileMode.Create); + fs.Write(buffer, 0, buffer.Length); + fs.Close(); + this.Logo = Image.FromFile(t,true); + try + { + File.Delete(t); + } + catch (Exception) + { + + } + } } public MPIFileList FindList(string typ, string stpy) Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -304,6 +304,7 @@ writer.WriteElementString("Author", it._intalerStruct.Author); writer.WriteElementString("Description", it._intalerStruct.Description); writer.WriteElementString("Group", it._intalerStruct.Group); + it._intalerStruct.WriteLogoElement(writer); writer.WriteStartElement("Uninstall"); for (int j = 0; j < it._intalerStruct.Uninstall.Count; j++) { Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -42,7 +42,7 @@ this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(121, 32); this.button1.TabIndex = 0; - this.button1.Text = "Manage package"; + this.button1.Text = "Create package"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // @@ -72,6 +72,7 @@ // // button4 // + this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button4.Location = new System.Drawing.Point(254, 231); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(26, 23); Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -56,6 +56,7 @@ this.columnHeader10 = new System.Windows.Forms.ColumnHeader(); this.label1 = new System.Windows.Forms.Label(); this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.button6 = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -179,6 +180,7 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.button6); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Controls.Add(this.comboBox2); this.tabPage1.Controls.Add(this.linkLabel1); @@ -199,7 +201,7 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(250, 280); + this.label2.Location = new System.Drawing.Point(361, 280); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(36, 13); this.label2.TabIndex = 7; @@ -212,7 +214,7 @@ this.comboBox2.Items.AddRange(new object[] { "List", "Icons"}); - this.comboBox2.Location = new System.Drawing.Point(250, 296); + this.comboBox2.Location = new System.Drawing.Point(361, 296); this.comboBox2.Name = "comboBox2"; this.comboBox2.Size = new System.Drawing.Size(82, 21); this.comboBox2.TabIndex = 6; @@ -319,6 +321,15 @@ this.comboBox1.TabIndex = 0; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // + // button6 + // + this.button6.Location = new System.Drawing.Point(250, 294); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(105, 23); + this.button6.TabIndex = 8; + this.button6.Text = "Find updates"; + this.button6.UseVisualStyleBackColor = true; + // // controlp // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -367,5 +378,6 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.ColumnHeader columnHeader10; + private System.Windows.Forms.Button button6; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 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Af8BEAE5AZAB/wEPATUBhQH/AQ8BLwF9Af//AJ0AAUIBTQE+BwABPgMA ASgDAAGAAwABIAMAAQEBAAEBBgABAhYAA/8BAAH8AgABPwwAAcACAAEDDAABgAIAAQEMAAGAAgABAQwA AYACAAEBDAABgAIAAQH/AD0AAYACAAEBDAABgAIAAQEMAAGAAgABAQwAAYACAAEBDAABgAIAAQEMAAHA AgABAwwAAf4CAAF/DAAL Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.Designer.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -30,6 +30,7 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(wizard_1)); this.panel1 = new System.Windows.Forms.Panel(); + this.listBox1 = new System.Windows.Forms.ListBox(); this.progressBar2 = new System.Windows.Forms.ProgressBar(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.label2 = new System.Windows.Forms.Label(); @@ -40,15 +41,17 @@ this.button_back = new System.Windows.Forms.Button(); this.button_next = new System.Windows.Forms.Button(); this.button_cancel = new System.Windows.Forms.Button(); - this.listBox1 = new System.Windows.Forms.ListBox(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pictureBox2); this.panel1.Controls.Add(this.listBox1); this.panel1.Controls.Add(this.progressBar2); this.panel1.Controls.Add(this.progressBar1); @@ -60,6 +63,15 @@ this.panel1.Size = new System.Drawing.Size(334, 298); this.panel1.TabIndex = 0; // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.HorizontalScrollbar = true; + this.listBox1.Location = new System.Drawing.Point(14, 174); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(308, 108); + this.listBox1.TabIndex = 5; + // // progressBar2 // this.progressBar2.Location = new System.Drawing.Point(14, 143); @@ -88,7 +100,7 @@ this.title_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.title_label.Location = new System.Drawing.Point(9, 9); this.title_label.Name = "title_label"; - this.title_label.Size = new System.Drawing.Size(313, 30); + this.title_label.Size = new System.Drawing.Size(252, 30); this.title_label.TabIndex = 1; this.title_label.Text = "label1"; // @@ -152,14 +164,16 @@ this.button_cancel.UseVisualStyleBackColor = true; this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click); // - // listBox1 + // pictureBox2 // - this.listBox1.FormattingEnabled = true; - this.listBox1.HorizontalScrollbar = true; - this.listBox1.Location = new System.Drawing.Point(14, 174); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(308, 108); - this.listBox1.TabIndex = 5; + this.pictureBox2.BackColor = System.Drawing.Color.Transparent; + this.pictureBox2.Location = new System.Drawing.Point(267, 4); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(64, 64); + this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox2.TabIndex = 6; + this.pictureBox2.TabStop = false; + this.pictureBox2.Visible = false; // // wizard_1 // @@ -181,6 +195,7 @@ this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.ResumeLayout(false); } @@ -199,5 +214,6 @@ private System.Windows.Forms.ProgressBar progressBar2; private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.PictureBox pictureBox2; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-18 18:10:10 UTC (rev 197) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-03-19 20:32:28 UTC (rev 198) @@ -47,6 +47,15 @@ title_label.Text = package._intalerStruct.Name; button_next.Text = "Next"; richTextBox1.Visible = true; + if (package._intalerStruct.Logo != null) + { + pictureBox2.Visible = true; + pictureBox2.Image = package._intalerStruct.Logo; + } + else + { + pictureBox2.Visible = false; + } richTextBox1.Text = String.Format(" Name : {0} \n\n Author : {1} \n\n Version : {2} \n\n Description :\n {3} \n", package._intalerStruct.Name, package._intalerStruct.Author, package._intalerStruct.Version, package._intalerStruct.Description); if (!this.Visible) this.ShowDialog(); break; Deleted: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-07-01 14:58:55
|
Revision: 663 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=663&view=rev Author: dukus Date: 2007-07-01 07:58:53 -0700 (Sun, 01 Jul 2007) Log Message: ----------- New Control panel Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs trunk/plugins/mpinstaler/MPInstaler/Properties/AssemblyInfo.cs trunk/plugins/mpinstaler/MPInstaler/SkinSelect.Designer.cs trunk/plugins/mpinstaler/MPInstaler/SkinSelect.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx trunk/plugins/mpinstaler/MPInstaler.sln Added Paths: ----------- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/AssemblyInfo.cs trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.cs trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.resx trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageMapEditor.cs trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj.user trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.snk trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.bmp trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.cs trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.resx trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozPane.bmp trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozPane.cs trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozPane.resx trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ScrollableControlWithScrollEvents.cs trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ScrollableControlWithScrollEvents.resx trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ThemeManager.cs Modified: trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-07-01 14:56:20 UTC (rev 662) +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -7,6 +7,8 @@ using System.IO; using System.Net; using System.Windows.Forms; +using MediaPortal.Utils.Web; +using MediaPortal.Utils; namespace MPInstaler { @@ -166,5 +168,9 @@ textBox4.Enabled = true; } } + + private void button5_Click(object sender, EventArgs e) + { + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-07-01 14:56:20 UTC (rev 662) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -29,6 +29,7 @@ { proiect_file_name = fil; InitializeComponent(); + proiectt_textBox6.Items.AddRange(MPinstalerStruct.CategoriListing); _struct.LoadFromFile(fil); _struct.ProiectdFileName = fil; loadProperties(); @@ -41,12 +42,9 @@ private void sToolStripMenuItem_Click(object sender, EventArgs e) { - if (proiectt_textBox1.Text.Length == 0) - { - MessageBox.Show("Name is mandatory !", "Stop"); - proiectt_textBox1.Focus(); + if (!IsGoodToSave()) return; - } + saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files (*.*)|*.*"; saveFileDialog1.DefaultExt = "*.xmp"; if (Path.GetFileName(proiect_file_name) == "Untitled" || String.IsNullOrEmpty(proiect_file_name.Trim())) @@ -293,16 +291,13 @@ private void buildToolStripMenuItem_Click(object sender, EventArgs e) { - if (proiectt_textBox1.Text.Length == 0) + if (IsGoodToSave()) { - MessageBox.Show("Name is mandatory !", "Stop"); - proiectt_textBox1.Focus(); - return; + sToolStripMenuItem_Click(sender, e); + Build_dialog buildfrm = new Build_dialog(this._struct); + buildfrm.ShowDialog(); + this._struct = buildfrm._struct; } - sToolStripMenuItem_Click(sender, e); - Build_dialog buildfrm = new Build_dialog(this._struct); - buildfrm.ShowDialog(); - this._struct = buildfrm._struct; } private void newToolStripMenuItem_Click(object sender, EventArgs e) @@ -676,5 +671,21 @@ } } + private bool IsGoodToSave() + { + if (proiectt_textBox1.Text.Length == 0) + { + MessageBox.Show("Name is mandatory !", "Stop"); + proiectt_textBox1.Focus(); + return false; + } + if (proiectt_textBox6.Text.Length == 0) + { + MessageBox.Show("Group is mandatory !", "Stop"); + proiectt_textBox6.Focus(); + return false; + } + return true; + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-07-01 14:56:20 UTC (rev 662) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-07-01 14:58:53 UTC (rev 663) @@ -59,6 +59,7 @@ <Reference Include="System.Configuration.Install" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> + <Reference Include="System.Design" /> <Reference Include="System.Drawing" /> <Reference Include="System.Management" /> <Reference Include="System.Windows.Forms" /> @@ -87,7 +88,6 @@ <Compile Include="GroupForm.Designer.cs"> <DependentUpon>GroupForm.cs</DependentUpon> </Compile> - <Compile Include="ItemCombo.cs" /> <Compile Include="MPinstalerStruct.cs" /> <Compile Include="Form1.cs"> <SubType>Form</SubType> @@ -225,6 +225,12 @@ <Install>true</Install> </BootstrapperPackage> </ItemGroup> + <ItemGroup> + <ProjectReference Include="MozBarControl\MozBar.csproj"> + <Project>{180E4B12-A45B-4091-8A6F-91031C28DA3D}</Project> + <Name>MozBar</Name> + </ProjectReference> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-07-01 14:56:20 UTC (rev 662) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -17,7 +17,11 @@ { public class MPinstalerStruct { + public const string DEFAULT_UPDATE_SITE = "http://dukus.extra.hu"; + static public string[] CategoriListing ={ "Audio/Radio", "Automation", "EPG/TV", "Games", "Input", "Others", "PIM", "Skins", "Utilities", "Video/Movies", "Web", "TV Logo" }; + + public const string PLUGIN_TYPE = "Plugin"; public const string PLUGIN_WINDOW_SUBTYPE = "Window"; public const string PLUGIN_PROCESS_SUBTYPE = "Process"; @@ -40,7 +44,7 @@ string _builFileName = string.Empty; string _proiectFileName = string.Empty; string _author = string.Empty; - string _update = string.Empty; + string _update = DEFAULT_UPDATE_SITE; string _name = string.Empty; string _version = string.Empty; string _description = string.Empty; @@ -53,7 +57,6 @@ public List<ActionInfo> Actions; public List<GroupString> SetupGroups; public List<GroupStringMapping> SetupGroupsMappig; - public MPinstalerStruct() { Language = new List<LanguageString>(); @@ -68,7 +71,7 @@ get { return _update; } set { - if (value == null) _update = ""; else _update = value.Trim(); + if (String.IsNullOrEmpty(value)) _update = DEFAULT_UPDATE_SITE; else _update = value.Trim(); } } Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-07-01 14:56:20 UTC (rev 662) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -25,6 +25,8 @@ public string txt_readme = String.Empty; public bool isNew = false; public bool isUpdated = false; + public bool isLocal = false; + public bool isInstalled = false; public bool containsSkin = false; public bool isValid = false; public List<string> SkinList; @@ -38,6 +40,7 @@ isValid = false; isNew = false; isUpdated = false; + isLocal = false; SkinList = new List<string>(); InstallableSkinList = new List<string>(); @@ -298,8 +301,17 @@ Directory.CreateDirectory(InstalDir); } if (Path.GetFullPath(pk.FileName) != Path.GetFullPath(InstalDir + @"\" + Path.GetFileName(pk.FileName))) + if (File.Exists(Path.GetFullPath(pk.FileName))) File.Copy(pk.FileName, InstalDir + @"\" + Path.GetFileName(pk.FileName), true); } + + public void AddRange(MPInstallHelper mpih) + { + foreach (MPpackageStruct pk in mpih.lst) + { + this.Add(pk); + } + } public int IndexOf(MPpackageStruct pk) { Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/AssemblyInfo.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/AssemblyInfo.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/AssemblyInfo.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("MozBar")] +[assembly: AssemblyDescription(".NET Component")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("PABO Software")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("Copyright 2005 Patrik Bohman")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.5.1.0")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\<configuration>. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("..\\..\\MozBar.snk")] +[assembly: AssemblyKeyName("")] Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,356 @@ +// ImageListPopup by John O'Byrne +// This class pops up window displaying the different images +// contained in an ImageList and allows to select one. +// History: 24/02/2003 : Initial Release +// 25/02/2003 : Added Keyboard support (arrows + space or enter to validate) +// Added Drag'n'Drop Support (disabled by default) - The selected Image +// and its Id are available to the drop target + +using System; +using System.Drawing; +using System.Drawing.Imaging; +using System.Drawing.Drawing2D; +using System.Windows.Forms; +using System.ComponentModel; +using System.Diagnostics; + +namespace CustomUIControls +{ + + #region Delegates + + public delegate void ImageListPanelEventHandler(object sender, ImageListPanelEventArgs ilpea); + + #endregion + + [ToolboxItem(false)] + public class ImageListPanel : System.Windows.Forms.Control + { + + #region Protected Member Variables + protected Bitmap _Bitmap = null; + protected ImageList _imageList = null; + protected int _nBitmapWidth = 0; + protected int _nBitmapHeight = 0; + protected int _nItemWidth = 0; + protected int _nItemHeight = 0; + protected int _nRows = 0; + protected int _nColumns = 0; + protected int _nHSpace = 0; + protected int _nVSpace = 0; + protected int _nCoordX = -1; + protected int _nCoordY = -1; + protected bool _bIsMouseDown = false; + + protected int _defaultImage; + + #endregion + + #region Public Properties + public Color BackgroundColor = Color.FromArgb(255,255,255); + public Color BackgroundOverColor = Color.FromArgb(241,238,231); + public Color HLinesColor = Color.FromArgb(222,222,222); + public Color VLinesColor = Color.FromArgb(165,182,222); + public Color BorderColor = Color.FromArgb(0,16,123); + public bool EnableDragDrop = false; + #endregion + + #region Events + + public event ImageListPanelEventHandler ItemClick = null; + #endregion + + + #region Constructor + public ImageListPanel() + { + + } + #endregion + + #region Public Methods + public bool Init(ImageList imageList, int nHSpace, int nVSpace, int nColumns, int defaultImage) + { + int nRows; + + Brush bgBrush = new SolidBrush(BackgroundColor); + Pen vPen = new Pen(VLinesColor); + Pen hPen = new Pen(HLinesColor); + Pen borderPen = new Pen(BorderColor); + + _imageList = imageList; + _nColumns = nColumns; + + _defaultImage = defaultImage; + if (_defaultImage > _imageList.Images.Count) + _defaultImage = _imageList.Images.Count; + if (_defaultImage < 0) _defaultImage = -1; + + + nRows = imageList.Images.Count / _nColumns; + if (imageList.Images.Count % _nColumns > 0) nRows++; + + _nRows = nRows; + _nHSpace = nHSpace; + _nVSpace = nVSpace; + _nItemWidth = _imageList.ImageSize.Width + nHSpace; + _nItemHeight = _imageList.ImageSize.Height + nVSpace; + _nBitmapWidth = _nColumns * _nItemWidth + 1; + _nBitmapHeight = _nRows * _nItemHeight + 1; + this.Width = _nBitmapWidth; + this.Height = _nBitmapHeight; + + + _Bitmap = new Bitmap(_nBitmapWidth,_nBitmapHeight); + Graphics grfx = Graphics.FromImage(_Bitmap); + grfx.FillRectangle(bgBrush, 0, 0, _nBitmapWidth, _nBitmapHeight); + for (int i=0;i<_nColumns;i++) + grfx.DrawLine(vPen, i*_nItemWidth, 0, i*_nItemWidth, _nBitmapHeight-1); + for (int i=0;i<_nRows;i++) + grfx.DrawLine(hPen, 0, i*_nItemHeight, _nBitmapWidth-1, i*_nItemHeight); + + grfx.DrawRectangle(borderPen, 0 ,0 , _nBitmapWidth-1, _nBitmapHeight-1); + + for (int i=0;i<_nColumns;i++) + for (int j=0;j<_nRows ;j++) + { + if ((j*_nColumns+i) < imageList.Images.Count) + imageList.Draw(grfx, + i*_nItemWidth+_nHSpace/2, + j*_nItemHeight+nVSpace/2, + imageList.ImageSize.Width, + imageList.ImageSize.Height, + j*_nColumns+i); + + } + + /* int a = (_defaultImage / _nColumns); // rad + int b = (_defaultImage % _nColumns); // kolumn; + + _nCoordX = b*(_nItemWidth+_nHSpace/2)-1; + _nCoordY = a*(_nItemHeight+nVSpace/2)-1; + */ + + // Clean up + bgBrush.Dispose(); + vPen.Dispose(); + hPen.Dispose(); + borderPen.Dispose(); + + Invalidate(); + return true; + } + + public void Show(int x, int y) + { + this.Left = x; + this.Top = y; + base.Show(); + } + #endregion + + + #region Overrides + + protected override void OnMouseLeave(EventArgs ea) + { + // We repaint the popup if the mouse is no more over it + base.OnMouseLeave(ea); + _nCoordX = -1; + _nCoordY = -1; + Invalidate(); + } + + /*protected override void OnDeactivate(EventArgs ea) + { + // If the form loses focus, we hide it + this.Hide(); + }*/ + + protected override void OnKeyDown(KeyEventArgs kea) + { + if (_nCoordX==-1 || _nCoordY==-1) + { + _nCoordX = 0; + _nCoordY = 0; + Invalidate(); + } + else + { + switch(kea.KeyCode) + { + case Keys.Down: + if (_nCoordY<_nRows-1) + { + _nCoordY++; + Invalidate(); + } + break; + case Keys.Up: + if (_nCoordY>0) + { + _nCoordY--; + Invalidate(); + } + break; + case Keys.Right: + if (_nCoordX<_nColumns-1) + { + _nCoordX++; + Invalidate(); + } + break; + case Keys.Left: + if (_nCoordX>0) + { + _nCoordX--; + Invalidate(); + } + break; + case Keys.Enter: + case Keys.Space: + // We fire the event only when the mouse is released + int nImageId = _nCoordY*_nColumns + _nCoordX; + if (ItemClick != null && nImageId>=0 && nImageId<_imageList.Images.Count) + { + ItemClick(this, new ImageListPanelEventArgs(nImageId)); + _nCoordX = -1; + _nCoordY = -1; + Hide(); + } + break; + case Keys.Escape: + _nCoordX = -1; + _nCoordY = -1; + Hide(); + break; + } + } + } + + protected override void OnMouseMove(MouseEventArgs mea) + { + // Update the popup only if the image selection has changed + if (ClientRectangle.Contains(new Point(mea.X,mea.Y))) + { + if (EnableDragDrop && _bIsMouseDown) + { + int nImage = _nCoordY*_nColumns+_nCoordX; + if (nImage <=_imageList.Images.Count-1) + { + DataObject data = new DataObject(); + data.SetData(DataFormats.Text,nImage.ToString()); + data.SetData(DataFormats.Bitmap,_imageList.Images[nImage]); + try + { + DragDropEffects dde = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Move); + } + catch + { + + } + _bIsMouseDown = false; + } + } + + if ( ((mea.X/_nItemWidth)!=_nCoordX) || ((mea.Y/_nItemHeight)!=_nCoordY) ) + { + _nCoordX = mea.X/_nItemWidth; + _nCoordY = mea.Y/_nItemHeight; + Invalidate(); + } + } + else + { + _nCoordX = -1; + _nCoordY = -1; + Invalidate(); + } + base.OnMouseMove(mea); + } + + protected override void OnMouseDown(MouseEventArgs mea) + { + base.OnMouseDown(mea); + _bIsMouseDown = true; + Invalidate(); + } + + protected override void OnMouseUp(MouseEventArgs mea) + { + base.OnMouseDown(mea); + _bIsMouseDown = false; + + // We fire the event only when the mouse is released + int nImageId = _nCoordY*_nColumns + _nCoordX; + // check that imageID is a valid image + if (ItemClick != null && nImageId>=0 && nImageId<_imageList.Images.Count) + { + ItemClick(this, new ImageListPanelEventArgs(nImageId)); + Hide(); + } + } + + + protected override void OnPaintBackground(PaintEventArgs pea) + { + Graphics grfx = pea.Graphics; + grfx.PageUnit = GraphicsUnit.Pixel; + + // Basic double buffering technique + Bitmap offscreenBitmap = new Bitmap(_nBitmapWidth, _nBitmapHeight); + Graphics offscreenGrfx = Graphics.FromImage(offscreenBitmap); + // We blit the precalculated bitmap on the offscreen Graphics + offscreenGrfx.DrawImage(_Bitmap, 0, 0); + + if (_nCoordX!=-1 && _nCoordY!=-1 && (_nCoordY*_nColumns+_nCoordX)<_imageList.Images.Count) + { + // We draw the selection rectangle + offscreenGrfx.FillRectangle(new SolidBrush(BackgroundOverColor), _nCoordX*_nItemWidth + 1, _nCoordY*_nItemHeight + 1, _nItemWidth-1, _nItemHeight-1); + if (_bIsMouseDown) + { + // Mouse Down aspect for the image + _imageList.Draw(offscreenGrfx, + _nCoordX*_nItemWidth + _nHSpace/2 + 1, + _nCoordY*_nItemHeight + _nVSpace/2 + 1, + _imageList.ImageSize.Width, + _imageList.ImageSize.Height, + _nCoordY*_nColumns + _nCoordX); + } + else + { + // Normal aspect for the image + _imageList.Draw(offscreenGrfx, + _nCoordX*_nItemWidth + _nHSpace/2, + _nCoordY*_nItemHeight + _nVSpace/2, + _imageList.ImageSize.Width, + _imageList.ImageSize.Height, + _nCoordY*_nColumns + _nCoordX); + } + // Border selection Rectangle + offscreenGrfx.DrawRectangle(new Pen(BorderColor), _nCoordX*_nItemWidth, _nCoordY*_nItemHeight, _nItemWidth, _nItemHeight); + } + + // We blit the offscreen image on the screen + grfx.DrawImage(offscreenBitmap, 0, 0); + + // Clean up + offscreenGrfx.Dispose (); + } + #endregion + } + + #region ImageListPanelEventArgs + + public class ImageListPanelEventArgs : EventArgs + { + public int SelectedItem; + + public ImageListPanelEventArgs(int selectedItem) + { + SelectedItem = selectedItem; + } + } + + #endregion +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.resx (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageListPanel.resx 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8" ?> +<root> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="ResMimeType"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="Version"> + <value>1.0.0.0</value> + </resheader> + <resheader name="Reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="Writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageMapEditor.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageMapEditor.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/ImageMapEditor.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,169 @@ +/* + * Copyright \xA9 2005, Patrik Bohman + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +using System; +using System.Windows.Forms; +using System.Windows.Forms.Design; +using System.Drawing.Design; +using System.Drawing; +using CustomUIControls; + +namespace Pabo.MozBar +{ + /// <summary> + /// Summary description for ImageEditor. + /// </summary> + public class ImageMapEditor : System.Drawing.Design.UITypeEditor + { + + #region properties + + private IWindowsFormsEditorService wfes = null ; + private int m_selectedIndex = -1 ; + private ImageListPanel m_imagePanel = null ; + + #endregion + + #region constructor + + public ImageMapEditor() + { + + } + + #endregion + + #region Methods + + protected virtual ImageList GetImageList(object component) + { + if (component is MozItem.ImageCollection) + { + return ((MozItem.ImageCollection) component).GetImageList(); + } + + return null ; + } + + #endregion + + #region overrides + + public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) + { + wfes = (IWindowsFormsEditorService) provider.GetService(typeof(IWindowsFormsEditorService)); + if((wfes == null) || (context == null)) + return null ; + + ImageList imageList = GetImageList(context.Instance) ; + if ((imageList == null) || (imageList.Images.Count==0)) + return -1 ; + + m_imagePanel = new ImageListPanel(); + + m_imagePanel.BackgroundColor = Color.FromArgb(241,241,241); + m_imagePanel.BackgroundOverColor = Color.FromArgb(102,154,204); + m_imagePanel.HLinesColor = Color.FromArgb(182,189,210); + m_imagePanel.VLinesColor = Color.FromArgb(182,189,210); + m_imagePanel.BorderColor = Color.FromArgb(0,0,0); + m_imagePanel.EnableDragDrop = true; + m_imagePanel.Init(imageList,12,12,6,(int)value); + + // add listner for event + m_imagePanel.ItemClick += new ImageListPanelEventHandler(OnItemClicked); + + // set m_selectedIndex to -1 in case the dropdown is closed without selection + m_selectedIndex = -1; + // show the popup as a drop-down + wfes.DropDownControl(m_imagePanel) ; + + // return the selection (or the original value if none selected) + return (m_selectedIndex != -1) ? m_selectedIndex : (int) value ; + } + + public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context) + { + if(context != null && context.Instance != null ) + { + return UITypeEditorEditStyle.DropDown ; + } + return base.GetEditStyle (context); + } + + + public override bool GetPaintValueSupported(System.ComponentModel.ITypeDescriptorContext context) + { + return true; + } + + public override void PaintValue(System.Drawing.Design.PaintValueEventArgs pe) + { + int imageIndex = -1 ; + // value is the image index + if(pe.Value != null) + { + try + { + imageIndex = (int)Convert.ToUInt16( pe.Value.ToString() ) ; + } + catch + { + } + } + // no instance, or the instance represents an undefined image + if((pe.Context.Instance == null) || (imageIndex < 0)) + return ; + // get the image set + ImageList imageList = GetImageList(pe.Context.Instance) ; + // make sure everything is valid + if((imageList == null) || (imageList.Images.Count == 0) || (imageIndex >= imageList.Images.Count)) + return ; + // Draw the preview image + pe.Graphics.DrawImage(imageList.Images[imageIndex],pe.Bounds); + } + + #endregion + + #region EventHandlers + + public void OnItemClicked(object sender, ImageListPanelEventArgs e) + { + m_selectedIndex = ((ImageListPanelEventArgs) e).SelectedItem; + + //remove listner + m_imagePanel.ItemClick -= new ImageListPanelEventHandler(OnItemClicked); + + // close the drop-dwon, we are done + wfes.CloseDropDown() ; + + m_imagePanel.Dispose() ; + m_imagePanel = null ; + } + + #endregion + + } +} Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,140 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{180E4B12-A45B-4091-8A6F-91031C28DA3D}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>MozBar</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>Pabo.MozBar</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Design"> + <Name>System.Design</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ImageListPanel.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="ImageMapEditor.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="MozItem.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="MozPane.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="ScrollableControlWithScrollEvents.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="ThemeManager.cs"> + <SubType>Code</SubType> + </Compile> + <EmbeddedResource Include="ImageListPanel.resx"> + <DependentUpon>ImageListPanel.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="MozItem.bmp" /> + <EmbeddedResource Include="MozItem.resx"> + <DependentUpon>MozItem.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="MozPane.bmp" /> + <EmbeddedResource Include="MozPane.resx"> + <DependentUpon>MozPane.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="ScrollableControlWithScrollEvents.resx"> + <DependentUpon>ScrollableControlWithScrollEvents.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj.user =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj.user (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.csproj.user 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,56 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <LastOpenVersion>7.10.3077</LastOpenVersion> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ReferencePath>E:\Work\Pabo\MozBar\bin\Release\</ReferencePath> + <CopyProjectDestinationFolder> + </CopyProjectDestinationFolder> + <CopyProjectUncPath> + </CopyProjectUncPath> + <CopyProjectOption>0</CopyProjectOption> + <ProjectView>ProjectFiles</ProjectView> + <ProjectTrust>0</ProjectTrust> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <EnableASPDebugging>false</EnableASPDebugging> + <EnableASPXDebugging>false</EnableASPXDebugging> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <EnableSQLServerDebugging>false</EnableSQLServerDebugging> + <RemoteDebugEnabled>false</RemoteDebugEnabled> + <RemoteDebugMachine> + </RemoteDebugMachine> + <StartAction>Project</StartAction> + <StartArguments> + </StartArguments> + <StartPage> + </StartPage> + <StartProgram> + </StartProgram> + <StartURL> + </StartURL> + <StartWorkingDirectory> + </StartWorkingDirectory> + <StartWithIE>true</StartWithIE> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <EnableASPDebugging>false</EnableASPDebugging> + <EnableASPXDebugging>false</EnableASPXDebugging> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <EnableSQLServerDebugging>false</EnableSQLServerDebugging> + <RemoteDebugEnabled>false</RemoteDebugEnabled> + <RemoteDebugMachine> + </RemoteDebugMachine> + <StartAction>Program</StartAction> + <StartArguments> + </StartArguments> + <StartPage> + </StartPage> + <StartProgram>E:\Work\Pabo\Test\Test\bin\Release\Test.exe</StartProgram> + <StartURL> + </StartURL> + <StartWorkingDirectory> + </StartWorkingDirectory> + <StartWithIE>false</StartWithIE> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.snk =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozBar.snk ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.bmp =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.bmp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/MozBarControl/MozItem.cs 2007-07-01 14:58:53 UTC (rev 663) @@ -0,0 +1,1546 @@ +/* + * Copyright \xA9 2005, Patrik Bohman + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +using System; +using System.Collections; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Windows.Forms; +using System.Windows.Forms.Design; + +namespace Pabo.MozBar +{ + + #region Enumerations + public enum MozItemState {Normal = 0, Focus = 1, Selected = 2} + + public enum MozItemStyle {Text = 0, Picture = 1, TextAndPicture = 2, Divider = 3} + public enum MozTextAlign {Bottom = 0, Right = 1, Top = 2, Left = 3} + #endregion + + #region delegates + + public delegate void MozItemEventHandler(object sender, MozItemEventArgs e); + public delegate void MozItemClickEventHandler(object sender, MozItemClickEventArgs e); + public delegate void ImageChangedEventHandler(object sender, ImageChangedEventArgs e); + + #endregion + + /// <summary> + /// Summary description for MozItem. + /// </summary> + + [DesignerAttribute(typeof(MozItemDesigner))] + [ToolboxItem(true)] + [DefaultEvent("Click")] + [ToolboxBitmap(typeof(MozItem),"Pabo.MozBar.MozItem.bmp")] + public class MozItem : System.Windows.Forms.Control + { + + #region EventHandler + + internal event MozItemEventHandler ItemGotFocus; + internal event MozItemEventHandler ItemLostFocus; + internal event MozItemClickEventHandler ItemClick; + internal event MozItemClickEventHandler ItemDoubleClick; + + [Browsable(true)] + [Category("Property Changed")] + [Description("Indicates that the ItemStyle has changed.")] + public event EventHandler ItemStyleChanged; + + [Browsable(true)] + [Category("Property Changed")] + [Description("Indicates that an item image has changed.")] + public event ImageChangedEventHandler ImageChanged; + + [Browsable(true)] + [Category("Property Changed")] + [Description("Indicates that TextAlign has changed.")] + public event EventHandler TextAlignChanged; + + #endregion + + #region private class members + + private MozPane m_mozPane; + private MouseButtons m_mouseButton; + private Image image; + + private ImageCollection m_imageCollection; + + private MozTextAlign m_textAlign; + + private MozItemState m_state; + private MozItemStyle m_itemStyle; + + private System.ComponentModel.Container components = null; + + #endregion + + #region constructor + + public MozItem() + { + // This call is required by the Windows.Forms Form Designer. + InitializeComponent(); + + this.SetStyle(ControlStyles.DoubleBuffer, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.ResizeRedraw, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // TODO: Add any initialization after the InitializeComponent call + + m_imageCollection = new ImageCollection(this); + + image = null; + + m_state = MozItemState.Normal; + + m_itemStyle = MozItemStyle.TextAndPicture; + m_textAlign = MozTextAlign.Bottom; + DoLayout(); + + } + + #endregion + + #region dispose + + /// <summary> + /// Clean up any resources being used. + /// </summary> + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(components != null) + { + components.Dispose(); + } + + // Delete images... + if (image!=null) image.Dispose(); + image = null; + m_imageCollection.Dispose(); + + } + base.Dispose( disposing ); + } + + #endregion + + #region Component Designer generated code + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + + } + #endregion + + + #region Properties + + #region Colors + + private Color SelectedColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.SelectedBackground; + else + return Color.FromArgb(193,210,238); + } + + } + + private Color SelectedBorderColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.SelectedBorder; + else + return Color.FromArgb(49,106,197); + } + } + + private Color SelectedText + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.SelectedText; + else + return Color.Black; + } + } + + private Color FocusText + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.FocusText; + else + return Color.Black; + } + } + + private Color FocusColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.FocusBackground; + else + return Color.FromArgb(224,232,246); + } + } + + private Color FocusBorderColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.FocusBorder; + else + return Color.White; + } + } + + private Color TextColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.Text; + else + return Color.Black; + + } + } + + private Color BackgroundColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.Background; + else + return Color.White; + } + } + + private Color BorderColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.Border; + else + return Color.FromArgb(152,180,226); + } + } + + private Color DividerColor + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemColors.Divider; + else + return Color.FromArgb(127,157,185); + } + } + + #endregion + + #region BorderStyles + + private ButtonBorderStyle SelectedBorderStyle + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemBorderStyles.Selected; + else + return ButtonBorderStyle.Solid; + } + } + + private ButtonBorderStyle NormalBorderStyle + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemBorderStyles.Normal; + else + return ButtonBorderStyle.None; + } + } + + private ButtonBorderStyle FocusBorderStyle + { + get + { + if (m_mozPane!=null) + return m_mozPane.ItemBorderStyles.Focus; + else + return ButtonBorderStyle.Solid; + } + } + + + #endregion + + [Browsable(true)] + [Category("Appearance")] + [Description("Images for various states.")] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] + public ImageCollection Images + { + get + { + return m_imageCollection; + } + set + { + if ((value != null) && (value!=m_imageCollection)) + { + m_imageCollection = value; + } + } + } + + [Browsable(true)] + [Category("Appearance")] + [Description("The alignment of the text that will be displayed.")] + [DefaultValue(typeof(MozTextAlign),"Bottom")] + public MozTextAlign TextAlign + { + get + { + return m_textAlign; + } + set + { + if (m_textAlign!=value) + { + m_textAlign = value; + DoLayout(); + if (this.MozPane != null) + { + this.MozPane.DoLayout(); + } + if (this.TextAlignChanged!=null) this.TextAlignChanged(this,new EventArgs()); + + this.Invalidate(); + } + } + } + + public override string Text + { + get + { + return base.Text; + } + set + { + if (value!=base.Text) + { + base.Text = value; + this.DoLayout(); + this.Invalidate(); + } + } + } + + [Browsable(true)] + [Category("Appearance")] + [Description("The visual appearance of the item.")] + [DefaultValue(typeof(MozItemStyle),"TextAndPicture")] + public MozItemStyle ItemStyle + { + get + { + return m_itemStyle; + } + set + { + if (value!=m_itemStyle) + { + m_itemStyle = value; + DoLayout(); + if (this.MozPane != null) + { + this.MozPane.DoLayout(); + } + if (ItemStyleChanged!=null) this.ItemStyleChanged(this,new EventArgs()); + this.Invalidate(); + } + } + } + + // obsolete properties + + [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] + [ObsoleteAttribute("This property is not supported",true)] + public override Color BackColor + { + get + { + return base.BackColor; + } + set + { + base.BackColor = value; + } + } + + [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] + [ObsoleteAttribute("This property is not supported",true)] + public override Color ForeColor + { + get + { + return base.ForeColor; + } + set + { + base.ForeColor = value; + } + } + + + + [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] + [ObsoleteAttribute("This property is not supported",true)] + public override Image BackgroundImage + { + get + { + return base.BackgroundImage; + } + set + { + base.BackgroundImage = value; + } + } + + [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] + [ObsoleteAttribute("This property is not supported",true)] + public override RightToLeft RightToLeft + { + get + { + return base.RightToLeft; + } + set + { + base.RightToLeft = value; + } + } + + protected internal MozPane MozPane + { + get + { + return this.m_mozPane; + } + + set + { + this.m_mozPane = value; + } + } + + + internal MozItemState state + { + get + { + return m_state; + } + set + { + m_state = value; + Invalidate(); + } + } + + #endregion + + #region methods + + public void DoLayout() + { + int imageHeight; + int imageWidth; + MozPaneStyle mode; + + ImageList list = GetImageList(); + + if (list!=null) + { + imageHeight = list.ImageSize.Height; + imageWidth = list.ImageSize.Width; + } + else + { + imageHeight = 32; + imageWidth = 32; + } + + if (m_mozPane!=null) + mode = m_mozPane.Style; + else + mode = MozPaneStyle.Vertical; + + switch (mode) + { + case MozPaneStyle.Vertical: + { + if (m_mozPane!=null) + { + if (!m_mozPane.IsVerticalScrollBarVisible()) + this.Width = m_mozPane.Width -(2*m_mozPane.Padding.Horizontal); + else + this.Width = m_mozPane.Width -(2*m_mozPane.Padding.Horizontal)-3 - (SystemInformation.VerticalScrollBarWidth-2); + } + else + this.Width = 40; + + switch (m_itemStyle) + { + + case MozItemStyle.Divider: + { + this.Height = 2*4; + break; + } + + case MozItemStyle.Picture: + { + this.Height = imageHeight + (2*4); + break; + } + case MozItemStyle.Text: + { + this.Height = base.Font.Height + (2*4); + break; + } + case MozItemStyle.TextAndPicture: + { + switch (m_textAlign) + { + case MozTextAlign.Bottom: + case MozTextAlign.Top: + { + this.Height = imageHeight + (3*4) + base.Font.Height; + break; + } + case MozTextAlign.Right: + case MozTextAlign.Left: + { + this.Height = imageHeight + (2*4); + break; + } + + } + break; + } + } + break; + } + case MozPaneStyle.Horizontal: + { + if (m_mozPane!=null) + if (!m_mozPane.IsHorizontalScrollBarVisible()) + this.Height = m_mozPane.Height -(2*m_mozPane.Padding.Vertical); + else + this.Height = m_mozPane.Height -(2*m_mozPane.Padding.Vertical)-3 - (SystemInformation.HorizontalScrollBarHeight-2); + + else + this.Height = 40; + + switch (m_itemStyle) + { + case MozItemStyle.Divider: + { + this.Width = 2*4; + break; + } + case MozItemStyle.Picture: + { + this.Width = imageWidth + (2*4); + break; + } + case MozItemStyle.Text: + { + + this.Width = (2*4)+ (int)MeasureString(this.Text); + break; + } + case MozItemStyle.TextAndPicture: + { + switch (m_textAlign) + { + case MozTextAlign.Bottom: + case MozTextAlign.Top: + { + int minWidth = 2 * 4 + imageWidth; + int stringWidth = (2*4)+ (int)MeasureString(this.Text); + if (stringWidth > minWidth) + this.Width = stringWidth; + else + this.Width = minWidth; + break; + } + case MozTextAlign.Right: + case MozTextAlign.Left: + { + this.Width = (3*4)+ (int)MeasureString(this.Text) + imageWidth; + break; + } + + } + break; + } + } + break; + } + } + + } + + private float MeasureString(string str) + { + + SizeF f = new SizeF(); + Graphics g; + g = this.CreateGraphics(); + f = g.MeasureString(str,this.Font); + g.Dispose(); + g = null; + + return f.Width; + } + + public ImageList GetImageList() + { + if (m_mozPane == null) + return null; + else + return m_mozPane.ImageList; + } + + public bool IsSelected() + { + if (m_state == MozItemState.Selected) + return true; + else + return false; + } + + public void SelectItem() + { + if (this.Enabled) + { + if (ItemClick!=null) this.ItemClick(this,new MozItemClickEventArgs(this,MouseButtons.Left)); + Invalidate(); + } + } + + #endregion + + + #region Events + + protected override void OnEnabledChanged(EventArgs e) + { + base.OnEnabledChanged (e); + // Enabled has changed, Invalidate.. + Invalidate(); + } + + protected override void OnFontChanged(EventArgs e) + { + base.OnFontChanged (e); + DoLayout(); + Invalidate(); + } + + protected override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged (e); + + if (m_mozPane!=null) + { + m_mozPane.DoLayout(); + m_mozPane.Invalidate(); + } + DoLayout(); + Invalidate(); + + } + + protected override void OnMouseEnter(EventArgs e) + { + if (ItemGotFocus != null) this.ItemGotFocus(this,new MozItemEventArgs(this)); + } + + protected override void OnMouseLeave(EventArgs e) + { + if (ItemLostFocus!=null) this.ItemLostFocus(this,new MozItemEventArgs(this)); + } + + protected override void OnMouseDown(MouseEventArgs e) + { + m_mouseButton = e.Button; + if (ItemClick!=null) this.ItemClick(this,new MozItemClickEventArgs(this,m_mouseButton)); + } + + protected override void OnDoubleClick(EventArgs e) + { + if (ItemDoubleClick!=null) this.ItemDoubleClick(this,new MozItemClickEventArgs(this,m_mouseButton)); + } + + protected override void OnClick(EventArgs e) + { + base.OnClick (e); + } + + protected override void OnPaint(PaintEventArgs e) + { + + int imageHeight; + int imageWidth; + int paddingX; + int paddingY; + + + Pen dividerPen = new Pen(this.DividerColor,0); + Brush textBrush = new SolidBrush(this.TextColor); + Brush disabledTextBrush = new SolidBrush(Color.Gray); + Brush bgBrush = new SolidBrush(Color.Black); + Color borderColor = Color.Black; + ButtonBorderStyle btnBorderStyle = ButtonBorderStyle.None; + + // Check if a ImageList exist + ImageList list = GetImageList(); + if (list!=null) + { + // if so get Height and Width + imageHeight = list.ImageSize.Height; + imageWidth = list.ImageSize.Width; + } + else + { + // if not use default values + imageHeight = 32; + imageWidth = 32; + } + + // Check if the item has belongs to a MozPane + if (m_mozPane!=null) + { + // If so get the padding + paddingX = m_mozPane.Padding.Horizontal; + paddingY = m_mozPane.Padding.Vertical; + } + else + { + // use some kind of padding if no daddy is found + paddingX = 1; + paddingY = 1; + } + + Rectangle textRect = new Rectangle(); + Rectangle imageRect = new Rectangle(0,0,imageWidth,imageHeight); + Rectangle borderRect = new Rectangle(); + + StringFormat f = new StringFormat(); + + Point borderLocation = new Point(); + + borderLocation.X = 0; + borderLocation.Y = 0; + + borderRect.Location = borderLocation; + borderRect.Width = this.Width; + borderRect.Height = this.Height; + + // Draw background + e.Graphics.FillRectangle(new SolidBrush(this.BackgroundColor),this.DisplayRectangle); + + // Use Normal image for disabled state + if (!this.Enabled) this.m_state = MozItemState.Normal; + // A divider should not be able to be selected or recieve focus + if (this.ItemStyle == MozItemStyle.Divider) this.m_state = MozItemState.Normal; + + // Check state for item, to decide image + switch (m_state) + { + case MozItemState.Focus: + { + + textBrush = new SolidBrush(this.FocusText); + bgBrush = new SolidBrush(this.FocusColor); + borderColor = this.FocusBorderColor; + btnBorderStyle = this.FocusBorderStyle; + if (m_imageCollection.FocusImage!= null) + image = m_imageCollection.FocusImage; + else + // if focusimage isnt set use Normal image + image = m_imageCollection.NormalImage; + break; + } + case MozItemState.Selected: + { + textBrush = new SolidBrush(this.SelectedText); + bgBrush = new SolidBrush(this.SelectedColor); + borderColor = this.SelectedBorderColor; + btnBorderStyle = this.SelectedBorderStyle; + if (m_imageCollection.SelectedImage!= null) + image = m_imageCollection.SelectedImage; + else + image = m_imageCollection.NormalImage; + break; + } + case MozItemState.Normal: + { + image = m_imageCollection.NormalImage; + bgBrush = new SolidBrush(this.BackgroundColor); + btnBorderStyle = this.NormalBorderStyle; + borderColor = this.BorderColor; + break; + } + } + + e.Graphics.FillRectangle(bgBrush,borderRect); + ControlPaint.DrawBorder(e.Graphics,borderRect,borderColor,btnBorderStyle); + + // check for itemStyle + switch (m_itemStyle) + { + case MozItemStyle.Divider: + { + float ptY; + float ptX; + + if (m_mozPane!=null) + { + // Check MozPane orientation + if (m_mozPane.Style == MozPaneStyle.Vertical) + { + ptY = borderRect.Top + (borderRect.Height / 2); + e.Graphics.DrawLine(dividerPen,borderRect.Left,ptY,borderRect.Right,ptY); + } + else + { + ptX = borderRect.Left + (borderRect.Width / 2); + e.Graphics.DrawLine(dividerPen,ptX,borderRect.Top,ptX,borderRect.Bottom); + } + } + else + { + ptY = borderRect.Top + (borderRect.Height / 2); + e.Graphics.DrawLine(dividerPen,borderRect.Left,ptY,borderRect.Right,ptY); + } + + break; + } + case MozItemStyle.Text: + { + f.Alignment = StringAlignment.Center; + f.LineAlignment = StringAlignment.Center; + textRect = borderRect; + if (m_state == MozItemState.Selected) + { + textRect.X+=1; + textRect.Y+=1; + } + if (this.Enabled) + e.Graphics.DrawString(this.Text,this.Font,textBrush,textRect,f); + else + e.Graphics.DrawString(this.Text,this.Font,disabledTextBrush,textRect,f); + break; + } + case MozItemStyle.Picture: + { + if (image!=null) + { + // center image + imageRect.X = ((borderRect.Width/2) - (imageRect.Width/2)); + imageRect.Y = ((borderRect.Height/2) - (imageRect.Height/2)); + if (m_state == MozItemState.Selected) + { + imageRect.X+=1; + imageRect.Y+=1; + } + + if (this.Enabled) + if (image!=null) + e.Graphics.DrawImage(image,imageRect); + else + if (image!=null) + ControlPaint.D... [truncated message content] |
From: <du...@us...> - 2007-02-07 20:12:16
|
Revision: 105 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=105&view=rev Author: dukus Date: 2007-02-07 12:11:58 -0800 (Wed, 07 Feb 2007) Log Message: ----------- Some form changing Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form2.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/Program.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-07 19:09:40 UTC (rev 104) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-07 20:11:58 UTC (rev 105) @@ -58,6 +58,7 @@ this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripComboBox1 = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); @@ -68,6 +69,7 @@ this.tabPage_Other = new System.Windows.Forms.TabPage(); this.tabPage_Language = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); @@ -163,7 +165,8 @@ this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.windowPluginToolStripMenuItem, this.skinToolStripMenuItem, - this.languageToolStripMenuItem}); + this.languageToolStripMenuItem, + this.textToolStripMenuItem}); this.addToolStripMenuItem.Name = "addToolStripMenuItem"; this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20); this.addToolStripMenuItem.Text = "Add"; @@ -228,21 +231,21 @@ // componentToolStripMenuItem // this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; - this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.componentToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.componentToolStripMenuItem.Text = "Component"; this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); // // mediaToolStripMenuItem // this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; - this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.mediaToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.mediaToolStripMenuItem.Text = "Media"; this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); // // fullToolStripMenuItem // this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; - this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.fullToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.fullToolStripMenuItem.Text = "Full"; this.fullToolStripMenuItem.Visible = false; // @@ -264,13 +267,14 @@ this.columnHeader2, this.columnHeader3, this.columnHeader4, - this.columnHeader5}); + this.columnHeader5, + this.columnHeader6}); this.bossview.ContextMenuStrip = this.contextMenuStrip1; this.bossview.FullRowSelect = true; this.bossview.GridLines = true; this.bossview.Location = new System.Drawing.Point(12, 40); this.bossview.Name = "bossview"; - this.bossview.Size = new System.Drawing.Size(663, 227); + this.bossview.Size = new System.Drawing.Size(651, 227); this.bossview.TabIndex = 2; this.bossview.UseCompatibleStateImageBehavior = false; this.bossview.View = System.Windows.Forms.View.Details; @@ -300,6 +304,11 @@ // this.columnHeader5.Text = "Id"; // + // columnHeader6 + // + this.columnHeader6.Text = "Options"; + this.columnHeader6.Width = 89; + // // contextMenuStrip1 // this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -386,6 +395,12 @@ this.tabPage_Proiect.Text = "Proiect Properties"; this.tabPage_Proiect.UseVisualStyleBackColor = true; // + // textToolStripMenuItem + // + this.textToolStripMenuItem.Name = "textToolStripMenuItem"; + this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.textToolStripMenuItem.Text = "Text"; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -448,6 +463,8 @@ private System.Windows.Forms.TabPage tabPage_Other; private System.Windows.Forms.TabPage tabPage_Language; private System.Windows.Forms.TabPage tabPage_Proiect; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.ToolStripMenuItem textToolStripMenuItem; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-07 19:09:40 UTC (rev 104) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-07 20:11:58 UTC (rev 105) @@ -90,9 +90,9 @@ foreach (string fil in openFileDialog1.FileNames) switch (type) { - case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02010"); + case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02010",""); break; - case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02020"); + case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(fil), "02020",""); break; default: break; @@ -127,9 +127,19 @@ item1.SubItems.Add(subtype); item1.SubItems.Add(path); item1.SubItems.Add(id); + item1.SubItems.Add(""); bossview.Items.AddRange(new ListViewItem[] { item1 }); } - + private void addrow(string file, string type, string subtype, string path, string id, string op) + { + ListViewItem item1 = new ListViewItem(file, 0); + item1.SubItems.Add(type); + item1.SubItems.Add(subtype); + item1.SubItems.Add(path); + item1.SubItems.Add(id); + item1.SubItems.Add(op); + bossview.Items.AddRange(new ListViewItem[] { item1 }); + } private void openProiectToolStripMenuItem_Click(object sender, EventArgs e) { string fil; @@ -228,6 +238,7 @@ writer.WriteElementString("SubType", it.SubType); writer.WriteElementString("Source", Path.GetFullPath(it.FileName)); writer.WriteElementString("Id", it.ID); + writer.WriteElementString("Option", it.Option); writer.WriteEndElement(); st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; } Modified: trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs 2007-02-07 19:09:40 UTC (rev 104) +++ trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs 2007-02-07 20:11:58 UTC (rev 105) @@ -28,97 +28,98 @@ /// </summary> private void InitializeComponent() { - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.listView1 = new System.Windows.Forms.ListView(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(80, 289); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(65, 23); - this.button1.TabIndex = 0; - this.button1.Text = "Add"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(186, 289); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Remove"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // comboBox1 - // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(12, 22); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(372, 21); - this.comboBox1.TabIndex = 2; - // - // listView1 - // - this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.languageComboBox = new System.Windows.Forms.ComboBox(); + this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(80, 289); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(65, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Add"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(186, 289); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 1; + this.button2.Text = "Remove"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // languageComboBox + // + this.languageComboBox.FormattingEnabled = true; + this.languageComboBox.Location = new System.Drawing.Point(12, 22); + this.languageComboBox.Name = "languageComboBox"; + this.languageComboBox.Size = new System.Drawing.Size(372, 21); + this.languageComboBox.TabIndex = 2; + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2}); - this.listView1.FullRowSelect = true; - this.listView1.GridLines = true; - this.listView1.Location = new System.Drawing.Point(12, 68); - this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(372, 179); - this.listView1.TabIndex = 3; - this.listView1.UseCompatibleStateImageBehavior = false; - this.listView1.View = System.Windows.Forms.View.Details; - this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); - // - // columnHeader1 - // - this.columnHeader1.Text = "Id"; - // - // columnHeader2 - // - this.columnHeader2.Text = "Value"; - this.columnHeader2.Width = 308; - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(12, 253); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(62, 20); - this.textBox1.TabIndex = 4; - // - // textBox2 - // - this.textBox2.Location = new System.Drawing.Point(80, 253); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(304, 20); - this.textBox2.TabIndex = 5; - // - // Form2 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(396, 333); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.listView1); - this.Controls.Add(this.comboBox1); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Name = "Form2"; - this.Text = "String Editor"; - this.ResumeLayout(false); - this.PerformLayout(); + this.listView1.FullRowSelect = true; + this.listView1.GridLines = true; + this.listView1.Location = new System.Drawing.Point(12, 68); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(372, 179); + this.listView1.TabIndex = 3; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "Id"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Value"; + this.columnHeader2.Width = 308; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(12, 253); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(62, 20); + this.textBox1.TabIndex = 4; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(80, 253); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(304, 20); + this.textBox2.TabIndex = 5; + // + // Form2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(396, 333); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.listView1); + this.Controls.Add(this.languageComboBox); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Name = "Form2"; + this.Text = "String Editor"; + this.Load += new System.EventHandler(this.Form2_Load); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -126,7 +127,7 @@ private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; - private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox languageComboBox; private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ColumnHeader columnHeader2; Modified: trunk/plugins/mpinstaler/MPInstaler/Form2.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form2.cs 2007-02-07 19:09:40 UTC (rev 104) +++ trunk/plugins/mpinstaler/MPInstaler/Form2.cs 2007-02-07 20:11:58 UTC (rev 105) @@ -5,12 +5,14 @@ using System.Drawing; using System.Text; using System.Windows.Forms; +using System.IO; namespace MPInstaler { public partial class Form2 : Form { - public Form2() + string LanguageDirectory = ""; + public Form2() { InitializeComponent(); } @@ -35,5 +37,30 @@ listView1.Items.RemoveAt(index); } } + + private void Form2_Load(object sender, EventArgs e) + { + if (Directory.Exists(LanguageDirectory)) + { + string[] folders = Directory.GetDirectories(LanguageDirectory, "*.*"); + + foreach (string folder in folders) + { + string fileName = folder.Substring(folder.LastIndexOf(@"\") + 1); + + // + // Exclude cvs folder + // + if (fileName.ToLower() != "cvs") + { + if (fileName.Length > 0) + { + fileName = fileName.Substring(0, 1).ToUpper() + fileName.Substring(1); + languageComboBox.Items.Add(fileName); + } + } + } + } + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-07 19:09:40 UTC (rev 104) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-02-07 20:11:58 UTC (rev 105) @@ -46,6 +46,10 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="Core, Version=1.0.2587.35999, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\Program Files\Team MediaPortal\MediaPortal\Core.DLL</HintPath> + </Reference> <Reference Include="ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73"> <SpecificVersion>False</SpecificVersion> <HintPath>D:\Program Files\Team MediaPortal\MediaPortal\ICSharpCode.SharpZipLib.DLL</HintPath> @@ -110,6 +114,10 @@ <SubType>Designer</SubType> <DependentUpon>SkinSelect.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="start_form.resx"> + <SubType>Designer</SubType> + <DependentUpon>start_form.cs</DependentUpon> + </EmbeddedResource> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> @@ -131,6 +139,12 @@ <Compile Include="SkinSelect.Designer.cs"> <DependentUpon>SkinSelect.cs</DependentUpon> </Compile> + <Compile Include="start_form.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="start_form.Designer.cs"> + <DependentUpon>start_form.cs</DependentUpon> + </Compile> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> Modified: trunk/plugins/mpinstaler/MPInstaler/Program.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-02-07 19:09:40 UTC (rev 104) +++ trunk/plugins/mpinstaler/MPInstaler/Program.cs 2007-02-07 20:11:58 UTC (rev 105) @@ -14,7 +14,7 @@ { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new start_form()); } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |