From: <du...@us...> - 2007-04-11 19:10:23
|
Revision: 313 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=313&view=rev Author: dukus Date: 2007-04-11 12:10:20 -0700 (Wed, 11 Apr 2007) Log Message: ----------- Added full skin package support 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/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-04-10 12:11:44 UTC (rev 312) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-04-11 19:10:20 UTC (rev 313) @@ -51,12 +51,13 @@ 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.textToolStripMenuItem = 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.customizationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.postSetupToolStripMenuItem = 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(); @@ -104,8 +105,9 @@ this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.customizationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.postSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.soundsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.animationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tetrisToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabPage_Skin.SuspendLayout(); @@ -231,7 +233,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 @@ -274,44 +276,38 @@ this.skinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.componentToolStripMenuItem, this.mediaToolStripMenuItem, - this.fullToolStripMenuItem}); + this.soundsToolStripMenuItem, + this.animationsToolStripMenuItem, + this.tetrisToolStripMenuItem}); 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); // - // fullToolStripMenuItem - // - this.fullToolStripMenuItem.Enabled = false; - 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.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); // @@ -319,23 +315,38 @@ // 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); // + // customizationToolStripMenuItem + // + this.customizationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.postSetupToolStripMenuItem}); + this.customizationToolStripMenuItem.Name = "customizationToolStripMenuItem"; + this.customizationToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.customizationToolStripMenuItem.Text = "Setup"; + // + // postSetupToolStripMenuItem + // + this.postSetupToolStripMenuItem.Name = "postSetupToolStripMenuItem"; + this.postSetupToolStripMenuItem.Size = new System.Drawing.Size(137, 22); + this.postSetupToolStripMenuItem.Text = "Post Setup"; + this.postSetupToolStripMenuItem.Click += new System.EventHandler(this.postSetupToolStripMenuItem_Click); + // // bossview // this.bossview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -800,21 +811,27 @@ this.toolStripContainer1.TabIndex = 5; this.toolStripContainer1.Text = "toolStripContainer1"; // - // customizationToolStripMenuItem + // soundsToolStripMenuItem // - this.customizationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.postSetupToolStripMenuItem}); - this.customizationToolStripMenuItem.Name = "customizationToolStripMenuItem"; - this.customizationToolStripMenuItem.Size = new System.Drawing.Size(47, 20); - this.customizationToolStripMenuItem.Text = "Setup"; + this.soundsToolStripMenuItem.Name = "soundsToolStripMenuItem"; + this.soundsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.soundsToolStripMenuItem.Text = "Sounds"; + this.soundsToolStripMenuItem.Click += new System.EventHandler(this.soundsToolStripMenuItem_Click); // - // postSetupToolStripMenuItem + // animationsToolStripMenuItem // - this.postSetupToolStripMenuItem.Name = "postSetupToolStripMenuItem"; - this.postSetupToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.postSetupToolStripMenuItem.Text = "Post Setup"; - this.postSetupToolStripMenuItem.Click += new System.EventHandler(this.postSetupToolStripMenuItem_Click); + this.animationsToolStripMenuItem.Name = "animationsToolStripMenuItem"; + this.animationsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.animationsToolStripMenuItem.Text = "Animations"; + this.animationsToolStripMenuItem.Click += new System.EventHandler(this.animationsToolStripMenuItem_Click); // + // tetrisToolStripMenuItem + // + this.tetrisToolStripMenuItem.Name = "tetrisToolStripMenuItem"; + this.tetrisToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.tetrisToolStripMenuItem.Text = "Tetris"; + this.tetrisToolStripMenuItem.Click += new System.EventHandler(this.tetrisToolStripMenuItem_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -879,7 +896,6 @@ private System.Windows.Forms.ToolStripMenuItem skinToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem componentToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem mediaToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem fullToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openProiectToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem sToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveProiectAsToolStripMenuItem; @@ -936,6 +952,9 @@ private System.Windows.Forms.ToolStripContainer toolStripContainer1; private System.Windows.Forms.ToolStripMenuItem customizationToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem postSetupToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem soundsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem animationsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tetrisToolStripMenuItem; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-04-10 12:11:44 UTC (rev 312) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-04-11 19:10:20 UTC (rev 313) @@ -130,6 +130,15 @@ case 2: openFileDialog1.Filter = "png files (*.png)|*.png|bmp files (*.bmp)|*.bmp|xml files (*.xml)|*.xml|All files (*.*)|*.*"; openFileDialog1.DefaultExt = "*.png"; break; + case 3: openFileDialog1.Filter = "wav files (*.wav)|*.wav|All files (*.*)|*.*"; + openFileDialog1.DefaultExt = "*.wav"; + break; + case 4: openFileDialog1.Filter = "png files (*.png)|*.png|bmp files (*.bmp)|*.bmp|xml files (*.xml)|*.xml|All files (*.*)|*.*"; + openFileDialog1.DefaultExt = "*.png"; + break; + case 5: openFileDialog1.Filter = "png files (*.png)|*.png|bmp files (*.bmp)|*.bmp|xml files (*.xml)|*.xml|All files (*.*)|*.*"; + openFileDialog1.DefaultExt = "*.png"; + break; } if (openFileDialog1.ShowDialog(this) == DialogResult.OK) { @@ -149,6 +158,12 @@ break; case 2: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_MEDIA_TYPE, subtype, Path.GetFullPath(fil), "02020",""); break; + case 3: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_SOUNDS_TYPE, subtype, Path.GetFullPath(fil), "02030", ""); + break; + case 4: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_ANIMATIONS_TYPE, subtype, Path.GetFullPath(fil), "02040", ""); + break; + case 5: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TETRIS_TYPE, subtype, Path.GetFullPath(fil), "02050", ""); + break; default: break; } @@ -536,5 +551,20 @@ dlg._struct = this._struct; dlg.ShowDialog(); } + + private void soundsToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(3); + } + + private void animationsToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(4); + } + + private void tetrisToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(5); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-04-10 12:11:44 UTC (rev 312) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-04-11 19:10:20 UTC (rev 313) @@ -25,6 +25,9 @@ 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_SOUNDS_TYPE = "Sounds"; + public const string SKIN_ANIMATIONS_TYPE = "Animations"; + public const string SKIN_TETRIS_TYPE = "Tetris"; public const string SKIN_XML_SUBTYPE = "Genskin"; public const string TEXT_TYPE = "Text"; public const string TEXT_EULA_TYPE = "EULA"; @@ -448,6 +451,21 @@ ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); } + if (flst.Type == SKIN_SOUNDS_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Sounds" + @"\" + Path.GetFileName(flst.FileName); + } + + if (flst.Type == SKIN_ANIMATIONS_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Media" + @"\" + "Animations" + @"\" + Path.GetFileName(flst.FileName); + } + + if (flst.Type == SKIN_TETRIS_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Media" + @"\" + "Tetris" + @"\" + Path.GetFileName(flst.FileName); + } + if (flst.Type == TEXT_TYPE) { ret = "Release" + @"\" + "Text" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); @@ -503,6 +521,20 @@ ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); } + if (flst.Type == SKIN_SOUNDS_TYPE) + { + ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\" + "Sounds" + @"\" + Path.GetFileName(flst.FileName); + } + + if (flst.Type == SKIN_ANIMATIONS_TYPE) + { + ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\" + "Media" + @"\" + "Animations" + @"\" + Path.GetFileName(flst.FileName); + } + if (flst.Type == SKIN_TETRIS_TYPE) + { + ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\" + "Media" + @"\" + "Tetris" + @"\" + Path.GetFileName(flst.FileName); + } + if (flst.Type == THUMBS_TYPE) { ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType +@"\" + Path.GetFileName(flst.FileName); Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-04-10 12:11:44 UTC (rev 312) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-04-11 19:10:20 UTC (rev 313) @@ -60,7 +60,7 @@ if (test_file(fl,entry)) { string tpf =Path.GetFullPath(MPinstalerStruct.GetDirEntry(fl)) ; - if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE) + if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE || fl.Type == MPinstalerStruct.SKIN_SOUNDS_TYPE || fl.Type == MPinstalerStruct.SKIN_ANIMATIONS_TYPE || fl.Type == MPinstalerStruct.SKIN_TETRIS_TYPE) { if (!Directory.Exists(Path.GetDirectoryName(tpf))) Directory.CreateDirectory(Path.GetDirectoryName(tpf)); Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs 2007-04-10 12:11:44 UTC (rev 312) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.Designer.cs 2007-04-11 19:10:20 UTC (rev 313) @@ -32,6 +32,7 @@ this.button1 = new System.Windows.Forms.Button(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // button1 @@ -49,6 +50,7 @@ this.progressBar1.Location = new System.Drawing.Point(12, 34); this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(419, 23); + this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.progressBar1.TabIndex = 1; // // label1 @@ -60,11 +62,20 @@ this.label1.TabIndex = 2; this.label1.Text = "Downloading"; // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(201, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(0, 13); + this.label2.TabIndex = 3; + // // 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.label2); this.Controls.Add(this.label1); this.Controls.Add(this.progressBar1); this.Controls.Add(this.button1); @@ -85,5 +96,6 @@ private System.Windows.Forms.Button button1; private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-04-10 12:11:44 UTC (rev 312) +++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-04-11 19:10:20 UTC (rev 313) @@ -52,6 +52,7 @@ // e.TotalBytesToReceive, // e.ProgressPercentage); progressBar1.Value = e.ProgressPercentage; + label2.Text = string.Format("{0}/{1}", e.BytesReceived, e.TotalBytesToReceive); } private void UploadProgressCallback(object sender, UploadProgressChangedEventArgs e) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |