|
From: <du...@us...> - 2007-05-14 17:10:07
|
Revision: 400
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=400&view=rev
Author: dukus
Date: 2007-05-14 10:09:39 -0700 (Mon, 14 May 2007)
Log Message:
-----------
Add all project files with one click
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Form1.cs
trunk/plugins/mpinstaler/MPInstaler/Form1.resx
Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-05-12 08:37:06 UTC (rev 399)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-05-14 17:09:39 UTC (rev 400)
@@ -111,6 +111,10 @@
this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
+ this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+ this.fileAutomatedDiscoverTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+ this.directoryAutomatedDiscoverTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.tabPage_Skin.SuspendLayout();
@@ -222,7 +226,10 @@
this.textToolStripMenuItem,
this.settingsToolStripMenuItem,
this.textToolStripMenuItem1,
- this.otherToolStripMenuItem});
+ this.otherToolStripMenuItem,
+ this.toolStripSeparator3,
+ this.fileAutomatedDiscoverTypeToolStripMenuItem,
+ this.directoryAutomatedDiscoverTypeToolStripMenuItem});
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
this.addToolStripMenuItem.Text = "Add";
@@ -236,7 +243,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(232, 22);
this.windowPluginToolStripMenuItem.Text = "Plugin";
//
// windowToolStripMenuItem
@@ -283,55 +290,55 @@
this.animationsToolStripMenuItem,
this.tetrisToolStripMenuItem});
this.skinToolStripMenuItem.Name = "skinToolStripMenuItem";
- this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
+ this.skinToolStripMenuItem.Size = new System.Drawing.Size(232, 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);
//
// soundsToolStripMenuItem
//
this.soundsToolStripMenuItem.Name = "soundsToolStripMenuItem";
- this.soundsToolStripMenuItem.Size = new System.Drawing.Size(140, 22);
+ this.soundsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.soundsToolStripMenuItem.Text = "Sounds";
this.soundsToolStripMenuItem.Click += new System.EventHandler(this.soundsToolStripMenuItem_Click);
//
// animationsToolStripMenuItem
//
this.animationsToolStripMenuItem.Name = "animationsToolStripMenuItem";
- this.animationsToolStripMenuItem.Size = new System.Drawing.Size(140, 22);
+ 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(140, 22);
+ this.tetrisToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.tetrisToolStripMenuItem.Text = "Tetris";
this.tetrisToolStripMenuItem.Click += new System.EventHandler(this.tetrisToolStripMenuItem_Click);
//
// languageToolStripMenuItem
//
this.languageToolStripMenuItem.Name = "languageToolStripMenuItem";
- this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
+ this.languageToolStripMenuItem.Size = new System.Drawing.Size(232, 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(232, 22);
this.textToolStripMenuItem.Text = "Text";
this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click);
//
@@ -339,20 +346,20 @@
//
this.settingsToolStripMenuItem.Enabled = false;
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
- this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
+ this.settingsToolStripMenuItem.Size = new System.Drawing.Size(232, 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(232, 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(232, 22);
this.otherToolStripMenuItem.Text = "Other";
this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click);
//
@@ -880,6 +887,29 @@
this.toolStripContainer1.TabIndex = 5;
this.toolStripContainer1.Text = "toolStripContainer1";
//
+ // toolStripSeparator3
+ //
+ this.toolStripSeparator3.Name = "toolStripSeparator3";
+ this.toolStripSeparator3.Size = new System.Drawing.Size(229, 6);
+ //
+ // fileAutomatedDiscoverTypeToolStripMenuItem
+ //
+ this.fileAutomatedDiscoverTypeToolStripMenuItem.Name = "fileAutomatedDiscoverTypeToolStripMenuItem";
+ this.fileAutomatedDiscoverTypeToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
+ this.fileAutomatedDiscoverTypeToolStripMenuItem.Text = "File - Automated discover type";
+ this.fileAutomatedDiscoverTypeToolStripMenuItem.Click += new System.EventHandler(this.fileAutomatedDiscoverTypeToolStripMenuItem_Click);
+ //
+ // folderBrowserDialog1
+ //
+ this.folderBrowserDialog1.ShowNewFolderButton = false;
+ //
+ // directoryAutomatedDiscoverTypeToolStripMenuItem
+ //
+ this.directoryAutomatedDiscoverTypeToolStripMenuItem.Name = "directoryAutomatedDiscoverTypeToolStripMenuItem";
+ this.directoryAutomatedDiscoverTypeToolStripMenuItem.Size = new System.Drawing.Size(260, 22);
+ this.directoryAutomatedDiscoverTypeToolStripMenuItem.Text = "Directory - Automated discover type";
+ this.directoryAutomatedDiscoverTypeToolStripMenuItem.Click += new System.EventHandler(this.directoryAutomatedDiscoverTypeToolStripMenuItem_Click);
+ //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1006,6 +1036,10 @@
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.ToolStripMenuItem setupGroupsToolStripMenuItem;
private System.Windows.Forms.PropertyGrid propertyGrid2;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
+ private System.Windows.Forms.ToolStripMenuItem fileAutomatedDiscoverTypeToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem directoryAutomatedDiscoverTypeToolStripMenuItem;
+ private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
}
}
Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-05-12 08:37:06 UTC (rev 399)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-05-14 17:09:39 UTC (rev 400)
@@ -584,5 +584,96 @@
dlg._struct = this._struct;
dlg.ShowDialog();
}
+
+ private void fileAutomatedDiscoverTypeToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ openFileDialog1.Filter = "All files (*.*)|*.*|png files (*.png)|*.png|bmp files (*.bmp)|*.bmp|jpeg files (*.jpg)|*.jpg|Skin files (*.xml)|*.xml|Plugin files (*.dll)|*.dll";
+ openFileDialog1.FileName = "";
+ openFileDialog1.DefaultExt = "*.*";
+ openFileDialog1.Multiselect = true;
+ if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
+ {
+ foreach (string f in openFileDialog1.FileNames)
+ {
+ addFile(f);
+ }
+ }
+ }
+
+ private void addFile(string fil)
+ {
+ if (Path.GetExtension(fil).ToUpper() == ".DLL")
+ {
+ if (fil.ToUpper().Contains("PLUGINS\\WINDOWS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_WINDOW_SUBTYPE, Path.GetFullPath(fil), "01010");
+ }
+ if (fil.ToUpper().Contains("PLUGINS\\TAGREADERS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_TAGREADER_SUBTYPE, Path.GetFullPath(fil), "01010");
+ }
+ if (fil.ToUpper().Contains("PLUGINS\\SUBTITLE"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_SUBTITLE_SUBTYPE, Path.GetFullPath(fil), "01010");
+ }
+ if (fil.ToUpper().Contains("PLUGINS\\PROCESS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PROCESS_SUBTYPE, Path.GetFullPath(fil), "01010");
+ }
+ if (fil.ToUpper().Contains("PLUGINS\\EXTERNALPLAYERS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PLAYER_SUBTYPE, Path.GetFullPath(fil), "01010");
+ }
+ return;
+ }
+ if (fil.ToUpper().Contains("SKIN"))
+ {
+ string subtype = Path.GetFullPath(fil).Substring(Path.GetFullPath(fil).ToLower().IndexOf("skin\\") + 5);
+ subtype = subtype.Substring(0, subtype.IndexOf("\\"));
+ if (fil.ToUpper().Contains("SOUNDS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_SOUNDS_TYPE, subtype, Path.GetFullPath(fil), "02010", "");
+ }
+ else
+ if (fil.ToUpper().Contains("MEDIA\\ANIMATIONS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_ANIMATIONS_TYPE, subtype, Path.GetFullPath(fil), "02010", "");
+ }
+ else if (fil.ToUpper().Contains("MEDIA\\TETRIS"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TETRIS_TYPE, subtype, Path.GetFullPath(fil), "02010", "");
+ }
+ else if (fil.ToUpper().Contains("MEDIA"))
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, subtype, Path.GetFullPath(fil), "02010", "");
+ }
+ else
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, subtype, Path.GetFullPath(fil), "02010", "");
+ }
+ return;
+ }
+ if (Path.GetExtension(fil).ToUpper() == ".TXT")
+ {
+ addrow(Path.GetFileName(fil), MPinstalerStruct.TEXT_TYPE,MPinstalerStruct.TEXT_README_TYPE, Path.GetFullPath(fil), "02010", "");
+ return;
+ }
+ addrow(Path.GetFileName(fil), MPinstalerStruct.OTHER_TYPE, "", Path.GetFullPath(fil), "02010", "");
+ }
+
+ private void directoryAutomatedDiscoverTypeToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+
+ if (folderBrowserDialog1.ShowDialog(this) == DialogResult.OK)
+ {
+ DirectoryInfo di = new DirectoryInfo(folderBrowserDialog1.SelectedPath);
+ FileInfo[] fileList = di.GetFiles("*.*",SearchOption.AllDirectories);
+ foreach (FileInfo f in fileList)
+ {
+ addFile(f.FullName);
+ }
+ }
+
+ }
}
}
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.resx
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-05-12 08:37:06 UTC (rev 399)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-05-14 17:09:39 UTC (rev 400)
@@ -177,6 +177,9 @@
Cv71r/4OTrQ4xWMwWlcAAAAASUVORK5CYII=
</value>
</data>
+ <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>624, 17</value>
+ </metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAEAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|