You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
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/wEKAT4BtgH/ + AQoBPgG2Af8BCQE6AaoB/wEJATYBnwH/AQkBNAGWAf8BCAEvAYgB/wEIASkBeQH/AQcBJAFrAf//AKEA + AQkBMwGTAf8BDAE/AbYB/wERAUUBuAH/ARUBSQG7Af8BGgFNAb8B/wEeAVIBwwH/ASMBVgHHAf8BKAFb + AcoB/wEsAWABzgH/ATEBZQHRAf8BNgFpAdQB/wE6AW4B1wH/AT4BcgHaAf8BQQF1AdwB/wFEAXgB3gH/ + AUgBewHgAf8BSQF8AeEB/wFKAX0B4gH/AUoBfgHiAf8BSQF9AeEB/wFHAXoB4AH/AUQBdwHeAf8BPwFz + AdoB/wE6AW0B1gH/ATIBZgHRAf8BKQFdAcsB/wETAUcBvAH/AQkBMgGQAf//AI0AAQkBNAGWAf8BEAFC + AbMB/wEbAU0BtwH/AR8BUQG8Af8BIgFVAcEB/wElAVgBxQH/ASgBXAHJAf8BKwFfAc0B/wEuAWIBzwH/ + ATIBZQHRAf8BNQFoAdMB/wE4AWsB1QH/ATsBbgHXAf8BPgFyAdoB/wFBAXQB3AH/AUQBeAHeAf8BRwF7 + AeAB/wFKAX4B4gH/AU4BgQHkAf8BUQGBAeYB/wFUAYIB6QH/AVcBhQHrAf8BWgGIAe0B/wFdAYsB7wH/ + AWABjgHxAf8BYwGSAfMB/wFmAZQB9QH/AWYBlAH1Af8BLQFgAc4B/wEIATMBkwH//wCJAAELAT4BswH/ + ARcBSQGwAf8BGwFNAbUB/wEeAVABugH/ASIBVAG/Af8BJQFXAcMB/wEoAVsByAH/ASsBXwHMAf8BLgFi + Ac8B/wExAWUB0QH/ATQBaAHTAf8BOAFrAdUB/wE7AW4B1wH/AT4BcQHZAf8BQQF0AdwB/wFEAXcB3gH/ + AUcBewHgAf8BSgF9AeIB/wFNAYEB5AH/AVABgQHmAf8BVAGCAegB/wFXAYUB6gH/AVoBiAHsAf8BXQGL + Ae8B/wFgAY4B8QH/AWMBkQHzAf8BZgGUAfUB/wFpAZcB9wH/AWgBlgH2Af8BFQFJAb4B//8AiQABDgFA + Aa8B/wEXAUgBrgH/ARsBTAGzAf8BHgFQAbgB/wEhAVMBvQH/ASQBVwHBAf8BJwFaAcYB/wErAV4BygH/ + AS4BYQHOAf8BMQFkAdAB/wE0AWgB0wH/ATcBawHVAf8BOgFuAdcB/wE9AXEB2QH/AUABdAHbAf8BQwF3 + Ad0B/wFHAXoB3wH/AUoBfQHhAf8BTQGAAeQB/wFQAYEB5gH/AVMBgQHoAf8BVgGEAeoB/wFZAYcB7AH/ + AVwBigHuAf8BXwGNAfAB/wFiAZAB8gH/AWQBkwH0Af8BZgGUAfUB/wFnAZUB9gH/AS4BYgHOAf//AIkA + AQ8BQQGsAf8BFwFHAawB/wEaAUsBsQH/AR4BTwG2Af8BIQFSAbsB/wEkAVYBvwH/AScBWQHEAf8BKgFd + AcgB/wEtAWEBzQH/ATABZAHQAf8BMwFnAdIB/wE3AWoB1AH/AToBbQHWAf8BPQFwAdkB/wFAAXMB2wH/ + AUMBdgHdAf8BRgF5Ad8B/wFJAXwB4QH/AUwBfwHjAf8BTwGBAeUB/wFSAYEB5wH/AVUBgwHpAf8BWAGG + AesB/wFbAYkB7QH/AV0BjAHvAf8BYAGOAfEB/wFiAZAB8gH/AWQBkgHzAf8BZAGTAfQB/wE3AWsB1QH/ + /wCFAAEIASgBdgH/ARABQAGpAf8BFgFGAakB/wEZAUoBrwH/ARwBTgG0Af8BIAFRAbkB/wEjAVUBvQH/ + ASYBWQHCAf8BKQFcAcYB/wEsAV8BywH/ATABYwHPAf8BMwFmAdIB/wE2AWkB1AH/ATkBbAHWAf8BPAFv + AdgB/wE/AXIB2gH/AUIBdQHcAf8BPgFyAd4B/wEwAWgB2wH/AUIBeQHfAf8BNgFwAd8B/wFIAX4B5wH/ + AWMBjgHrAf8BRwF+AeoB/wFZAYcB7AH/AVwBigHuAf8BXgGMAe8B/wFgAY4B8QH/AWEBjwHxAf8BYQGQ + AfIB/wE+AXIB2gH/AQgBKAF2Af//AIEAAQgBLQGCAf8BFAFDAacB/wEVAUUBpwH/ARgBSQGsAf8BHAFN + AbIB/wEfAVABtwH/ASMBVAG7Af8BJgFYAcAB/wEpAVsBxAH/ASwBXwHJAf8BLwFiAc0B/wEyAWUB0QH/ + ATUBaAHTAf8BOAFrAdUB/wE7AW4B1wH/AT4BcQHZAf8BQQF0AdsB/wE1AWsB3gH/AvwG/wF8AZwB7gH/ + AeQB6wH9Bf8BWQGGAesB/wFRAYEB6wH/AVkBiAHsAf8BWwGKAe4B/wFdAYsB7wH/AV4BjAHvAf8BXgGN + AfAB/wFEAXgB3gH/AQgBLQGCAf//AIEAAQgBMQGNAf8BPQFkAbMB/wEuAVgBrgH/ARkBSAGqAf8BGwFL + Aa8B/wEeAU8BtAH/ASIBUwG5Af8BJQFWAb4B/wEoAVoBwgH/ASsBXQHHAf8BLgFhAcsB/wExAWQBzwH/ + ATQBZwHSAf8BNwFqAdUB/wE6AW0B1wH/AT0BcAHZAf8BOQFuAdsB/wEXAVgB1wP/Af4F/wH9Af4B/Qn/ + AYsBrgHyAf8BMwFwAeYB/wFLAYEB6wH/AVkBhwHsAf8BWgGIAe0B/wFbAYkB7QH/AVwBigHuAf8BSQF8 + AeEB/wEIATEBjgH//wCBAAEJATYBnwH/AUwBbwG1Af8BSQFtAbYB/wE4AWEBtAH/ARQBRgGtAf8BHQFO + AbIB/wEgAVEBtwH/ASQBVQG7Af8BJwFYAcAB/wEqAVwBxAH/AS0BXwHJAf8BMAFjAc0B/wEzAWYB0QH/ + ATUBaQHUAf8BOQFsAdYB/wExAWkB1wH/ATwBbQHdAf8BaQGLAecF/wFWAYIB4wH/ASIBXwHbAf8BIwFh + Ad0B/wGJAakB7wn/AW0BlgHsAf8BUgGEAeoB/wFXAYYB6wH/AVgBhwHsAf8BWQGHAewB/wFMAX8B4wH/ + AQkBNgGfAf//AIEAAQoBOAGkAf8BYgGAAbsB/wFQAXMBtwH/AUoBbwG4Af8BPAFmAbUB/wEWAUcBrwH/ + AR8BUAG0Af8BIgFTAbkB/wEmAVcBvgH/ASkBWgHCAf8BLAFeAcYB/wEuAWEBygH/ATEBZAHOAf8BNAFo + AdIB/wE3AWsB1QH/ASkBYAHSAf8B2wHlAfUF/wG/AdIB9QH/ASUBYAHYAf8BRwF7AeAB/wFKAX0B4QH/ + ASQBYgHfAf8C/gH9Af8B5AHqAfwB/wFXAYcB6gH/AVMBggHoAf8BVQGDAekB/wFVAYQB6gH/AVYBhAHq + Af8BTgGBAeQB/wEJATgBpQH//wCBAAEOAUABtQH/AXUBigHCAf8BWAF5AbkB/wFRAXQBuQH/AVIBcwG+ + Af8BMgFdAbUB/wEaAUoBsQH/ASEBUgG2Af8BJAFVAbsB/wEnAVkBwAH/ASQBVAHEAf8BFQFNAcIB/wEj + AVkBygH/AScBXAHQAf8BNQFpAdMB/wEgAVsB1gH/AYMBowHmBf8BrwHHAe8B/wEmAWEB2QH/AUUBeQHe + Af8BSAF7AeAB/wEnAWIB2wH/AfQB+AH9Af8BTgGBAeoB/wE7AXQB5QH/AVEBgQHmAf8BUgGBAecB/wFS + AYEB6AH/AVMBgQHoAf8BTgGBAeUB/wEJAT4BtgH//wCBAAERAUMBtQH/AYMBmQHIAf8BXgF9AboB/wFZ + AXkBugH/AVMBdgG7Af8BUwF2Ab8B/wEUAUkBsAH/AR8BUAG0Af8BIgFUAbgB/wEmAVcBvQH/ARMBSgG7 + Af8ByAHUAfEF/wEFAT8BwQH/ARABTQHJAf8BaAGJAd8B/wFYAYEB3gH/ASYBYQHUBf8BIAFbAdYB/wEp + AWEB2QH/AScBYgHaAf8BRAF6AeIF/wHUAeEB9AH/AUIBeAHjAf8BTgGBAeQB/wFPAYEB5QH/AVABgQHm + Af8BUAGBAeYB/wFOAYEB5QH/AQoBPgG1Af//AIEAARQBRQG1Af8BlAGmAc4B/wFlAYEBuwH/AWABfwG7 + Af8BWgF7AbwB/wFbAX4BwAH/ATMBWQG0Af8BCgE/AasB/wEnAVYBuQH/AQUBNgGsAf8BBQEpAa4B/wHd + AeIB9AX/AdMB3AHyAf8BjwGpAeMJ/wF4AZYB4Qn/AaIBugHuAf8BsAHEAe8N/wE3AW8B4gH/AUsBfgHi + Af8BTAF/AeMB/wFNAYAB4wH/AU0BgAHkAf8BTQGAAeQB/wEKAT4BtgH//wCBAAEXAUgBtgH/AaMBswHU + Af8BbAGCAbwB/wFnAYEBvQH/AWEBgAG9Af8BXgF/Ab0B/wFHAW4BugH/ARIBQwGqBf8B3wHlAfUB/wHh + AeUB9Bn/AS4BZAHQBf8BiAGrAesD/wH+Bf8BngG3Ae0B/wEUAVYB1wH/ATQBbAHfAf8BPwFzAd8B/wFI + AXwB4AH/AUkBfAHhAf8BSgF9AeEB/wFKAX0B4gH/AUoBfQHiAf8BCgE+AbYB//8AgQABGQFJAbcB/wGy + Ab8B2gH/AXIBhwG8Af8BbgGEAb4B/wFoAYEBvgH/AWIBgQG/Af8BYwGBAcIB/wEYAUgBrA3/AZYBrgHg + Af8BHgFQAb4B/wEFATwBvAH/AUMBcAHPAf8B4wHnAfgF/wHJAdcB9AH/AZIBrQHrAf8BPgFyAdcB/wFA + AXIB2AH/Ae0B8wH9Af8BVAGAAeEB/wE3AW0B2wH/AUMBdwHdAf8BRAF4Ad4B/wFFAXkB3wH/AUYBegHf + Af8BRwF6AeAB/wFHAXsB4AH/AUcBewHgAf8BCwE/AbYB//8AgQABGQFJAbcB/wHAAcsB4QH/AXkBjAG+ + Af8BdAGJAb8B/wFvAYYBvwH/AWkBgQHAAf8BagGEAcAB/wEFAS4BmQH/AZIBqAHXBf8BcQGLAdEB/wEF + ATsBrQH/AR4BUgG/Af8BJgFXAcIB/wEdAVQBwQH/AQUBQQHDAf8B5wHvAfoJ/wHiAeoB9wH/AR0BVwHP + Af8BKQFjAdcB/wEwAWgB2QH/AT8BcgHaAf8BQAF0AdsB/wFBAXUB3AH/AUMBdgHdAf8BQwF3Ad0B/wFE + AXcB3gH/AUQBeAHeAf8BRAF4Ad4B/wEKAT4BtgH//wCBAAEYAUgBtwH/Ac0B1gHmAf8BgQGTAcAB/wF7 + AY4BvwH/AXYBiwHBAf8BcAGHAcEB/wFpAYIBvgH/ATwBZwGxCf8BBQEqAaIB/wEaAVQBtwH/ASUBVgG7 + Af8BKAFZAb8B/wErAVwBwwH/AR0BUwHCAf8BUAF6AdMJ/wExAWYB1AH/AS4BZAHVAf8BOQFsAdYB/wE7 + AW4B1wH/ATwBcAHYAf8BPQFxAdkB/wE/AXIB2gH/AUABcwHbAf8BQAF0AdsB/wFBAXQB3AH/AUEBdQHc + Af8BQQF1AdwB/wEKAT4BtgH//wCBAAEVAUYBtgH/AdgB3gHrAf8BhgGaAcQB/wGBAZMBwQH/AXwBkAHB + Af8BbQGFAb0B/wGzAcQB4Qn/Ac0B1gHtAf8BBQEvAaIB/wEgAVEBtAH/ASMBVAG4Af8BJgFXAbwB/wEo + AVoBwAH/ASQBWQHEAf8BFAFPAcQF/wG4AckB7wH/AQYBRQHJAf8BMQFjAdIB/wE2AWoB1AH/ATgBawHV + Af8BOQFtAdYB/wE7AW4B1wH/ATwBbwHYAf8BPQFwAdkB/wE9AXEB2QH/AT4BcgHaAf8BPgFyAdoB/wE9 + AXAB2QH/AQoBPgG1Af//AIEAARABQwG1Af8B3wHkAe8B/wGRAaMByQH/AYUBmgHEAf8BgQGUAcIB/wF3 + AY0BwgH/AZsBrgHUAf8B+QH4Af0F/wL1AfoB/wEFASYBmwH/AR4BTwGwAf8BIQFSAbUB/wEjAVUBuQH/ + ASYBVwG9Af8BHAFRAcEB/wE0AWQByAn/AWcBhwHeAf8BIgFYAdEB/wE0AWcB0wH/ATUBaQHTAf8BNwFq + AdUB/wE4AWsB1QH/ATkBbAHWAf8BOgFtAdcB/wE7AW4B1wH/ATsBbwHYAf8BPAFvAdgB/wE4AWwB1gH/ + AQkBPQG2Af//AIEAAQoBOAGhAf8B4wHoAfEB/wGcAa0BzgH/AY4BoAHHAf8BhgGaAcUB/wGBAZUBwwH/ + AXYBigHAAf8BVAF2AbUB/wHIAdIB6AX/AS8BWAGuAf8BBQE6AaUB/wEfAU8BsQH/ASEBUgG1Af8BGgFR + AbkB/wEFATgBsQH/AbkBxQHsDf8BGAFRAcgB/wExAWUB0QH/ATMBZgHSAf8BNAFoAdMB/wE1AWkB0wH/ + ATYBagHUAf8BNwFrAdUB/wE4AWsB1QH/ATgBbAHWAf8BOQFsAdYB/wEzAWcB0gH/AQkBNwGiAf//AIEA + AQkBNgGfAf8B3gHkAfAB/wGpAbcB0wH/AZYBpwHKAf8BjgGhAcgB/wGGAZoBxQH/AYEBlgHFAf8BawGE + Ab4B/wG3AcYB4wn/ATgBXwG0Af8BBQElAZsB/wEFAS8BogH/AQUBMQGqAf8BlAGrAd4F/wGVAa0B4wH/ + ATwBbAHLAf8BYQGCAdUB/wEeAVMBxgH/AS4BYgHOAf8BMAFkAdAB/wExAWUB0QH/ATIBZgHSAf8BMwFn + AdIB/wE0AWgB0wH/ATUBaAHTAf8BNQFpAdMB/wE2AWkB1AH/AS4BYgHPAf8BCQE2AZ8B//8AgQABCAEw + AYsB/wHUAdwB7wH/AbYBwgHZAf8BngGuAc4B/wGWAagBywH/AY4BoQHIAf8BhgGbAcYB/wGBAZMBwxX/ + AeQB7QH0Df8BBQEjAasB/wEVAUwBvQH/ASEBVQHFAf8BKgFdAcgB/wEsAV8BywH/AS0BYQHOAf8BLgFi + Ac8B/wEvAWMB0AH/ATABZAHQAf8BMQFlAdEB/wEyAWYB0QH/ATIBZgHSAf8BMwFmAdIB/wEpAV0BywH/ + AQgBMAGLAf//AIEAAQgBLQGBAf8BxAHPAeoB/wHDAc0B3wH/AaYBtQHRAf8BngGuAc4B/wGXAagBywH/ + AY8BogHIAf8BgQGSAb4B/wGjAbMB1QH/AWMBgQG8Af8BBQERAYUB/wHrAfAB9Qn/AakBuwHhCf8BZQGC + Ac4B/wEdAVABvQH/ASYBWAHBAf8BKAFaAcUB/wEpAVwByAH/ASoBXgHLAf8BLAFfAc0B/wEtAWABzgH/ + AS4BYQHOAf8BLgFiAc8B/wEvAWMBzwH/AS8BYwHQAf8BMAFkAdAB/wEkAVcBxwH/AQgBLQGBAf//AIEA + AQcBJwFzAf8BrgG+AeQB/wHPAdcB5QH/Aa4BuwHVAf8BpgG1AdEB/wGfAa8BzwH/AZcBqAHMAf8BjwGi + AckB/wGHAZwBxwH/AYQBmwHGAf8BcQGHAcQB/wHQAdwB7QX/ATUBXwGwAf8BBQEWAZUB/wEJAT8BqQH/ + AakBuAHhAf8BBgE8Aa0B/wERAUgBswH/AR0BTwG9Af8BHgFRAcEB/wEgAVkBxAH/ASgBWwHHAf8BKQFc + AcoB/wEqAV4BzAH/ASsBXgHMAf8BLAFfAc0B/wEsAWABzQH/AS0BYAHNAf8BLQFgAc4B/wEfAVIBxAH/ + AQgBJwFzAf//AIUAAZYBqwHdAf8B2gHgAesB/wG3AcIB2AH/Aa8BvAHVAf8BpwG1AdIB/wGfAa8BzwH/ + AZcBqQHMAf8BjwGiAcoB/wGHAZwBxwH/AYEBmAHGAf8BgQGXAc0B/wGnAbYB1wH/AXYBjQHIAf8BZgGC + AcEB/wFcAX8BwwH/AVIBfAHEAf8BVAF5AcUB/wFWAXwBxQH/AVEBdwHGAf8BTAF1AcYB/wFCAW8ByQH/ + AToBaAHJAf8BNQFlAcsB/wEwAWIBywH/ASsBXgHLAf8BKQFcAcsB/wEpAV0BywH/ASoBXQHMAf8BKgFe + AcwB/wEaAU0BwAH//wCJAAGAAZYB1gH/AeQB6AHwAf8BvwHJAdwB/wG3AcMB2QH/Aa8BvAHVAf8BpwG2 + AdIB/wGfAa8BzwH/AZgBqQHNAf8BkAGiAcoB/wGIAZwByAH/AYEBlwHHAf8BfQGUAcgB/wF7AZABxwH/ + AXcBiwHGAf8BcQGHAcYB/wFnAYIBxwH/AWEBgQHHAf8BWwF/AccB/wFVAXoBxwH/AU8BdgHIAf8BSQFy + AcgB/wFDAW4ByQH/AT0BagHKAf8BNwFmAcoB/wEwAWEBywH/ASoBXQHKAf8BJwFaAckB/wEnAVsBygH/ + AScBWwHKAf8BFQFJAb0B//8AiQABYQGBAc0B/wHtAfAB9QH/AccB0AHgAf8BvwHJAd0B/wG3AcMB2QH/ + Aa8BvAHWAf8BpwG2AdMB/wGgAbAB0AH/AZgBqQHNAf8BkAGjAcsB/wGIAZ0ByAH/AYEBlwHGAf8BgAGT + AccB/wF6AZAByAH/AXQBiwHHAf8BbgGHAccB/wFnAYIBxwH/AWEBgQHHAf8BWgF+AccB/wFUAXoBxwH/ + AU4BdQHIAf8BSAFxAcgB/wFCAW0ByQH/ATsBaAHJAf8BNQFkAcoB/wEuAV8BygH/ASgBWwHJAf8BJAFY + AcgB/wEkAVgByAH/ARABRAG6Af//AIkAASABTwG7Af8B8AHyAfgB/wHTAdkB5gH/AcgB0AHhAf8BwAHK + Ad0B/wG4AcMB2gH/AbABvQHWAf8BqAG2AdMB/wGgAbAB0AH/AZgBqgHOAf8BkAGjAcsB/wGIAZ0ByQH/ + AYEBlwHGAf8BfgGSAcYB/wF5AY8BxwH/AXQBiwHHAf8BbQGGAccB/wFnAYIBxwH/AWABgQHHAf8BWgF+ + AccB/wFUAXkBxwH/AU0BdAHHAf8BRwFwAcgB/wFAAWwByAH/AToBZwHIAf8BMwFiAckB/wEsAV4ByAH/ + ASYBWAHHAf8BHwFTAcQB/wEKAT0BswH//wCJAAEHASoBfAH/AV8BgQHOAf8B8AHyAfkB/wHlAekB8QH/ + AdcB3QHpAf8BywHTAeMB/wG+AckB3QH/AbEBvgHYAf8BqAG3AdQB/wGgAbAB0QH/AZkBqgHOAf8BkQGk + AcwB/wGIAZ0ByQH/AYEBlwHHAf8BfQGRAcUB/wF3AYwBxQH/AXIBiQHGAf8BbQGGAccB/wFmAYEBxwH/ + AV8BgQHGAf8BWQF9AcYB/wFTAXgBxgH/AUwBcwHHAf8BRgFuAccB/wE/AWoBxwH/ATgBZQHIAf8BMQFh + AcgB/wEnAVgBxQH/AQ8BQwG5Af8BBwEmAXEB//8AjQABCAEqAXwB/wEdAU0BugH/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: <sa...@us...> - 2007-03-09 17:26:25
|
Revision: 171 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=171&view=rev Author: saamand Date: 2007-03-09 09:26:16 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.15")] -[assembly: AssemblyFileVersion("0.15")] +[assembly: AssemblyVersion("0.16")] +[assembly: AssemblyFileVersion("0.16")] Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.15")] +[assembly: AssemblyVersion("0.16")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -488,10 +488,7 @@ private void SaveLyricToDatabase() { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("Lyrics.xml", false)) - { - xmlwriter.SetValue(LyricUtil.capatalizeString(m_artist), LyricUtil.capatalizeString(m_title), m_LyricText); - } + MyLyricsSetup.LyricsDB[MyLyricsUtil.CorrectKeyFormat(LyricUtil.capatalizeString(m_artist), LyricUtil.capatalizeString(m_title))].Lyrics = m_LyricText; } // Stop worker thread if it is running. Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -103,7 +103,7 @@ this.tabControl.Location = new System.Drawing.Point(12, 12); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(528, 495); + this.tabControl.Size = new System.Drawing.Size(528, 494); this.tabControl.TabIndex = 1; // // tabPageLyricsDatabase @@ -111,7 +111,7 @@ this.tabPageLyricsDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageLyricsDatabase.Name = "tabPageLyricsDatabase"; this.tabPageLyricsDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLyricsDatabase.Size = new System.Drawing.Size(520, 469); + this.tabPageLyricsDatabase.Size = new System.Drawing.Size(520, 468); this.tabPageLyricsDatabase.TabIndex = 1; this.tabPageLyricsDatabase.Text = "Lyrics database"; this.tabPageLyricsDatabase.UseVisualStyleBackColor = true; @@ -123,7 +123,7 @@ this.tabPageSetup.Location = new System.Drawing.Point(4, 22); this.tabPageSetup.Name = "tabPageSetup"; this.tabPageSetup.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSetup.Size = new System.Drawing.Size(520, 469); + this.tabPageSetup.Size = new System.Drawing.Size(520, 454); this.tabPageSetup.TabIndex = 2; this.tabPageSetup.Text = "General setup"; this.tabPageSetup.UseVisualStyleBackColor = true; @@ -242,7 +242,7 @@ this.tabPageDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageDatabase.Name = "tabPageDatabase"; this.tabPageDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageDatabase.Size = new System.Drawing.Size(520, 469); + this.tabPageDatabase.Size = new System.Drawing.Size(520, 454); this.tabPageDatabase.TabIndex = 2; this.tabPageDatabase.Text = "Search music database"; this.tabPageDatabase.UseVisualStyleBackColor = true; @@ -663,7 +663,7 @@ // // btSave // - this.btSave.Location = new System.Drawing.Point(356, 513); + this.btSave.Location = new System.Drawing.Point(358, 512); this.btSave.Name = "btSave"; this.btSave.Size = new System.Drawing.Size(78, 23); this.btSave.TabIndex = 16; @@ -673,7 +673,7 @@ // // btClose // - this.btClose.Location = new System.Drawing.Point(440, 513); + this.btClose.Location = new System.Drawing.Point(442, 512); this.btClose.Name = "btClose"; this.btClose.Size = new System.Drawing.Size(78, 23); this.btClose.TabIndex = 99; @@ -692,7 +692,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(539, 542); + this.ClientSize = new System.Drawing.Size(538, 543); this.ControlBox = false; this.Controls.Add(this.btClose); this.Controls.Add(this.tabControl); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -94,7 +94,10 @@ // worker thread Thread m_LyricControllerThread; - MusicDatabase dbs; + internal static LyricsDatabase LyricsDB = null; + internal static LyricsDatabase LyricsMarkedDB = null; + internal const string LyricsDBName = "LyricsDatabaseV2.db"; + internal const string LyricsMarkedDBName = "LyricsMarkedDatabaseV2.db"; // Timer variables int hour = 0; @@ -169,6 +172,77 @@ MessageBox.Show("Something has gone wrong when reading Mediaportal.xml"); } } + + string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + LyricsDBName; + FileInfo fileInfo = new FileInfo(path); + + if (fileInfo.Exists == false) + { + MessageBox.Show("Serialize file - " + Environment.CurrentDirectory); + + if (MessageBox.Show(this, "Your database will have to be upgraded to work with this version\r\nUpgrade now?", "Upgrade lyricsdatabase", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) + { + ConvertFromXMLtoLyricsDatabase convertFromXMLtoLyricsDatabase = new ConvertFromXMLtoLyricsDatabase(); + LyricsDB = convertFromXMLtoLyricsDatabase.Convert(); + + BinaryFormatter b = new BinaryFormatter(); + Stream s = File.Open(path, FileMode.CreateNew, FileAccess.ReadWrite); + b.Serialize(s, LyricsDB); + s.Close(); + + + + + + //// Create file to save the database to + //FileStream fs = new FileStream(path, FileMode.Create); + + //// Create a BinaryFormatter object to perform the serialization + //BinaryFormatter bf = new BinaryFormatter(); + + //// Use the BinaryFormatter object to serialize the database to the file + //bf.Serialize(fs, LyricsDB); + + //// Create likewise a database for the remainingLyrics + //path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + LyricsMarkedDBName; + //fs = new FileStream(path, FileMode.Create); + //LyricsMarkedDB = new LyricsDatabase(); + //bf.Serialize(fs, LyricsMarkedDB); + + //// Close the file + //fs.Close(); + } + } + else + { + path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsDBName); + BinaryFormatter bf = new BinaryFormatter(); + Stream s = File.Open(path, FileMode.Open, FileAccess.Read); + LyricsDB = (LyricsDatabase)bf.Deserialize(s, null); + s.Close(); + + // Open database to read data from + FileStream fs = new FileStream(path, FileMode.Open); + + // Create a BinaryFormatter object to perform the deserialization + //BinaryFormatter bf = new BinaryFormatter(); + + // Use the BinaryFormatter object to deserialize the database + LyricsDB = new LyricsDatabase(); + LyricsDB = (LyricsDatabase)bf.Deserialize(fs); + + // Deserialize LyricsRemainingDatabase + path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + LyricsMarkedDBName; + fs = new FileStream(path, FileMode.Open); + LyricsMarkedDB = new LyricsDatabase(); + LyricsMarkedDB = (LyricsDatabase)bf.Deserialize(fs); + + // Close the file + fs.Close(); + } + + MyLyricsSetup_LyricsLibrary.CurrentDB = LyricsDB; + lyricUC.updateLyricsTree(); } // Stop worker thread if it is running. @@ -356,17 +430,15 @@ string capArtist = LyricUtil.capatalizeString(m_artist); string capTitle = LyricUtil.capatalizeString(m_track); - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + + if (MyLyricsUtil.isTrackInLyricsDatabase(capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_NOT_FOUND)) { - xmlwriter.SetValue(capArtist, capTitle, m_LyricText); + LyricsDB.Add(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, m_LyricText, site)); } if (MyLyricsUtil.isTrackInLyricsMarkedDatabase(capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_MARKED)) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("LyricsToFetch.xml", false)) - { - xmlwriter.RemoveEntry(capArtist, capTitle); - } + LyricsMarkedDB.Remove(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle)); } StreamReader sr = File.OpenText(logFullFileName); @@ -392,12 +464,9 @@ string capArtist = LyricUtil.capatalizeString(artist); string capTitle = LyricUtil.capatalizeString(title); - if (m_MarkSongsWhenNoLyricFound) + if (m_MarkSongsWhenNoLyricFound && MyLyricsUtil.isTrackInLyricsMarkedDatabase(capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_NOT_FOUND)) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("LyricsToFetch.xml", false)) - { - xmlwriter.SetValue(capArtist, capTitle, MyLyricsUtil.MARK); - } + LyricsMarkedDB.Add(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, MyLyricsUtil.MARK, "")); } m_SongsWithMark += 1; @@ -444,6 +513,25 @@ btImportAll.Enabled = true; btCancel.Enabled = false; isSearching(false); + + if (LyricsDB != null) + { + string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + LyricsDBName; + FileStream fs = new FileStream(path, FileMode.Create); + BinaryFormatter bf = new BinaryFormatter(); + bf.Serialize(fs, LyricsDB); + fs.Close(); + } + + if (LyricsMarkedDB != null) + { + string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + LyricsMarkedDBName; + FileStream fs = new FileStream(path, FileMode.Create); + BinaryFormatter bf = new BinaryFormatter(); + bf.Serialize(fs, LyricsMarkedDB); + fs.Close(); + } + lyricUC.updateLyricsTree(); } @@ -579,50 +667,18 @@ } else { - XmlTextReader tr = null; - try + foreach (KeyValuePair<string, LyricsItem> kvp in LyricsMarkedDB) { - tr = new XmlTextReader("LyricsToFetch.xml"); - - string currentArtist = ""; - string currentTitle = ""; - while (tr.Read()) + if (++m_SongsNotKnown > m_Limit) { - switch (tr.Name) - { - case "section": - if (tr.AttributeCount == 1) - { - currentArtist = tr.GetAttribute(0); - } - break; - case "entry": - if (tr.AttributeCount == 1) - { - currentTitle = tr.GetAttribute(0); - string currentLyrics = tr.Value; - - if (++m_SongsNotKnown > m_Limit) - { - bgWorkerSearch.ReportProgress(-1); - goto startSearch; - } - - string[] lyricId = new string[2] { currentArtist, currentTitle }; - lyricConfigInfosQueue.Enqueue(lyricId); - } - break; - } - + bgWorkerSearch.ReportProgress(-1); + goto startSearch; } + string[] lyricId = new string[2] { kvp.Value.Artist, kvp.Value.Title }; + lyricConfigInfosQueue.Enqueue(lyricId); + } - } - catch { ;} - finally - { - tr.Close(); - } - //m_SongsToSearch = lyricConfigInfosQueue.Count; + m_SongsToSearch = lyricConfigInfosQueue.Count; //bgWorkerSearch.ReportProgress(songNotKnown); } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -15,14 +15,12 @@ private void InitializeComponent() { this.btSave = new MediaPortal.UserInterface.Controls.MPButton(); - this.lbTitle = new MediaPortal.UserInterface.Controls.MPLabel(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.btDelete = new System.Windows.Forms.Button(); this.btAdd = new System.Windows.Forms.Button(); this.gbLibrary = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.comboDatabase = new MediaPortal.UserInterface.Controls.MPComboBox(); this.lbDatabase = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbTestSecondsLeft = new System.Windows.Forms.Label(); this.btImportLRC = new MediaPortal.UserInterface.Controls.MPButton(); this.lbSongs2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.tbLyrics = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -36,6 +34,9 @@ this.btResetDatabase = new System.Windows.Forms.Button(); this.lbResetDatabase = new MediaPortal.UserInterface.Controls.MPLabel(); this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog(); + this.lbTestSecondsLeft = new System.Windows.Forms.Label(); + this.lbTitle = new MediaPortal.UserInterface.Controls.MPLabel(); + this.lbSource = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbLibrary.SuspendLayout(); this.gbResetDatabase.SuspendLayout(); this.SuspendLayout(); @@ -51,16 +52,6 @@ this.btSave.UseVisualStyleBackColor = true; this.btSave.Click += new System.EventHandler(this.btSave_Click); // - // lbTitle - // - this.lbTitle.AutoSize = true; - this.lbTitle.Location = new System.Drawing.Point(215, 66); - this.lbTitle.MaximumSize = new System.Drawing.Size(275, 13); - this.lbTitle.MinimumSize = new System.Drawing.Size(275, 13); - this.lbTitle.Name = "lbTitle"; - this.lbTitle.Size = new System.Drawing.Size(275, 13); - this.lbTitle.TabIndex = 4; - // // openFileDialog1 // this.openFileDialog1.FileName = "ARTIST - TITLE.txt"; @@ -91,6 +82,7 @@ // // gbLibrary // + this.gbLibrary.Controls.Add(this.lbSource); this.gbLibrary.Controls.Add(this.comboDatabase); this.gbLibrary.Controls.Add(this.lbDatabase); this.gbLibrary.Controls.Add(this.lbTestSecondsLeft); @@ -121,7 +113,7 @@ this.comboDatabase.FormattingEnabled = true; this.comboDatabase.Items.AddRange(new object[] { "Lyrics database", - "LyricsToFetct database"}); + "Marked database"}); this.comboDatabase.Location = new System.Drawing.Point(85, 15); this.comboDatabase.Name = "comboDatabase"; this.comboDatabase.Size = new System.Drawing.Size(144, 21); @@ -136,16 +128,6 @@ this.lbDatabase.TabIndex = 26; this.lbDatabase.Text = "Database:"; // - // lbTestSecondsLeft - // - this.lbTestSecondsLeft.AutoSize = true; - this.lbTestSecondsLeft.Location = new System.Drawing.Point(215, 335); - this.lbTestSecondsLeft.Name = "lbTestSecondsLeft"; - this.lbTestSecondsLeft.Size = new System.Drawing.Size(93, 13); - this.lbTestSecondsLeft.TabIndex = 25; - this.lbTestSecondsLeft.Text = "SecondsLeftLabel"; - this.lbTestSecondsLeft.Visible = false; - // // btImportLRC // this.btImportLRC.Location = new System.Drawing.Point(95, 330); @@ -158,7 +140,7 @@ // // lbSongs2 // - this.lbSongs2.Location = new System.Drawing.Point(82, 59); + this.lbSongs2.Location = new System.Drawing.Point(82, 65); this.lbSongs2.Name = "lbSongs2"; this.lbSongs2.Size = new System.Drawing.Size(65, 15); this.lbSongs2.TabIndex = 23; @@ -179,7 +161,7 @@ // // lbSongs // - this.lbSongs.Location = new System.Drawing.Point(11, 59); + this.lbSongs.Location = new System.Drawing.Point(11, 65); this.lbSongs.Name = "lbSongs"; this.lbSongs.Size = new System.Drawing.Size(60, 15); this.lbSongs.TabIndex = 22; @@ -197,7 +179,7 @@ // // lbArtists2 // - this.lbArtists2.Location = new System.Drawing.Point(82, 44); + this.lbArtists2.Location = new System.Drawing.Point(82, 50); this.lbArtists2.Name = "lbArtists2"; this.lbArtists2.Size = new System.Drawing.Size(65, 15); this.lbArtists2.TabIndex = 21; @@ -205,7 +187,7 @@ // // lbArtists // - this.lbArtists.Location = new System.Drawing.Point(11, 44); + this.lbArtists.Location = new System.Drawing.Point(11, 50); this.lbArtists.Name = "lbArtists"; this.lbArtists.Size = new System.Drawing.Size(60, 15); this.lbArtists.TabIndex = 20; @@ -238,7 +220,7 @@ this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(181, 23); this.button1.TabIndex = 11; - this.button1.Text = "Reset LyricsToFetch database"; + this.button1.Text = "Reset marked database"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // @@ -258,8 +240,8 @@ this.lbResetDatabase.Name = "lbResetDatabase"; this.lbResetDatabase.Size = new System.Drawing.Size(282, 41); this.lbResetDatabase.TabIndex = 9; - this.lbResetDatabase.Text = "Reset the \"Lyrics\" and/or \"LyricsToFetch\" database.\r\n\r\nAll data in each database" + - " that is reset is lost for ever"; + this.lbResetDatabase.Text = "Reset the \"Lyrics\" and/or \"marked\" database.\r\n\r\nAll data in each database that is" + + " reset is lost for ever"; // // openFileDialog2 // @@ -268,6 +250,36 @@ this.openFileDialog2.Multiselect = true; this.openFileDialog2.RestoreDirectory = true; // + // lbTestSecondsLeft + // + this.lbTestSecondsLeft.AutoSize = true; + this.lbTestSecondsLeft.Location = new System.Drawing.Point(215, 335); + this.lbTestSecondsLeft.Name = "lbTestSecondsLeft"; + this.lbTestSecondsLeft.Size = new System.Drawing.Size(93, 13); + this.lbTestSecondsLeft.TabIndex = 25; + this.lbTestSecondsLeft.Text = "SecondsLeftLabel"; + this.lbTestSecondsLeft.Visible = false; + // + // lbTitle + // + this.lbTitle.AutoSize = true; + this.lbTitle.Location = new System.Drawing.Point(221, 53); + this.lbTitle.MaximumSize = new System.Drawing.Size(290, 26); + this.lbTitle.MinimumSize = new System.Drawing.Size(290, 26); + this.lbTitle.Name = "lbTitle"; + this.lbTitle.Size = new System.Drawing.Size(290, 26); + this.lbTitle.TabIndex = 4; + this.lbTitle.TextAlign = System.Drawing.ContentAlignment.BottomLeft; + // + // lbSource + // + this.lbSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbSource.Location = new System.Drawing.Point(357, 297); + this.lbSource.Name = "lbSource"; + this.lbSource.Size = new System.Drawing.Size(142, 15); + this.lbSource.TabIndex = 28; + this.lbSource.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // // MyLyricsSetup_LyricsLibrary // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -275,7 +287,7 @@ this.Controls.Add(this.gbResetDatabase); this.Controls.Add(this.gbLibrary); this.Name = "MyLyricsSetup_LyricsLibrary"; - this.Size = new System.Drawing.Size(525, 515); + this.Size = new System.Drawing.Size(525, 456); this.gbLibrary.ResumeLayout(false); this.gbLibrary.PerformLayout(); this.gbResetDatabase.ResumeLayout(false); @@ -285,7 +297,6 @@ #endregion - private MediaPortal.UserInterface.Controls.MPLabel lbTitle; private System.Windows.Forms.OpenFileDialog openFileDialog1; private MediaPortal.UserInterface.Controls.MPGroupBox gbLibrary; private MediaPortal.UserInterface.Controls.MPTextBox tbLyrics; @@ -301,11 +312,13 @@ internal MediaPortal.UserInterface.Controls.MPButton btImportSingle; internal MediaPortal.UserInterface.Controls.MPButton btImportLRC; private System.Windows.Forms.OpenFileDialog openFileDialog2; - private System.Windows.Forms.Label lbTestSecondsLeft; - private MediaPortal.UserInterface.Controls.MPComboBox comboDatabase; private MediaPortal.UserInterface.Controls.MPLabel lbDatabase; internal System.Windows.Forms.Button button1; internal System.Windows.Forms.Button btResetDatabase; private MediaPortal.UserInterface.Controls.MPLabel lbResetDatabase; + private MediaPortal.UserInterface.Controls.MPComboBox comboDatabase; + private System.Windows.Forms.Label lbTestSecondsLeft; + private MediaPortal.UserInterface.Controls.MPLabel lbTitle; + private MediaPortal.UserInterface.Controls.MPLabel lbSource; } } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -5,12 +5,13 @@ using System.Data; using System.Text; using System.Windows.Forms; -using System.Xml; using System.IO; using System.Collections; using System.Threading; using System.Text.RegularExpressions; using System.Diagnostics; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; using MediaPortal.GUI.Library; using MediaPortal.Dialogs; @@ -42,61 +43,34 @@ string nextLineToShow; int lineCounter; const int SHIFT_WHEN_HIT = 15; - string currentDatabase = ""; + internal static LyricsDatabase CurrentDB; public MyLyricsSetup_LyricsLibrary(Form form) { this.m_Form = form; InitializeComponent(); - currentDatabase = "Lyrics.xml"; comboDatabase.SelectedIndex = 0; updateLyricsTree(); } internal void updateLyricsTree() { - //if file is not found, create a new xml file - if (!System.IO.File.Exists("Lyrics.xml")) + if (CurrentDB == null) { - MyLyricsUtil.createLyricDatabase(); + return; } - if (!System.IO.File.Exists("LyricsToFetch.xml")) - { - MyLyricsUtil.createLyricToFetchDatabase(); - } - // catch error when treeView suddenly is disposed due to application shutdown try { treeView.Nodes.Clear(); m_NoOfArtists = 0; m_NoOfTitles = 0; - XmlTextReader tr = new XmlTextReader(currentDatabase); - - string currentArtist = ""; - string currentTitle = ""; - while (tr.Read()) + foreach (KeyValuePair<string, LyricsItem> kvp in CurrentDB) { - - switch (tr.Name) - { - case "section": - if (tr.AttributeCount == 1) - { - currentArtist = tr.GetAttribute(0); - } - break; - case "entry": - if (tr.AttributeCount == 1) - { - currentTitle = tr.GetAttribute(0); - AddSong(currentArtist, currentTitle); - } - break; - } + AddSong(kvp.Value); } - tr.Close(); + treeView.Sort(); updateLyricDatabaseStats(); } @@ -111,40 +85,16 @@ private ArrayList getTitlesByArtist(string artist) { - XmlTextReader tr = new XmlTextReader(currentDatabase); ArrayList titles = new ArrayList(); - while (tr.Read()) + foreach (KeyValuePair<string, LyricsItem> kvp in CurrentDB) { - switch (tr.Name) + if (kvp.Value.Artist.Equals(artist)) { - case "section": - if (tr.AttributeCount == 1 && tr.GetAttribute(0).Equals(artist)) - { - while (tr.Read()) - { - if (tr.Name.Equals("entry")) - { - if (tr.AttributeCount == 1) - { - titles.Add(tr.GetAttribute(0)); - } - } - else if (tr.Name.Equals("section")) - { - tr.Close(); - return titles; - } - } - } - break; - - default: - break; + titles.Add(kvp.Value.Title); } } - tr.Close(); - return null; + return titles; } /// <summary> @@ -152,10 +102,10 @@ /// </summary> /// <param name="artist"></param> /// <param name="title"></param> - private void AddSong(string artist, string title) + private void AddSong(LyricsItem item) { - artist = LyricUtil.capatalizeString(artist); - title = LyricUtil.capatalizeString(title); + string artist = LyricUtil.capatalizeString(item.Artist); + string title = LyricUtil.capatalizeString(item.Title); // add artist, if it doesn't exists if (!treeView.Nodes.ContainsKey(artist)) @@ -169,6 +119,7 @@ if (!treeView.Nodes[artistIndex].Nodes.ContainsKey(title)) { treeView.Nodes[artistIndex].Nodes.Add(title, title); + treeView.Nodes[artistIndex].Nodes[treeView.Nodes[artistIndex].Nodes.Count - 1].Tag = item; ++m_NoOfTitles; } treeView.Update(); @@ -180,14 +131,10 @@ /// <param name="artist"></param> /// <param name="title"></param> /// <param name="lyric"></param> - private void AddSong(string artist, string title, string lyric) + private void AddSong(string artist, string title, string lyrics) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(currentDatabase, false)) - { - xmlwriter.SetValue(artist, title, lyric); - } - - AddSong(artist, title); + LyricsItem item = new LyricsItem(artist, title, lyrics, "MP config"); + AddSong(item); } private void RemoveArtist(string artist) @@ -206,11 +153,8 @@ treeView.Nodes[artistIndex].Nodes.RemoveAt(titleIndex); --m_NoOfTitles; - // remove title from xml-file - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(currentDatabase, false)) - { - xmlwriter.RemoveEntry(artist, title); - } + // remove title from database + CurrentDB.Remove(MyLyricsUtil.CorrectKeyFormat(artist, title)); // remove title from treeView if (treeView.Nodes[artistIndex].Nodes.Count == 0) @@ -233,13 +177,9 @@ m_CurrentArtist = artist; m_CurrentTitle = LyricUtil.capatalizeString(title); - string lyricText = ""; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(currentDatabase, false)) - { - lyricText = xmlreader.GetValueAsString(m_CurrentArtist, m_CurrentTitle, ""); - } + string lyricsText = (string)CurrentDB[MyLyricsUtil.CorrectKeyFormat(artist, title)].Lyrics; - LRC.SimpleLRC lrc = new LRC.SimpleLRC(artist, title, lyricText); + LRC.SimpleLRC lrc = new LRC.SimpleLRC(artist, title, lyricsText); if (lrc.IsValid) { return true; @@ -259,6 +199,7 @@ m_CurrentTitle = ""; tbLyrics.Text = ""; lbTitle.Text = ""; + lbSource.Text = ""; tbLyrics.Enabled = false; @@ -273,19 +214,17 @@ m_CurrentArtist = LyricUtil.capatalizeString(artist); m_CurrentTitle = LyricUtil.capatalizeString(title); - string lyricText = ""; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(currentDatabase, false)) - { - lyricText = xmlreader.GetValueAsString(m_CurrentArtist, m_CurrentTitle, ""); - } + LyricsItem item = CurrentDB[MyLyricsUtil.CorrectKeyFormat(m_CurrentArtist, m_CurrentTitle)]; + string lyricsText = item.Lyrics; - lyricText = LyricsEngine.LyricUtil.ReturnEnvironmentNewLine(lyricText); + lyricsText = LyricsEngine.LyricUtil.ReturnEnvironmentNewLine(lyricsText); - m_OriginalLyric = lyricText; + m_OriginalLyric = lyricsText; tbLyrics.Text = m_OriginalLyric; tbLyrics.Enabled = true; - lbTitle.Text = m_CurrentArtist + " - " + m_CurrentTitle; + lbTitle.Text = "\"" + m_CurrentArtist + " - " + m_CurrentTitle + "\""; + lbSource.Text = "(" + item.Source + ")"; } } // Selected an artist @@ -327,11 +266,8 @@ private void btSave_Click(object sender, EventArgs e) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(currentDatabase, false)) - { - xmlwriter.SetValue(LyricUtil.capatalizeString(m_CurrentArtist), LyricUtil.capatalizeString(m_CurrentTitle), tbLyrics.Text); - btSave.Enabled = false; - } + CurrentDB[MyLyricsUtil.CorrectKeyFormat(LyricUtil.capatalizeString(m_CurrentArtist), LyricUtil.capatalizeString(m_CurrentTitle))].Lyrics = tbLyrics.Text; + btSave.Enabled = false; } private void tbLyrics_KeyUp(object sender, KeyEventArgs e) @@ -480,43 +416,6 @@ { if (MessageBox.Show(this, "Are you sure the lyrics database should be upgraded?", "Upgrade lyrics database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) { - StreamReader freader = File.OpenText("Lyrics.xml"); - StreamWriter fwriter = File.CreateText("LyricsTemp.xml"); - - string text_line; - while ((text_line = freader.ReadLine()) != null) - { - string strStart = "entry name="; - string strFinish = ">"; - - int indexStart = text_line.IndexOf(strStart); - int indexFinish = text_line.IndexOf(strFinish); - - // if both strings are found, you have a line holding title of track - - if (indexStart != -1 && indexFinish != -1 && ((char)(text_line[indexFinish - 2])).Equals(' ')) - { - string text_newline = - text_line.Substring(0, indexFinish - 2) + text_line.Substring(indexFinish - 1); - text_line = text_newline; - } - - // write to output file - fwriter.WriteLine(text_line); - } - - // must explicitly close the readers - freader.Close(); - fwriter.Close(); - - FileInfo fi = new FileInfo("Lyrics.xml"); - fi.Delete(); - - fi = new FileInfo("LyricsTemp.xml"); - fi.MoveTo("Lyrics.xml"); - fi = new FileInfo("LyricsTemp.xml"); - fi.Delete(); - updateLyricsTree(); } } @@ -626,12 +525,12 @@ { if (comboDatabase.SelectedIndex == 0) { - currentDatabase = "Lyrics.xml"; + CurrentDB = MyLyricsSetup.LyricsDB; updateLyricsTree(); } else { - currentDatabase = "LyricsToFetch.xml"; + CurrentDB = MyLyricsSetup.LyricsMarkedDB; updateLyricsTree(); } } @@ -640,8 +539,13 @@ { if (MessageBox.Show(this, "Are you sure the Lyrics database should be deleted?", "Delete Lyrics database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) { - MyLyricsUtil.createLyricDatabase(); - currentDatabase = "Lyrics.xml"; + string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsDBName; + FileStream fs = new FileStream(path, FileMode.Create); + BinaryFormatter bf = new BinaryFormatter(); + bf.Serialize(fs, new LyricsDatabase()); + fs.Close(); + + CurrentDB = MyLyricsSetup.LyricsDB; comboDatabase.SelectedIndex = 0; updateLyricsTree(); updateInfo(); @@ -651,10 +555,15 @@ private void button1_Click(object sender, EventArgs e) { - if (MessageBox.Show(this, "Are you sure the LyricsToFetch database should be deleted?", "Delete LyricsToFetch database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) + if (MessageBox.Show(this, "Are you sure you want to delete the database with marked titles?", "Delete title database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) { - MyLyricsUtil.createLyricToFetchDatabase(); - currentDatabase = "LyricsToFetch.xml"; + string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsMarkedDBName; + FileStream fs = new FileStream(path, FileMode.Create); + BinaryFormatter bf = new BinaryFormatter(); + bf.Serialize(fs, new LyricsDatabase()); + fs.Close(); + + CurrentDB = MyLyricsSetup.LyricsDB; comboDatabase.SelectedIndex = 1; updateLyricsTree(); updateInfo(); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Text; -using System.Xml; using LyricsEngine; @@ -20,19 +19,14 @@ string lyricText = ""; try { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("Lyrics.xml", false)) - { - string capatalizedArtist = LyricUtil.capatalizeString(artist); - string capatalizedTitle = LyricUtil.capatalizeString(title); - lyricText = xmlreader.GetValue(capatalizedArtist, capatalizedTitle); - } + string capatalizedArtist = LyricUtil.capatalizeString(artist); + string capatalizedTitle = LyricUtil.capatalizeString(title); + + lyricText = MyLyricsSetup.LyricsDB[CorrectKeyFormat(capatalizedArtist, capatalizedTitle)].Lyrics; + } - catch (System.Xml.XPath.XPathException XPathExp) + catch { - //Catch the XPathException and write it to the Visual Studio .NET output window. - System.Diagnostics.Debug.WriteLine("XPathException:"); - System.Diagnostics.Debug.WriteLine("***************"); - System.Diagnostics.Debug.WriteLine(XPathExp.ToString()); return LYRIC_NOT_FOUND; } if (lyricText.Equals("")) @@ -44,55 +38,38 @@ internal static int isTrackInLyricsMarkedDatabase(string artist, string title) { - string lyricText = ""; + string lyricsText = ""; try { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("LyricsToFetch.xml", false)) - { - string capatalizedArtist = LyricUtil.capatalizeString(artist); - string capatalizedTitle = LyricUtil.capatalizeString(title); - lyricText = xmlreader.GetValue(capatalizedArtist, capatalizedTitle); - } + lyricsText = MyLyricsSetup.LyricsMarkedDB[MyLyricsUtil.CorrectKeyFormat(LyricUtil.capatalizeString(artist), LyricUtil.capatalizeString(title))].Lyrics; } - catch{;} - if (lyricText.Equals(MyLyricsUtil.MARK)) + catch{ + return LYRIC_NOT_FOUND; + } + if (lyricsText.Equals(MyLyricsUtil.MARK)) return LYRIC_MARKED; - return LYRIC_NOT_FOUND; + else + return LYRIC_NOT_FOUND; } - internal static void createLyricDatabase() - { - XmlTextWriter xmlWriter = new XmlTextWriter("Lyrics.xml", System.Text.Encoding.UTF8); - xmlWriter.Formatting = Formatting.Indented; - xmlWriter.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); - xmlWriter.WriteStartElement("Lyrics"); - xmlWriter.Close(); - } - internal static void createLyricToFetchDatabase() - { - XmlTextWriter xmlWriter = new XmlTextWriter("LyricsToFetch.xml", System.Text.Encoding.UTF8); - xmlWriter.Formatting = Formatting.Indented; - xmlWriter.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); - xmlWriter.WriteStartElement("Lyrics"); - xmlWriter.Close(); - } - public static string LookUpLyricInDatabase(string artist, string title) { - string lyricText; - - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + string lyricText = ""; + try { - lyricText = xmlreader.GetValueAsString(artist, title, ""); - if (lyricText.Equals("")) - { - lyricText = xmlreader.GetValueAsString(LyricUtil.capatalizeString(artist), LyricUtil.capatalizeString(title), ""); - } - lyricText = lyricText.Replace("\n", "\r\n"); + lyricText = MyLyricsSetup.LyricsDB[CorrectKeyFormat(LyricUtil.capatalizeString(artist), LyricUtil.capatalizeString(title))].Lyrics; + return lyricText.Replace("\n", "\r\n"); } + catch + { + return lyricText; + } + } - return lyricText; + public static string CorrectKeyFormat(string artist, string title) + { + return artist + "-" + title; } } } Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.15")] -[assembly: AssemblyFileVersion("0.15")] +[assembly: AssemblyVersion("0.16")] +[assembly: AssemblyFileVersion("0.16")] Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-03-09 13:23:31 UTC (rev 170) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-03-09 17:26:16 UTC (rev 171) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.15")] -[assembly: AssemblyFileVersion("0.15")] +[assembly: AssemblyVersion("0.16")] +[assembly: AssemblyFileVersion("0.16")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mis...@us...> - 2007-03-09 13:23:44
|
Revision: 170 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=170&view=rev Author: misterd_sf Date: 2007-03-09 05:23:31 -0800 (Fri, 09 Mar 2007) Log Message: ----------- MPlayer: - Added option to use my video and/or my music shares - Added option to delete items - Documentation updated Modified Paths: -------------- trunk/plugins/My MPlayer/Liesmich.pdf trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 16x9/myMPlayer.xml trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 4x3/myMPlayer.xml trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/PM III/myMPlayer.xml trunk/plugins/My MPlayer/Readme.pdf Modified: trunk/plugins/My MPlayer/Liesmich.pdf =================================================================== (Binary files differ) Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2007-03-09 13:23:31 UTC (rev 170) @@ -303,7 +303,7 @@ /// Version number of the player /// </summary> public override string VersionNumber { - get { return "0.61"; } + get { return "0.65"; } } #endregion @@ -437,13 +437,16 @@ mplayerBackgroundPanel = new Panel(); mplayerBackgroundPanel.BackColor = Color.Black; mplayerBackgroundPanel.Size = new System.Drawing.Size(0, 0); + mplayerBackgroundPanel.Location = new Point(0, 0); mplayerOuterPanel = new Panel(); mplayerOuterPanel.BackColor = Color.FromArgb(0, 0, 0, 0); ; mplayerOuterPanel.Size = new System.Drawing.Size(0, 0); + mplayerOuterPanel.Location = new Point(0, 0); mplayerInnerPanel = new Panel(); mplayerInnerPanel.Size = new System.Drawing.Size(0, 0); mplayerInnerPanel.BackColor = Color.FromArgb(16, 16, 16); mplayerOuterPanel.Controls.Add(mplayerInnerPanel); + mplayerInnerPanel.Location = new Point(0, 0); _playState = PlayState.Playing; speed = 1; _volume = 100; @@ -790,7 +793,7 @@ m_geometry.ARType = GUIGraphicsContext.ARType; m_geometry.PixelRatio = GUIGraphicsContext.PixelRatio; // Use Method with crop settings, because without it doesn't work properly. There is a bug. - m_geometry.GetWindow(videoWith, videoHeight, out _sourceRectangle, out _videoRectangle, new CropSettings()); + m_geometry.GetWindow(videoWith, videoHeight, out _sourceRectangle, out _videoRectangle); _positionX += _videoRectangle.X; _positionY += _videoRectangle.Y; Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs 2007-03-09 13:23:31 UTC (rev 170) @@ -60,11 +60,15 @@ this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.pluginName = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.myVideoShare = new System.Windows.Forms.CheckBox(); + this.myMusicShare = new System.Windows.Forms.CheckBox(); + this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // okButton // - this.okButton.Location = new System.Drawing.Point(12, 237); + this.okButton.Location = new System.Drawing.Point(14, 290); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(75, 23); this.okButton.TabIndex = 3; @@ -75,7 +79,7 @@ // cancelButton // this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(322, 237); + this.cancelButton.Location = new System.Drawing.Point(322, 290); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(75, 23); this.cancelButton.TabIndex = 20; @@ -90,7 +94,7 @@ // shareLocation // this.shareLocation.Enabled = false; - this.shareLocation.Location = new System.Drawing.Point(90, 210); + this.shareLocation.Location = new System.Drawing.Point(87, 194); this.shareLocation.Name = "shareLocation"; this.shareLocation.Size = new System.Drawing.Size(207, 20); this.shareLocation.TabIndex = 33; @@ -99,7 +103,7 @@ // label24 // this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(12, 213); + this.label24.Location = new System.Drawing.Point(9, 197); this.label24.Name = "label24"; this.label24.Size = new System.Drawing.Size(48, 13); this.label24.TabIndex = 32; @@ -108,7 +112,7 @@ // label23 // this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(12, 187); + this.label23.Location = new System.Drawing.Point(9, 171); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(38, 13); this.label23.TabIndex = 31; @@ -117,7 +121,7 @@ // shareName // this.shareName.Enabled = false; - this.shareName.Location = new System.Drawing.Point(90, 184); + this.shareName.Location = new System.Drawing.Point(87, 168); this.shareName.Name = "shareName"; this.shareName.Size = new System.Drawing.Size(207, 20); this.shareName.TabIndex = 30; @@ -125,7 +129,7 @@ // // shareDelete // - this.shareDelete.Location = new System.Drawing.Point(90, 155); + this.shareDelete.Location = new System.Drawing.Point(87, 139); this.shareDelete.Name = "shareDelete"; this.shareDelete.Size = new System.Drawing.Size(75, 23); this.shareDelete.TabIndex = 29; @@ -135,7 +139,7 @@ // // shareAdd // - this.shareAdd.Location = new System.Drawing.Point(12, 155); + this.shareAdd.Location = new System.Drawing.Point(9, 139); this.shareAdd.Name = "shareAdd"; this.shareAdd.Size = new System.Drawing.Size(75, 23); this.shareAdd.TabIndex = 28; @@ -146,15 +150,15 @@ // shareList // this.shareList.FormattingEnabled = true; - this.shareList.Location = new System.Drawing.Point(12, 54); + this.shareList.Location = new System.Drawing.Point(9, 38); this.shareList.Name = "shareList"; - this.shareList.Size = new System.Drawing.Size(385, 95); + this.shareList.Size = new System.Drawing.Size(366, 95); this.shareList.TabIndex = 27; this.shareList.SelectedIndexChanged += new System.EventHandler(this.shareList_SelectedIndexChanged); // // browseButton // - this.browseButton.Location = new System.Drawing.Point(322, 208); + this.browseButton.Location = new System.Drawing.Point(300, 192); this.browseButton.Name = "browseButton"; this.browseButton.Size = new System.Drawing.Size(75, 23); this.browseButton.TabIndex = 34; @@ -165,7 +169,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(9, 32); + this.label1.Location = new System.Drawing.Point(6, 16); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(74, 13); this.label1.TabIndex = 35; @@ -187,22 +191,53 @@ this.pluginName.Size = new System.Drawing.Size(212, 20); this.pluginName.TabIndex = 37; // + // groupBox1 + // + this.groupBox1.Controls.Add(this.shareList); + this.groupBox1.Controls.Add(this.shareAdd); + this.groupBox1.Controls.Add(this.shareDelete); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.shareName); + this.groupBox1.Controls.Add(this.browseButton); + this.groupBox1.Controls.Add(this.label23); + this.groupBox1.Controls.Add(this.shareLocation); + this.groupBox1.Controls.Add(this.label24); + this.groupBox1.Location = new System.Drawing.Point(14, 58); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(385, 226); + this.groupBox1.TabIndex = 38; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Additional internal shares:"; + // + // myVideoShare + // + this.myVideoShare.AutoSize = true; + this.myVideoShare.Location = new System.Drawing.Point(12, 35); + this.myVideoShare.Name = "myVideoShare"; + this.myVideoShare.Size = new System.Drawing.Size(123, 17); + this.myVideoShare.TabIndex = 39; + this.myVideoShare.Text = "Use MyVideo shares"; + this.myVideoShare.UseVisualStyleBackColor = true; + // + // myMusicShare + // + this.myMusicShare.AutoSize = true; + this.myMusicShare.Location = new System.Drawing.Point(273, 35); + this.myMusicShare.Name = "myMusicShare"; + this.myMusicShare.Size = new System.Drawing.Size(124, 17); + this.myMusicShare.TabIndex = 40; + this.myMusicShare.Text = "Use MyMusic shares"; + this.myMusicShare.UseVisualStyleBackColor = true; + // // ConfigurationForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.cancelButton; - this.ClientSize = new System.Drawing.Size(409, 274); + this.ClientSize = new System.Drawing.Size(411, 325); + this.Controls.Add(this.myMusicShare); + this.Controls.Add(this.myVideoShare); + this.Controls.Add(this.groupBox1); this.Controls.Add(this.pluginName); this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.browseButton); - this.Controls.Add(this.shareLocation); - this.Controls.Add(this.label24); - this.Controls.Add(this.label23); - this.Controls.Add(this.shareName); - this.Controls.Add(this.shareDelete); - this.Controls.Add(this.shareAdd); - this.Controls.Add(this.shareList); this.Controls.Add(this.cancelButton); this.Controls.Add(this.okButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; @@ -211,6 +246,8 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "MPlayer Configuration"; this.Load += new System.EventHandler(this.ConfigurationForm_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -239,6 +276,9 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox pluginName; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.CheckBox myVideoShare; + private System.Windows.Forms.CheckBox myMusicShare; } } \ No newline at end of file Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2007-03-09 13:23:31 UTC (rev 170) @@ -199,6 +199,8 @@ } using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { pluginName.Text = xmlreader.GetValueAsString("mplayer", "displayNameOfGUI", "My MPlayer GUI"); + myVideoShare.Checked = xmlreader.GetValueAsBool("mplayer", "useMyVideoShares", true); + myMusicShare.Checked = xmlreader.GetValueAsBool("mplayer", "useMyMusicShares", true); } } catch (Exception e) { Log.Info("MPlayer GUI Error: Configuration could not be loaded: " + e.Message); @@ -230,15 +232,16 @@ writer.WriteEndDocument(); writer.Close(); using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { - if (pluginName.Text.Equals(String.Empty)) { + if (String.IsNullOrEmpty(pluginName.Text)) { xmlWriter.SetValue("mplayer", "displayNameOfGUI", "My MPlayer"); } else { xmlWriter.SetValue("mplayer", "displayNameOfGUI", pluginName.Text); } + xmlWriter.SetValueAsBool("mplayer", "useMyMusicShares", myMusicShare.Checked); + xmlWriter.SetValueAsBool("mplayer", "useMyVideoShares", myVideoShare.Checked); } } #endregion - } } \ No newline at end of file Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs 2007-03-09 13:23:31 UTC (rev 170) @@ -37,9 +37,11 @@ using MediaPortal.Player; using MediaPortal.Dispatcher; using MediaPortal.Video.Database; +using MediaPortal.Music.Database; using MediaPortal.TV.Database; using MediaPortal.GUI.View; using MediaPortal.GUI.Video; +using MediaPortal.GUI.Music; using MediaPortal.Configuration; namespace MPlayer { @@ -71,57 +73,63 @@ } #endregion - #region variables + #region variables /// <summary> /// Virutal Directory /// </summary> private VirtualDirectory m_directory = new VirtualDirectory(); - + /// <summary> /// ViewAs Button /// </summary> [SkinControlAttribute(2)] private GUIButtonControl btnViewAs = null; - + /// <summary> /// SortBy Button /// </summary> [SkinControlAttribute(3)] private GUISortButtonControl btnSortBy = null; - + /// <summary> /// PlayStream Button /// </summary> [SkinControlAttribute(5)] private GUIButtonControl btnPlayStream = null; - + /// <summary> - /// PlayDis Button + /// PlayDisc Button /// </summary> [SkinControlAttribute(6)] private GUIButtonControl btnPlayDisc = null; - + /// <summary> + /// Delete Button + /// </summary> + [SkinControlAttribute(7)] + private GUIButtonControl btnDelete = null; + + /// <summary> /// FacadeView /// </summary> [SkinControlAttribute(50)] private GUIFacadeControl facadeView = null; - + /// <summary> /// Current view mode /// </summary> private View currentView; - + /// <summary> /// Current sort method /// </summary> private VideoSort.SortMethod currentSortMethod; - + /// <summary> /// Indicator, if ascending sort is selected /// </summary> private bool m_bSortAscending; - + /// <summary> /// Playlistplayer instance /// </summary> @@ -136,6 +144,18 @@ /// Display name of the plugin /// </summary> private string displayName; + /// <summary> + /// Indicates if the my video Shares are used + /// </summary> + private bool useMyVideoShares; + /// <summary> + /// Indicates if the my music Shares are used + /// </summary> + private bool useMyMusicShares; + /// <summary> + /// List of path of all shares + /// </summary> + private List<String> sharePaths; #endregion #region ctor @@ -145,7 +165,7 @@ static MPlayer_GUIPlugin() { playlistPlayer = PlayListPlayer.SingletonPlayer; } - + /// <summary> /// Standard constructor which set the WindowID /// </summary> @@ -154,6 +174,8 @@ virtualPath = String.Empty; using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { displayName = xmlreader.GetValueAsString("mplayer", "displayNameOfGUI", "My MPlayer"); + useMyVideoShares = xmlreader.GetValueAsBool("mplayer", "useMyVideoShares", true); + useMyMusicShares = xmlreader.GetValueAsBool("mplayer", "useMyMusicShares", true); } } #endregion @@ -166,7 +188,7 @@ get { return currentView; } set { currentView = value; } } - + /// <summary> /// Gets/Sets the current sort method /// </summary> @@ -174,7 +196,7 @@ get { return currentSortMethod; } set { currentSortMethod = value; } } - + /// <summary> /// Gets/Sets the current sorting direction /// </summary> @@ -182,40 +204,17 @@ get { return m_bSortAscending; } set { m_bSortAscending = value; } } - + /// <summary> /// Inits the window plugin /// </summary> /// <returns>true, if init was successful</returns> public override bool Init() { bool bResult = Load(GUIGraphicsContext.Skin + @"\myMPlayer.xml"); - m_directory.SetExtensions(getExtenstions()); - m_directory.Clear(); - Share share = null; - string[] drives = Environment.GetLogicalDrives(); - foreach (string driveElement in drives) { - if (Utils.getDriveType(driveElement) == 5) { - string driveLetter = driveElement.Substring(0, 1); - share = new Share(); - share.Name = driveLetter + ":\\"; - share.Path = driveLetter + ":\\"; - m_directory.Add(share); - } - } - XmlDocument doc = new XmlDocument(); - string path = Config.GetFile(Config.Dir.Config, "MPlayer_GUIPlugin.xml"); - doc.Load(path); - XmlNodeList listShare = doc.DocumentElement.SelectNodes("/mplayergui/Share"); - foreach (XmlNode nodeShare in listShare) { - share = new Share(); - share.Name = nodeShare.Attributes["name"].Value; - share.Path = nodeShare.Attributes["path"].Value; - m_directory.Add(share); - } - + initializeVirtualDirectory(); return bResult; } - + /// <summary> /// Handler for the GUIMessage of the MP System /// </summary> @@ -224,11 +223,11 @@ public override bool OnMessage(GUIMessage message) { if (message.Message == GUIMessage.MessageType.GUI_MSG_WINDOW_INIT) { bool mplayerPlayerAvailable = false; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config,"MediaPortal.xml"))) { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { mplayerPlayerAvailable = xmlreader.GetValueAsBool("plugins", "MPlayer", false); } - mplayerPlayerAvailable = (mplayerPlayerAvailable & System.IO.File.Exists(Config.GetFile(Config.Dir.Plugins,"ExternalPlayers","MPlayer_ExtPlayer.dll"))); + mplayerPlayerAvailable = (mplayerPlayerAvailable & System.IO.File.Exists(Config.GetFile(Config.Dir.Plugins, "ExternalPlayers", "MPlayer_ExtPlayer.dll"))); if (!mplayerPlayerAvailable) { GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); dlgOk.SetHeading("My MPlayer GUI"); @@ -240,7 +239,7 @@ } return base.OnMessage(message); } - + /// <summary> /// Tries to start the playback of an disc /// </summary> @@ -289,7 +288,7 @@ dlgOk.DoModal(GetID); return false; } - + /// <summary> /// Tries to start the playback of an internet stream /// </summary> @@ -305,7 +304,12 @@ if (g_Player.Playing) { g_Player.Stop(); } - g_Player.Play(keyboard.Text + ".mplayer"); + String url = keyboard.Text + ".mplayer"; + if (url.StartsWith("rtsp:")) { + url = "ZZZZ:" + url.Remove(0, 5); + } + + g_Player.Play(url); if (g_Player.Player != null && g_Player.IsVideo) { GUIGraphicsContext.IsFullScreenVideo = true; GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); @@ -314,7 +318,7 @@ } return false; } - + /// <summary> /// Handles click events of GUI controls /// </summary> @@ -404,8 +408,11 @@ //OnQueueItem(iItem); } } + if(control == btnDelete){ + OnAction(new Action(Action.ActionType.ACTION_DELETE_ITEM,0,0)); + } } - + /// <summary> /// Handles the click in the facadeview /// </summary> @@ -440,8 +447,8 @@ LoadDirectory(path); } else { string movieFileName = path + ".mplayer"; - if(movieFileName.StartsWith("rtsp:")){ - movieFileName = "ZZZZ:"+movieFileName.Remove(0,5); + if (movieFileName.StartsWith("rtsp:")) { + movieFileName = "ZZZZ:" + movieFileName.Remove(0, 5); } movieFileName = m_directory.GetLocalFilename(movieFileName); if (PlayListFactory.IsPlayList(movieFileName)) { @@ -456,7 +463,7 @@ return; } } - + /// <summary> /// Selects the current selected Item of the facadeView /// </summary> @@ -467,7 +474,7 @@ } UpdateButtonStates(); } - + /// <summary> /// Sorts the facadeView /// </summary> @@ -475,7 +482,7 @@ facadeView.Sort(new VideoSort(CurrentSortMethod, CurrentSortAsc)); UpdateButtonStates(); } - + /// <summary> /// Updates the labels of the button /// </summary> @@ -520,7 +527,7 @@ btnSortBy.IsAscending = CurrentSortAsc; } } - + /// <summary> /// Handles the page load event and initializes the plugin /// </summary> @@ -535,15 +542,15 @@ CurrentSortAsc = true; OnSort(); } - + /// <summary> /// Reads all extensions from external player plugin /// </summary> /// <returns>Lsit of all extensions</returns> private ArrayList getExtenstions() { - ArrayList extensions = new ArrayList() ; + ArrayList extensions = new ArrayList(); XmlDocument doc = new XmlDocument(); - string path = Config.GetFile(Config.Dir.Config,"MPlayer_ExtPlayer.xml"); + string path = Config.GetFile(Config.Dir.Config, "MPlayer_ExtPlayer.xml"); doc.Load(path); XmlNodeList listExtensions = doc.DocumentElement.SelectNodes("/mplayer/extensions/Extension"); foreach (XmlNode nodeExtension in listExtensions) { @@ -551,7 +558,7 @@ } return extensions; } - + /// <summary> /// Loads a playlist and starts the playback /// </summary> @@ -609,7 +616,6 @@ /// </summary> /// <param name="newFolderName">Name of the folder</param> private void LoadDirectory(string newFolderName) { - String _currentFolder = newFolderName; string objectCount = String.Empty; @@ -652,8 +658,23 @@ } OnSort(); } - /// <summary> + /// Overrides on action for deleting item + /// </summary> + /// <param name="action"></param> + public override void OnAction(Action action) { + if (action.wID == Action.ActionType.ACTION_DELETE_ITEM) { + GUIListItem item = facadeView.SelectedListItem; + if (item != null) { + if (!item.IsFolder) { + OnDeleteItem(item); + return; + } + } + } + base.OnAction(action); + } + /// <summary> /// Handles the event, when the Sorting method changes /// </summary> /// <param name="sender">Sender object</param> @@ -665,6 +686,145 @@ GUIControl.FocusControl(GetID, ((GUIControl)sender).GetID); } + /// <summary> + /// Deletes an item from the gui list + /// </summary> + /// <param name="item">item to delete</param> + private void OnDeleteItem(GUIListItem item) { + if (item.IsRemote) return; + if (!m_directory.RequestPin(item.Path)) { + return; + } + + string movieFileName = System.IO.Path.GetFileName(item.Path); + string movieTitle = movieFileName; + // delete single file + GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); + if (null == dlgYesNo) return; + dlgYesNo.SetHeading(GUILocalizeStrings.Get(925)); + dlgYesNo.SetLine(1, movieTitle); + dlgYesNo.SetLine(2, String.Empty); + dlgYesNo.SetLine(3, String.Empty); + dlgYesNo.DoModal(GetID); + + if (!dlgYesNo.IsConfirmed) + return; + DoDeleteItem(item); + + int currentSelectedItem = facadeView.SelectedListItemIndex; + if (currentSelectedItem > 0) currentSelectedItem--; + LoadDirectory(virtualPath); + if (currentSelectedItem >= 0) { + GUIControl.SelectItemControl(GetID, facadeView.GetID, currentSelectedItem); + } + } + /// <summary> + /// Deletes the item + /// </summary> + /// <param name="item">Item to delete</param> + private void DoDeleteItem(GUIListItem item) { + if (item.IsFolder) { + if (item.IsRemote) return; + if (item.Label != "..") { + ArrayList items = new ArrayList(); + items = m_directory.GetDirectoryUnProtected(item.Path, false); + foreach (GUIListItem subItem in items) { + DoDeleteItem(subItem); + } + MediaPortal.Util.Utils.DirectoryDelete(item.Path); + } + } else { + if (item.IsRemote) return; + MediaPortal.Util.Utils.FileDelete(item.Path); + } + } + + + /// <summary> + /// Initialize the virtual directory + /// </summary> + private void initializeVirtualDirectory() { + sharePaths = new List<string>(); + m_directory.SetExtensions(getExtenstions()); + m_directory.Clear(); + if (useMyVideoShares) { + AddSection("movies"); + } + if (useMyMusicShares) { + AddSection("music"); + } + Share share = null; + XmlDocument doc = new XmlDocument(); + string path = Config.GetFile(Config.Dir.Config, "MPlayer_GUIPlugin.xml"); + doc.Load(path); + XmlNodeList listShare = doc.DocumentElement.SelectNodes("/mplayergui/Share"); + foreach (XmlNode nodeShare in listShare) { + share = new Share(); + share.Name = nodeShare.Attributes["name"].Value; + share.Path = nodeShare.Attributes["path"].Value; + if (!sharePaths.Contains(share.Path.ToLower())) { + sharePaths.Add(share.Path.ToLower()); + m_directory.Add(share); + } + } + } + + /// <summary> + /// Adds a section of MP shares + /// </summary> + /// <param name="section">Name of the section</param> + private void AddSection(String section) { + Share defaultshare = null; + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { + string strDefault = xmlreader.GetValueAsString(section, "default", String.Empty); + for (int i = 0; i < 20; i++) { + string strShareName = String.Format("sharename{0}", i); + string strSharePath = String.Format("sharepath{0}", i); + string strPincode = String.Format("pincode{0}", i); + + string shareType = String.Format("sharetype{0}", i); + string shareServer = String.Format("shareserver{0}", i); + string shareLogin = String.Format("sharelogin{0}", i); + string sharePwd = String.Format("sharepassword{0}", i); + string sharePort = String.Format("shareport{0}", i); + string remoteFolder = String.Format("shareremotepath{0}", i); + string shareViewPath = String.Format("shareview{0}", i); + + Share share = new Share(); + share.Name = xmlreader.GetValueAsString(section, strShareName, String.Empty); + share.Path = xmlreader.GetValueAsString(section, strSharePath, String.Empty); + + string pinCode = MediaPortal.Util.Utils.DecryptPin(xmlreader.GetValueAsString(section, strPincode, string.Empty)); + if (pinCode != string.Empty) + share.Pincode = Convert.ToInt32(pinCode); + else + share.Pincode = -1; + + share.IsFtpShare = xmlreader.GetValueAsBool(section, shareType, false); + share.FtpServer = xmlreader.GetValueAsString(section, shareServer, String.Empty); + share.FtpLoginName = xmlreader.GetValueAsString(section, shareLogin, String.Empty); + share.FtpPassword = xmlreader.GetValueAsString(section, sharePwd, String.Empty); + share.FtpPort = xmlreader.GetValueAsInt(section, sharePort, 21); + share.FtpFolder = xmlreader.GetValueAsString(section, remoteFolder, "/"); + share.DefaultView = (Share.Views)xmlreader.GetValueAsInt(section, shareViewPath, (int)Share.Views.List); + + if (share.Name.Length > 0) { + + if (strDefault == share.Name) { + share.Default = true; + if (defaultshare == null) { + defaultshare = share; + } + } + + if (!sharePaths.Contains(share.Path.ToLower())) { + sharePaths.Add(share.Path.ToLower()); + m_directory.Add(share); + } + } else break; + } + } + } #endregion #region IShowPlugin Member Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 16x9/myMPlayer.xml =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 16x9/myMPlayer.xml 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 16x9/myMPlayer.xml 2007-03-09 13:23:31 UTC (rev 170) @@ -40,7 +40,13 @@ <id>5</id> <label>Play Stream</label> </control> - </control> + <control> + <description>Delete Item</description> + <type>button</type> + <id>5</id> + <label>Delete Item</label> + </control> + </control> <import>common.facade.video.xml</import> </controls> </window> \ No newline at end of file Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 4x3/myMPlayer.xml =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 4x3/myMPlayer.xml 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/BlueTwo 4x3/myMPlayer.xml 2007-03-09 13:23:31 UTC (rev 170) @@ -40,7 +40,13 @@ <id>5</id> <label>Play Stream</label> </control> - </control> + <control> + <description>Delete Item</description> + <type>button</type> + <id>7</id> + <label>Delete Item</label> + </control> + </control> <import>common.facade.video.xml</import> </controls> </window> \ No newline at end of file Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/PM III/myMPlayer.xml =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/PM III/myMPlayer.xml 2007-03-09 07:46:47 UTC (rev 169) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/SkinFiles/PM III/myMPlayer.xml 2007-03-09 13:23:31 UTC (rev 170) @@ -117,8 +117,21 @@ <alignY>center</alignY> </control> + <control> + <description>Delete Item</description> - </control> + <type>button</type> + + <id>7</id> + + <label>Delete Item</label> + + <textXOff>17</textXOff> + + <alignY>center</alignY> + </control> + + </control> <control> <type>group</type> Modified: trunk/plugins/My MPlayer/Readme.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-03-09 07:46:49
|
Revision: 169 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=169&view=rev Author: and-81 Date: 2007-03-08 23:46:47 -0800 (Thu, 08 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs trunk/plugins/ComSkipLauncher/ExternalProgram.cs trunk/plugins/ComSkipLauncher/ExternalProgram.resx Added: trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs =================================================================== --- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs (rev 0) +++ trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-09 07:46:47 UTC (rev 169) @@ -0,0 +1,184 @@ +namespace MediaPortal.Plugins +{ + partial class ExternalProgram + { + /// <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.textBoxProgram = new System.Windows.Forms.TextBox(); + this.labelProgram = new System.Windows.Forms.Label(); + this.buttonProgam = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.labelParameters = new System.Windows.Forms.Label(); + this.textBoxParameters = new System.Windows.Forms.TextBox(); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.buttonParamQuestion = new System.Windows.Forms.Button(); + this.buttonTest = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // textBoxProgram + // + this.textBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxProgram.Location = new System.Drawing.Point(8, 24); + this.textBoxProgram.Name = "textBoxProgram"; + this.textBoxProgram.Size = new System.Drawing.Size(288, 20); + this.textBoxProgram.TabIndex = 1; + // + // labelProgram + // + this.labelProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labelProgram.Location = new System.Drawing.Point(8, 8); + this.labelProgram.Name = "labelProgram"; + this.labelProgram.Size = new System.Drawing.Size(288, 16); + this.labelProgram.TabIndex = 0; + this.labelProgram.Text = "Program:"; + this.labelProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // buttonProgam + // + this.buttonProgam.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonProgam.Location = new System.Drawing.Point(304, 24); + this.buttonProgam.Name = "buttonProgam"; + this.buttonProgam.Size = new System.Drawing.Size(24, 20); + this.buttonProgam.TabIndex = 2; + this.buttonProgam.Text = "..."; + this.buttonProgam.UseVisualStyleBackColor = true; + this.buttonProgam.Click += new System.EventHandler(this.buttonProgam_Click); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.Location = new System.Drawing.Point(208, 96); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(56, 24); + this.buttonOK.TabIndex = 7; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(272, 96); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(56, 24); + this.buttonCancel.TabIndex = 8; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // labelParameters + // + this.labelParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labelParameters.Location = new System.Drawing.Point(8, 48); + this.labelParameters.Name = "labelParameters"; + this.labelParameters.Size = new System.Drawing.Size(288, 16); + this.labelParameters.TabIndex = 3; + this.labelParameters.Text = "Parameters:"; + this.labelParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // textBoxParameters + // + this.textBoxParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxParameters.Location = new System.Drawing.Point(8, 64); + this.textBoxParameters.Name = "textBoxParameters"; + this.textBoxParameters.Size = new System.Drawing.Size(288, 20); + this.textBoxParameters.TabIndex = 4; + // + // openFileDialog + // + this.openFileDialog.Filter = "All files|*.*"; + this.openFileDialog.Title = "Select Program Executable"; + // + // buttonParamQuestion + // + this.buttonParamQuestion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonParamQuestion.Location = new System.Drawing.Point(304, 64); + this.buttonParamQuestion.Name = "buttonParamQuestion"; + this.buttonParamQuestion.Size = new System.Drawing.Size(24, 20); + this.buttonParamQuestion.TabIndex = 5; + this.buttonParamQuestion.Text = "?"; + this.buttonParamQuestion.UseVisualStyleBackColor = true; + this.buttonParamQuestion.Click += new System.EventHandler(this.buttonParamQuestion_Click); + // + // buttonTest + // + this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonTest.Location = new System.Drawing.Point(8, 96); + this.buttonTest.Name = "buttonTest"; + this.buttonTest.Size = new System.Drawing.Size(56, 24); + this.buttonTest.TabIndex = 6; + this.buttonTest.Text = "Test"; + this.buttonTest.UseVisualStyleBackColor = true; + this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); + // + // ExternalProgram + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(336, 128); + this.Controls.Add(this.buttonTest); + this.Controls.Add(this.buttonParamQuestion); + this.Controls.Add(this.labelParameters); + this.Controls.Add(this.textBoxParameters); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.buttonProgam); + this.Controls.Add(this.labelProgram); + this.Controls.Add(this.textBoxProgram); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(352, 164); + this.Name = "ExternalProgram"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "ComSkip Program Details"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBoxProgram; + private System.Windows.Forms.Label labelProgram; + private System.Windows.Forms.Button buttonProgam; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Label labelParameters; + private System.Windows.Forms.TextBox textBoxParameters; + private System.Windows.Forms.OpenFileDialog openFileDialog; + private System.Windows.Forms.Button buttonParamQuestion; + private System.Windows.Forms.Button buttonTest; + } +} \ No newline at end of file Added: trunk/plugins/ComSkipLauncher/ExternalProgram.cs =================================================================== --- trunk/plugins/ComSkipLauncher/ExternalProgram.cs (rev 0) +++ trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-09 07:46:47 UTC (rev 169) @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; + +using MediaPortal.GUI.Library; + +namespace MediaPortal.Plugins +{ + + public partial class ExternalProgram : Form + { + + #region Constants + + const string ParametersMessage = +@"{0} = Recorded filename (includes path) +{1} = Recorded filename (w/o path) +{2} = Recorded filename (w/o path or extension) +{3} = Recorded file path +{4} = Current date +{5} = Current time"; + + #endregion Constants + + #region Properties + + public string Program + { + get { return textBoxProgram.Text; } + } + public string Parameters + { + get { return textBoxParameters.Text; } + } + + #endregion Properties + + #region Constructors + + public ExternalProgram(string program, string parameters) + { + InitializeComponent(); + + textBoxProgram.Text = program; + textBoxParameters.Text = parameters; + } + + #endregion Constructors + + private void buttonProgam_Click(object sender, EventArgs e) + { + if (openFileDialog.ShowDialog(this) == DialogResult.OK) + textBoxProgram.Text = openFileDialog.FileName; + } + + private void buttonOK_Click(object sender, EventArgs e) + { + if (textBoxProgram.Text.Trim().Length == 0) + { + MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void buttonParamQuestion_Click(object sender, EventArgs e) + { + MessageBox.Show(this, ParametersMessage, "Parameters", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void buttonTest_Click(object sender, EventArgs e) + { + if (textBoxProgram.Text.Trim().Length == 0) + { + MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + + try + { + string parameters = ComSkipLauncher.ProcessParameters(textBoxParameters.Text, "test.file"); + + Process process = new Process(); + process.StartInfo.Arguments = parameters; + process.StartInfo.FileName = textBoxProgram.Text; + process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + process.StartInfo.WorkingDirectory = Path.GetDirectoryName(textBoxProgram.Text); + + process.Start(); + } + catch (Exception ex) + { + Log.Error("ComSkipLauncher: {0}", ex.Message); + } + } + + } + +} Added: trunk/plugins/ComSkipLauncher/ExternalProgram.resx =================================================================== --- trunk/plugins/ComSkipLauncher/ExternalProgram.resx (rev 0) +++ trunk/plugins/ComSkipLauncher/ExternalProgram.resx 2007-03-09 07:46:47 UTC (rev 169) @@ -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="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-03-09 03:23:19
|
Revision: 168 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=168&view=rev Author: and-81 Date: 2007-03-08 19:23:17 -0800 (Thu, 08 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj Modified: trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs =================================================================== --- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-08 05:17:49 UTC (rev 167) +++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-09 03:23:17 UTC (rev 168) @@ -5,19 +5,28 @@ using System.Text; using System.Windows.Forms; +using MediaPortal.Configuration; using MediaPortal.GUI.Library; using MediaPortal.TV.Database; using MediaPortal.TV.Recording; +using MediaPortal.Util; namespace MediaPortal.Plugins { - public class ComSkipLauncher : ISetupForm + public class ComSkipLauncher : IPlugin, ISetupForm { + #region Constants + + public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml"; + + #endregion Constants + #region Members - string _comSkipPath = "C:\\ComSkip\\ComSkip.exe"; + string _program; + string _parameters; #endregion Members @@ -25,11 +34,15 @@ public void Start() { + Log.Info("ComSkipLauncher: Start"); + LoadSettings(); Recorder.OnTvRecordingEnded += new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded); } public void Stop() { + Log.Info("ComSkipLauncher: Stop"); + Recorder.OnTvRecordingEnded -= new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded); } @@ -47,7 +60,16 @@ public void ShowPlugin() { - // TODO: Configuration + LoadSettings(); + + ExternalProgram externalProgram = new ExternalProgram(_program, _parameters); + if (externalProgram.ShowDialog() == DialogResult.OK) + { + _program = externalProgram.Program; + _parameters = externalProgram.Parameters; + + SaveSettings(); + } } public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) @@ -62,25 +84,108 @@ void Recorder_OnTvRecordingEnded(string recordingFilename, TVRecording recording, TVProgram program) { - Process comskip = new Process(); - comskip.StartInfo = new ProcessStartInfo(); - comskip.StartInfo.Arguments = string.Format("--playnice --zpcut {0}", recordingFilename); - comskip.StartInfo.CreateNoWindow = true; - comskip.StartInfo.FileName = _comSkipPath; - //comskip.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; - comskip.StartInfo.WorkingDirectory = Path.GetDirectoryName(recordingFilename); + Log.Debug("ComSkipLauncher: Recorder_OnTvRecordingEnded {0}", recordingFilename); - comskip.Start(); + try + { + string fileName = String.Empty; + List<TVRecorded> recorded = new List<TVRecorded>(); + TVDatabase.GetRecordedTV(ref recorded); + foreach (TVRecorded rec in recorded) + { + if (rec.Title == recording.Title && rec.StartTime == recording.StartTime) + { + fileName = rec.FileName; + break; + } + } - comskip.WaitForExit(); + if (String.IsNullOrEmpty(fileName)) + { + Log.Warn("ComSkipLauncher: Couldn't process recording titled {0}, no filename found.", recording.Title); + return; + } + + string parameters = ProcessParameters(_parameters, fileName); + + Log.Info( + "ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...", + fileName, + _program, + parameters + ); + + Process comskip = new Process(); + comskip.StartInfo = new ProcessStartInfo(); + comskip.StartInfo.Arguments = parameters; + comskip.StartInfo.FileName = _program; + comskip.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + comskip.StartInfo.WorkingDirectory = Path.GetDirectoryName(fileName); + + comskip.Start(); + } + catch (Exception ex) + { + Log.Error("ComSkipLauncher: {0}", ex.Message); + } } void LoadSettings() { + try + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile)) + { + _program = xmlreader.GetValueAsString("ComSkipLauncher", "Program", "C:\\ComSkip\\ComSkip.exe"); + _parameters = xmlreader.GetValueAsString("ComSkipLauncher", "Parameters", "--playnice --zpcut \"{0}\""); + } + } + catch (Exception ex) + { + Log.Error("ComSkipLauncher: {0}", ex.Message); + } + } + void SaveSettings() + { + try + { + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile)) + { + xmlwriter.SetValue("ComSkipLauncher", "Program", _program); + xmlwriter.SetValue("ComSkipLauncher", "Parameters", _parameters); + } + } + catch (Exception ex) + { + Log.Error("ComSkipLauncher: {0}", ex.Message); + } } + internal static string ProcessParameters(string input, string fileName) + { + string output = String.Empty; + try + { + output = string.Format( + input, // Format + fileName, // {0} = Recorded filename (includes path) + Path.GetFileName(fileName), // {1} = Recorded filename (w/o path) + Path.GetFileNameWithoutExtension(fileName), // {2} = Recorded filename (w/o path or extension) + Path.GetDirectoryName(fileName), // {3} = Recorded file path + DateTime.Now.ToShortDateString(), // {4} = Current date + DateTime.Now.ToShortTimeString() // {5} = Current time + ); + } + catch (Exception ex) + { + Log.Error("ComSkipLauncher: {0}", ex.Message); + } + + return output; + } + #endregion Implementation } Modified: trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj =================================================================== --- trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj 2007-03-08 05:17:49 UTC (rev 167) +++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj 2007-03-09 03:23:17 UTC (rev 168) @@ -43,6 +43,7 @@ </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="TVCapture, Version=1.0.2623.6917, Culture=neutral, processorArchitecture=x86"> @@ -50,11 +51,28 @@ <HintPath>..\..\MediaPortal\xbmc\bin\Release\TVCapture.dll</HintPath> <Private>False</Private> </Reference> + <Reference Include="Utils, Version=1.0.2622.31921, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> + <Private>False</Private> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="ComSkipLauncher.cs" /> <Compile Include="AssemblyInfo.cs" /> + <Compile Include="ExternalProgram.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ExternalProgram.Designer.cs"> + <DependentUpon>ExternalProgram.cs</DependentUpon> + </Compile> </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="ExternalProgram.resx"> + <DependentUpon>ExternalProgram.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-03-08 05:17:52
|
Revision: 167 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=167&view=rev Author: and-81 Date: 2007-03-07 21:17:49 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/MessagePlugin/MessagePlugin.cs trunk/plugins/MessagePlugin/MessagePlugin.csproj Added Paths: ----------- trunk/plugins/ComSkipLauncher/ trunk/plugins/ComSkipLauncher/AssemblyInfo.cs trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj Added: trunk/plugins/ComSkipLauncher/AssemblyInfo.cs =================================================================== --- trunk/plugins/ComSkipLauncher/AssemblyInfo.cs (rev 0) +++ trunk/plugins/ComSkipLauncher/AssemblyInfo.cs 2007-03-08 05:17:49 UTC (rev 167) @@ -0,0 +1,39 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// +// 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("ComSkipLauncher")] +[assembly: AssemblyDescription("Launches ComSkip when a recording completes")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("For MediaPortal")] +[assembly: AssemblyProduct("ComSkipLauncher plugin by and-81")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// +// 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.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] + +[assembly: CLSCompliant(true)] \ No newline at end of file Added: trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs =================================================================== --- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs (rev 0) +++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-08 05:17:49 UTC (rev 167) @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Text; +using System.Windows.Forms; + +using MediaPortal.GUI.Library; +using MediaPortal.TV.Database; +using MediaPortal.TV.Recording; + +namespace MediaPortal.Plugins +{ + + public class ComSkipLauncher : ISetupForm + { + + #region Members + + string _comSkipPath = "C:\\ComSkip\\ComSkip.exe"; + + #endregion Members + + #region IPlugin Members + + public void Start() + { + LoadSettings(); + Recorder.OnTvRecordingEnded += new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded); + } + public void Stop() + { + Recorder.OnTvRecordingEnded -= new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded); + } + + #endregion + + #region ISetupForm Members + + public string Author() { return "and-81"; } + public bool CanEnable() { return true; } + public bool DefaultEnabled() { return true; } + public string Description() { return "Launches ComSkip when a recording completes."; } + public int GetWindowId() { return 0; } + public bool HasSetup() { return true; } + public string PluginName() { return "ComSkip Launcher"; } + + public void ShowPlugin() + { + // TODO: Configuration + } + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = ""; + return false; + } + + #endregion + + #region Implementation + + void Recorder_OnTvRecordingEnded(string recordingFilename, TVRecording recording, TVProgram program) + { + Process comskip = new Process(); + comskip.StartInfo = new ProcessStartInfo(); + comskip.StartInfo.Arguments = string.Format("--playnice --zpcut {0}", recordingFilename); + comskip.StartInfo.CreateNoWindow = true; + comskip.StartInfo.FileName = _comSkipPath; + //comskip.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + comskip.StartInfo.WorkingDirectory = Path.GetDirectoryName(recordingFilename); + + comskip.Start(); + + comskip.WaitForExit(); + } + + void LoadSettings() + { + + } + + + #endregion Implementation + + } + +} Added: trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj =================================================================== --- trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj (rev 0) +++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj 2007-03-08 05:17:49 UTC (rev 167) @@ -0,0 +1,69 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{35EE9B81-1774-498E-94A0-0FD47E213FB5}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MediaPortal.Plugins</RootNamespace> + <AssemblyName>ComSkipLauncher</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>false</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>none</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants> + </DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Databases, Version=1.0.2623.6915, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\xbmc\bin\Release\Databases.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="TVCapture, Version=1.0.2623.6917, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\xbmc\bin\Release\TVCapture.dll</HintPath> + <Private>False</Private> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="ComSkipLauncher.cs" /> + <Compile Include="AssemblyInfo.cs" /> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> + <PropertyGroup> + <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\ComSkip Launcher\"</PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Modified: trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj =================================================================== --- trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj 2007-03-07 21:29:28 UTC (rev 166) +++ trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj 2007-03-08 05:17:49 UTC (rev 167) @@ -5,7 +5,7 @@ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{88520E4C-5C49-478A-8AFA-959B45075922}</ProjectGuid> + <ProjectGuid>{2985E855-6D03-4A36-A488-94ACDE7FE286}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>MediaPortal.Plugins</RootNamespace> Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-03-07 21:29:28 UTC (rev 166) +++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-03-08 05:17:49 UTC (rev 167) @@ -106,8 +106,6 @@ static bool _mpMCERemote; static string _mpSerialUirPort; - SendMessageHandler _sendMessageHandler; - int[] _mceRemoteMap = null; int[] _differentRemoteMap = null; @@ -354,10 +352,7 @@ // Register with MediaPortal to receive GUI Messages ... if (ControlExternalEnabled || EventMapperEnabled) - { - _sendMessageHandler = new SendMessageHandler(OnMessage); - GUIWindowManager.Receivers += _sendMessageHandler; - } + GUIWindowManager.Receivers += new SendMessageHandler(OnMessage); if (LogVerbose) Log.Info("MCEReplacement: Started"); @@ -372,7 +367,7 @@ MapEvent(MappedEvent.MappingEvent.MediaPortal_Stop); if (ControlExternalEnabled || EventMapperEnabled) - GUIWindowManager.Receivers -= _sendMessageHandler; + GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage); _defaultInputHandler = null; Modified: trunk/plugins/MessagePlugin/MessagePlugin.cs =================================================================== --- trunk/plugins/MessagePlugin/MessagePlugin.cs 2007-03-07 21:29:28 UTC (rev 166) +++ trunk/plugins/MessagePlugin/MessagePlugin.cs 2007-03-08 05:17:49 UTC (rev 167) @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Text; - using System.Windows.Forms; using MediaPortal.GUI.Library; Modified: trunk/plugins/MessagePlugin/MessagePlugin.csproj =================================================================== --- trunk/plugins/MessagePlugin/MessagePlugin.csproj 2007-03-07 21:29:28 UTC (rev 166) +++ trunk/plugins/MessagePlugin/MessagePlugin.csproj 2007-03-08 05:17:49 UTC (rev 167) @@ -7,7 +7,7 @@ <ProjectGuid>{31589D6D-5540-413D-8D6B-ACED28727686}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>MessagePlugin</RootNamespace> + <RootNamespace>MediaPortal.Plugins</RootNamespace> <AssemblyName>MessagePlugin</AssemblyName> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 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: <kro...@us...> - 2007-03-07 20:34:05
|
Revision: 165 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=165&view=rev Author: kroko_koenig Date: 2007-03-07 12:33:19 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/MyDbox/ trunk/plugins/MyDbox/Release/ trunk/plugins/MyDbox/Release/Plugins/ trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ExternalPlayers.dll trunk/plugins/MyDbox/Release/Plugins/Windows/ trunk/plugins/MyDbox/Release/Plugins/Windows/ExternalPlayers.dll trunk/plugins/MyDbox/Release/Plugins/Windows/MyDbox.dll trunk/plugins/MyDbox/Release/Skin/ trunk/plugins/MyDbox/Release/Skin/Blue Two/ trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml trunk/plugins/MyDbox/Source/ trunk/plugins/MyDbox/Source/MyDbox/ trunk/plugins/MyDbox/Source/MyDbox/ChannelInfo.cs trunk/plugins/MyDbox/Source/MyDbox/Data.cs trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx trunk/plugins/MyDbox/Source/MyDbox/Epg.cs trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs trunk/plugins/MyDbox/Source/MyDbox/MyDboxPlugin.cs trunk/plugins/MyDbox/Source/MyDbox/Properties/ trunk/plugins/MyDbox/Source/MyDbox/Properties/AssemblyInfo.cs trunk/plugins/MyDbox/Source/MyDbox/Request.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/ConfigurationForm.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/ConfigurationForm.resx trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/IPlayer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/InnerVlcWindow.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/InnerVlcWindow.designer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/InnerVlcWindow.resx trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/NativeLibVlc.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanControl.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanControl.designer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanControl.resx trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanPlugin.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanPlugin.cs.bak trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/IPlayer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/InnerVlcWindow.Designer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/InnerVlcWindow.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/NativeLibVlc.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/Properties/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VLanControl.csproj trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VLanControl.sln trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VLanControl.suo trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VlcUserControl.Designer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VlcUserControl.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VlcUserControl.resx trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/bin/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/bin/Debug/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/bin/Release/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Debug/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Debug/TempPE/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/TempPE/ trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/VLanControl.VlcUserControl.resources trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/VLanControl.csproj.GenerateResource.Cache trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/VLanControl.csproj.FileList.txt trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcUserControl.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcUserControl.designer.cs trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcUserControl.resx trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/mk.txt trunk/plugins/MyDbox/Source/MyDbox/Zap.cs trunk/plugins/MyDbox/Source/MyDbox/bin/ trunk/plugins/MyDbox/Source/MyDbox/bin/Debug/ trunk/plugins/MyDbox/Source/MyDbox/bin/Release/ trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Communications.DLL trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Core.dll trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Dialogs.dll trunk/plugins/MyDbox/Source/MyDbox/bin/Release/ExternalPlayers.dll trunk/plugins/MyDbox/Source/MyDbox/bin/Release/MyDbox.dll trunk/plugins/MyDbox/Source/MyDbox/bin/Release/MyDbox.pdb trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Utils.dll trunk/plugins/MyDbox/Source/MyDbox/bin/Release/copy.bat trunk/plugins/MyDbox/Source/MyDbox/obj/ trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/ trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/MyDbox.dll trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/MyDbox.pdb trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/ResolveAssemblyReference.cache trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/TempPE/ trunk/plugins/MyDbox/Source/MyDbox/obj/MyDbox.csproj.FileList.txt trunk/plugins/MyDbox/Source/MyDbox/obj/Release/ trunk/plugins/MyDbox/Source/MyDbox/obj/Release/Interop.WinGrabEngine.dll trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MediaPortal.GUI.Mydbox.DboxSetupForm.resources trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.csproj.GenerateResource.Cache trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.csproj.ResolveComReference.cache trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.dll trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.pdb trunk/plugins/MyDbox/Source/MyDbox/obj/Release/ResolveAssemblyReference.cache trunk/plugins/MyDbox/Source/MyDbox/obj/Release/TempPE/ trunk/plugins/MyDbox/Source/MyDbox.sln trunk/plugins/MyDbox/Source/MyDbox.suo trunk/plugins/MyDbox/read_me.txt Added: trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ExternalPlayers.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ExternalPlayers.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyDbox/Release/Plugins/Windows/ExternalPlayers.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyDbox/Release/Plugins/Windows/ExternalPlayers.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyDbox/Release/Plugins/Windows/MyDbox.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyDbox/Release/Plugins/Windows/MyDbox.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml =================================================================== --- trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml (rev 0) +++ trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,251 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <id>2203</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>no</allowoverlay> + <define>#header.image:television_logo.png</define> + <define>#header.label:605</define> + <define>#header.hover:hover_my tv.png</define> + <controls> + <import>common.window.xml</import> + <import>common.time.xml</import> + <control> + <type>group</type> + <layout>StackLayout</layout> + <description>group element</description> + <animation>FlyInFromLeft</animation> + <posX>60</posX> + <posY>97</posY> + <control> + <description>TVGuide</description> + <type>button</type> + <id>2</id> + <label>600</label> + <hyperlink>600</hyperlink> + <onup>17</onup> + <ondown>3</ondown> + <onright>99</onright> + </control> + <control> + <description>Record Now</description> + <type>button</type> + <id>3</id> + <label>601</label> + <onup>2</onup> + <ondown>6</ondown> + <onright>99</onright> + </control> + <control> + <description>Group button</description> + <type>button</type> + <id>6</id> + <label>971</label> + <onup>3</onup> + <ondown>7</ondown> + <onright>99</onright> + </control> + <control> + <description>Channel button</description> + <type>button</type> + <id>7</id> + <label>602</label> + <onup>6</onup> + <ondown>8</ondown> + <onright>99</onright> + </control> + <control> + <description>TV On/Off button</description> + <type>togglebutton</type> + <id>8</id> + <font>font13</font> + <textcolor>White</textcolor> + <colordiffuse>White</colordiffuse> + <disabledcolor>#60ffffff</disabledcolor> + <label>707</label> + <onup>7</onup> + <ondown>9</ondown> + <onright>99</onright> + </control> + <control> + <description>Timeshifting On/Off button</description> + <type>togglebutton</type> + <id>9</id> + <font>font13</font> + <textcolor>White</textcolor> + <colordiffuse>White</colordiffuse> + <label>708</label> + <onup>8</onup> + <ondown>10</ondown> + <onright>99</onright> + </control> + <control> + <description>Scheduler</description> + <type>button</type> + <id>10</id> + <label>603</label> + <hyperlink>601</hyperlink> + <onup>9</onup> + <ondown>11</ondown> + <onright>99</onright> + </control> + <control> + <description>Recordings</description> + <type>button</type> + <id>11</id> + <label>604</label> + <onup>10</onup> + <ondown>12</ondown> + <onright>99</onright> + </control> + <control> + <description>Raido</description> + <type>button</type> + <id>12</id> + <label>665</label> + <onup>11</onup> + <ondown>13</ondown> + <onright>99</onright> + </control> + <control> + <description>DirectChannel</description> + <type>button</type> + <id>13</id> + <label>891</label> + <onup>12</onup> + <ondown>14</ondown> + <onright>99</onright> + </control> + </control> + <control> + <description>TV background</description> + <type>image</type> + <id>1</id> + <posX>281</posX> + <posY>87</posY> + <width>396</width> + <height>335</height> + <colordiffuse>60ffffff</colordiffuse> + <texture>tv_background.png</texture> + </control> + <control> + <description>video window</description> + <type>videowindow</type> + <id>99</id> + <posX>300</posX> + <posY>107</posY> + <width>350</width> + <height>260</height> + <onleft>2</onleft> + <onright>2</onright> + <action>18</action> + <textureFocus>tv_green_border.png</textureFocus> + </control> + <control> + <description>Current program title</description> + <type>fadelabel</type> + <id>13</id> + <posX>290</posX> + <posY>415</posY> + <width>250</width> + <label>#TV.View.title</label> + <font>font13</font> + <textcolor>White</textcolor> + </control> + <control> + <description>Channel label</description> + <type>label</type> + <id>13</id> + <posX>660</posX> + <posY>415</posY> + <label>602</label> + <font>font13</font> + <align>right</align> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <description>Current program time</description> + <type>label</type> + <id>13</id> + <posX>290</posX> + <posY>435</posY> + <label>#TV.View.start-#TV.View.stop</label> + <font>font13</font> + <align>left</align> + <textcolor>FFB2D4F5</textcolor> + </control> + <control> + <description>Current Channelname</description> + <type>fadelabel</type> + <id>30</id> + <posX>660</posX> + <posY>435</posY> + <width>90</width> + <label>#TV.View.channel</label> + <font>font13</font> + <align>right</align> + <textcolor>FFB2D4F5</textcolor> + </control> + <control> + <description>Description1</description> + <type>textboxscrollup</type> + <id>15</id> + <posX>290</posX> + <posY>455</posY> + <width>350</width> + <height>90</height> + <seperator>----------------------------------------------------------------------------------------------</seperator> + <label>#TV.View.description</label> + <font>font13</font> + <textcolor>White</textcolor> + </control> + <control> + <description>Progress background</description> + <type>image</type> + <id>1</id> + <posX>300</posX> + <posY>377</posY> + <width>350</width> + <texture>osd_progress_background.png</texture> + </control> + <control> + <description>progress bar</description> + <type>progress</type> + <id>20</id> + <posX>289</posX> + <posY>376</posY> + <width>372</width> + <label>#TV.View.Percentage</label> + <visible>yes</visible> + </control> + <control> + <description>Recording Channel</description> + <type>image</type> + <id>22</id> + <posX>90</posX> + <posY>425</posY> + <width>80</width> + <height>80</height> + <texture>#TV.Record.thumb</texture> + </control> + <control> + <description>record info label</description> + <type>fadelabel</type> + <id>23</id> + <width>150</width> + <height>30</height> + <posX>85</posX> + <label>#TV.Record.channel\r#TV.Record.title\r#TV.Record.start-#TV.Record.stop</label> + <font>font13</font> + <textcolor>White</textcolor> + </control> + <control> + <description>record pin</description> + <type>image</type> + <id>24</id> + <posX>260</posX> + <posY>425</posY> + <texture>tvguide_record_button.png</texture> + <visible>no</visible> + </control> + </controls> +</window> \ No newline at end of file Added: trunk/plugins/MyDbox/Source/MyDbox/ChannelInfo.cs =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyDbox/Source/MyDbox/ChannelInfo.cs ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyDbox/Source/MyDbox/Data.cs =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/Data.cs (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/Data.cs 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,189 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Data; +using System.Text.RegularExpressions; + +namespace MediaPortal.GUI.Mydbox +{ + public class Data + { + private string _Url = ""; + private string _UserName = ""; + private string _Password = ""; + private string _Command = "/control/"; + + public Data(string url, string username, string password) + { + _Url = url; + _UserName = username; + _Password = password; + } + + public DataSet UserTVBouquets + { + get + { + string temp = ""; + Request request = new Request(_Url, _UserName, _Password); + string sreturn = request.PostData(_Command + "getbouquets"); + string[] allBouquets = sreturn.Split('\n'); + + // convert to dataset + DataSet ds = new DataSet(); + DataTable table = new DataTable("BouquetsTV"); + DataRow row = null; + + try + { + table.Columns.Add("Ref", Type.GetType("System.String")); + table.Columns.Add("Bouquet", Type.GetType("System.String")); + table.Columns.Add("Channel", Type.GetType("System.String")); + table.Columns.Add("ID", Type.GetType("System.String")); + table.Columns.Add("Name", Type.GetType("System.String")); + + foreach (string s in allBouquets) + { + temp = s.Split(' ')[0]; + + sreturn = request.PostData(_Command + "getbouquet?bouquet=" + temp + "&mode=TV"); + string[] OneBouquet = sreturn.Split('\n'); + + if (OneBouquet[0] != "") + { + + foreach (string bouquets in OneBouquet) + { + if (bouquets.IndexOf(' ') > -1 && bouquets.Length > 0) + { + row = table.NewRow(); + int start = 0; + + String tmp_Ref = s.Split(' ')[0]; + start = tmp_Ref.Length + 1; + String tmp_Bouquet = s.Substring(start,s.Length-start); + String tmp_Channel = bouquets.Split(' ')[0]; + String tmp_ID = bouquets.Split(' ')[1]; + start = tmp_Channel.Length + tmp_ID.Length + 2; + String tmp_Name = bouquets.Substring(start, bouquets.Length - start); + + row["Ref"] = tmp_Ref; + row["Bouquet"] = tmp_Bouquet; + row["Channel"] = tmp_Channel; + row["ID"] = tmp_ID; + row["Name"] = tmp_Name; + + table.Rows.Add(row); + } + } + } + } + ds.Tables.Add(table); + } + catch + { + + } + + return ds; + } + } + + public DataSet UserRadioBouquets + { + get + { + string temp = ""; + Request request = new Request(_Url, _UserName, _Password); + string sreturn = request.PostData(_Command + "getbouquets"); + string[] allBouquets = sreturn.Split('\n'); + + // convert to dataset + DataSet ds = new DataSet(); + DataTable table = new DataTable("BouquetsRadio"); + DataRow row = null; + + try + { + + table.Columns.Add("Ref", Type.GetType("System.String")); + table.Columns.Add("Bouquet", Type.GetType("System.String")); + table.Columns.Add("Channel", Type.GetType("System.String")); + table.Columns.Add("ID", Type.GetType("System.String")); + table.Columns.Add("Name", Type.GetType("System.String")); + + foreach (string s in allBouquets) + { + temp = s.Split(' ')[0]; + + sreturn = request.PostData(_Command + "getbouquet?bouquet=" + temp + "&mode=RADIO"); + string[] OneBouquet = sreturn.Split('\n'); + + if (OneBouquet[0] != "") + { + + foreach (string bouquets in OneBouquet) + { + if (bouquets.IndexOf(' ') > -1 && bouquets.Length > 0) + { + row = table.NewRow(); + int start = 0; + + String tmp_Ref = s.Split(' ')[0]; + start = tmp_Ref.Length + 1; + String tmp_Bouquet = s.Substring(start, s.Length - start); + String tmp_Channel = bouquets.Split(' ')[0]; + String tmp_ID = bouquets.Split(' ')[1]; + start = tmp_Ref.Length + tmp_ID.Length + 2; + String tmp_Name = bouquets.Substring(start, bouquets.Length - start); + + row["Ref"] = tmp_Ref; + row["Bouquet"] = tmp_Bouquet; + row["Channel"] = tmp_Channel; + row["ID"] = tmp_ID; + row["Name"] = tmp_Name; + + table.Rows.Add(row); + } + } + } + } + ds.Tables.Add(table); + } + catch + { + + } + + return ds; + } + } + + } + +} Added: trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,40 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +namespace MediaPortal.GUI.Mydbox +{ + partial class DboxSetupForm + { + + private MediaPortal.UserInterface.Controls.MPLabel mpLabel3; + private MediaPortal.UserInterface.Controls.MPTextBox edtPassword; + private MediaPortal.UserInterface.Controls.MPButton mpButton1; + private MediaPortal.UserInterface.Controls.MPTextBox edtUserName; + private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox1; + private MediaPortal.UserInterface.Controls.MPLabel mpLabel2; + private MediaPortal.UserInterface.Controls.MPTextBox edtIP; + private MediaPortal.UserInterface.Controls.MPLabel mpLabel1; + } +} \ No newline at end of file Added: trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,197 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections; +using System.ComponentModel; +using System.IO; +using System.Windows.Forms; +using MediaPortal.Profile; +using MediaPortal.Util; + + +namespace MediaPortal.GUI.Mydbox +{ + public partial class DboxSetupForm : Form + { + public DboxSetupForm() + { + InitializeComponent(); + LoadSettings(); + } + + private void DboxSetupForm_Load(object sender, EventArgs e) + { + LoadSettings(); + } + + private void btnClose_Click(object sender, EventArgs e) + { + SaveSettings(); + this.Close(); + } + + private void InitializeComponent() + { + this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.edtPassword = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.mpLabel3 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.edtUserName = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.edtIP = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.mpLabel1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.mpButton1 = new MediaPortal.UserInterface.Controls.MPButton(); + this.mpGroupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // mpGroupBox1 + // + this.mpGroupBox1.Controls.Add(this.edtPassword); + this.mpGroupBox1.Controls.Add(this.mpLabel3); + this.mpGroupBox1.Controls.Add(this.edtUserName); + this.mpGroupBox1.Controls.Add(this.mpLabel2); + this.mpGroupBox1.Controls.Add(this.edtIP); + this.mpGroupBox1.Controls.Add(this.mpLabel1); + this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.mpGroupBox1.Location = new System.Drawing.Point(3, 3); + this.mpGroupBox1.Name = "mpGroupBox1"; + this.mpGroupBox1.Size = new System.Drawing.Size(310, 144); + this.mpGroupBox1.TabIndex = 0; + this.mpGroupBox1.TabStop = false; + this.mpGroupBox1.Text = "D-Box Login Settings"; + // + // edtPassword + // + this.edtPassword.BorderColor = System.Drawing.Color.Empty; + this.edtPassword.Location = new System.Drawing.Point(120, 94); + this.edtPassword.Name = "edtPassword"; + this.edtPassword.Size = new System.Drawing.Size(157, 20); + this.edtPassword.TabIndex = 5; + this.edtPassword.Visible = false; + // + // mpLabel3 + // + this.mpLabel3.AutoSize = true; + this.mpLabel3.Location = new System.Drawing.Point(58, 97); + this.mpLabel3.Name = "mpLabel3"; + this.mpLabel3.Size = new System.Drawing.Size(56, 13); + this.mpLabel3.TabIndex = 4; + this.mpLabel3.Text = "Password:"; + this.mpLabel3.Visible = false; + // + // edtUserName + // + this.edtUserName.BorderColor = System.Drawing.Color.Empty; + this.edtUserName.Location = new System.Drawing.Point(120, 68); + this.edtUserName.Name = "edtUserName"; + this.edtUserName.Size = new System.Drawing.Size(157, 20); + this.edtUserName.TabIndex = 3; + this.edtUserName.Visible = false; + // + // mpLabel2 + // + this.mpLabel2.AutoSize = true; + this.mpLabel2.Location = new System.Drawing.Point(53, 71); + this.mpLabel2.Name = "mpLabel2"; + this.mpLabel2.Size = new System.Drawing.Size(61, 13); + this.mpLabel2.TabIndex = 2; + this.mpLabel2.Text = "User name:"; + this.mpLabel2.Visible = false; + // + // edtIP + // + this.edtIP.BorderColor = System.Drawing.Color.Empty; + this.edtIP.Location = new System.Drawing.Point(120, 42); + this.edtIP.Name = "edtIP"; + this.edtIP.Size = new System.Drawing.Size(157, 20); + this.edtIP.TabIndex = 1; + // + // mpLabel1 + // + this.mpLabel1.AutoSize = true; + this.mpLabel1.Location = new System.Drawing.Point(26, 45); + this.mpLabel1.Name = "mpLabel1"; + this.mpLabel1.Size = new System.Drawing.Size(92, 13); + this.mpLabel1.TabIndex = 0; + this.mpLabel1.Text = "IP address D-Box:"; + // + // mpButton1 + // + this.mpButton1.Location = new System.Drawing.Point(238, 153); + this.mpButton1.Name = "mpButton1"; + this.mpButton1.Size = new System.Drawing.Size(75, 23); + this.mpButton1.TabIndex = 1; + this.mpButton1.Text = "OK"; + this.mpButton1.UseVisualStyleBackColor = true; + this.mpButton1.Click += new System.EventHandler(this.mpButton1_Click); + // + // DboxSetupForm + // + this.ClientSize = new System.Drawing.Size(316, 179); + this.Controls.Add(this.mpButton1); + this.Controls.Add(this.mpGroupBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "DboxSetupForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Dbox Settings"; + this.mpGroupBox1.ResumeLayout(false); + this.mpGroupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + private void mpButton1_Click(object sender, EventArgs e) + { + SaveSettings(); + this.Close(); + } + + void LoadSettings() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + edtIP.Text = xmlreader.GetValue("mydbox", "IP"); + edtUserName.Text = xmlreader.GetValue("mydbox", "UserName"); + edtPassword.Text = xmlreader.GetValue("mydbox", "Password"); + } + } + + void SaveSettings() + { + if (edtIP.Text.Length == 0) + return; + + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml")) + + { + xmlwriter.SetValue("mydbox", "IP", edtIP.Text); + xmlwriter.SetValue("mydbox", "UserName", edtUserName.Text); + xmlwriter.SetValue("mydbox", "Password", edtPassword.Text); + } + } + } +} \ No newline at end of file Added: trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx 2007-03-07 20:33:19 UTC (rev 165) @@ -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 Added: trunk/plugins/MyDbox/Source/MyDbox/Epg.cs =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/Epg.cs (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/Epg.cs 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,193 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Data; +using System.Text.RegularExpressions; + +namespace MediaPortal.GUI.Mydbox +{ + public class EPG + { + private string _Url = ""; + private string _UserName = ""; + private string _Password = ""; + private string _Command = "/control/"; + + private DateTime StartTime; + private DateTime EndTime; + private DateTime ActTime; + + public EPG(string url, string username, string password) + { + _Url = url; + _UserName = username; + _Password = password; + } + + public DataSet EPG_Now + { + get + { + //get all actual programms EPG + Request request = new Request(_Url, _UserName, _Password); + string sreturn = request.PostData(_Command + "epg?ext"); + string[] allChannels = sreturn.Split('\n'); + + // convert to dataset + DataSet ds = new DataSet(); + DataTable table = new DataTable("EPG"); + DataRow row = null; + + try + { + table.Columns.Add("ID", Type.GetType("System.String")); + table.Columns.Add("Start", Type.GetType("System.DateTime")); + table.Columns.Add("Stop", Type.GetType("System.DateTime")); + table.Columns.Add("Duration", Type.GetType("System.String")); + table.Columns.Add("EventID", Type.GetType("System.String")); + table.Columns.Add("Title", Type.GetType("System.String")); + + + foreach (string s in allChannels) + { + if (s != "") + { + string[] allFields = s.Split(' '); + + row = table.NewRow(); + + ActTime = DateTime.Now; + + + StartTime = DateTime.Parse("01.01.1970 01:00"); + StartTime = StartTime.AddSeconds(Convert.ToInt32(allFields[1])); + EndTime = StartTime.AddSeconds(Convert.ToInt32(allFields[2])); + + String title = ""; + + for (int j = 4; j <= allFields.GetUpperBound(0); j++) + { + title = title + allFields[j] + " "; + } + + row["ID"] = allFields[0]; + row["Start"] = StartTime; + row["Stop"] = EndTime; + row["Duration"] = Convert.ToInt32(allFields[2]); + row["EventID"] = allFields[3]; + row["Title"] = title; + + table.Rows.Add(row); + } + } + + ds.Tables.Add(table); + } + catch + { + + } + return ds; + } + } + + public DataSet EPG_Channel + { + get + { + //get actual channel (ID) + Request request = new Request(_Url, _UserName, _Password); + string sreturn = request.PostData(_Command + "zapto"); + sreturn = sreturn.Replace("\n", ""); + string channel = sreturn; + + //Get EPG for channel + sreturn = request.PostData(_Command + "epg?" + channel); + string[] allRows = sreturn.Split('\n'); + + // convert to dataset + DataSet ds = new DataSet(); + DataTable table = new DataTable("EPG"); + DataRow row = null; + + try + { + table.Columns.Add("ID", Type.GetType("System.String")); + table.Columns.Add("Start", Type.GetType("System.DateTime")); + table.Columns.Add("Stop", Type.GetType("System.DateTime")); + table.Columns.Add("Duration", Type.GetType("System.String")); + table.Columns.Add("EventID", Type.GetType("System.String")); + table.Columns.Add("Title", Type.GetType("System.String")); + + foreach (string s in allRows) + { + if (s != "") + { + string[] allFields = s.Split(' '); + + row = table.NewRow(); + + ActTime = DateTime.Now; + + StartTime = DateTime.Parse("01.01.1970 01:00"); + StartTime = StartTime.AddSeconds(Convert.ToInt32(allFields[1])); + EndTime = StartTime.AddSeconds(Convert.ToInt32(allFields[2])); + + String title = ""; + + for (int j = 3; j <= allFields.GetUpperBound(0); j++) + { + title = title + allFields[j] + " "; + } + + row["ID"] = channel; + row["Start"] = StartTime; + row["Stop"] = EndTime; + row["Duration"] = Convert.ToInt32(allFields[2]); + row["EventID"] = allFields[0]; + row["Title"] = title; + + table.Rows.Add(row); + } + } + + ds.Tables.Add(table); + } + catch + { + + } + return ds; + } + } + + } +} + + + Added: trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,181 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.ComponentModel; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Text; +using System.Text.RegularExpressions; +using MediaPortal.GUI.Library; +using MediaPortal.Player; +using MediaPortal.Dialogs; +using MediaPortal.Configuration; +using MediaPortal.Playlists; +using System.Xml; +using System.IO; +using System.Data; +using MediaPortal.Util; + +namespace MediaPortal.GUI.Mydbox +{ + public class DboxGui : GUIWindow + { + public const int WindowID = 9900; + + #region Constructor + public DboxGui() + { + GetID = (int)MyDboxGui.WindowID; + } + #endregion + + #region SkinControlAttributes + [SkinControlAttribute(50)] + protected GUIFacadeControl facadeview = null; + [SkinControlAttribute(2)] + protected GUIButtonControl btnFavoriet = null; + [SkinControlAttribute(3)] + protected GUIButtonControl btnRadio = null; + [SkinControlAttribute(4)] + protected GUIButtonControl btnRecordings = null; + #endregion + + #region Variables + //private DBox.Core _Dreambox = null; + //PlayListPlayer playlistPlayer; + + // bools + //private bool _ShowChannels = false; + + private static string server; + private static string username; + private static string password; + + private string _Url = ""; + private string _UserName = ""; + private string _Password = ""; + + private static DataTable _TV_Bouquets = null; + //private static DataTable _Radio_Bouquets = null; + + #endregion + + #region Overrides + public override bool Init() + { + //playlistPlayer = PlayListPlayer.SingletonPlayer; + LoadSettings(); + + return Load(GUIGraphicsContext.Skin + @"\mydbox.xml"); + } + + #endregion + + #region Private Methods + void LoadSettings() + { + string path = Path.Combine(Config.GetFolder(Config.Dir.Config), "MediaPortal.xml"); + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(path)) + //using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + server = xmlreader.GetValue("mydbox", "IP"); + username = xmlreader.GetValue("mydbox", "UserName"); + password = xmlreader.GetValue("mydbox", "Password"); + } + + ShowBoutiques(); + + } + + void ShowBoutiques() + { + _Url = "http://" + server ; + _UserName = ""; + _Password = ""; + + //_ShowChannels = false; + facadeview.Clear(); + + //get bouquets + Data _DBox = new Data(_Url, _UserName, _Password); + _TV_Bouquets = _DBox.UserTVBouquets.Tables[0]; + + foreach (DataRow row in _TV_Bouquets.Rows) + { + GUIListItem li = new GUIListItem(); + li.Label = row["Name"].ToString(); + facadeview.Add(li); + } + } + void ShowChannels(GUIListItem guiListItem) + { + _Url = "http://192.168.0.100/"; + _UserName = ""; + _Password = ""; + + //_ShowChannels = true; + facadeview.Clear(); + Data _DBox = new Data(_Url, _UserName, _Password); + string reference = GetChannelReference(guiListItem); + //DataTable dt = _DBox.Channels(reference).Tables[0]; + //foreach (DataRow row in dt.Rows) + { + // GUIListItem li = new GUIListItem(); + // li.Label = row["Name"].ToString(); + // facadeview.Add(li); + } + try + { + //string currentChannelName = _Dbox.CurrentChannel.Name; + //GUIPropertyManager.SetProperty("#Play.Current.File", currentChannelName); + //GUIPropertyManager.SetProperty("#Play.Current.Title", currentChannelName); + } + catch (Exception) { } + } + string GetChannelReference(GUIListItem guiListItem) + { + string reference = ""; + Data _DBox = new Data(_Url, _UserName, _Password); + DataTable dt = _DBox.UserTVBouquets.Tables[0]; + foreach (DataRow row in dt.Rows) + { + if (guiListItem.Label == row["Name"].ToString()) + { + reference = row["Ref"].ToString(); + break; + } + } + return reference; + } + #endregion + + + } + + + + +} \ No newline at end of file Added: trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,71 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{F8CC05AA-6306-459E-BD32-40C02489EFEC}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MyDbox</RootNamespace> + <AssemblyName>MyDbox</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="ExternalPlayers, Version=1.0.2604.25450, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2593.1896, Culture=neutral, processorArchitecture=MSIL" /> + </ItemGroup> + <ItemGroup> + <Compile Include="ChannelInfo.cs" /> + <Compile Include="Data.cs" /> + <Compile Include="DboxSetupForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DboxSetupForm.Designer.cs"> + <DependentUpon>DboxSetupForm.cs</DependentUpon> + </Compile> + <Compile Include="Epg.cs" /> + <Compile Include="MyDboxGui.cs" /> + <Compile Include="MyDboxPlugin.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Request.cs" /> + <Compile Include="Zap.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="DboxSetupForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>DboxSetupForm.cs</DependentUpon> + </EmbeddedResource> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,5 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectView>ProjectFiles</ProjectView> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs =================================================================== --- trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs (rev 0) +++ trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs 2007-03-07 20:33:19 UTC (rev 165) @@ -0,0 +1,630 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.ComponentModel; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Text; +using System.Text.RegularExpressions; +using MediaPortal.GUI.Library; +using MediaPortal.Player; +using MediaPortal.Dialogs; +using MediaPortal.Playlists; +using System.Xml; +using System.IO; +using System.Data; +using System.Drawing; +using MediaPortal.Util; + +namespace MediaPortal.GUI.Mydbox +{ + public class MyDboxGui : GUIWindow + { + #region SkinControlAttributes + [SkinControlAttribute(3)] + protected GUIButtonControl btnRecord = null; + [SkinControlAttribute(6)] + protected GUIButtonControl btnBouquet = null; + [SkinControlAttribute(7)] + protected GUIButtonControl btnChannel = null; + [SkinControlAttribute(8)] + protected GUIToggleButtonControl btnTVOnOff = null; + [SkinControlAttribute(11)] + protected GUIButtonControl btnRecordings = null; + [SkinControlAttribute(13)] + protected GUIButtonControl SelChannel = null; + [SkinControlAttribute(50)] + protected GUIFacadeControl facadeView = null; + [SkinControlAttribute(20)] + protected GUIProgressControl progressBar = null; + [SkinControlAttribute(99)] + protected GUIVideoControl videoWindow = null; + #endregion + + #region Private Variables + + private string _Url = ""; + private string _UserName = ""; + private string _Password = ""; + + private static PlayList playlist = new PlayList(); + + private static string server; + private static string username; + private static string password; + + private static DataTable _TV_Bouquets = null; + //private static DataTable _Radio_Bouquets = null; + private static DataTable _EPG = null; + + private static int ActBouquet = 0; + private static int ActChannelList; + + private static String ActID = ""; + + private static VirtualDirectory recDirectory = new VirtualDirectory(); + private static string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv"; + + private string LogPathName = Directory.GetCurrentDirectory() + @"\log\MyDbox.log"; + + private static OnActionHandler ah; + + #endregion + + #region Private Enumerations + enum Controls + { + BouquetButton = 6, + ChannelButton = 7,... [truncated message content] |
From: <kro...@us...> - 2007-03-07 20:29:05
|
Revision: 164 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=164&view=rev Author: kroko_koenig Date: 2007-03-07 12:28:56 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/MySimon/ trunk/plugins/MySimon/Release/ trunk/plugins/MySimon/Release/Plugins/ trunk/plugins/MySimon/Release/Plugins/Windows/ trunk/plugins/MySimon/Release/Plugins/Windows/MySimon.dll trunk/plugins/MySimon/Release/Skin/ trunk/plugins/MySimon/Release/Skin/Media/ trunk/plugins/MySimon/Release/Skin/Media/MySimon_1.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_1a.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_2.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_2a.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_3.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_3a.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_4.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_4a.png trunk/plugins/MySimon/Release/Skin/MySimon.xml trunk/plugins/MySimon/Release/Skin/Sounds/ trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_a.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_c.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_e.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_err.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_g.wav trunk/plugins/MySimon/Source/ trunk/plugins/MySimon/Source/SimonSay/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Debug/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Core.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Dialogs.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.pdb trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Utils.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/TempPE/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/build.force trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.pdb trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ResolveAssemblyReference.cache trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/TempPE/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln trunk/plugins/MySimon/Source/SimonSay/SimonSay.suo trunk/plugins/MySimon/readme.txt Added: trunk/plugins/MySimon/Release/Plugins/Windows/MySimon.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Plugins/Windows/MySimon.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/MySimon.xml =================================================================== --- trunk/plugins/MySimon/Release/Skin/MySimon.xml (rev 0) +++ trunk/plugins/MySimon/Release/Skin/MySimon.xml 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,136 @@ +<window> + <id>0709</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <control> + <description>BackGround</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <description>an Image</description> + <type>image</type> + <id>11</id> + <posX>75</posX> + <posY>370</posY> + <texture>hover_my videos.png</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>1</id> + <posX>60</posX> + <posY>70</posY> + <label>Simon Say</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Start</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>Start</label> + <onleft>2</onleft> + <onright>2</onright> + <onup>6</onup> + <ondown>3</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>3</id> + <posX>60</posX> + <posY>131</posY> + <label>Level: Amateur</label> + <onleft>3</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>6</ondown> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>4</id> + <posX>70</posX> + <posY>170</posY> + <label>#Round</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>4</id> + <posX>70</posX> + <posY>204</posY> + <label>#Player</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Whatsthis</description> + <type>button</type> + <id>6</id> + <posX>60</posX> + <posY>233</posY> + <label>What's this?</label> + <onleft>6</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>2</ondown> + </control> + <control> + <type>button</type> + <id>101</id> + <posX>280</posX> + <posY>80</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso1</textureFocus> + <textureNoFocus>#Senso1</textureNoFocus> + </control> + <control> + <type>button</type> + <id>102</id> + <posX>429</posX> + <posY>80</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso2</textureFocus> + <textureNoFocus>#Senso2</textureNoFocus> + </control> + <control> + <type>button</type> + <id>103</id> + <posX>280</posX> + <posY>229</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso3</textureFocus> + <textureNoFocus>#Senso3</textureNoFocus> + </control> + <control> + <type>button</type> + <id>104</id> + <posX>429</posX> + <posY>229</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso4</textureFocus> + <textureNoFocus>#Senso4</textureNoFocus> + </control> + + </controls> +</window> Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_a.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_a.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_c.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_c.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_e.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_e.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_err.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_err.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_g.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_g.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,512 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MediaPortal.Util; +using MediaPortal.Utils; + +namespace MediaPortal.GUI.MySimon +{ + public class MySimonGUI : GUIWindow , ISetupForm + { + #region SkinControl + [SkinControlAttribute(2)] protected GUIButtonControl BtnStart = null; + [SkinControlAttribute(3)] protected GUIButtonControl BtnLevel = null; + + [SkinControlAttribute(6)] protected GUIButtonControl BtnWhatsThis = null; + + [SkinControlAttribute(101)] protected GUIButtonControl BtnRed = null; + [SkinControlAttribute(102)] protected GUIButtonControl BtnBlue = null; + [SkinControlAttribute(103)] protected GUIButtonControl BtnGreen = null; + [SkinControlAttribute(104)] protected GUIButtonControl BtnYellow = null; + #endregion + + #region Private variables + string Level="Am"; //Choosen level + + Boolean SimonOn = false; + Boolean PlayerOn = false; + + int[] Code = new int[100]; + + int timeBase = 0; + int timeActual = 0; + int timeWait = 0; + + int round = 0; + int cnt = 0; + + private static OnActionHandler ah; + + private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer(); + #endregion + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Simon Say"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Simon Say"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Mark Koenig (kroko)"; + } + + // show the setup dialog + public void ShowPlugin() + { + MessageBox.Show("Nothing to configure, this is just an example"); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 0709; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return false; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of MediaPortal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = String.Empty; + return true; + } + + #endregion + + public override int GetID + { + get + { + return 0709; + } + set + { + base.GetID = value; + } + } + + public override bool Init() + { + bool result = Load(GUIGraphicsContext.Skin + @"\MySimon.xml"); + if (ah == null) ah = new OnActionHandler(OnAction2); + return result; + } + + #region Actions + public override void OnAction(Action action) + { + base.OnAction(action); + } + public void OnAction2(Action action) + { + + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; + + //string t = action.wID.ToString(); + //GUIPropertyManager.SetProperty("#Round", t); + + if (PlayerOn) + { + switch (action.wID) + { + //normal + case Action.ActionType.ACTION_REMOTE_RED_BUTTON: + Check(0); + break; + case Action.ActionType.ACTION_REMOTE_BLUE_BUTTON: + Check(1); + break; + case Action.ActionType.ACTION_REMOTE_GREEN_BUTTON: + Check(2); + break; + case Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON: + Check(3); + break; + //my PC + case Action.ActionType.ACTION_SHOW_GUI: + Check(0); + break; + case Action.ActionType.ACTION_ASPECT_RATIO: + Check(1); + break; + case Action.ActionType.ACTION_NEXT_AUDIO: + Check(2); + break; + case Action.ActionType.ACTION_SHOW_INFO: + Check(3); + break; + // play with 1 2 + // play with 4 5 + case Action.ActionType.ACTION_KEY_PRESSED: + switch (action.m_key.KeyChar) + { + case '1': + Check(0); + break; + case '2': + Check(1); + break; + case '4': + Check(2); + break; + case '5': + Check(3); + break; + } + break; + default: + break; + } + } + } + #endregion + + public override bool OnMessage(GUIMessage message) + { + return base.OnMessage(message); + } + + public void Dispose() + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + + protected override void OnPageLoad() + { + _Game.Interval = 5; + _Game.Tick += new EventHandler(_Game_Tick); + _Game.Start(); + + SimonOn = false; + PlayerOn = false; + Level = "Am"; + + GUIGraphicsContext.OnNewAction -= ah; + GUIGraphicsContext.OnNewAction += ah; + + base.OnPageLoad(); + + Reset(); + + GUIPropertyManager.SetProperty("#Round", "Round: 1"); + GUIPropertyManager.SetProperty("#Player", "GAME OVER"); + } + + protected override void OnPageDestroy(int new_windowId) + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + + protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) + { + if (control == BtnLevel) + OnBtnLevel(); + if (control == BtnWhatsThis) + OnBtnWhatsThis(); + if (control == BtnStart) + { //start game + if ((!PlayerOn) && (!SimonOn)) + { + Random randObj = new Random(); + for (int i = 0; i <= 99; i++) + { // do random colors for 100 rounds + Code[i] = (int)(randObj.NextDouble() * 4); + } + // set timebase for game + if (Level == "Pro") + timeBase = 4; + if (Level == "Nor") + timeBase = 10; + if (Level == "Am") + timeBase = 20; + + timeActual = timeBase; + Reset(); + + //init round + round = 0; + cnt = 0; + //simonn starts + SimonOn = true; + } + } + if (PlayerOn) + { + if ((controlId >= 101) && (controlId <= 104)) + { //which button has clicked ? + if (controlId == 101) Check(0); + if (controlId == 102) Check(1); + if (controlId == 103) Check(2); + if (controlId == 104) Check(3); + } + } + base.OnClicked(controlId, control, actionType); + } + + protected override void OnShowContextMenu() + { + base.OnShowContextMenu(); + } + + private void OnBtnLevel() + { //Choose level for the game + if ((!PlayerOn) && (!SimonOn)) + { + if (Level == "Nor") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Professional"); + Level = "Pro"; + } + else if (Level == "Pro") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); + Level = "Am"; + } + else + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); + Level = "Nor"; + } + } + } + + private void OnBtnWhatsThis() + { + GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); + dlg.SetHeading("What's Simon Say (Senso)"); + dlg.SetText("Simon Say is a game where your object is to repeat a code of\n" + + "tones and colors.\n" + + "Level Amateur/Normal/Professional: Speed is increasing\n\n" + + "I would like to say 'Thank You' to MB for their great games.\n" + + "In my earlier day's I had a lot of them. We had a lot of fun\n" + + "playing them.\n\n" + + "Good luck\nkroko"); + dlg.DoModal(GetID); + } + + private void Red() + { // draw red field on + GUIPropertyManager.SetProperty("#Senso1", "MySimon_1a.png"); + MediaPortal.Util.Utils.PlaySound ("MySimon_c.wav", false, true); + } + private void Blue() + { // draw blue field on + GUIPropertyManager.SetProperty("#Senso2", "MySimon_2a.png"); + MediaPortal.Util.Utils.PlaySound("MySimon_e.wav", false, true); + } + private void Green() + { // draw green field on + GUIPropertyManager.SetProperty("#Senso3", "MySimon_3a.png"); + MediaPortal.Util.Utils.PlaySound("MySimon_g.wav", false, true); + } + private void Yellow() + { // draw yellow field on + GUIPropertyManager.SetProperty("#Senso4", "MySimon_4a.png"); + MediaPortal.Util.Utils.PlaySound("MySimon_a.wav", false, true); + } + private void Error(int errNo) + { // draw correct field on + Reset(); + if (errNo== 0) + GUIPropertyManager.SetProperty("#Senso1", "MySimon_1a.png"); + if (errNo == 1) + GUIPropertyManager.SetProperty("#Senso2", "MySimon_2a.png"); + if (errNo == 2) + GUIPropertyManager.SetProperty("#Senso3", "MySimon_3a.png"); + if (errNo == 3) + GUIPropertyManager.SetProperty("#Senso4", "MySimon_4a.png"); + + MediaPortal.Util.Utils.PlaySound("MySimon_err.wav", false, true); + } + private void Reset() + { // draw all fields off + GUIPropertyManager.SetProperty("#Senso1", "MySimon_1.png"); + GUIPropertyManager.SetProperty("#Senso2", "MySimon_2.png"); + GUIPropertyManager.SetProperty("#Senso3", "MySimon_3.png"); + GUIPropertyManager.SetProperty("#Senso4", "MySimon_4.png"); + } + + private void Check(int Button) + { + Reset(); // reset display + timeActual = timeBase; // set time to base + + if (Button == 0) + { //red is pressed + Red(); + } + if (Button == 1) + { //blue is pressed + Blue(); + } + if (Button == 2) + { //green is pressed + Green(); + } + if (Button == 3) + { //yellow is pressed + Yellow(); + } + if (Code[cnt] != Button ) + { //wrong color is pressed + PlayerOn = false; + Error(Code[cnt]); + } + else + { // color is correct + cnt++; // next tone + timeActual = 30; // check time for player + if (cnt > round) // last tone reached ? + { + PlayerOn = false; // Simon is now on + SimonOn = true; + + cnt = 0; // Start with tone 0 + round++; // next Round + + if (timeBase >4) // increased difficulty + timeBase--; + + timeWait = 30; // wait a little + timeActual = timeBase; // reset timer + } + } + } + + void _Game_Tick(object sender, EventArgs e) + { //display status of the game + if ((!PlayerOn) && (!SimonOn)) + GUIPropertyManager.SetProperty("#Player", "GAME OVER"); + if (PlayerOn) + GUIPropertyManager.SetProperty("#Player", "PLAYER"); + if (SimonOn) + GUIPropertyManager.SetProperty("#Player", "SIMON"); + //Simon is on and no wait + if ((SimonOn) && (timeWait==0)) + { // just started ? + if (timeBase == timeActual) + { //Display color + if (Code[cnt] == 0) + Red(); + if (Code[cnt] == 1) + Blue(); + if (Code[cnt] == 2) + Green(); + if (Code[cnt] == 3) + Yellow(); + + //Display round + int tmp = round + 1; + GUIPropertyManager.SetProperty("#Round", "Round: " + tmp.ToString() + " "); + } //count timer down + if (timeActual > 0) + timeActual = timeActual - 1; + else + { //if timer is 0 + timeActual = timeBase; + Reset(); + //next tone + if (cnt < round) + cnt++; + else + { //player is next + SimonOn = false; + PlayerOn = true; + // first tone a lot of time + timeActual = 50; + cnt = 0; + } + } + } + + if (timeWait > 0) + { //wait timer for little break + timeWait = timeWait - 1; + if (timeWait==timeBase) + Reset(); + } + + if (PlayerOn) + { // if player is on count down timer + if (timeActual > 0) + timeActual = timeActual - 1; + else + { //Player wait too long + PlayerOn = false; + Error(Code[cnt]); + //Reset(); + } + } + } + } +} Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,51 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{206A81B8-D452-45C2-86C9-CBBECF31C11C}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ClassLibrary1</RootNamespace> + <AssemblyName>MySimon</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2593.1896, Culture=neutral, processorArchitecture=MSIL" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="MySimon.cs" /> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("MySimonSay")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MySimonSay")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("1bd4081e-182e-436a-ab7a-abcc7b53684b")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern +// übernehmen, indem Sie "*" eingeben: +[assembly: AssemblyVersion("0.1.0.0")] +[assembly: AssemblyFileVersion("0.1.0.0")] Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Core.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Dialogs.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Utils.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,3 @@ +copy MySimon.dll "C:\Programme\Team MediaPortal\MediaPortal\Plugins\Windows" + + Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/build.force =================================================================== Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,6 @@ +obj\Release\ResolveAssemblyReference.cache +bin\Release\MySimon.dll +bin\Release\MySimon.pdb +obj\Release\MySimon.dll +obj\Release\MySimon.pdb +obj\Debug\ResolveAssemblyReference.cache Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ResolveAssemblyReference.cache ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,5 @@ +obj\Release\ResolveAssemblyReference.cache +bin\Release\SimonSay.dll +bin\Release\SimonSay.pdb +obj\Release\SimonSay.dll +obj\Release\SimonSay.pdb Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySimon", "SimonSay\MySimon.csproj", "{206A81B8-D452-45C2-86C9-CBBECF31C11C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/readme.txt =================================================================== --- trunk/plugins/MySimon/readme.txt (rev 0) +++ trunk/plugins/MySimon/readme.txt 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,22 @@ +Simon Say V0.1 +-------------- + +Simon Say (Senso) + +Initial release +This nice game from MB as a MP version. You can play with + +- the mouse +- remote color buttons +- 1 2 + 4 5 (action keys) + +Copy the plugin and skin files into your favorite skin folder. +I had to adjust my remote a little in the setup. It was to sensitve. + +Planed feature: Highscores ? + +Have fun. + +Greets +kroko \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-03-07 16:03:36
|
Revision: 163 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=163&view=rev Author: saamand Date: 2007-03-07 08:03:32 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Before new serialization structure Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs Removed Paths: ------------- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj Deleted: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-03-06 15:07:16 UTC (rev 162) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-03-07 16:03:32 UTC (rev 163) @@ -1,129 +0,0 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.50727</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}</ProjectGuid> - <OutputType>WinExe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>MyLyrics</RootNamespace> - <AssemblyName>MyLyrics</AssemblyName> - <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> - <StartupObject>MyLyrics.MyLyricsSetup_test</StartupObject> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn> - </NoWarn> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="Core, Version=1.0.2546.32606, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\..\..\..\Program Files\Team Mediaportal\MediaPortal\Core.DLL</HintPath> - </Reference> - <Reference Include="Databases, Version=1.0.2546.32610, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\..\..\..\Program Files\Team Mediaportal\MediaPortal\Databases.DLL</HintPath> - </Reference> - <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\..\..\..\Program Files\Team Mediaportal\MediaPortal\Plugins\Windows\Dialogs.DLL</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - <Reference Include="Utils, Version=1.0.2546.32604, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\..\..\..\Program Files\Team Mediaportal\MediaPortal\Utils.DLL</HintPath> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="MyLyricsSetup_test.cs" /> - <Compile Include="MyLyricsUtil.cs" /> - <Compile Include="MyLyrics.cs" /> - <Compile Include="MyLyricsSetup.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="MyLyricsSetup.Designer.cs"> - <DependentUpon>MyLyricsSetup.cs</DependentUpon> - </Compile> - <Compile Include="MyLyricsSetup_AddNewSong.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="MyLyricsSetup_AddNewSong.Designer.cs"> - <DependentUpon>MyLyricsSetup_AddNewSong.cs</DependentUpon> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="MyLyricsSetup_LyricsLibrary.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="MyLyricsSetup_LyricsLibrary.Designer.cs"> - <DependentUpon>MyLyricsSetup_LyricsLibrary.cs</DependentUpon> - </Compile> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="MyLyricsSetup_LyricsLibrary.resx"> - <SubType>Designer</SubType> - <DependentUpon>MyLyricsSetup_LyricsLibrary.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="MyLyricsSetup.resx"> - <SubType>Designer</SubType> - <DependentUpon>MyLyricsSetup.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="MyLyricsSetup_AddNewSong.resx"> - <SubType>Designer</SubType> - <DependentUpon>MyLyricsSetup_AddNewSong.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="Properties\Resources.resx"> - <SubType>Designer</SubType> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\LRC\LRC.csproj"> - <Project>{1555695C-1274-46BD-97CB-CAC3A393522D}</Project> - <Name>LRC</Name> - </ProjectReference> - <ProjectReference Include="..\LyricsEngine\LyricsEngine.csproj"> - <Project>{B0760CE8-086F-4301-9091-C9BE54F261FD}</Project> - <Name>LyricsEngine</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <Content Include="Changelog.txt" /> - </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. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <PropertyGroup> - <PostBuildEvent>copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal\plugins\windows"</PostBuildEvent> - </PropertyGroup> -</Project> \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-06 15:07:16 UTC (rev 162) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-07 16:03:32 UTC (rev 163) @@ -31,6 +31,7 @@ this.tabControl = new MediaPortal.UserInterface.Controls.MPTabControl(); this.tabPageLyricsDatabase = new MediaPortal.UserInterface.Controls.MPTabPage(); this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage(); + this.tbNote = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbSeekLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); @@ -44,6 +45,7 @@ this.btCancel = new MediaPortal.UserInterface.Controls.MPButton(); this.mpLabel3 = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbGenerel = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbSearchOnlyForMarkedSongs = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbDisregardSongWithLyricInTag = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbDisregardVariousArtist = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbDisregardSongsWithNoLyric = new MediaPortal.UserInterface.Controls.MPCheckBox(); @@ -82,7 +84,6 @@ this.btSave = new MediaPortal.UserInterface.Controls.MPButton(); this.btClose = new MediaPortal.UserInterface.Controls.MPButton(); this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker(); - this.tbNote = new MediaPortal.UserInterface.Controls.MPLabel(); this.tabControl.SuspendLayout(); this.tabPageSetup.SuspendLayout(); this.gbLyricSites.SuspendLayout(); @@ -127,6 +128,15 @@ this.tabPageSetup.Text = "General setup"; this.tabPageSetup.UseVisualStyleBackColor = true; // + // tbNote + // + this.tbNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbNote.Location = new System.Drawing.Point(17, 111); + this.tbNote.Name = "tbNote"; + this.tbNote.Size = new System.Drawing.Size(377, 18); + this.tbNote.TabIndex = 19; + this.tbNote.Text = "(Seek Lyrics and Evil Labs are currently disabled due to instable servers)"; + // // gbLyricSites // this.gbLyricSites.AutoSize = true; @@ -283,6 +293,7 @@ // // gbGenerel // + this.gbGenerel.Controls.Add(this.cbSearchOnlyForMarkedSongs); this.gbGenerel.Controls.Add(this.cbDisregardSongWithLyricInTag); this.gbGenerel.Controls.Add(this.cbDisregardVariousArtist); this.gbGenerel.Controls.Add(this.cbDisregardSongsWithNoLyric); @@ -299,6 +310,18 @@ this.gbGenerel.TabStop = false; this.gbGenerel.Text = "Music database search setup"; // + // cbSearchOnlyForMarkedSongs + // + this.cbSearchOnlyForMarkedSongs.AutoSize = true; + this.cbSearchOnlyForMarkedSongs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbSearchOnlyForMarkedSongs.Location = new System.Drawing.Point(245, 91); + this.cbSearchOnlyForMarkedSongs.Name = "cbSearchOnlyForMarkedSongs"; + this.cbSearchOnlyForMarkedSongs.Size = new System.Drawing.Size(232, 17); + this.cbSearchOnlyForMarkedSongs.TabIndex = 19; + this.cbSearchOnlyForMarkedSongs.Text = "Search for marked songs ONLY (only batch)"; + this.cbSearchOnlyForMarkedSongs.UseVisualStyleBackColor = true; + this.cbSearchOnlyForMarkedSongs.CheckedChanged += new System.EventHandler(this.cbSearchOnlyForMarkedSongs_CheckedChanged); + // // cbDisregardSongWithLyricInTag // this.cbDisregardSongWithLyricInTag.AutoSize = true; @@ -665,20 +688,11 @@ this.bgWorkerSearch.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorkerSearch_RunWorkerCompleted); this.bgWorkerSearch.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorkerSearch_ProgressChanged); // - // tbNote - // - this.tbNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tbNote.Location = new System.Drawing.Point(17, 111); - this.tbNote.Name = "tbNote"; - this.tbNote.Size = new System.Drawing.Size(377, 18); - this.tbNote.TabIndex = 19; - this.tbNote.Text = "(Seek Lyrics and Evil Labs are currently disabled due to instable servers)"; - // // MyLyricsSetup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(541, 539); + this.ClientSize = new System.Drawing.Size(539, 542); this.ControlBox = false; this.Controls.Add(this.btClose); this.Controls.Add(this.tabControl); @@ -764,5 +778,6 @@ private MediaPortal.UserInterface.Controls.MPLabel lbTimeElapsed; internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics; private MediaPortal.UserInterface.Controls.MPLabel tbNote; + private MediaPortal.UserInterface.Controls.MPCheckBox cbSearchOnlyForMarkedSongs; } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-06 15:07:16 UTC (rev 162) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-07 16:03:32 UTC (rev 163) @@ -74,6 +74,9 @@ bool m_DisregardKnownLyric = true; bool m_MarkSongsWhenNoLyricFound = true; bool m_DisregardMarkedLyric = true; + bool m_DisregardSongWithLyricInTag = true; + bool m_DisregardVariousArtist = true; + bool m_SearchOnlyMarkedSongs = false; int m_noOfCurrentlySearches = 0; const int m_NoOfCurrentSearchesAllowed = 4; @@ -289,9 +292,12 @@ m_Limit = int.Parse(lbLimit.Text); - m_DisregardKnownLyric = cbDisconsiderTitlesWithLyrics.Checked; - m_MarkSongsWhenNoLyricFound = cbMarkSongsWithNoLyrics.Checked; - m_DisregardMarkedLyric = cbDisregardSongsWithNoLyric.Checked; + m_DisregardKnownLyric = cbDisconsiderTitlesWithLyrics.Enabled && cbDisconsiderTitlesWithLyrics.Checked; + m_MarkSongsWhenNoLyricFound = cbMarkSongsWithNoLyrics.Enabled && cbMarkSongsWithNoLyrics.Checked; + m_DisregardMarkedLyric = cbDisregardSongsWithNoLyric.Enabled && cbDisregardSongsWithNoLyric.Checked; + m_DisregardSongWithLyricInTag = cbDisregardSongWithLyricInTag.Enabled && cbDisregardSongWithLyricInTag.Checked; + m_DisregardVariousArtist = cbDisregardVariousArtist.Enabled && cbDisregardVariousArtist.Checked; + m_SearchOnlyMarkedSongs = cbSearchOnlyForMarkedSongs.Enabled && cbSearchOnlyForMarkedSongs.Checked; m_SongsNotKnown = 0; m_SongsWithLyric = 0; @@ -355,6 +361,14 @@ xmlwriter.SetValue(capArtist, capTitle, m_LyricText); } + if (MyLyricsUtil.isTrackInLyricsMarkedDatabase(capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_MARKED)) + { + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("LyricsToFetch.xml", false)) + { + xmlwriter.RemoveEntry(capArtist, capTitle); + } + } + StreamReader sr = File.OpenText(logFullFileName); log = sr.ReadToEnd(); sr.Close(); @@ -380,7 +394,7 @@ string capTitle = LyricUtil.capatalizeString(title); if (m_MarkSongsWhenNoLyricFound) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("LyricsToFetch.xml", false)) { xmlwriter.SetValue(capArtist, capTitle, MyLyricsUtil.MARK); } @@ -495,68 +509,121 @@ #region 1. Sorting song lyricConfigInfosQueue = new Queue(); - MusicDatabase dbs = new MusicDatabase(); - dbs.GetArtists(ref artists); + if (m_SearchOnlyMarkedSongs == false) + { + MusicDatabase dbs = new MusicDatabase(); - m_noOfArtistsToSearch = artists.Count; + dbs.GetArtists(ref artists); - for (int albumIndex = 0; albumIndex < artists.Count; albumIndex++) - { - string currentArtist = (string)artists[albumIndex]; - dbs.GetSongsByArtist(currentArtist, ref songs); + m_noOfArtistsToSearch = artists.Count; - for (int i = 0; i < songs.Count; i++) + for (int albumIndex = 0; albumIndex < artists.Count; albumIndex++) { - // if song isn't known in lyric database the progressbar should not be incremented - int songNotKnown = -1; - Song song = (Song)songs[i]; + string currentArtist = (string)artists[albumIndex]; + dbs.GetSongsByArtist(currentArtist, ref songs); - /* Don't include song if one of the following is true - * 1. The artist isn't known (MP issue - should be deleted?) - * 2. Various artister should not be considered and the artist is "various artist" - * 3. Song with a lyric in the tag should not be considered and the music tag has an lyrictext included */ + for (int i = 0; i < songs.Count; i++) + { + // if song isn't known in lyric database the progressbar should not be incremented + int songNotKnown = -1; + Song song = (Song)songs[i]; - MusicTag tag = null; + /* Don't include song if one of the following is true + * 1. The artist isn't known (MP issue - should be deleted?) + * 2. Various artister should not be considered and the artist is "various artist" + * 3. Song with a lyric in the tag should not be considered and the music tag has an lyrictext included */ - if (song.Artist.Equals("unknown") - || (cbDisregardVariousArtist.Checked && (song.Artist.ToLower().Equals("various artists") || song.Artist.ToLower().Equals("diverse kunstnere"))) - || (cbDisregardSongWithLyricInTag.Checked && ((tag = MediaPortal.TagReader.TagReader.ReadTag(song.FileName)) != null) && tag.Lyrics.Equals("") == false)) - { - m_DisregardedSongs += 1; - } - else - { - int status = MyLyricsUtil.isTrackInLyricsDatabase(song.Artist, song.Title); + MusicTag tag = null; - if (!m_DisregardKnownLyric && status.Equals(MyLyricsUtil.LYRIC_FOUND) - || !m_DisregardMarkedLyric && status.Equals(MyLyricsUtil.LYRIC_MARKED) - || status.Equals(MyLyricsUtil.LYRIC_NOT_FOUND)) + if (song.Artist.Equals("unknown") + || (m_DisregardVariousArtist && (song.Artist.ToLower().Equals("various artists") || song.Artist.ToLower().Equals("diverse kunstnere"))) + || (m_DisregardSongWithLyricInTag && ((tag = MediaPortal.TagReader.TagReader.ReadTag(song.FileName)) != null) && tag.Lyrics.Equals("") == false)) { + m_DisregardedSongs += 1; + } + else + { + int status = MyLyricsUtil.isTrackInLyricsDatabase(song.Artist, song.Title); + bool isTrackInLyricsMarkedDatabase = true; - songNotKnown = 1; - if (++m_SongsNotKnown > m_Limit) + if (!m_DisregardKnownLyric && status.Equals(MyLyricsUtil.LYRIC_FOUND) + || (!m_DisregardMarkedLyric && ((isTrackInLyricsMarkedDatabase = MyLyricsUtil.isTrackInLyricsMarkedDatabase(song.Artist, song.Title).Equals(MyLyricsUtil.LYRIC_MARKED)) || status.Equals(MyLyricsUtil.LYRIC_MARKED))) + || (status.Equals(MyLyricsUtil.LYRIC_NOT_FOUND) && !MyLyricsUtil.isTrackInLyricsMarkedDatabase(song.Artist, song.Title).Equals(MyLyricsUtil.LYRIC_MARKED))) { - songNotKnown = 0; - bgWorkerSearch.ReportProgress(songNotKnown); - goto startSearch; + + songNotKnown = 1; + if (++m_SongsNotKnown > m_Limit) + { + songNotKnown = 0; + bgWorkerSearch.ReportProgress(songNotKnown); + goto startSearch; + } + + string[] lyricId = new string[2] { song.Artist, song.Title }; + lyricConfigInfosQueue.Enqueue(lyricId); } + else if (status.Equals(MyLyricsUtil.LYRIC_FOUND)) + { + m_SongsWithLyric += 1; + } + else //if (status.Equals(MyLyricsUtil.LYRIC_MARKED)) + { + m_SongsWithMark += 1; + } + } + m_SongsToSearch = lyricConfigInfosQueue.Count; + bgWorkerSearch.ReportProgress(songNotKnown); + } + } + } + else + { + XmlTextReader tr = null; + try + { + tr = new XmlTextReader("LyricsToFetch.xml"); - string[] lyricId = new string[2] { song.Artist, song.Title }; - lyricConfigInfosQueue.Enqueue(lyricId); - } - else if (status.Equals(MyLyricsUtil.LYRIC_FOUND)) + string currentArtist = ""; + string currentTitle = ""; + while (tr.Read()) + { + switch (tr.Name) { - m_SongsWithLyric += 1; + case "section": + if (tr.AttributeCount == 1) + { + currentArtist = tr.GetAttribute(0); + } + break; + case "entry": + if (tr.AttributeCount == 1) + { + currentTitle = tr.GetAttribute(0); + string currentLyrics = tr.Value; + + if (++m_SongsNotKnown > m_Limit) + { + bgWorkerSearch.ReportProgress(-1); + goto startSearch; + } + + string[] lyricId = new string[2] { currentArtist, currentTitle }; + lyricConfigInfosQueue.Enqueue(lyricId); + } + break; } - else //if (status.Equals(MyLyricsUtil.LYRIC_MARKED)) - { - m_SongsWithMark += 1; - } + } - m_SongsToSearch = lyricConfigInfosQueue.Count; - bgWorkerSearch.ReportProgress(songNotKnown); + } + catch { ;} + finally + { + tr.Close(); + } + //m_SongsToSearch = lyricConfigInfosQueue.Count; + //bgWorkerSearch.ReportProgress(songNotKnown); } startSearch: @@ -663,5 +730,25 @@ lbTimer.Text = (hour < 10 ? "0" + hour.ToString() : hour.ToString()) + ":" + (min < 10 ? "0" + min.ToString() : min.ToString()) + "." + (sec < 10 ? "0" + sec.ToString() : sec.ToString()); } + + private void cbSearchOnlyForMarkedSongs_CheckedChanged(object sender, EventArgs e) + { + if (cbSearchOnlyForMarkedSongs.Checked) + { + cbDisconsiderTitlesWithLyrics.Enabled = false; + cbDisregardSongsWithNoLyric.Enabled = false; + cbDisregardSongWithLyricInTag.Enabled = false; + cbDisregardVariousArtist.Enabled = false; + cbMarkSongsWithNoLyrics.Enabled = false; + } + else + { + cbDisconsiderTitlesWithLyrics.Enabled = true; + cbDisregardSongsWithNoLyric.Enabled = true; + cbDisregardSongWithLyricInTag.Enabled = true; + cbDisregardVariousArtist.Enabled = true; + cbMarkSongsWithNoLyrics.Enabled = true; + } + } } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-03-06 15:07:16 UTC (rev 162) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-03-07 16:03:32 UTC (rev 163) @@ -20,6 +20,8 @@ this.btDelete = new System.Windows.Forms.Button(); this.btAdd = new System.Windows.Forms.Button(); this.gbLibrary = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.comboDatabase = new MediaPortal.UserInterface.Controls.MPComboBox(); + this.lbDatabase = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbTestSecondsLeft = new System.Windows.Forms.Label(); this.btImportLRC = new MediaPortal.UserInterface.Controls.MPButton(); this.lbSongs2 = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -30,6 +32,7 @@ this.lbArtists = new MediaPortal.UserInterface.Controls.MPLabel(); this.treeView = new System.Windows.Forms.TreeView(); this.gbResetDatabase = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.button1 = new System.Windows.Forms.Button(); this.btResetDatabase = new System.Windows.Forms.Button(); this.lbResetDatabase = new MediaPortal.UserInterface.Controls.MPLabel(); this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog(); @@ -40,7 +43,7 @@ // btSave // this.btSave.Enabled = false; - this.btSave.Location = new System.Drawing.Point(218, 275); + this.btSave.Location = new System.Drawing.Point(218, 301); this.btSave.Name = "btSave"; this.btSave.Size = new System.Drawing.Size(75, 23); this.btSave.TabIndex = 6; @@ -51,7 +54,7 @@ // lbTitle // this.lbTitle.AutoSize = true; - this.lbTitle.Location = new System.Drawing.Point(215, 40); + this.lbTitle.Location = new System.Drawing.Point(215, 66); this.lbTitle.MaximumSize = new System.Drawing.Size(275, 13); this.lbTitle.MinimumSize = new System.Drawing.Size(275, 13); this.lbTitle.Name = "lbTitle"; @@ -68,7 +71,7 @@ // // btDelete // - this.btDelete.Location = new System.Drawing.Point(95, 275); + this.btDelete.Location = new System.Drawing.Point(95, 301); this.btDelete.Name = "btDelete"; this.btDelete.Size = new System.Drawing.Size(75, 23); this.btDelete.TabIndex = 3; @@ -78,7 +81,7 @@ // // btAdd // - this.btAdd.Location = new System.Drawing.Point(14, 275); + this.btAdd.Location = new System.Drawing.Point(14, 301); this.btAdd.Name = "btAdd"; this.btAdd.Size = new System.Drawing.Size(75, 23); this.btAdd.TabIndex = 2; @@ -88,6 +91,8 @@ // // gbLibrary // + this.gbLibrary.Controls.Add(this.comboDatabase); + this.gbLibrary.Controls.Add(this.lbDatabase); this.gbLibrary.Controls.Add(this.lbTestSecondsLeft); this.gbLibrary.Controls.Add(this.btImportLRC); this.gbLibrary.Controls.Add(this.lbSongs2); @@ -104,15 +109,37 @@ this.gbLibrary.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLibrary.Location = new System.Drawing.Point(3, 3); this.gbLibrary.Name = "gbLibrary"; - this.gbLibrary.Size = new System.Drawing.Size(515, 336); + this.gbLibrary.Size = new System.Drawing.Size(515, 362); this.gbLibrary.TabIndex = 8; this.gbLibrary.TabStop = false; this.gbLibrary.Text = "Editor"; // + // comboDatabase + // + this.comboDatabase.BorderColor = System.Drawing.Color.Empty; + this.comboDatabase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboDatabase.FormattingEnabled = true; + this.comboDatabase.Items.AddRange(new object[] { + "Lyrics database", + "LyricsToFetct database"}); + this.comboDatabase.Location = new System.Drawing.Point(85, 15); + this.comboDatabase.Name = "comboDatabase"; + this.comboDatabase.Size = new System.Drawing.Size(144, 21); + this.comboDatabase.TabIndex = 27; + this.comboDatabase.SelectedIndexChanged += new System.EventHandler(this.comboDatabase_SelectedIndexChanged); + // + // lbDatabase + // + this.lbDatabase.Location = new System.Drawing.Point(11, 18); + this.lbDatabase.Name = "lbDatabase"; + this.lbDatabase.Size = new System.Drawing.Size(60, 26); + this.lbDatabase.TabIndex = 26; + this.lbDatabase.Text = "Database:"; + // // lbTestSecondsLeft // this.lbTestSecondsLeft.AutoSize = true; - this.lbTestSecondsLeft.Location = new System.Drawing.Point(215, 309); + this.lbTestSecondsLeft.Location = new System.Drawing.Point(215, 335); this.lbTestSecondsLeft.Name = "lbTestSecondsLeft"; this.lbTestSecondsLeft.Size = new System.Drawing.Size(93, 13); this.lbTestSecondsLeft.TabIndex = 25; @@ -121,7 +148,7 @@ // // btImportLRC // - this.btImportLRC.Location = new System.Drawing.Point(95, 304); + this.btImportLRC.Location = new System.Drawing.Point(95, 330); this.btImportLRC.Name = "btImportLRC"; this.btImportLRC.Size = new System.Drawing.Size(75, 23); this.btImportLRC.TabIndex = 24; @@ -131,7 +158,7 @@ // // lbSongs2 // - this.lbSongs2.Location = new System.Drawing.Point(92, 33); + this.lbSongs2.Location = new System.Drawing.Point(82, 59); this.lbSongs2.Name = "lbSongs2"; this.lbSongs2.Size = new System.Drawing.Size(65, 15); this.lbSongs2.TabIndex = 23; @@ -142,7 +169,7 @@ this.tbLyrics.AllowDrop = true; this.tbLyrics.BorderColor = System.Drawing.Color.Empty; this.tbLyrics.Enabled = false; - this.tbLyrics.Location = new System.Drawing.Point(218, 55); + this.tbLyrics.Location = new System.Drawing.Point(218, 81); this.tbLyrics.Multiline = true; this.tbLyrics.Name = "tbLyrics"; this.tbLyrics.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; @@ -152,7 +179,7 @@ // // lbSongs // - this.lbSongs.Location = new System.Drawing.Point(11, 33); + this.lbSongs.Location = new System.Drawing.Point(11, 59); this.lbSongs.Name = "lbSongs"; this.lbSongs.Size = new System.Drawing.Size(60, 15); this.lbSongs.TabIndex = 22; @@ -160,7 +187,7 @@ // // btImportSingle // - this.btImportSingle.Location = new System.Drawing.Point(14, 304); + this.btImportSingle.Location = new System.Drawing.Point(14, 330); this.btImportSingle.Name = "btImportSingle"; this.btImportSingle.Size = new System.Drawing.Size(75, 23); this.btImportSingle.TabIndex = 4; @@ -170,7 +197,7 @@ // // lbArtists2 // - this.lbArtists2.Location = new System.Drawing.Point(92, 18); + this.lbArtists2.Location = new System.Drawing.Point(82, 44); this.lbArtists2.Name = "lbArtists2"; this.lbArtists2.Size = new System.Drawing.Size(65, 15); this.lbArtists2.TabIndex = 21; @@ -178,7 +205,7 @@ // // lbArtists // - this.lbArtists.Location = new System.Drawing.Point(11, 18); + this.lbArtists.Location = new System.Drawing.Point(11, 44); this.lbArtists.Name = "lbArtists"; this.lbArtists.Size = new System.Drawing.Size(60, 15); this.lbArtists.TabIndex = 20; @@ -186,7 +213,7 @@ // // treeView // - this.treeView.Location = new System.Drawing.Point(14, 55); + this.treeView.Location = new System.Drawing.Point(14, 81); this.treeView.Name = "treeView"; this.treeView.Size = new System.Drawing.Size(200, 213); this.treeView.TabIndex = 1; @@ -194,33 +221,45 @@ // // gbResetDatabase // + this.gbResetDatabase.Controls.Add(this.button1); this.gbResetDatabase.Controls.Add(this.btResetDatabase); this.gbResetDatabase.Controls.Add(this.lbResetDatabase); this.gbResetDatabase.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbResetDatabase.Location = new System.Drawing.Point(3, 345); + this.gbResetDatabase.Location = new System.Drawing.Point(3, 371); this.gbResetDatabase.Name = "gbResetDatabase"; - this.gbResetDatabase.Size = new System.Drawing.Size(515, 68); + this.gbResetDatabase.Size = new System.Drawing.Size(515, 76); this.gbResetDatabase.TabIndex = 11; this.gbResetDatabase.TabStop = false; this.gbResetDatabase.Text = "Reset database"; // + // button1 + // + this.button1.Location = new System.Drawing.Point(309, 45); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(181, 23); + this.button1.TabIndex = 11; + this.button1.Text = "Reset LyricsToFetch database"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // // btResetDatabase // - this.btResetDatabase.Location = new System.Drawing.Point(387, 32); + this.btResetDatabase.Location = new System.Drawing.Point(309, 16); this.btResetDatabase.Name = "btResetDatabase"; - this.btResetDatabase.Size = new System.Drawing.Size(114, 23); - this.btResetDatabase.TabIndex = 7; - this.btResetDatabase.Text = "&Reset database"; + this.btResetDatabase.Size = new System.Drawing.Size(181, 23); + this.btResetDatabase.TabIndex = 10; + this.btResetDatabase.Text = "Reset Lyrics database"; this.btResetDatabase.UseVisualStyleBackColor = true; this.btResetDatabase.Click += new System.EventHandler(this.btResetDatabase_Click); // // lbResetDatabase // - this.lbResetDatabase.Location = new System.Drawing.Point(11, 23); + this.lbResetDatabase.Location = new System.Drawing.Point(11, 22); this.lbResetDatabase.Name = "lbResetDatabase"; - this.lbResetDatabase.Size = new System.Drawing.Size(370, 32); + this.lbResetDatabase.Size = new System.Drawing.Size(282, 41); this.lbResetDatabase.TabIndex = 9; - this.lbResetDatabase.Text = "Reset the lyrics database.\r\nNOTICE: all lyrics in database will be deleted."; + this.lbResetDatabase.Text = "Reset the \"Lyrics\" and/or \"LyricsToFetch\" database.\r\n\r\nAll data in each database" + + " that is reset is lost for ever"; // // openFileDialog2 // @@ -252,7 +291,6 @@ private MediaPortal.UserInterface.Controls.MPTextBox tbLyrics; private System.Windows.Forms.TreeView treeView; private MediaPortal.UserInterface.Controls.MPGroupBox gbResetDatabase; - private MediaPortal.UserInterface.Controls.MPLabel lbResetDatabase; private MediaPortal.UserInterface.Controls.MPLabel lbSongs; private MediaPortal.UserInterface.Controls.MPLabel lbArtists; internal MediaPortal.UserInterface.Controls.MPLabel lbArtists2; @@ -261,9 +299,13 @@ internal System.Windows.Forms.Button btDelete; internal System.Windows.Forms.Button btAdd; internal MediaPortal.UserInterface.Controls.MPButton btImportSingle; - internal System.Windows.Forms.Button btResetDatabase; internal MediaPortal.UserInterface.Controls.MPButton btImportLRC; private System.Windows.Forms.OpenFileDialog openFileDialog2; private System.Windows.Forms.Label lbTestSecondsLeft; + private MediaPortal.UserInterface.Controls.MPComboBox comboDatabase; + private MediaPortal.UserInterface.Controls.MPLabel lbDatabase; + internal System.Windows.Forms.Button button1; + internal System.Windows.Forms.Button btResetDatabase; + private MediaPortal.UserInterface.Controls.MPLabel lbResetDatabase; } } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-06 15:07:16 UTC (rev 162) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-07 16:03:32 UTC (rev 163) @@ -42,11 +42,14 @@ string nextLineToShow; int lineCounter; const int SHIFT_WHEN_HIT = 15; + string currentDatabase = ""; public MyLyricsSetup_LyricsLibrary(Form form) { this.m_Form = form; InitializeComponent(); + currentDatabase = "Lyrics.xml"; + comboDatabase.SelectedIndex = 0; updateLyricsTree(); } @@ -57,6 +60,10 @@ { MyLyricsUtil.createLyricDatabase(); } + if (!System.IO.File.Exists("LyricsToFetch.xml")) + { + MyLyricsUtil.createLyricToFetchDatabase(); + } // catch error when treeView suddenly is disposed due to application shutdown try @@ -65,7 +72,7 @@ m_NoOfArtists = 0; m_NoOfTitles = 0; - XmlTextReader tr = new XmlTextReader("Lyrics.xml"); + XmlTextReader tr = new XmlTextReader(currentDatabase); string currentArtist = ""; string currentTitle = ""; @@ -84,7 +91,6 @@ if (tr.AttributeCount == 1) { currentTitle = tr.GetAttribute(0); - string currentLyrics = tr.Value; AddSong(currentArtist, currentTitle); } break; @@ -105,7 +111,7 @@ private ArrayList getTitlesByArtist(string artist) { - XmlTextReader tr = new XmlTextReader("Lyrics.xml"); + XmlTextReader tr = new XmlTextReader(currentDatabase); ArrayList titles = new ArrayList(); while (tr.Read()) @@ -176,7 +182,7 @@ /// <param name="lyric"></param> private void AddSong(string artist, string title, string lyric) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(currentDatabase, false)) { xmlwriter.SetValue(artist, title, lyric); } @@ -201,7 +207,7 @@ --m_NoOfTitles; // remove title from xml-file - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(currentDatabase, false)) { xmlwriter.RemoveEntry(artist, title); } @@ -228,7 +234,7 @@ m_CurrentTitle = LyricUtil.capatalizeString(title); string lyricText = ""; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(currentDatabase, false)) { lyricText = xmlreader.GetValueAsString(m_CurrentArtist, m_CurrentTitle, ""); } @@ -268,7 +274,7 @@ m_CurrentTitle = LyricUtil.capatalizeString(title); string lyricText = ""; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(currentDatabase, false)) { lyricText = xmlreader.GetValueAsString(m_CurrentArtist, m_CurrentTitle, ""); } @@ -321,7 +327,7 @@ private void btSave_Click(object sender, EventArgs e) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("Lyrics.xml", false)) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(currentDatabase, false)) { xmlwriter.SetValue(LyricUtil.capatalizeString(m_CurrentArtist), LyricUtil.capatalizeString(m_CurrentTitle), tbLyrics.Text); btSave.Enabled = false; @@ -469,15 +475,6 @@ } } - private void btResetDatabase_Click(object sender, EventArgs e) - { - if (MessageBox.Show(this, "Are you sure the lyrics database should be deleted?", "Delete lyrics database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) - { - MyLyricsUtil.createLyricDatabase(); - updateLyricsTree(); - updateInfo(); - } - } private void btUpgradeDatabase_Click(object sender, EventArgs e) { @@ -624,5 +621,44 @@ timer.Dispose(); } } + + private void comboDatabase_SelectedIndexChanged(object sender, EventArgs e) + { + if (comboDatabase.SelectedIndex == 0) + { + currentDatabase = "Lyrics.xml"; + updateLyricsTree(); + } + else + { + currentDatabase = "LyricsToFetch.xml"; + updateLyricsTree(); + } + } + + private void btResetDatabase_Click(object sender, EventArgs e) + { + if (MessageBox.Show(this, "Are you sure the Lyrics database should be deleted?", "Delete Lyrics database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) + { + MyLyricsUtil.createLyricDatabase(); + currentDatabase = "Lyrics.xml"; + comboDatabase.SelectedIndex = 0; + updateLyricsTree(); + updateInfo(); + } + } + + + private void button1_Click(object sender, EventArgs e) + { + if (MessageBox.Show(this, "Are you sure the LyricsToFetch database should be deleted?", "Delete LyricsToFetch database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) + { + MyLyricsUtil.createLyricToFetchDatabase(); + currentDatabase = "LyricsToFetch.xml"; + comboDatabase.SelectedIndex = 1; + updateLyricsTree(); + updateInfo(); + } + } } } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs 2007-03-06 15:07:16 UTC (rev 162) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs 2007-03-07 16:03:32 UTC (rev 163) @@ -42,6 +42,24 @@ return LYRIC_FOUND; } + internal static int isTrackInLyricsMarkedDatabase(string artist, string title) + { + string lyricText = ""; + try + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("LyricsToFetch.xml", false)) + { + string capatalizedArtist = LyricUtil.capatalizeString(artist); + string capatalizedTitle = LyricUtil.capatalizeString(title); + lyricText = xmlreader.GetValue(capatalizedArtist, capatalizedTitle); + } + } + catch{;} + if (lyricText.Equals(MyLyricsUtil.MARK)) + return LYRIC_MARKED; + return LYRIC_NOT_FOUND; + } + internal static void createLyricDatabase() { XmlTextWriter xmlWriter = new XmlTextWriter("Lyrics.xml", System.Text.Encoding.UTF8); @@ -51,6 +69,15 @@ xmlWriter.Close(); } + internal static void createLyricToFetchDatabase() + { + XmlTextWriter xmlWriter = new XmlTextWriter("LyricsToFetch.xml", System.Text.Encoding.UTF8); + xmlWriter.Formatting = Formatting.Indented; + xmlWriter.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); + xmlWriter.WriteStartElement("Lyrics"); + xmlWriter.Close(); + } + public static string LookUpLyricInDatabase(string artist, string title) { string lyricText; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-03-06 15:07:18
|
Revision: 162 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=162&view=rev Author: and-81 Date: 2007-03-06 07:07:16 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/XBCDRC/XBCDRCPlugin.cs Modified: trunk/plugins/XBCDRC/XBCDRCPlugin.cs =================================================================== --- trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-06 02:54:38 UTC (rev 161) +++ trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-06 15:07:16 UTC (rev 162) @@ -281,12 +281,12 @@ { int lastError; - // 0x12 = DIGCF_PRESENT or DIGCF_DEVICEINTERFACE + // 0x12 = DIGCF_PRESENT | DIGCF_DEVICEINTERFACE IntPtr handle = SetupDiGetClassDevs(ref classGuid, "", IntPtr.Zero, 0x12); lastError = Marshal.GetLastWin32Error(); if (handle.ToInt32() == -1) - Marshal.ThrowExceptionForHR(lastError); + throw new Win32Exception(lastError); string devicePath = null; @@ -302,7 +302,7 @@ if (lastError != 0x0103 && lastError != 0x007E) { SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + throw new Win32Exception(Marshal.GetLastWin32Error()); } SetupDiDestroyDeviceInfoList(handle); @@ -315,7 +315,7 @@ if (SetupDiEnumDeviceInterfaces(handle, ref deviceInfoData, ref classGuid, 0, ref deviceInterfaceData) == false) { SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + throw new Win32Exception(Marshal.GetLastWin32Error()); } uint cbData = 0; @@ -323,7 +323,7 @@ if (SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, IntPtr.Zero, 0, ref cbData, IntPtr.Zero) == false && cbData == 0) { SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + throw new Win32Exception(Marshal.GetLastWin32Error()); } DeviceInterfaceDetailData deviceInterfaceDetailData = new DeviceInterfaceDetailData(); @@ -332,7 +332,7 @@ if (SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, ref deviceInterfaceDetailData, cbData, IntPtr.Zero, IntPtr.Zero) == false) { SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + throw new Win32Exception(Marshal.GetLastWin32Error()); } if (deviceInterfaceDetailData.DevicePath.IndexOf("vid_045e&pid_0284") != -1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-03-06 02:54:43
|
Revision: 161 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=161&view=rev Author: and-81 Date: 2007-03-05 18:54:38 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/IgorPlugUSB/ trunk/plugins/IgorPlugUSB/AssemblyInfo.cs trunk/plugins/IgorPlugUSB/IgorPlug.dll trunk/plugins/IgorPlugUSB/IgorPlugUSB.cs trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj Removed Paths: ------------- trunk/plugins/IgorPlugUSB/AssemblyInfo.cs trunk/plugins/IgorPlugUSB/XBCDRC Plugin.csproj trunk/plugins/IgorPlugUSB/XBCDRCPlugin.cs Copied: trunk/plugins/IgorPlugUSB (from rev 151, trunk/plugins/XBCDRC) Deleted: trunk/plugins/IgorPlugUSB/AssemblyInfo.cs =================================================================== --- trunk/plugins/XBCDRC/AssemblyInfo.cs 2007-03-01 20:27:59 UTC (rev 151) +++ trunk/plugins/IgorPlugUSB/AssemblyInfo.cs 2007-03-06 02:54:38 UTC (rev 161) @@ -1,67 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security.Permissions; - -// -// 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("XBCDRC Plugin")] -[assembly: AssemblyDescription("Supports the XBox 1 remote receiver using XBCDRC driver")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("and-81")] -[assembly: AssemblyProduct("MediaPortal")] -[assembly: AssemblyCopyright("Aaron Dinnage")] -[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.0.2.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\<setupForm>. 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("")] -[assembly: AssemblyKeyName("")] -[assembly: ComVisibleAttribute(false)] -[assembly: AssemblyFileVersionAttribute("1.0.2.0")] - -[assembly: CLSCompliant(true)] - -[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)] Copied: trunk/plugins/IgorPlugUSB/AssemblyInfo.cs (from rev 159, trunk/plugins/XBCDRC/AssemblyInfo.cs) =================================================================== --- trunk/plugins/IgorPlugUSB/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IgorPlugUSB/AssemblyInfo.cs 2007-03-06 02:54:38 UTC (rev 161) @@ -0,0 +1,67 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security.Permissions; + +// +// 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("IgorPlugUSB Plugin")] +[assembly: AssemblyDescription("Supports the Igor do-it-yourself IR receiver, USB version")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("MediaPortal")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[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.0.2.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\<setupForm>. 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("")] +[assembly: AssemblyKeyName("")] +[assembly: ComVisibleAttribute(false)] +[assembly: AssemblyFileVersionAttribute("1.0.2.0")] + +[assembly: CLSCompliant(true)] + +[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)] Added: trunk/plugins/IgorPlugUSB/IgorPlug.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/IgorPlugUSB/IgorPlug.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/IgorPlugUSB/IgorPlugUSB.cs =================================================================== --- trunk/plugins/IgorPlugUSB/IgorPlugUSB.cs (rev 0) +++ trunk/plugins/IgorPlugUSB/IgorPlugUSB.cs 2007-03-06 02:54:38 UTC (rev 161) @@ -0,0 +1,218 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; + +using Microsoft.Win32.SafeHandles; + +using MediaPortal.GUI.Library; +using MediaPortal.InputDevices; + +namespace MediaPortal.Plugins +{ + + public class IgorPlugUSB : IPlugin, ISetupForm, IDisposable + { + + #region Variables + + InputHandler _inputHandler; + + Thread _readThread; + + bool _disposed = false; + + #endregion Variables + + #region Interop + + const int NO_ERROR = 0; + const int DEVICE_NOT_PRESENT = 1; + const int NO_DATA_AVAILABLE = 2; + const int INVALID_BAUDRATE = 3; + const int OVERRUN_ERROR = 4; + + [DllImport("IgorPlug.dll", SetLastError = true)] + static extern int DoGetInfraCode(out byte[] TimeCodeDiagram, out int DiagramLength); + + /* + static extern int DoSetDataPortDirection(uchar DirectionByte); + static extern int DoGetDataPortDirection(uchar* DataDirectionByte); + static extern int DoSetOutDataPort(uchar DataOutByte); + static extern int DoGetOutDataPort(uchar* DataOutByte); + static extern int DoGetInDataPort(uchar* DataInByte); + static extern int DoEEPROMRead(uchar Address, uchar* DataInByte); + static extern int DoEEPROMWrite(uchar Address, uchar DataOutByte); + static extern int DoRS232Send(uchar DataOutByte); + static extern int DoRS232Read(uchar* DataInByte); + static extern int DoSetRS232Baud(int BaudRate); + static extern int DoGetRS232Baud(int* BaudRate); + */ + + #endregion Interop + + #region Deconstructor + + ~IgorPlugUSB() + { + // call Dispose with false. Since we're in the + // destructor call, the managed resources will be + // disposed of anyways. + Dispose(false); + } + + #endregion + + #region IPlugin Members + + public void Start() + { + Log.Info("IgorPlugUSB Plugin: Start"); + + try + { + _inputHandler = new InputHandler("IgorPlugUSB"); + + ThreadStart readThreadStart = new ThreadStart(ReadThread); + _readThread = new Thread(readThreadStart); + _readThread.Start(); + } + catch (Exception ex) + { + Log.Error("IgorPlugUSB Plugin: {0}", ex.Message); + } + } + + public void Stop() + { + Log.Info("IgorPlugUSB Plugin: Stop"); + + _readThread.Abort(); + } + + #endregion + + #region ISetupForm Members + + public string Author() { return "and-81"; } + public bool CanEnable() { return true; } + public bool DefaultEnabled() { return true; } + public string Description() { return "Supports the Igor USB remote receiver"; } + public int GetWindowId() { return 0; } + public bool HasSetup() { return true; } + public string PluginName() { return "IgorPlugUSB Plugin"; } + + public void ShowPlugin() + { + InputMappingForm inputMappingForm = new InputMappingForm("IgorPlugUSB"); + inputMappingForm.ShowDialog(); + } + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = ""; + return false; + } + + #endregion + + #region IDisposable Members + + public void Dispose() + { + // dispose of the managed and unmanaged resources + Dispose(true); + + // tell the GC that the Finalize process no longer needs + // to be run for this object. + GC.SuppressFinalize(this); + } + + #endregion + + #region Implementation + + protected virtual void Dispose(bool disposeManagedResources) + { + // process only if mananged and unmanaged resources have + // not been disposed of. + if (!this._disposed) + { + if (disposeManagedResources) + { + + } + + // dispose unmanaged resources + this._disposed = true; + } + } + + void ReadThread() + { + try + { + byte[] deviceBuffer = new byte[256]; + int codeLength; + int returnCode; + int keyCode; + + int lastCode = -1; + DateTime lastCodeTime = DateTime.Now; + TimeSpan timeSpan; + + while (true) + { + returnCode = DoGetInfraCode(out deviceBuffer, out codeLength); + + switch (returnCode) + { + case NO_ERROR: + break; + + case DEVICE_NOT_PRESENT: + throw new Exception("Device not present."); + + case NO_DATA_AVAILABLE: + break; + + case INVALID_BAUDRATE: + throw new Exception("Invalid baud rate."); + + case OVERRUN_ERROR: + throw new Exception("Overrun error."); + + default: + throw new Exception(string.Format("Unknown error ({0})", returnCode)); + } + + if (codeLength == 0) + continue; + + keyCode = (int)deviceBuffer[3]; + timeSpan = DateTime.Now - lastCodeTime; + + if (keyCode != lastCode || timeSpan.Milliseconds > 250) + { + lastCode = keyCode; + lastCodeTime = DateTime.Now; + _inputHandler.MapAction(keyCode); + } + + } + } + catch (ThreadAbortException) + { + Log.Info("IgorPlugUSB Plugin: IR read thread aborted."); + } + catch (Exception ex) + { + Log.Error("IgorPlugUSB Plugin: {0}", ex.Message); + } + } + + #endregion Implementation + + } + +} Added: trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj =================================================================== --- trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj (rev 0) +++ trunk/plugins/IgorPlugUSB/IgorPlugUSB.csproj 2007-03-06 02:54:38 UTC (rev 161) @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{88520E4C-5C49-478A-8AFA-959B45075922}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MediaPortal.Plugins</RootNamespace> + <AssemblyName>IgorPlugUSB</AssemblyName> + <StartupObject> + </StartupObject> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>false</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>none</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants> + </DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> + <ItemGroup> + <Compile Include="AssemblyInfo.cs" /> + <Compile Include="IgorPlugUSB.cs" /> + </ItemGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="RemotePlugins, Version=1.0.2581.1913, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\RemotePlugins\bin\Release\RemotePlugins.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2581.1867, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> + <Private>False</Private> + </Reference> + </ItemGroup> + <PropertyGroup> + <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\IgorPlugUSB\"</PostBuildEvent> + </PropertyGroup> + <ItemGroup> + <Content Include="IgorPlug.dll"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + </ItemGroup> +</Project> \ No newline at end of file Deleted: trunk/plugins/IgorPlugUSB/XBCDRC Plugin.csproj =================================================================== --- trunk/plugins/XBCDRC/XBCDRC Plugin.csproj 2007-03-01 20:27:59 UTC (rev 151) +++ trunk/plugins/IgorPlugUSB/XBCDRC Plugin.csproj 2007-03-06 02:54:38 UTC (rev 161) @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.50727</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{88520E4C-5C49-478A-8AFA-959B45075922}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>MediaPortal.Plugins</RootNamespace> - <AssemblyName>XBCDRCPlugin</AssemblyName> - <StartupObject> - </StartupObject> - <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>false</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <UseVSHostingProcess>false</UseVSHostingProcess> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>none</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants> - </DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <UseVSHostingProcess>false</UseVSHostingProcess> - </PropertyGroup> - <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. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <ItemGroup> - <Compile Include="AssemblyInfo.cs" /> - <Compile Include="XBCDRCPlugin.cs" /> - </ItemGroup> - <ItemGroup> - <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="RemotePlugins, Version=1.0.2581.1913, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\MediaPortal\RemotePlugins\bin\Release\RemotePlugins.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - <Reference Include="Utils, Version=1.0.2581.1867, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> - <Private>False</Private> - </Reference> - </ItemGroup> - <PropertyGroup> - <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\XBCDRC Plugin\Release\"</PostBuildEvent> - </PropertyGroup> -</Project> \ No newline at end of file Deleted: trunk/plugins/IgorPlugUSB/XBCDRCPlugin.cs =================================================================== --- trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-01 20:27:59 UTC (rev 151) +++ trunk/plugins/IgorPlugUSB/XBCDRCPlugin.cs 2007-03-06 02:54:38 UTC (rev 161) @@ -1,383 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices; - -using Microsoft.Win32.SafeHandles; - -using MediaPortal.GUI.Library; -using MediaPortal.InputDevices; - -namespace MediaPortal.Plugins -{ - - public class XBCDRCPlugin : IPlugin, ISetupForm, IDisposable - { - - #region Variables - - InputHandler _inputHandler; - FileStream _deviceStream; - byte[] _deviceBuffer; - - int _lastPacketID = 0; - int _lastCode = -1; - DateTime _lastCodeTime = DateTime.Now; - - bool _disposed = false; - - #endregion Variables - - #region Interop - - [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Auto)] - static extern SafeFileHandle CreateFile( - String fileName, - [MarshalAs(UnmanagedType.U4)] FileAccess fileAccess, - [MarshalAs(UnmanagedType.U4)] FileShare fileShare, - IntPtr securityAttributes, - [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, - [MarshalAs(UnmanagedType.U4)] EFileAttributes flags, - IntPtr template); - - [Flags] - enum EFileAttributes : uint - { - Readonly = 0x00000001, - Hidden = 0x00000002, - System = 0x00000004, - Directory = 0x00000010, - Archive = 0x00000020, - Device = 0x00000040, - Normal = 0x00000080, - Temporary = 0x00000100, - SparseFile = 0x00000200, - ReparsePoint = 0x00000400, - Compressed = 0x00000800, - Offline = 0x00001000, - NotContentIndexed = 0x00002000, - Encrypted = 0x00004000, - Write_Through = 0x80000000, - Overlapped = 0x40000000, - NoBuffering = 0x20000000, - RandomAccess = 0x10000000, - SequentialScan = 0x08000000, - DeleteOnClose = 0x04000000, - BackupSemantics = 0x02000000, - PosixSemantics = 0x01000000, - OpenReparsePoint = 0x00200000, - OpenNoRecall = 0x00100000, - FirstPipeInstance = 0x00080000 - } - - [StructLayout(LayoutKind.Sequential)] - struct DeviceInfoData - { - public int Size; - public Guid Class; - public uint DevInst; - public IntPtr Reserved; - } - - [StructLayout(LayoutKind.Sequential)] - struct DeviceInterfaceData - { - public int Size; - public Guid Class; - public uint Flags; - public uint Reserved; - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] - struct DeviceInterfaceDetailData - { - public int Size; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string DevicePath; - } - - [DllImport("hid")] - static extern void HidD_GetHidGuid( - ref Guid guid); - - [DllImport("setupapi", CharSet = CharSet.Auto)] - static extern IntPtr SetupDiGetClassDevs( - ref Guid ClassGuid, - [MarshalAs(UnmanagedType.LPTStr)] string Enumerator, - IntPtr hwndParent, - UInt32 Flags); - - [DllImport("setupapi", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool SetupDiEnumDeviceInfo( - IntPtr handle, - int Index, - ref DeviceInfoData deviceInfoData); - - [DllImport("setupapi", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool SetupDiEnumDeviceInterfaces( - IntPtr handle, - ref DeviceInfoData deviceInfoData, - ref Guid guidClass, - int MemberIndex, - ref DeviceInterfaceData deviceInterfaceData); - - [DllImport("setupapi", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool SetupDiGetDeviceInterfaceDetail( - IntPtr handle, - ref DeviceInterfaceData deviceInterfaceData, - IntPtr unused1, - int unused2, - ref uint requiredSize, - IntPtr unused3); - - [DllImport("setupapi", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool SetupDiGetDeviceInterfaceDetail( - IntPtr handle, - ref DeviceInterfaceData deviceInterfaceData, - ref DeviceInterfaceDetailData deviceInterfaceDetailData, - uint detailSize, - IntPtr unused1, - IntPtr unused2); - - [DllImport("setupapi")] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool SetupDiDestroyDeviceInfoList(IntPtr handle); - - #endregion Interop - - #region Deconstructor - - ~XBCDRCPlugin() - { - // call Dispose with false. Since we're in the - // destructor call, the managed resources will be - // disposed of anyways. - Dispose(false); - } - - #endregion - - #region IPlugin Members - - public void Start() - { - Log.Info("XBCDRC Plugin: Start"); - - try - { - Guid guid = new Guid(); - HidD_GetHidGuid(ref guid); - - string devicePath = FindDevice(guid); - if (devicePath == null) - { - Log.Error("XBCDRC Plugin: Could not find an Xbox remote receiver"); - return; - } - - SafeFileHandle deviceHandle = CreateFile(devicePath, FileAccess.Read, FileShare.ReadWrite, IntPtr.Zero, FileMode.Open, EFileAttributes.Overlapped, IntPtr.Zero); - - if (deviceHandle.IsInvalid) - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - - //_deviceWatcher.RegisterDeviceRemoval(deviceHandle); - - _inputHandler = new InputHandler("XBox Remote"); - - _deviceBuffer = new byte[7]; - _deviceStream = new FileStream(deviceHandle, FileAccess.Read, _deviceBuffer.Length, true); - _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null); - } - catch (Exception ex) - { - Log.Error("XBCDRC Plugin: {0}", ex.Message); - } - } - - public void Stop() - { - Log.Info("XBCDRC Plugin: Stop"); - - if (_deviceStream == null) - return; - - try - { - _deviceStream.Close(); - } - catch (IOException) - { - } - } - - #endregion - - #region ISetupForm Members - - public string Author() { return "and-81"; } - public bool CanEnable() { return true; } - public bool DefaultEnabled() { return true; } - public string Description() { return "Supports the XBox 1 remote receiver using XBCDRC driver"; } - public int GetWindowId() { return 0; } - public bool HasSetup() { return true; } - public string PluginName() { return "XBCDRC Plugin"; } - - public void ShowPlugin() - { - InputMappingForm inputMappingForm = new InputMappingForm("XBox Remote"); - inputMappingForm.ShowDialog(); - } - - public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) - { - strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = ""; - return false; - } - - #endregion - - #region IDisposable Members - - public void Dispose() - { - // dispose of the managed and unmanaged resources - Dispose(true); - - // tell the GC that the Finalize process no longer needs - // to be run for this object. - GC.SuppressFinalize(this); - } - - #endregion - - #region Implementation - - protected virtual void Dispose(bool disposeManagedResources) - { - // process only if mananged and unmanaged resources have - // not been disposed of. - if (!this._disposed) - { - if (disposeManagedResources) - { - // dispose managed resources - if (_deviceStream != null) - { - _deviceStream.Dispose(); - _deviceStream = null; - } - } - - // dispose unmanaged resources - this._disposed = true; - } - } - - static string FindDevice(Guid classGuid) - { - int lastError; - - // 0x12 = DIGCF_PRESENT or DIGCF_DEVICEINTERFACE - IntPtr handle = SetupDiGetClassDevs(ref classGuid, "", IntPtr.Zero, 0x12); - lastError = Marshal.GetLastWin32Error(); - - if (handle.ToInt32() == -1) - Marshal.ThrowExceptionForHR(lastError); - - string devicePath = null; - - for (int deviceIndex = 0; ; deviceIndex++) - { - DeviceInfoData deviceInfoData = new DeviceInfoData(); - deviceInfoData.Size = Marshal.SizeOf(deviceInfoData); - - if (SetupDiEnumDeviceInfo(handle, deviceIndex, ref deviceInfoData) == false) - { - // out of devices or do we have an error? - lastError = Marshal.GetLastWin32Error(); - if (lastError != 0x0103 && lastError != 0x007E) - { - SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - } - - SetupDiDestroyDeviceInfoList(handle); - break; - } - - DeviceInterfaceData deviceInterfaceData = new DeviceInterfaceData(); - deviceInterfaceData.Size = Marshal.SizeOf(deviceInterfaceData); - - if (SetupDiEnumDeviceInterfaces(handle, ref deviceInfoData, ref classGuid, 0, ref deviceInterfaceData) == false) - { - SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - } - - uint cbData = 0; - - if (SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, IntPtr.Zero, 0, ref cbData, IntPtr.Zero) == false && cbData == 0) - { - SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - } - - DeviceInterfaceDetailData deviceInterfaceDetailData = new DeviceInterfaceDetailData(); - deviceInterfaceDetailData.Size = 5; - - if (SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, ref deviceInterfaceDetailData, cbData, IntPtr.Zero, IntPtr.Zero) == false) - { - SetupDiDestroyDeviceInfoList(handle); - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - } - - if (deviceInterfaceDetailData.DevicePath.IndexOf("vid_045e&pid_0284") != -1) - { - SetupDiDestroyDeviceInfoList(handle); - devicePath = deviceInterfaceDetailData.DevicePath; - break; - } - } - - return devicePath; - } - - void OnReadComplete(IAsyncResult asyncResult) - { - try - { - if (_deviceStream.EndRead(asyncResult) == 7 && _deviceBuffer[1] != 1) - { - int packetID = BitConverter.ToInt32(_deviceBuffer, 3); - - if (packetID != _lastPacketID) - { - _lastPacketID = packetID; - - TimeSpan timeSpan = DateTime.Now - _lastCodeTime; - _lastCodeTime = DateTime.Now; - - int keyCode = (int)_deviceBuffer[3]; - - if (keyCode != _lastCode || timeSpan.Milliseconds > 250) - _inputHandler.MapAction(keyCode); - - _lastCode = keyCode; - } - } - - _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null); - } - catch (Exception) - { - } - } - - #endregion Implementation - - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-03-06 02:52:57
|
Revision: 160 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=160&view=rev Author: and-81 Date: 2007-03-05 18:52:54 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/XBCDRC/XBCDRCPlugin.cs Modified: trunk/plugins/XBCDRC/XBCDRCPlugin.cs =================================================================== --- trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-05 18:46:39 UTC (rev 159) +++ trunk/plugins/XBCDRC/XBCDRCPlugin.cs 2007-03-06 02:52:54 UTC (rev 160) @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.IO; using System.Runtime.InteropServices; @@ -181,7 +182,7 @@ SafeFileHandle deviceHandle = CreateFile(devicePath, FileAccess.Read, FileShare.ReadWrite, IntPtr.Zero, FileMode.Open, EFileAttributes.Overlapped, IntPtr.Zero); if (deviceHandle.IsInvalid) - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + throw new Win32Exception(Marshal.GetLastWin32Error()); //_deviceWatcher.RegisterDeviceRemoval(deviceHandle); @@ -358,12 +359,14 @@ _lastPacketID = packetID; TimeSpan timeSpan = DateTime.Now - _lastCodeTime; - _lastCodeTime = DateTime.Now; int keyCode = (int)_deviceBuffer[3]; if (keyCode != _lastCode || timeSpan.Milliseconds > 250) + { _inputHandler.MapAction(keyCode); + _lastCodeTime = DateTime.Now; + } _lastCode = keyCode; } 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: <ze...@us...> - 2007-03-05 06:56:21
|
Revision: 158 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=158&view=rev Author: zebons Date: 2007-03-04 22:56:19 -0800 (Sun, 04 Mar 2007) Log Message: ----------- Suppress of Mepo Green skin (not compatible with 0.2.2.x) Removed Paths: ------------- trunk/plugins/MyFilms/skin/MePo Green Wide/ Property Changed: ---------------- trunk/plugins/MyFilms/ Property changes on: trunk/plugins/MyFilms ___________________________________________________________________ Name: svn:ignore + bin obj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ze...@us...> - 2007-03-04 16:39:16
|
Revision: 157 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=157&view=rev Author: zebons Date: 2007-03-04 08:39:07 -0800 (Sun, 04 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/MyFilms/AssemblyInfo.cs trunk/plugins/MyFilms/CString.cs trunk/plugins/MyFilms/MesFilms.csproj.user trunk/plugins/MyFilms/mesfilms.FxCop Added: trunk/plugins/MyFilms/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyFilms/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MyFilms/AssemblyInfo.cs 2007-03-04 16:39:07 UTC (rev 157) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("MesFilms")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Personnel")] +[assembly: AssemblyProduct("MesFilms")] +[assembly: AssemblyCopyright("Copyright © Personnel 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("d56acbdd-1a89-478f-8339-bf5e17d5554b")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de révision et de build par défaut +// en utilisant '*', comme indiqué ci-dessous : +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/MyFilms/CString.cs =================================================================== --- trunk/plugins/MyFilms/CString.cs (rev 0) +++ trunk/plugins/MyFilms/CString.cs 2007-03-04 16:39:07 UTC (rev 157) @@ -0,0 +1,509 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Globalization; + +namespace NewStringLib +{ + /// <summary> + /// Implementing String Methods + /// </summary> + public class NewString + { + string myString; + + #region ctor + public NewString() { myString = String.Empty; } + public NewString(string value) { myString = value; } + #endregion + + #region Left, Right & Mid + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string Left(int length) { return Left(myString, length); } + /// <summary>Return left hand part of a string</summary> + /// <param name="source">string to split</param> + /// <param name="length">Number of characters to return</param> + /// <returns>Returns left part of the string OR complete original string if length less than 1</returns> + public static string Left(string source, int length) + { + if( source == null ) throw new ArgumentNullException("source"); + if (length > 0) + return source.Substring(0, length); + else + return source; + } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string Right(int length) { return Right(myString, length); } + /// <summary>Returns right part of a string</summary> + /// <param name="source">string to split</param> + /// <param name="length">Number of characters to return</param> + /// <returns>Returns right part of the string OR complete original string if length less than 1</returns> + public static string Right(string source, int length) + { + if (source == null) throw new ArgumentNullException("source"); + + if (length > 0) + return source.Substring(source.Length - length); + else + return source; + } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string Mid(int index) { return Mid(myString, index); } + /// <summary>Returns right part of a string</summary> + /// <param name="source">string to split</param> + /// <param name="index">Position in string to return from to end of string</param> + /// <returns>Returns right part of the string</returns> + public static string Mid(string source, int index) + { + if (source == null) throw new ArgumentNullException("source"); + return source.Substring(index); + } + + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string Mid(int index, int length) { return Mid(myString, index, length); } + /// <summary>Returns middle part of a string</summary> + /// <param name="source">string to split</param> + /// <param name="index">Position in string to start extract</param> + /// <param name="length">Number of characters to extract</param> + /// <returns>Returns middle part of string</returns> + public static string Mid(string source, int index, int length) + { + if (source == null) throw new ArgumentNullException("source"); + return source.Substring(index, length); + } + #endregion + + + #region Positional functions + /// <summary>Searches for substring in string</summary> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <returns>Position in string of first match</returns> + public static int Pos(string findText, string source) + { + if (source == null) throw new ArgumentNullException("source"); + + return source.IndexOf(findText); + } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public int PPos(string findText, int index) { return myString.IndexOf(findText, index); } + /// <summary>Searches for substring in string</summary> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <param name="index">Position in string to begin searching from</param> + /// <returns>Position in string of next match</returns> + public static int PPos(string findText, string source, int index) + { + if (findText == null) throw new ArgumentNullException("findText"); + if (source == null) throw new ArgumentNullException("source"); + return source.IndexOf(findText, index); + } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public int NPos(string findText, int count, bool asChars) { return NPos(findText, myString, count, asChars); } + /// <summary>Searches for position of nth substring in string</summary> + /// <param name="findText">string to look for</param> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <param name="count">find n'th match in string. If negative search backwards from end of string for -n'th match</param> + /// <param name="asChars">If true treat findText as a character array, matching on ANY char</param> + /// <returns>Position in string of n'th match</returns> + public static int NPos(string findText, string source, int count, bool asChars) + { + int index; + int iLen; + char[] sFindArray; + + if (findText == null) throw new ArgumentNullException("findText"); + if (source == null) throw new ArgumentNullException("source"); + + iLen = (asChars) ? 1 : findText.Length; + sFindArray = findText.ToCharArray(); + + if (count < 0) + { + index = NPos(Reverse(findText), Reverse(source), count * -1, asChars); + if (index != -1) index = source.Length - index - iLen; + return index; + } + + index = -iLen; + do + { + index = (asChars) ? source.IndexOfAny(sFindArray, index + 1) : source.IndexOf(findText, index + iLen); + count--; + }while (index >= 0 && count > 0); + if (count > 0) index = -1; //not found enough + return index; + } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public int PosCount(string findText, bool asChars) { return PosCount(findText, myString, asChars); } + /// <summary>count how many substrings are present in the string</summary> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <param name="asChars">If true treat findText as a character array, matching on ANY char</param> + /// <returns>Count of substrings found</returns> + public static int PosCount(string findText, string source, bool asChars) + { + int index; + int count=-1; + int iLen; + char[] sFindArray; + + if (findText == null) throw new ArgumentNullException("findText"); + if (source == null) throw new ArgumentNullException("source"); + + iLen = (asChars) ? 1 : findText.Length; + sFindArray = findText.ToCharArray(); + + index = -iLen; + do + { + index = (asChars) ? source.IndexOfAny(sFindArray, index+1) : source.IndexOf(findText, index+iLen); + count++; + } while (index >= 0); + return count; + } + #endregion + + #region Positional extraction functions + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string NPosMid(string findText, int startCount, int endCount, bool include, bool asChars) + { return NPosMid(findText, myString, startCount, endCount, include, asChars); } + /// <summary>Gets the middle string between 2 matches of a substring in a string</summary> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <param name="startCount">Find n'th match in string. If negative search back from end of string. If 0 or no match grab from string start</param> + /// <param name="endCount">Find n'th match in string. If negative search back from end of string. If 0 or no match grab to string end</param> + /// <param name="include">If true include the findText substring in returned string</param> + /// <param name="asChars">If true treat findText as a character array, matching on ANY char</param> + /// <returns>Middle string Between n'th and n'th match of findText in source</returns> + public static string NPosMid(string findText, string source, int startCount, int endCount, bool include, bool asChars) + { + int iLen; + + if (findText == null) throw new ArgumentNullException("findText"); + if (source == null) throw new ArgumentNullException("source"); + + iLen = (asChars) ? 1 : findText.Length; + + if (startCount != 0) //dont bother looking if 0 + { + startCount = NPos(findText, source, startCount, asChars); //get pos of begin'th occurrence + if (startCount >= 0 && !include) startCount += iLen; + } + // else (leave as 0 no need to = -1) + + if (endCount != 0) + { + endCount = NPos(findText, source, endCount, asChars); //get pos of end'th occurrence + if (endCount >= 0 && include) endCount += iLen; + } + else + endCount = -1; //dont bother looking if 0, set -1 for later + + if (startCount < 0) startCount = 0; //set startCount to start of str + if (endCount < 0) endCount = source.Length; //set endCount to end of str+1 + + return source.Substring(startCount, endCount - startCount); + } + + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string NPosLeft(string findText, int count, bool include, bool asChars) + { return NPosMid(findText, myString, 0, count, include, asChars); } + /// <summary>Gets the left part of a string before the n'th match of a substring in a string</summary> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <param name="count">Find n'th match in string. If negative search back from end of string. If 0 or no match grab from string start</param> + /// <param name="include">If true include the findText substring in returned string</param> + /// <param name="asChars">If true treat findText as a character array, matching on ANY char</param> + /// <returns>Left string before n'th match of findText in source</returns> + public static string NPosLeft(string findText, string source, int count, bool include, bool asChars) + { return NPosMid(findText, source, 0, count, include, asChars); } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string PosLeft(string findText) + { return NPosMid(findText, myString, 0, 1, false, false); } + /// <summary>Gets the left part of a string before the first match of a substring in a string</summary> + /// <param name="findText">string to look for</param> + /// <param name="source">string to search within</param> + /// <returns>Left string before first match of findText in source</returns> + public static string PosLeft(string findText, string source) + { return NPosMid(findText, source, 0, 1, false, false); } + + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string NPosRight(string findText, int count, bool include, bool asChars) + { return NPosMid(findText, myString, count, 0, include, asChars); } + /// <summary>Gets the right part of a string after the n'th match of a substring in a string</summary> + /// <param name="findText">String to look for</param> + /// <param name="source">String to search within</param> + /// <param name="count">Find n'th match in string. If negative search back from end of string. If 0 or no match grab to end of string</param> + /// <param name="include">If true include the findText substring in returned string</param> + /// <param name="asChars">If true treat findText as a character array, matching on ANY char</param> + /// <returns>Right string after n'th match of findText in source</returns> + public static string NPosRight(string findText, string source, int count, bool include, bool asChars) + { return NPosMid(findText, source, count, 0, include, asChars); } + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string PosRight(string findText) + { return NPosMid(findText, myString, 1, 0, false, false); } + /// <summary>Gets the right part of a string after the first match of a substring in a string</summary> + /// <param name="findText">String to look for</param> + /// <param name="source">String to search within</param> + /// <returns>Right string after first match of findText in source</returns> + public static string PosRight(string findText, string source) + { return NPosMid(findText, source, 1, 0, false, false); } + #endregion + + #region Search & Replace functions + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string NPosReplaceString(string findText, string replaceText, int count) + { return NPosReplaceString(findText, replaceText, myString, count); } + /// <summary>Replaces all occurences of findText with replaceText in sStr from after n'th instance of findText</summary> + /// <param name="findText">String to look for</param> + /// <param name="replaceText">String to replace it with</param> + /// <param name="source">String to search within</param> + /// <param name="count">Find n'th match in string.</param> + /// <returns>New string with replacements</returns> + public static string NPosReplaceString(string findText, string replaceText, string source, int count) + { + string source2; + + if (findText == null) throw new ArgumentNullException("findText"); + if (replaceText == null) throw new ArgumentNullException("replaceText"); + if (source == null) throw new ArgumentNullException("source"); + + source2 = NPosRight(findText, source, count, false, false); + if (source2.Length != 0) + return source.Substring(0, source.Length - source2.Length) + source2.Replace(findText, replaceText); + else + return source; + } + + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string PosReplaceString(string startText, string endText, string replaceText, int index) + { return PosReplaceString(startText, endText, replaceText, myString, index); } + /// <summary>Replaces all occurences of text between 2 different substrings with a 3rd substring</summary> + /// <param name="startText">String to look for to begin replace</param> + /// <param name="endText">String to look for to end replace. Can be empty "" to just replace sFindBegs not range between</param> + /// <param name="replaceText">String to replace it with. Can be empty "" to just erase each match</param> + /// <param name="source">String to search within</param> + /// <param name="index">Position in string to begin search/replacing from</param> + /// <returns>New string with replacements</returns> + public static string PosReplaceString(string startText, string endText, string replaceText, string source, int index) + { + int pEnd; + + if (startText == null) throw new ArgumentNullException("startText"); + if (endText == null) throw new ArgumentNullException("endText"); + if (replaceText == null) throw new ArgumentNullException("replaceText"); + if (source == null) throw new ArgumentNullException("source"); + + if (index < 0) index = 0; + while (true) + { + index = source.IndexOf(startText, index); + if (index == -1) break; + + if (endText.Length != 0) + { + pEnd = source.IndexOf(endText, index + 1); + if (pEnd == -1) break; + pEnd = pEnd + endText.Length; + } + else + pEnd = index + startText.Length; + + source = source.Remove(index, pEnd - index); + if (replaceText.Length != 0) source = source.Insert(index, replaceText); + index = index + replaceText.Length; + if (index > source.Length) break; + } + return source; + } + + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string PosReplace(string replaceText, int index) + { return PosReplace(replaceText, myString, index); } + /// <summary>Replace text of equel length to new text with the new text</summary> + /// <param name="replaceText">String to replace</param> + /// <param name="index">Position in string to replace at</param> + /// <returns>New string with replacements</returns> + public static string PosReplace(string replaceText, string source, int index) + { + if (replaceText == null) throw new ArgumentNullException("replaceText"); + if (source == null) throw new ArgumentNullException("source"); + + source = source.Remove(index, replaceText.Length); + source = source.Insert(index, replaceText); + return source; + } + + + /// <summary>Non-static version of function below. Operates on NewString object</summary> + public string StripChars(string strip) + { return StripChars(strip, myString); } + /// <summary>Removes all chars in supplied string</summary> + /// <param name="strip">String of chars to remove from string</param> + /// <param name="source">String to search within</param> + /// <returns>New string without strip within it</returns> + public static string StripChars(string strip, string source) + { + if (strip == null) throw new ArgumentNullException("strip"); + if (source == null) throw new ArgumentNullException("source"); + + for (int i = 0; i < strip.Length; i++) + source = source.Replace(strip.Substring(i, 1), null); + return source; // xxx check if original affected + } + #endregion + + + #region Conversion functions + /// <summary>Convert String to ProperCase</summary> + /// <param name="source">String to be converted to ProperCase</param> + /// <returns>The ProperCase String</returns> + public string ProperCase(){return ProperCase (myString);} + public static string ProperCase(string source) + { + char[] sFindArray = { ' ', '\t', '\n', '.' }; + int index = 0; + char[] sArray; + + if (source == null) throw new ArgumentNullException("source"); + + sArray = source.ToCharArray(); + + do + { + sArray[index] = Char.ToUpper(sArray[index], CultureInfo.CurrentCulture); + index = source.IndexOfAny(sFindArray, index) + 1; + } while (index > 0 && index < source.Length); + return new string(sArray); + } + + + /// <summary>Recursion Reverse function to Reverse a given String</summary> + /// <param name="source">String to be Reversed</param> + /// <returns>The Reversed string</returns> + public string Reverse() { return Reverse(myString); } + public static string Reverse(string source) + { + if (source == null) throw new ArgumentNullException("source"); + + if (source.Length == 1) + { + return source; + } + else + { + return Reverse( source.Substring(1) ) + source.Substring(0,1); + } + } + + + /// <summary>Converts any multiple adjacent spaces to a single space</summary> + /// <returns>The trimmed string</returns> + public string TrimToSingleSpace() { return TrimToSingleSpace(myString); } + public static string TrimToSingleSpace(string source) + { + int intPos; + + if (source == null) throw new ArgumentNullException("source"); + + intPos = source.IndexOf(" "); + if (intPos == -1) + { + return source; + } + else + { + return TrimToSingleSpace(source.Substring(0,intPos) + source.Substring(intPos+1)); + } + } + #endregion + + + #region Non_String_functions + // -------- NON-STRING BUT USEFUL FUNCS ADDED HERE FOR NOW ------------ + + /// <summary>Returns the smaller of 2 values</summary> + /// <param name="val1">First value to compare</param> + /// <param name="val2">Second value to compare</param> + /// <returns>Smaller value</returns> + public static T Min<T>(T val1, T val2) + { + T retVal = val2; + if (Comparer<T>.Default.Compare(val1, val2) < 0) + retVal = val1; + return retVal; + } + + /// <summary>Returns the greater of 2 values</summary> + /// <param name="val1">First value to compare</param> + /// <param name="val2">Second value to compare</param> + /// <returns>Greater value value</returns> + public static T Max<T>(T val1, T val2) + { + T retVal = val1; + if (Comparer<T>.Default.Compare(val1, val2) < 0) + retVal = val2; + return retVal; + } + #endregion + + + //private static void Test() + //{ + // string text1 = "the.cat.sat.on.the.mat"; + // string text2 = "The cat sat on the mat the cat"; + // string text; + // int index; + + // text = Left(text1, 5); //the.c" + // text = Mid(text1, 5, 5); // "at.sa" + // text = Right(text1, 5); // "e.mat" + // index = NPos("the", text1, 2, false); //15 + // text = NPosMid(".", text1, 2, -2, false, false); // "sat.on" + // text = PosReplaceString(".", ".", "-blah-", text1, 4); // "the.cat-blah-on-blah-mat" + // text = ProperCase(text1); //"The.Cat.Sat.On.The.Mat" + // text = Reverse(text1); //"tam.eht.no.tas.tac.eht" + // text = TrimToSingleSpace(text2); // "The cat sat on the mat the cat" + // text = StripChars("aeiou", text1); // "th.ct.st.n.th.mt" + // text = NPosReplaceString("the", "a", text1, 0); //"a.cat.sat.on.a.mat"; + //} + } +} Added: trunk/plugins/MyFilms/MesFilms.csproj.user =================================================================== --- trunk/plugins/MyFilms/MesFilms.csproj.user (rev 0) +++ trunk/plugins/MyFilms/MesFilms.csproj.user 2007-03-04 16:39:07 UTC (rev 157) @@ -0,0 +1,13 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ReferencePath>D:\devel\vs2005\mediaportal\xbmc\bin\Debug\;D:\devel\vs2005\mediaportal\xbmc\bin\Debug\plugins\windows\</ReferencePath> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <StartAction>Program</StartAction> + <StartProgram>D:\devel\vs2005\mediaportal\xbmc\bin\Debug\MediaPortal.exe</StartProgram> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <StartAction>Program</StartAction> + <StartProgram>D:\devel\vs2005\mediaportal\xbmc\bin\Release\MediaPortal.exe</StartProgram> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/MyFilms/mesfilms.FxCop =================================================================== --- trunk/plugins/MyFilms/mesfilms.FxCop (rev 0) +++ trunk/plugins/MyFilms/mesfilms.FxCop 2007-03-04 16:39:07 UTC (rev 157) @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<FxCopProject Version="1.35" Name="My FxCop Project"> + <ProjectOptions> + <SharedProject>True</SharedProject> + <Stylesheet Apply="False">http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl</Stylesheet> + <SaveMessages> + <Project Status="Active, Excluded" NewOnly="False" /> + <Report Status="Active" NewOnly="False" /> + </SaveMessages> + <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" /> + <EnableMultithreadedLoad>True</EnableMultithreadedLoad> + <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis> + <SourceLookup>True</SourceLookup> + <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold> + <RuleExceptionsThreshold>1</RuleExceptionsThreshold> + <Spelling Locale="en-us" /> + <VersionAware>False</VersionAware> + <OverrideRuleVisibilities>False</OverrideRuleVisibilities> + <CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" /> + <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache> + <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout> + </ProjectOptions> + <Targets> + <Target Name="$(ProjectDir)/../mediaportal/xbmc/bin/Debug/Core.dll" Analyze="False" AnalyzeAllChildren="False" /> + <Target Name="$(ProjectDir)/../mediaportal/xbmc/bin/Debug/plugins/windows/MesFilms.dll" Analyze="True" AnalyzeAllChildren="False"> + <Modules AnalyzeAllChildren="False"> + <Module Name="mesfilms.dll" Analyze="True" AnalyzeAllChildren="False"> + <Namespaces AnalyzeAllChildren="False"> + <Namespace Name="NewStringLib" Analyze="True" AnalyzeAllChildren="True" /> + </Namespaces> + <Resources AnalyzeAllChildren="False" /> + </Module> + </Modules> + </Target> + </Targets> + <Rules> + <RuleFiles> + <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" /> + <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" /> + </RuleFiles> + <Groups /> + <Settings /> + </Rules> + <FxCopReport Version="1.35"> + <Namespaces> + <Namespace Name="NewStringLib"> + <Messages> + <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Status="Excluded" Created="2007-02-17 13:12:35Z"> + <Issue> + <Item>NewStringLib</Item> + </Issue> + </Message> + </Messages> + </Namespace> + </Namespaces> + <Targets> + <Target Name="$(ProjectDir)/../mediaportal/xbmc/bin/Debug/plugins/windows/MesFilms.dll"> + <Modules> + <Module Name="mesfilms.dll"> + <Messages> + <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-02-17 12:07:04Z"> + <Issue> + <Item>MesFilms</Item> + </Issue> + </Message> + <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-02-17 12:07:04Z"> + <Issue Name="NoStrongName"> + <Item>MesFilms</Item> + </Issue> + </Message> + <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-02-17 12:07:04Z"> + <Issue Name="NoAttr"> + <Item>MesFilms</Item> + </Issue> + </Message> + </Messages> + </Module> + </Modules> + </Target> + </Targets> + <Rules> + <Rule TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209"> + <Resolution Name="Default">No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.</Resolution> + </Rule> + <Rule TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210"> + <Resolution Name="NoStrongName">Sign '{0}' with a strong name key.</Resolution> + </Rule> + <Rule TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020"> + <Resolution Name="Default">Consider merging the types defined in '{0}' with another namespace.</Resolution> + </Rule> + <Rule TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014"> + <Resolution Name="NoAttr">'{0}' should be marked with CLSCompliantAttribute and its value should be true.</Resolution> + </Rule> + </Rules> + </FxCopReport> +</FxCopProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ze...@us...> - 2007-03-04 16:33:30
|
Revision: 156 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=156&view=rev Author: zebons Date: 2007-03-04 08:33:26 -0800 (Sun, 04 Mar 2007) Log Message: ----------- starhalf.png added to 4.0 version Added Paths: ----------- trunk/plugins/MyFilms/skin/BlackMyst/Media/starhalf.png trunk/plugins/MyFilms/skin/BlueTwo/Media/starhalf.png trunk/plugins/MyFilms/skin/BlueTwo wide/Media/starhalf.png Added: trunk/plugins/MyFilms/skin/BlackMyst/Media/starhalf.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyFilms/skin/BlackMyst/Media/starhalf.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyFilms/skin/BlueTwo/Media/starhalf.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyFilms/skin/BlueTwo/Media/starhalf.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyFilms/skin/BlueTwo wide/Media/starhalf.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyFilms/skin/BlueTwo wide/Media/starhalf.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ze...@us...> - 2007-03-04 16:29:39
|
Revision: 155 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=155&view=rev Author: zebons Date: 2007-03-04 08:29:34 -0800 (Sun, 04 Mar 2007) Log Message: ----------- Skins corrected for 4.0 version. Mepo Green skin deleted (not available for 0.2.2) Modified Paths: -------------- trunk/plugins/MyFilms/skin/BlackMyst/MesFilms.xml trunk/plugins/MyFilms/skin/BlackMyst/MesFilmsDetail.xml trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml trunk/plugins/MyFilms/skin/BlueTwo/MesFilmsDetail.xml trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilmsDetail.xml trunk/plugins/MyFilms/skin/Project Mayhem 3/MesFilms.xml trunk/plugins/MyFilms/skin/Project Mayhem 3/MesFilmsDetail.xml Modified: trunk/plugins/MyFilms/skin/BlackMyst/MesFilms.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlackMyst/MesFilms.xml 2007-03-04 16:26:12 UTC (rev 154) +++ trunk/plugins/MyFilms/skin/BlackMyst/MesFilms.xml 2007-03-04 16:29:34 UTC (rev 155) @@ -212,6 +212,61 @@ <texture>star.png</texture> <centered>yes</centered> </control> + <control> + <type>image</type> + <id>1060</id> + <posX>224</posX> + <posY>350</posY> + <width>36</width> + <height>36</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1059</id> + <posX>227</posX> + <posY>316</posY> + <width>30</width> + <height>30</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1058</id> + <posX>230</posX> + <posY>288</posY> + <width>24</width> + <height>24</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1057</id> + <posX>233</posX> + <posY>266</posY> + <width>18</width> + <height>18</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1056</id> + <posX>236</posX> + <posY>250</posY> + <width>12</width> + <height>12</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> <control> <type>image</type> <id>1055</id> Modified: trunk/plugins/MyFilms/skin/BlackMyst/MesFilmsDetail.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlackMyst/MesFilmsDetail.xml 2007-03-04 16:26:12 UTC (rev 154) +++ trunk/plugins/MyFilms/skin/BlackMyst/MesFilmsDetail.xml 2007-03-04 16:29:34 UTC (rev 155) @@ -93,6 +93,10 @@ <description>group element</description> <id>1234</id> <layout>GridLayout(4,0,0,0)</layout> + <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="400" end="0,-300" >WindowClose</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="250">WindowOpen</animation> <control> <type>button</type> <description>first</description> @@ -220,7 +224,7 @@ <posX>403</posX> <posY>156</posY> <label>#item1</label> - <width>180</width> + <width>280</width> <textcolor>ffffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> @@ -230,7 +234,7 @@ <posX>403</posX> <posY>281</posY> <label>#item2</label> - <width>200</width> + <width>280</width> <textcolor>ffffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> @@ -310,7 +314,7 @@ <posX>403</posX> <posY>206</posY> <label>#genre</label> - <width>270</width> + <width>280</width> <disabledcolor>ffffffff</disabledcolor> </control> <control> @@ -329,7 +333,7 @@ <posX>403</posX> <posY>256</posY> <label>#director</label> - <width>270</width> + <width>280</width> <disabledcolor>ffffffff</disabledcolor> </control> <control> @@ -348,7 +352,7 @@ <posX>403</posX> <posY>231</posY> <label>#pays</label> - <width>270</width> + <width>280</width> <disabledcolor>ffffffff</disabledcolor> </control> <control> Modified: trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml 2007-03-04 16:26:12 UTC (rev 154) +++ trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml 2007-03-04 16:29:34 UTC (rev 155) @@ -1,321 +1,435 @@ -<window> - <id>7986</id> - <defaultcontrol>1026</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <controls> - <import>common.time.xml</import> - <control> - <description>BG</description> - <type>image</type> - <id>1</id> - <posX>0</posX> - <posY>0</posY> - <texture>background.png</texture> - </control> - <control> - <type>image</type> - <id>1</id> - <posX>60</posX> - <posY>20</posY> - <texture>videos_logo.png</texture> - </control> - <control> - <description>logo</description> - <type>image</type> - <id>1</id> - <posX>75</posX> - <posY>70</posY> - <height>40</height> - <colordiffuse>9Fffffff</colordiffuse> - <keepaspectratio>yes</keepaspectratio> - <texture>amclogo.png</texture> - </control> - <control> - <type>fadelabel</type> - <id>12</id> - <posX>270</posX> - <posY>70</posY> - <label>label</label> - <font>font14</font> - <align>left</align> - <textcolor>ffa9d0f7</textcolor> - </control> - <control> - <type>group</type> - <description>group element</description> - <id>1</id> - <posX>60</posX> - <posY>97</posY> - <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> - <animation effect="slide" time="400" end="0,-300" >WindowClose</animation> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="fade" time="250">WindowOpen</animation> - <layout>StackLayout</layout> - <control> - <type>sortbutton</type> - <id>2</id> - <onleft>5</onleft> - <onright>1026</onright> - <onup>5</onup> - <ondown>3</ondown> - <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> - <font>font13</font> - <textureFocus>menu_list_focus.png</textureFocus> - <textYOff>5</textYOff> - <textXOff>10</textXOff> - <disabledcolor>60ffffff</disabledcolor> - <label>103</label> - <offsetSortButtonY>8</offsetSortButtonY> - <offsetSortButtonX>165</offsetSortButtonX> - <textcolor>White</textcolor> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <textureAscending>arrow_round_up_nofocus.png</textureAscending> - <textureDescending>arrow_round_down_nofocus.png</textureDescending> - <textureDescendingFocused>arrow_round_down_focus.png</textureDescendingFocused> - </control> - <control> - <type>button</type> - <description>Switch view</description> - <id>3</id> - <onleft>2</onleft> - <onright>1026</onright> - <onup>2</onup> - <ondown>4</ondown> - <label>457</label> - </control> - <control> - <type>button</type> - <description>Search by Films</description> - <id>4</id> - <onleft>3</onleft> - <onright>1026</onright> - <onup>3</onup> - <ondown>5</ondown> - <label>137</label> - </control> - <control> - <type>button</type> - <description>Search by Actors</description> - <id>5</id> - <onleft>4</onleft> - <onright>1026</onright> - <onup>4</onup> - <ondown>319</ondown> - <label>137</label> - </control> - </control> - <control> - <type>group</type> - <description>composite control consisting of a list control and a thumbnail panel</description> - <id>1000</id> - <posX>260</posX> - <posY>56</posY> - <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> - <animation effect="slide" time="400" end="800,0" >WindowClose</animation> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <mpe> - <layout>Grid</layout> - <spring>no</spring> - <spacing>0</spacing> - <padding> - <top>0</top> - <right>0</right> - <bottom>0</bottom> - <left>0</left> - </padding> - </mpe> - <control> - <type>textboxscrollup</type> - <description>Biography value</description> - <id>1025</id> - <posX>260</posX> - <posY>414</posY> - <width>430</width> - <height>106</height> - <onleft>2</onleft> - <onright>1026</onright> - <onup>1026</onup> - <ondown>1026</ondown> - <colordiffuse>ffffffff</colordiffuse> - <textcolor>FFFFFFFF</textcolor> - <speed>10</speed> - <label>-</label> - <font>font12</font> - </control> - <control> - <type>listcontrol</type> - <description>listcontrol</description> - <id>1026</id> - <width>440</width> - <height>354</height> - <onleft>2</onleft> - <onright>1000</onright> - <onup>1026</onup> - <ondown>1026</ondown> - <posX>260</posX> - <posY>97</posY> - </control> - </control> - <control> - <type>image</type> - <id>1065</id> - <posX>224</posX> - <posY>350</posY> - <width>36</width> - <height>36</height> - <visible>no</visible> - <texture>star.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1064</id> - <posX>227</posX> - <posY>316</posY> - <width>30</width> - <height>30</height> - <visible>no</visible> - <texture>star.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1063</id> - <posX>230</posX> - <posY>288</posY> - <width>24</width> - <height>24</height> - <visible>no</visible> - <texture>star.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1062</id> - <posX>233</posX> - <posY>266</posY> - <width>18</width> - <height>18</height> - <visible>no</visible> - <texture>star.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1061</id> - <posX>236</posX> - <posY>250</posY> - <width>12</width> - <height>12</height> - <visible>no</visible> - <texture>star.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1055</id> - <posX>224</posX> - <posY>350</posY> - <width>36</width> - <height>36</height> - <visible>no</visible> - <texture>greystar.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1054</id> - <posX>227</posX> - <posY>316</posY> - <width>30</width> - <height>30</height> - <visible>no</visible> - <texture>greystar.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1053</id> - <posX>230</posX> - <posY>288</posY> - <width>24</width> - <height>24</height> - <visible>no</visible> - <texture>greystar.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1052</id> - <posX>233</posX> - <posY>266</posY> - <width>18</width> - <height>18</height> - <visible>no</visible> - <texture>greystar.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1051</id> - <posX>236</posX> - <posY>250</posY> - <width>12</width> - <height>12</height> - <visible>no</visible> - <texture>greystar.png</texture> - <centered>yes</centered> - </control> - <control> - <type>image</type> - <id>1020</id> - <posX>95</posX> - <posY>235</posY> - <width>122</width> - <height>160</height> - <keepaspectratio>yes</keepaspectratio> - <texture>-</texture> - </control> - <control> - <type>image</type> - <id>1021</id> - <posX>65</posX> - <posY>250</posY> - <width>155</width> - <height>220</height> - <keepaspectratio>yes</keepaspectratio> - <texture>-</texture> - </control> - <control> - <type>label</type> - <description>year</description> - <id>1022</id> - <posX>78</posX> - <posY>550</posY> - <visible>no</visible> - <label>6</label> - <font>font12</font> - </control> - <control> - <type>label</type> - <description>category</description> - <id>1024</id> - <posX>125</posX> - <posY>550</posY> - <visible>no</visible> - <align>left</align> - <label>6</label> - <font>font12</font> - </control> - <control> - <type>label</type> - <id>2073</id> - <posX>270</posX> - <posY>530</posY> - <label>#nbobjects</label> - <align>left</align> - <textcolor>7fffffff</textcolor> - </control> - </controls> +<window> + <id>7986</id> + <defaultcontrol>1026</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + <import>common.time.xml</import> + <control> + <type>image</type> + <description>BG</description> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <texture>background.png</texture> + </control> + <control> + <type>image</type> + <id>24</id> + <posX>64</posX> + <posY>70</posY> + <width>67</width> + <height>40</height> + <colordiffuse>9fffffff</colordiffuse> + <texture>amclogo.png</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>image</type> + <id>25</id> + <posX>56</posX> + <posY>16</posY> + <texture>videos_logo.png</texture> + </control> + <control> + <type>group</type> + <description>group element</description> + <id>1</id> + <posX>60</posX> + <posY>97</posY> + <width>198</width> + <height>140</height> + <layout>StackLayout</layout> + <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="400" end="0,-300" >WindowClose</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="250">WindowOpen</animation> + <mpe> + <layout>Grid</layout> + <spring>no</spring> + <spacing>0</spacing> + <padding> + <top>0</top> + <right>0</right> + <bottom>0</bottom> + <left>0</left> + </padding> + </mpe> + <control> + <type>sortbutton</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <onleft>5</onleft> + <onright>1026</onright> + <onup>5</onup> + <ondown>3</ondown> + <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> + <font>font13</font> + <textureFocus>menu_list_focus.png</textureFocus> + <textYOff>5</textYOff> + <animation>unfocus</animation> + <textXOff>10</textXOff> + <disabledcolor>60ffffff</disabledcolor> + <label>103</label> + <offsetSortButtonY>8</offsetSortButtonY> + <offsetSortButtonX>165</offsetSortButtonX> + <textcolor>White</textcolor> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <textureDescending>arrow_round_down_nofocus.png</textureDescending> + <textureDescendingFocused>arrow_round_down_focus.png</textureDescendingFocused> + </control> + <control> + <type>button</type> + <description>Switch view</description> + <id>3</id> + <posX>60</posX> + <posY>129</posY> + <onleft>2</onleft> + <onright>1026</onright> + <onup>2</onup> + <ondown>4</ondown> + <animation>unfocus</animation> + <label>457</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>button</type> + <description>Search by Films</description> + <id>4</id> + <posX>60</posX> + <posY>161</posY> + <onleft>3</onleft> + <onright>1026</onright> + <onup>3</onup> + <ondown>5</ondown> + <animation>unfocus</animation> + <label>137</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>button</type> + <description>Search by Actors</description> + <id>5</id> + <posX>60</posX> + <posY>193</posY> + <onleft>4</onleft> + <onright>1026</onright> + <onup>4</onup> + <ondown>319</ondown> + <animation>unfocus</animation> + <label>137</label> + <textcolor>ff000000</textcolor> + </control> + </control> + <control> + <type>fadelabel</type> + <id>12</id> + <posX>344</posX> + <posY>68</posY> + <width>272</width> + <height>24</height> + <label>label</label> + <font>font14</font> + <textcolor>ffa9d0f7</textcolor> + <disabledcolor>ff808080</disabledcolor> + </control> + <control> + <type>group</type> + <description>composite control consisting of a list control and a thumbnail panel</description> + <id>1000</id> + <posX>260</posX> + <posY>97</posY> + <width>448</width> + <height>424</height> + <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> + <animation effect="slide" time="400" end="800,0" >WindowClose</animation> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <mpe> + <layout>Grid</layout> + <spring>no</spring> + <spacing>0</spacing> + <padding> + <top>0</top> + <right>0</right> + <bottom>0</bottom> + <left>0</left> + </padding> + </mpe> + <control> + <type>listcontrol</type> + <description>listcontrol</description> + <id>1026</id> + <posX>260</posX> + <posY>97</posY> + <width>440</width> + <height>354</height> + <onleft>2</onleft> + <onright>1000</onright> + <onup>1026</onup> + <ondown>1026</ondown> + <playedColor>ffa0d0ff</playedColor> + <font>font13</font> + <textcolor2>ffffffff</textcolor2> + <textureDown>page_down_nofocus.png</textureDown> + <spinPosY>530</spinPosY> + <remoteColor>ffFFA075</remoteColor> + <textureHeight>32</textureHeight> + <spinHeight>27</spinHeight> + <textureUpFocus>page_up_focus.png</textureUpFocus> + <textXOff>5</textXOff> + <textYOff>4</textYOff> + <spinColor>ffffffff</spinColor> + <spinWidth>26</spinWidth> + <shadedColor>20ffffff</shadedColor> + <textYOff2>4</textYOff2> + <IconXOff>8</IconXOff> + <textureNoFocus>list_sub_nofocus.png</textureNoFocus> + <textureDownFocus>page_down_focus.png</textureDownFocus> + <textcolor>ffffffff</textcolor> + <selectedColor>FFF8BC70</selectedColor> + <image>folder_focus.png</image> + <IconYOff>8</IconYOff> + <spinPosX>590</spinPosX> + <textXOff2>0</textXOff2> + <suffix>|</suffix> + <textureUp>page_up_nofocus.png</textureUp> + <downloadColor>ff80ff80</downloadColor> + <textcolor3>ffffffff</textcolor3> + <textureFocus>list_sub_focus.png</textureFocus> + </control> + <control> + <type>textboxscrollup</type> + <description>Biography value</description> + <id>1025</id> + <posX>260</posX> + <posY>414</posY> + <width>440</width> + <height>106</height> + <colordiffuse>ffffffff</colordiffuse> + <onleft>2</onleft> + <onright>1026</onright> + <onup>1026</onup> + <ondown>1026</ondown> + <font>font12</font> + <speed>10</speed> + <textcolor>FFFFFFFF</textcolor> + <label>-</label> + </control> + </control> + <control> + <type>image</type> + <id>1065</id> + <posX>224</posX> + <posY>350</posY> + <width>36</width> + <height>36</height> + <visible>no</visible> + <texture>star.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1064</id> + <posX>227</posX> + <posY>316</posY> + <width>30</width> + <height>30</height> + <visible>no</visible> + <texture>star.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1063</id> + <posX>230</posX> + <posY>288</posY> + <width>24</width> + <height>24</height> + <visible>no</visible> + <texture>star.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1062</id> + <posX>233</posX> + <posY>266</posY> + <width>18</width> + <height>18</height> + <visible>no</visible> + <texture>star.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1061</id> + <posX>236</posX> + <posY>250</posY> + <width>12</width> + <height>12</height> + <visible>no</visible> + <texture>star.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1060</id> + <posX>224</posX> + <posY>350</posY> + <width>36</width> + <height>36</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1059</id> + <posX>227</posX> + <posY>316</posY> + <width>30</width> + <height>30</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1058</id> + <posX>230</posX> + <posY>288</posY> + <width>24</width> + <height>24</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1057</id> + <posX>233</posX> + <posY>266</posY> + <width>18</width> + <height>18</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1056</id> + <posX>236</posX> + <posY>250</posY> + <width>12</width> + <height>12</height> + <visible>no</visible> + <texture>starhalf.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1055</id> + <posX>224</posX> + <posY>350</posY> + <width>36</width> + <height>36</height> + <visible>no</visible> + <texture>greystar.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1054</id> + <posX>227</posX> + <posY>316</posY> + <width>30</width> + <height>30</height> + <visible>no</visible> + <texture>greystar.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1053</id> + <posX>230</posX> + <posY>288</posY> + <width>24</width> + <height>24</height> + <visible>no</visible> + <texture>greystar.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1052</id> + <posX>233</posX> + <posY>266</posY> + <width>18</width> + <height>18</height> + <visible>no</visible> + <texture>greystar.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1051</id> + <posX>236</posX> + <posY>250</posY> + <width>12</width> + <height>12</height> + <visible>no</visible> + <texture>greystar.png</texture> + <centered>yes</centered> + </control> + <control> + <type>image</type> + <id>1021</id> + <posX>65</posX> + <posY>250</posY> + <width>155</width> + <height>220</height> + <texture>-</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>label</type> + <description>year</description> + <id>1022</id> + <posX>78</posX> + <posY>550</posY> + <visible>no</visible> + <label>6</label> + <font>font12</font> + </control> + <control> + <type>label</type> + <description>category</description> + <id>1024</id> + <posX>125</posX> + <posY>550</posY> + <visible>no</visible> + <label>6</label> + <font>font12</font> + </control> + <control> + <type>label</type> + <id>2073</id> + <posX>270</posX> + <posY>530</posY> + <label>#nbobjects</label> + <textcolor>7fffffff</textcolor> + </control> + <control> + <type>image</type> + <id>1020</id> + <posX>80</posX> + <posY>235</posY> + <width>122</width> + <height>160</height> + <texture>-</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + </controls> </window> \ No newline at end of file Modified: trunk/plugins/MyFilms/skin/BlueTwo/MesFilmsDetail.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo/MesFilmsDetail.xml 2007-03-04 16:26:12 UTC (rev 154) +++ trunk/plugins/MyFilms/skin/BlueTwo/MesFilmsDetail.xml 2007-03-04 16:29:34 UTC (rev 155) @@ -1,439 +1,482 @@ <window> - <id>7987</id> - <defaultcontrol>101</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <controls> - <import>common.time.xml</import> - <control> - <type>image</type> - <description>BackGround</description> - <id>1</id> - <posX>0</posX> - <posY>0</posY> - <texture>background.png</texture> - </control> - <control> - <description>logo</description> - <type>image</type> - <id>1</id> - <posX>75</posX> - <posY>70</posY> - <height>40</height> - <colordiffuse>9Fffffff</colordiffuse> - <keepaspectratio>yes</keepaspectratio> - <texture>amclogo.png</texture> - </control> - <control> - <type>image</type> - <id>1</id> - <posX>60</posX> - <posY>20</posY> - <texture>videos_logo.png</texture> - </control> - <control> - <type>image</type> - <id>1</id> - <posX>250</posX> - <posY>80</posY> - <width>480</width> - <height>502</height> - <texture>menu_bg.png</texture> - <colordiffuse>7fffffff</colordiffuse> - </control> - <control> - <type>image</type> - <id>1</id> - <posX>273</posX> - <posY>100</posY> - <width>330</width> - <height>50</height> - <texture>album_background_nofocus.png</texture> - <colordiffuse>4fffffff</colordiffuse> - </control> - <control> - <type>group</type> - <description>group element</description> - <id>27</id> - <posX>56</posX> - <posY>97</posY> - <width>198</width> - <height>140</height> - <layout>StackLayout</layout> - <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> - <animation effect="slide" time="400" end="0,-300" >WindowClose</animation> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="fade" time="250">WindowOpen</animation> - <control> - <type>button</type> - <description>Play</description> - <id>101</id> - <onleft>103</onleft> - <onright>102</onright> - <label>208</label> - </control> - <control> - <type>button</type> - <description>Back</description> - <id>102</id> - <onleft>101</onleft> - <onright>107</onright> - <label>712</label> - </control> - <control> - <type>button</type> - <description>Update</description> - <id>107</id> - <onleft>102</onleft> - <onright>103</onright> - <ondown>103</ondown> - <label>79861</label> - </control> - <control> - <type>group</type> - <description>group element</description> - <id>1234</id> - <layout>GridLayout(4,0,0,0)</layout> - <control> - <type>button</type> - <description>first</description> - <id>106</id> - <onleft>107</onleft> - <onright>104</onright> - <ondown>319</ondown> - <onup>107</onup> - <label>-</label> - <height>34</height> - <width>30</width> - <textureFocus>Films_first_focus.png</textureFocus> - <textureNoFocus>Films_first_nofocus.png</textureNoFocus> - </control> - <control> - <type>button</type> - <description>prior</description> - <id>104</id> - <onleft>106</onleft> - <onright>103</onright> - <ondown>319</ondown> - <onup>107</onup> - <label>-</label> - <height>34</height> - <width>30</width> - <textureFocus>Films_prior_focus.png</textureFocus> - <textureNoFocus>Films_prior_nofocus.png</textureNoFocus> - </control> - <control> - <type>button</type> - <description>next</description> - <id>103</id> - <onleft>104</onleft> - <onright>105</onright> - <ondown>319</ondown> - <onup>107</onup> - <label>-</label> - <height>34</height> - <width>30</width> - <textureFocus>Films_next_focus.png</textureFocus> - <textureNoFocus>Films_next_nofocus.png</textureNoFocus> - </control> - <control> - <type>button</type> - <description>last</description> - <id>105</id> - <onleft>103</onleft> - <onright>106</onright> - <ondown>319</ondown> - <onup>107</onup> - <label>-</label> - <height>34</height> - <width>30</width> - <textureFocus>Films_last_focus.png</textureFocus> - <textureNoFocus>Films_last_nofocus.png</textureNoFocus> - </control> - </control> - </control> - <control> - <type>fadelabel</type> - <id>2071</id> - <posX>78</posX> - <posY>528</posY> - <label>#item3</label> - <font>font8</font> - <width>150</width> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2069</id> - <posX>78</posX> - <posY>513</posY> - <label>#format</label> - <font>font8</font> - <width>150</width> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2070</id> - <posX>690</posX> - <posY>126</posY> - <label>#support</label> - <font>font10</font> - <align>right</align> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>label</type> - <id>2068</id> - <posX>690</posX> - <posY>150</posY> - <label>#duree</label> - <font>font10</font> - <align>right</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <type>image</type> - <id>2072</id> - <posX>660</posX> - <posY>170</posY> - <width>35</width> - <height>35</height> - <align>right</align> - <texture>Films_DD.png</texture> - <colordiffuse>7fffffff</colordiffuse> - </control> - <control> - <type>label</type> - <id>2010</id> - <posX>280</posX> - <posY>156</posY> - <label>#label1</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2011</id> - <posX>403</posX> - <posY>156</posY> - <label>#item1</label> - <width>180</width> - <textcolor>ffffffff</textcolor> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2065</id> - <posX>403</posX> - <posY>281</posY> - <label>#item2</label> - <width>200</width> - <textcolor>ffffffff</textcolor> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>label</type> - <id>2035</id> - <posX>280</posX> - <posY>281</posY> - <label>#label2</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <description>Actors</description> - <id>2065</id> - <posX>280</posX> - <posY>307</posY> - <label>344</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>label</type> - <description>year</description> - <id>2031</id> - <posX>280</posX> - <posY>181</posY> - <label>201</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>label</type> - <id>2061</id> - <posX>403</posX> - <posY>181</posY> - <label>#year</label> - <textcolor>ffffffff</textcolor> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>label</type> - <description>Rating</description> - <id>2030</id> - <posX>610</posX> - <posY>100</posY> - <label>204</label> - <colordiffuse>ffe0e0e0</colordiffuse> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>label</type> - <id>2060</id> - <posX>690</posX> - <posY>100</posY> - <label>#rating</label> - <align>right</align> - <colordiffuse>ffffffff</colordiffuse> - <textcolor>ffff8000</textcolor> - <disabledcolor>ffff8000</disabledcolor> - </control> - <control> - <type>label</type> - <description>category</description> - <id>2032</id> - <posX>280</posX> - <posY>206</posY> - <label>174</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2062</id> - <posX>403</posX> - <posY>206</posY> - <label>#genre</label> - <width>270</width> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>label</type> - <description>producer</description> - <id>2034</id> - <posX>280</posX> - <posY>256</posY> - <label>199</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2064</id> - <posX>403</posX> - <posY>256</posY> - <label>#director</label> - <width>270</width> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>label</type> - <description>country</description> - <id>2033</id> - <posX>280</posX> - <posY>231</posY> - <label>200026</label> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2063</id> - <posX>403</posX> - <posY>231</posY> - <label>#pays</label> - <width>270</width> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>textboxscrollup</type> - <description>description value</description> - <id>2050</id> - <posX>280</posX> - <posY>382</posY> - <width>408</width> - <height>162</height> - <colordiffuse>ffffffff</colordiffuse> - <textcolor>FFFFFFFF</textcolor> - <label>#description</label> - <font>font12</font> - </control> - <control> - <type>textboxscrollup</type> - <description>Biography value</description> - <id>2040</id> - <posX>403</posX> - <posY>308</posY> - <width>280</width> - <height>68</height> - <colordiffuse>ffffffff</colordiffuse> - <textcolor>FFFFFFFF</textcolor> - <label>#acteurs</label> - <font>font12</font> - </control> - <control> - <type>fadelabel</type> - <id>2026</id> - <posX>310</posX> - <posY>127</posY> - <label>#OTitle</label> - <width>250</width> - <font>font12</font> - <colordiffuse>ffe0e0e0</colordiffuse> - <textcolor>ffc0c0c0</textcolor> - <disabledcolor>ffc0c0c0</disabledcolor> - </control> - <control> - <type>fadelabel</type> - <id>2025</id> - <posX>292</posX> - <posY>105</posY> - <label>#Title</label> - <width>305</width> - <font>font14</font> - <colordiffuse>ffffffff</colordiffuse> - <textcolor>ffffffff</textcolor> - <disabledcolor>ffffffff</disabledcolor> - </control> - <control> - <type>image</type> - <id>2024</id> - <posX>62</posX> - <posY>245</posY> - <width>175</width> - <height>265</height> - <align>center</align> - <keepaspectratio>yes</keepaspectratio> - <texture>-</texture> - </control> - <control> - <type>image</type> - <id>2023</id> - <posX>95</posX> - <posY>232</posY> - <width>120</width> - <height>165</height> - <align>center</align> - <keepaspectratio>yes</keepaspectratio> - <visible>no</visible> - <texture>-</texture> - </control> - <control> - <type>fadelabel</type> - <id>12</id> - <posX>280</posX> - <posY>60</posY> - <label>#select</label> - <width>280</width> - <font>font14</font> - <align>left</align> - <textcolor>ffa9d0f7</textcolor> - </control> - </controls> + <id>7987</id> + <defaultcontrol>101</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + <control> + <type>image</type> + <description>BackGround</description> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <texture>background.png</texture> + </control> + <control> + <type>image</type> + <id>1</id> + <posX>250</posX> + <posY>80</posY> + <width>480</width> + <height>502</height> + <colordiffuse>7fffffff</colordiffuse> + <texture>menu_bg.png</texture> + </control> + <control> + <type>image</type> + <id>1</id> + <posX>273</posX> + <posY>100</posY> + <width>330</width> + <height>50</height> + <colordiffuse>4fffffff</colordiffuse> + <texture>album_background_nofocus.png</texture> + </control> + <control> + <type>group</type> + <description>group element</description> + <id>27</id> + <posX>56</posX> + <posY>97</posY> + <width>198</width> + <height>136</height> + <layout>StackLayout</layout> + <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="400" end="0,-300" >WindowClose</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="250">WindowOpen</animation> + <mpe> + <layout>Grid</layout> + <spring>no</spring> + <spacing>0</spacing> + <padding> + <top>0</top> + <right>0</right> + <bottom>0</bottom> + <left>0</left> + </padding> + </mpe> + <control> + <type>button</type> + <description>Play</description> + <id>101</id> + <posX>56</posX> + <posY>97</posY> + <onleft>103</onleft> + <onright>102</onright> + <label>208</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>button</type> + <description>Back</description> + <id>102</id> + <posX>56</posX> + <posY>129</posY> + <onleft>101</onleft> + <onright>107</onright> + <label>712</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>button</type> + <description>Update</description> + <id>107</id> + <posX>56</posX> + <posY>161</posY> + <onleft>102</onleft> + <onright>103</onright> + <ondown>103</ondown> + <label>79861</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>group</type> + <description>group element</description> + <id>1234</id> + <posX>56</posX> + <posY>193</posY> + <width>198</width> + <height>34</height> + <layout>GridLayout(4,0,0,0)</layout> + <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="400" end="0,-300" >WindowClose</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="250">WindowOpen</animation> + <mpe> + <layout>Grid</layout> + <spring>no</spring> + <spacing>0</spacing> + <padding> + <top>0</top> + <right>0</right> + <bottom>0</bottom> + <left>0</left> + </padding> + </mpe> + <control> + <type>button</type> + <description>first</description> + <id>106</id> + <posX>56</posX> + <posY>193</posY> + <onleft>107</onleft> + <onright>104</onright> + <onup>107</onup> + <ondown>319</ondown> + <label>-</label> + <textcolor>ff000000</textcolor> + <width>46</width> + <height>34</height> + <textureFocus>Films_first_focus.png</textureFocus> + <textureNoFocus>Films_first_nofocus.png</textureNoFocus> + </control> + <control> + <type>button</type> + <description>prior</description> + <id>104</id> + <posX>104</posX> + <posY>193</posY> + <onleft>106</onleft> + <onright>103</onright> + <onup>107</onup> + <ondown>319</ondown> + <label>-</label> + <textcolor>ff000000</textcolor> + <width>46</width> + <height>34</height> + <textureFocus>Films_prior_focus.PNG</textureFocus> + <textureNoFocus>Films_prior_nofocus.PNG</textureNoFocus> + </control> + <control> + <type>button</type> + <description>next</description> + <id>103</id> + <posX>152</posX> + <posY>193</posY> + <onleft>104</onleft> + <onright>105</onright> + <onup>107</onup> + <ondown>319</ondown> + <label>-</label> + <textcolor>ff000000</textcolor> + <width>46</width> + <height>34</height> + <textureFocus>Films_next_focus.PNG</textureFocus> + <textureNoFocus>Films_next_nofocus.PNG</textureNoFocus> + </control> + <control> + <type>button</type> + <description>last</description> + <id>105</id> + <posX>200</posX> + <posY>193</posY> + <onleft>103</onleft> + <onright>106</onright> + <onup>107</onup> + <ondown>319</ondown> + <label>-</label> + <textcolor>ff000000</textcolor> + <width>46</width> + <height>34</height> + <textureFocus>Films_last_focus.png</textureFocus> + <textureNoFocus>Films_last_nofocus.png</textureNoFocus> + </control> + </control> + </control> + <control> + <type>fadelabel</type> + <id>2071</id> + <posX>56</posX> + <posY>536</posY> + <label>#item3</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2069</id> + <posX>56</posX> + <posY>513</posY> + <label>#format</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2070</id> + <posX>690</posX> + <posY>126</posY> + <label>#support</label> + <align>right</align> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>label</type> + <id>2068</id> + <posX>690</posX> + <posY>150</posY> + <label>#duree</label> + <align>right</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>image</type> + <id>2072</id> + <posX>660</posX> + <posY>172</posY> + <width>35</width> + <height>35</height> + <colordiffuse>7fffffff</colordiffuse> + <align>right</align> + <texture>Films_DD.png</texture> + </control> + <control> + <type>label</type> + <id>2010</id> + <posX>280</posX> + <posY>156</posY> + <label>#label1</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2011</id> + <posX>400</posX> + <posY>156</posY> + <label>#item1</label> + <textcolor>ffffffff</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>24</id> + <posX>400</posX> + <posY>281</posY> + <label>#item2</label> + <textcolor>ffffffff</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>label</type> + <id>2035</id> + <posX>280</posX> + <posY>281</posY> + <label>#label2</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <description>Actors</description> + <id>2065</id> + <posX>280</posX> + <posY>307</posY> + <label>344</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>label</type> + <description>year</description> + <id>2031</id> + <posX>280</posX> + <posY>181</posY> + <label>201</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>label</type> + <id>2061</id> + <posX>400</posX> + <posY>181</posY> + <label>#year</label> + <textcolor>ffffffff</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>label</type> + <description>Rating</description> + <id>2030</id> + <posX>610</posX> + <posY>100</posY> + <colordiffuse>ffe0e0e0</colordiffuse> + <label>204</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>label</type> + <id>2060</id> + <posX>690</posX> + <posY>100</posY> + <label>#rating</label> + <align>right</align> + <textcolor>ffff8000</textcolor> + <disabledcolor>ffff8000</disabledcolor> + </control> + <control> + <type>label</type> + <description>category</description> + <id>2032</id> + <posX>280</posX> + <posY>206</posY> + <label>174</label> + <width>300</width> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2062</id> + <posX>400</posX> + <posY>206</posY> + <width>300</width> + <label>#genre</label> + <textcolor>ff000000</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>label</type> + <description>producer</description> + <id>2034</id> + <posX>280</posX> + <posY>256</posY> + <width>300</width> + <label>199</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2064</id> + <posX>400</posX> + <posY>256</posY> + <label>#director</label> + <width>300</width> + <textcolor>ff000000</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>label</type> + <description>country</description> + <id>2033</id> + <posX>280</posX> + <posY>231</posY> + <label>200026</label> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2063</id> + <posX>400</posX> + <posY>231</posY> + <label>#pays</label> + <textcolor>ff000000</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>textboxscrollup</type> + <description>description value</description> + <id>2050</id> + <posX>280</posX> + <posY>382</posY> + <width>416</width> + <height>162</height> + <colordiffuse>ffffffff</colordiffuse> + <textcolor>FFFFFFFF</textcolor> + <label>#description</label> + <font>font12</font> + </control> + <control> + <type>textboxscrollup</type> + <description>Biography value</description> + <id>2040</id> + <posX>400</posX> + <posY>308</posY> + <width>296</width> + <height>68</height> + <colordiffuse>ffffffff</colordiffuse> + <textcolor>FFFFFFFF</textcolor> + <label>#acteurs</label> + <font>font12</font> + </control> + <control> + <type>fadelabel</type> + <id>2026</id> + <posX>312</posX> + <posY>127</posY> + <width>270</width> + <colordiffuse>ffe0e0e0</colordiffuse> + <label>#OTitle</label> + <font>font12</font> + <textcolor>ffc0c0c0</textcolor> + <disabledcolor>ffc0c0c0</disabledcolor> + </control> + <control> + <type>fadelabel</type> + <id>2025</id> + <posX>292</posX> + <posY>105</posY> + <width>300</width> + <label>#Title</label> + <font>font14</font> + <textcolor>ffffffff</textcolor> + <disabledcolor>ffffffff</disabledcolor> + </control> + <control> + <type>image</type> + <id>2024</id> + <posX>56</posX> + <posY>245</posY> + <width>192</width> + <height>265</height> + <align>center</align> + <texture>-</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>image</type> + <id>2023</id> + <posX>95</posX> + <posY>232</posY> + <width>120</width> + <height>165</height> + <visible>no</visible> + <align>center</align> + <texture>-</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>fadelabel</type> + <id>12</id> + <posX>344</posX> + <posY>68</posY> + <label>#select</label> + <font>font14</font> + <textcolor>ffa9d0f7</textcolor> + <disabledcolor>ff808080</disabledcolor> + </control> + <control> + <type>image</type> + <id>26</id> + <posX>56</posX> + <posY>70</posY> + <width>67</width> + <height>40</height> + <colordiffuse>9fffffff</colordiffuse> + <texture>amclogo.png</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>image</type> + <id>25</id> + <posX>56</posX> + <posY>16</posY> + <texture>videos_logo.png</texture> + </control> + </controls> </window> \ No newline at end of file Modified: trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml 2007-03-04 16:26:12 UTC (rev 154) +++ trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml 2007-03-04 16:29:34 UTC (rev 155) @@ -51,6 +51,10 @@ <posY>97</posY> <width>198</width> <layout>StackLayout</layout> + <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="400" end="0,-300">WindowClose</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation... [truncated message content] |
From: <ze...@us...> - 2007-03-04 16:26:21
|
Revision: 154 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=154&view=rev Author: zebons Date: 2007-03-04 08:26:12 -0800 (Sun, 04 Mar 2007) Log Message: ----------- Version 4.0 Many configuration defined with setup. Configuration by default possible. Default view loaded at the plugin start. Hierarchical structure defined in the title of the movies with a separator indicated in the setup. Group by actors now ignore the role name. Corrected bug when launching a movie without picture. More controls on the xml database in setup. Modified Paths: -------------- trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs trunk/plugins/MyFilms/AntMovieCatalog.xsd trunk/plugins/MyFilms/MesFilms.cs trunk/plugins/MyFilms/MesFilms.csproj trunk/plugins/MyFilms/MesFilms.suo trunk/plugins/MyFilms/MesFilmsDetail.cs trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs trunk/plugins/MyFilms/MesFilmsSetup.cs trunk/plugins/MyFilms/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs =================================================================== --- trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs 2007-03-04 14:21:06 UTC (rev 153) +++ trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs 2007-03-04 16:26:12 UTC (rev 154) @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // <auto-generated> -// Ce code a été généré par un outil. -// Version du runtime :2.0.50727.42 +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 // -// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si -// le code est régénéré. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ @@ -1135,7 +1135,7 @@ [System.Diagnostics.DebuggerNonUserCodeAttribute()] public MovieRow AddMovieRow( - string Number, + int Number, string Checked, string MediaLabel, string MediaType, @@ -1266,7 +1266,7 @@ [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { - this.columnNumber = new System.Data.DataColumn("Number", typeof(string), null, System.Data.MappingType.Attribute); + this.columnNumber = new System.Data.DataColumn("Number", typeof(int), null, System.Data.MappingType.Attribute); base.Columns.Add(this.columnNumber); this.columnChecked = new System.Data.DataColumn("Checked", typeof(string), null, System.Data.MappingType.Attribute); base.Columns.Add(this.columnChecked); @@ -1475,8 +1475,7 @@ return ((int)(this[this.tableCatalog.AntMovieCatalog_IdColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'AntMovieCatalog_Id\' dans la table \'Catalog\' est DBNull" + - ".", e); + throw new System.Data.StrongTypingException("The value for column \'AntMovieCatalog_Id\' in table \'Catalog\' is DBNull.", e); } } set { @@ -1491,7 +1490,7 @@ return ((string)(this[this.tableCatalog.PropertiesColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Properties\' dans la table \'Catalog\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Properties\' in table \'Catalog\' is DBNull.", e); } } set { @@ -1563,7 +1562,7 @@ return ((int)(this[this.tableContents.Catalog_IdColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Catalog_Id\' dans la table \'Contents\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Catalog_Id\' in table \'Contents\' is DBNull.", e); } } set { @@ -1609,13 +1608,13 @@ } [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string Number { + public int Number { get { try { - return ((string)(this[this.tableMovie.NumberColumn])); + return ((int)(this[this.tableMovie.NumberColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Number\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Number\' in table \'Movie\' is DBNull.", e); } } set { @@ -1630,7 +1629,7 @@ return ((string)(this[this.tableMovie.CheckedColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Checked\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Checked\' in table \'Movie\' is DBNull.", e); } } set { @@ -1645,7 +1644,7 @@ return ((string)(this[this.tableMovie.MediaLabelColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'MediaLabel\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'MediaLabel\' in table \'Movie\' is DBNull.", e); } } set { @@ -1660,7 +1659,7 @@ return ((string)(this[this.tableMovie.MediaTypeColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'MediaType\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'MediaType\' in table \'Movie\' is DBNull.", e); } } set { @@ -1675,7 +1674,7 @@ return ((string)(this[this.tableMovie.SourceColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Source\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Source\' in table \'Movie\' is DBNull.", e); } } set { @@ -1690,7 +1689,7 @@ return ((string)(this[this.tableMovie.DateColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Date\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Date\' in table \'Movie\' is DBNull.", e); } } set { @@ -1705,7 +1704,7 @@ return ((string)(this[this.tableMovie.BorrowerColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Borrower\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Borrower\' in table \'Movie\' is DBNull.", e); } } set { @@ -1720,7 +1719,7 @@ return ((decimal)(this[this.tableMovie.RatingColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Rating\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Rating\' in table \'Movie\' is DBNull.", e); } } set { @@ -1735,7 +1734,7 @@ return ((string)(this[this.tableMovie.OriginalTitleColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'OriginalTitle\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'OriginalTitle\' in table \'Movie\' is DBNull.", e); } } set { @@ -1750,7 +1749,7 @@ return ((string)(this[this.tableMovie.TranslatedTitleColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'TranslatedTitle\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'TranslatedTitle\' in table \'Movie\' is DBNull.", e); } } set { @@ -1765,7 +1764,7 @@ return ((string)(this[this.tableMovie.FormattedTitleColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'FormattedTitle\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'FormattedTitle\' in table \'Movie\' is DBNull.", e); } } set { @@ -1780,7 +1779,7 @@ return ((string)(this[this.tableMovie.DirectorColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Director\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Director\' in table \'Movie\' is DBNull.", e); } } set { @@ -1795,7 +1794,7 @@ return ((string)(this[this.tableMovie.ProducerColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Producer\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Producer\' in table \'Movie\' is DBNull.", e); } } set { @@ -1810,7 +1809,7 @@ return ((string)(this[this.tableMovie.CountryColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Country\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Country\' in table \'Movie\' is DBNull.", e); } } set { @@ -1825,7 +1824,7 @@ return ((string)(this[this.tableMovie.CategoryColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Category\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Category\' in table \'Movie\' is DBNull.", e); } } set { @@ -1840,7 +1839,7 @@ return ((string)(this[this.tableMovie.YearColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Year\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Year\' in table \'Movie\' is DBNull.", e); } } set { @@ -1855,7 +1854,7 @@ return ((string)(this[this.tableMovie.LengthColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Length\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Length\' in table \'Movie\' is DBNull.", e); } } set { @@ -1870,7 +1869,7 @@ return ((string)(this[this.tableMovie.ActorsColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Actors\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Actors\' in table \'Movie\' is DBNull.", e); } } set { @@ -1885,7 +1884,7 @@ return ((string)(this[this.tableMovie.URLColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'URL\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'URL\' in table \'Movie\' is DBNull.", e); } } set { @@ -1900,7 +1899,7 @@ return ((string)(this[this.tableMovie.DescriptionColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Description\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Description\' in table \'Movie\' is DBNull.", e); } } set { @@ -1915,7 +1914,7 @@ return ((string)(this[this.tableMovie.CommentsColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Comments\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Comments\' in table \'Movie\' is DBNull.", e); } } set { @@ -1930,7 +1929,7 @@ return ((string)(this[this.tableMovie.VideoFormatColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'VideoFormat\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'VideoFormat\' in table \'Movie\' is DBNull.", e); } } set { @@ -1945,7 +1944,7 @@ return ((string)(this[this.tableMovie.VideoBitrateColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'VideoBitrate\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'VideoBitrate\' in table \'Movie\' is DBNull.", e); } } set { @@ -1960,7 +1959,7 @@ return ((string)(this[this.tableMovie.AudioFormatColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'AudioFormat\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'AudioFormat\' in table \'Movie\' is DBNull.", e); } } set { @@ -1975,7 +1974,7 @@ return ((string)(this[this.tableMovie.AudioBitrateColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'AudioBitrate\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'AudioBitrate\' in table \'Movie\' is DBNull.", e); } } set { @@ -1990,7 +1989,7 @@ return ((string)(this[this.tableMovie.ResolutionColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Resolution\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Resolution\' in table \'Movie\' is DBNull.", e); } } set { @@ -2005,7 +2004,7 @@ return ((string)(this[this.tableMovie.FramerateColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Framerate\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Framerate\' in table \'Movie\' is DBNull.", e); } } set { @@ -2020,7 +2019,7 @@ return ((string)(this[this.tableMovie.LanguagesColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Languages\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Languages\' in table \'Movie\' is DBNull.", e); } } set { @@ -2035,7 +2034,7 @@ return ((string)(this[this.tableMovie.SubtitlesColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Subtitles\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Subtitles\' in table \'Movie\' is DBNull.", e); } } set { @@ -2050,7 +2049,7 @@ return ((System.DateTime)(this[this.tableMovie.DateAddedColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'DateAdded\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'DateAdded\' in table \'Movie\' is DBNull.", e); } } set { @@ -2065,7 +2064,7 @@ return ((string)(this[this.tableMovie.SizeColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Size\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Size\' in table \'Movie\' is DBNull.", e); } } set { @@ -2080,7 +2079,7 @@ return ((string)(this[this.tableMovie.DisksColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Disks\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Disks\' in table \'Movie\' is DBNull.", e); } } set { @@ -2095,7 +2094,7 @@ return ((string)(this[this.tableMovie.PictureColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Picture\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Picture\' in table \'Movie\' is DBNull.", e); } } set { @@ -2110,7 +2109,7 @@ return ((int)(this[this.tableMovie.Contents_IdColumn])); } catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("La valeur pour la colonne \'Contents_Id\' dans la table \'Movie\' est DBNull.", e); + throw new System.Data.StrongTypingException("The value for column \'Contents_Id\' in table \'Movie\' is DBNull.", e); } } set { Modified: trunk/plugins/MyFilms/AntMovieCatalog.xsd =================================================================== --- trunk/plugins/MyFilms/AntMovieCatalog.xsd 2007-03-04 14:21:06 UTC (rev 153) +++ trunk/plugins/MyFilms/AntMovieCatalog.xsd 2007-03-04 16:26:12 UTC (rev 154) @@ -18,58 +18,58 @@ <xs:element name="Catalog" msprop:Generator_UserTableName="Catalog" msprop:Generator_RowDeletedName="CatalogRowDeleted" msprop:Generator_RowChangedName="CatalogRowChanged" msprop:Generator_RowClassName="CatalogRow" msprop:Generator_RowChangingName="CatalogRowChanging" msprop:Generator_RowEvArgName="CatalogRowChangeEvent" msprop:Generator_RowEvHandlerName="CatalogRowChangeEventHandler" msprop:Generator_TableClassName="CatalogDataTable" msprop:Generator_TableVarName="tableCatalog" msprop:Generator_RowDeletingName="CatalogRowDeleting" msprop:Generator_TablePropName="Catalog"> <xs:complexType> <xs:sequence> - <xs:element name="Properties" msprop:Generator_UserColumnName="Properties" msprop:Generator_ColumnPropNameInRow="Properties" msprop:Generator_ColumnVarNameInTable="columnProperties" msprop:Generator_ColumnPropNameInTable="PropertiesColumn" type="xs:string" minOccurs="0" msdata:Ordinal="1" /> + <xs:element name="Properties" msprop:Generator_UserColumnName="Properties" msprop:Generator_ColumnVarNameInTable="columnProperties" msprop:Generator_ColumnPropNameInRow="Properties" msprop:Generator_ColumnPropNameInTable="PropertiesColumn" type="xs:string" minOccurs="0" msdata:Ordinal="1" /> <xs:element name="Contents" msprop:Generator_UserTableName="Contents" msprop:Generator_RowDeletedName="ContentsRowDeleted" msprop:Generator_RowChangedName="ContentsRowChanged" msprop:Generator_RowClassName="ContentsRow" msprop:Generator_RowChangingName="ContentsRowChanging" msprop:Generator_RowEvArgName="ContentsRowChangeEvent" msprop:Generator_RowEvHandlerName="ContentsRowChangeEventHandler" msprop:Generator_TableClassName="ContentsDataTable" msprop:Generator_TableVarName="tableContents" msprop:Generator_RowDeletingName="ContentsRowDeleting" msprop:Generator_TablePropName="Contents" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Movie" msprop:Generator_UserTableName="Movie" msprop:Generator_RowDeletedName="MovieRowDeleted" msprop:Generator_RowChangedName="MovieRowChanged" msprop:Generator_RowClassName="MovieRow" msprop:Generator_RowChangingName="MovieRowChanging" msprop:Generator_RowEvArgName="MovieRowChangeEvent" msprop:Generator_RowEvHandlerName="MovieRowChangeEventHandler" msprop:Generator_TableClassName="MovieDataTable" msprop:Generator_TableVarName="tableMovie" msprop:Generator_RowDeletingName="MovieRowDeleting" msprop:Generator_TablePropName="Movie" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> - <xs:element name="DateAdded" msdata:ReadOnly="true" msdata:Expression="Convert(Date,'System.DateTime')" msprop:Generator_UserColumnName="DateAdded" msprop:Generator_ColumnPropNameInRow="DateAdded" msprop:Generator_ColumnVarNameInTable="columnDateAdded" msprop:Generator_ColumnPropNameInTable="DateAddedColumn" type="xs:dateTime" minOccurs="0" msdata:Ordinal="29" /> + <xs:element name="DateAdded" msdata:ReadOnly="true" msdata:Expression="Convert(Date,'System.DateTime')" msprop:Generator_UserColumnName="DateAdded" msprop:Generator_ColumnVarNameInTable="columnDateAdded" msprop:Generator_ColumnPropNameInRow="DateAdded" msprop:Generator_ColumnPropNameInTable="DateAddedColumn" type="xs:dateTime" minOccurs="0" msdata:Ordinal="29" /> </xs:sequence> - <xs:attribute name="Number" msprop:Generator_UserColumnName="Number" msprop:Generator_ColumnPropNameInRow="Number" msprop:Generator_ColumnVarNameInTable="columnNumber" msprop:Generator_ColumnPropNameInTable="NumberColumn" type="xs:string" /> - <xs:attribute name="Checked" msprop:Generator_UserColumnName="Checked" msprop:Generator_ColumnPropNameInRow="Checked" msprop:Generator_ColumnVarNameInTable="columnChecked" msprop:Generator_ColumnPropNameInTable="CheckedColumn" type="xs:string" /> - <xs:attribute name="MediaLabel" msprop:Generator_UserColumnName="MediaLabel" msprop:Generator_ColumnVarNameInTable="columnMediaLabel" msprop:Generator_ColumnPropNameInRow="MediaLabel" msprop:Generator_ColumnPropNameInTable="MediaLabelColumn" type="xs:string" /> - <xs:attribute name="MediaType" msprop:Generator_UserColumnName="MediaType" msprop:Generator_ColumnPropNameInRow="MediaType" msprop:Generator_ColumnVarNameInTable="columnMediaType" msprop:Generator_ColumnPropNameInTable="MediaTypeColumn" type="xs:string" /> - <xs:attribute name="Source" msprop:Generator_UserColumnName="Source" msprop:Generator_ColumnVarNameInTable="columnSource" msprop:Generator_ColumnPropNameInRow="Source" msprop:Generator_ColumnPropNameInTable="SourceColumn" type="xs:string" /> - <xs:attribute name="Date" msprop:Generator_UserColumnName="Date" msprop:Generator_ColumnPropNameInRow="Date" msprop:Generator_ColumnVarNameInTable="columnDate" msprop:Generator_ColumnPropNameInTable="DateColumn" type="xs:string" /> - <xs:attribute name="Borrower" msprop:Generator_UserColumnName="Borrower" msprop:Generator_ColumnPropNameInRow="Borrower" msprop:Generator_ColumnVarNameInTable="columnBorrower" msprop:Generator_ColumnPropNameInTable="BorrowerColumn" type="xs:string" /> - <xs:attribute name="Rating" msprop:Generator_UserColumnName="Rating" msprop:Generator_ColumnPropNameInRow="Rating" msprop:Generator_ColumnVarNameInTable="columnRating" msprop:Generator_ColumnPropNameInTable="RatingColumn" type="xs:decimal" /> - <xs:attribute name="OriginalTitle" msprop:Generator_UserColumnName="OriginalTitle" msprop:Generator_ColumnPropNameInRow="OriginalTitle" msprop:Generator_ColumnVarNameInTable="columnOriginalTitle" msprop:Generator_ColumnPropNameInTable="OriginalTitleColumn" type="xs:string" /> - <xs:attribute name="TranslatedTitle" msprop:Generator_UserColumnName="TranslatedTitle" msprop:Generator_ColumnPropNameInRow="TranslatedTitle" msprop:Generator_ColumnVarNameInTable="columnTranslatedTitle" msprop:Generator_ColumnPropNameInTable="TranslatedTitleColumn" type="xs:string" /> - <xs:attribute name="FormattedTitle" msprop:Generator_UserColumnName="FormattedTitle" msprop:Generator_ColumnPropNameInRow="FormattedTitle" msprop:Generator_ColumnVarNameInTable="columnFormattedTitle" msprop:Generator_ColumnPropNameInTable="FormattedTitleColumn" type="xs:string" /> - <xs:attribute name="Director" msprop:Generator_UserColumnName="Director" msprop:Generator_ColumnPropNameInRow="Director" msprop:Generator_ColumnVarNameInTable="columnDirector" msprop:Generator_ColumnPropNameInTable="DirectorColumn" type="xs:string" /> - <xs:attribute name="Producer" msprop:Generator_UserColumnName="Producer" msprop:Generator_ColumnPropNameInRow="Producer" msprop:Generator_ColumnVarNameInTable="columnProducer" msprop:Generator_ColumnPropNameInTable="ProducerColumn" type="xs:string" /> - <xs:attribute name="Country" msprop:Generator_UserColumnName="Country" msprop:Generator_ColumnPropNameInRow="Country" msprop:Generator_ColumnVarNameInTable="columnCountry" msprop:Generator_ColumnPropNameInTable="CountryColumn" type="xs:string" /> - <xs:attribute name="Category" msprop:Generator_UserColumnName="Category" msprop:Generator_ColumnPropNameInRow="Category" msprop:Generator_ColumnVarNameInTable="columnCategory" msprop:Generator_ColumnPropNameInTable="CategoryColumn" type="xs:string" /> - <xs:attribute name="Year" msprop:Generator_UserColumnName="Year" msprop:Generator_ColumnPropNameInRow="Year" msprop:Generator_ColumnVarNameInTable="columnYear" msprop:Generator_ColumnPropNameInTable="YearColumn" type="xs:string" /> - <xs:attribute name="Length" msprop:Generator_UserColumnName="Length" msprop:Generator_ColumnPropNameInRow="Length" msprop:Generator_ColumnVarNameInTable="columnLength" msprop:Generator_ColumnPropNameInTable="LengthColumn" type="xs:string" /> - <xs:attribute name="Actors" msprop:Generator_UserColumnName="Actors" msprop:Generator_ColumnPropNameInRow="Actors" msprop:Generator_ColumnVarNameInTable="columnActors" msprop:Generator_ColumnPropNameInTable="ActorsColumn" type="xs:string" /> - <xs:attribute name="URL" msprop:Generator_UserColumnName="URL" msprop:Generator_ColumnVarNameInTable="columnURL" msprop:Generator_ColumnPropNameInRow="URL" msprop:Generator_ColumnPropNameInTable="URLColumn" type="xs:string" /> - <xs:attribute name="Description" msprop:Generator_UserColumnName="Description" msprop:Generator_ColumnPropNameInRow="Description" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" type="xs:string" /> - <xs:attribute name="Comments" msprop:Generator_UserColumnName="Comments" msprop:Generator_ColumnPropNameInRow="Comments" msprop:Generator_ColumnVarNameInTable="columnComments" msprop:Generator_ColumnPropNameInTable="CommentsColumn" type="xs:string" /> - <xs:attribute name="VideoFormat" msprop:Generator_UserColumnName="VideoFormat" msprop:Generator_ColumnPropNameInRow="VideoFormat" msprop:Generator_ColumnVarNameInTable="columnVideoFormat" msprop:Generator_ColumnPropNameInTable="VideoFormatColumn" type="xs:string" /> - <xs:attribute name="VideoBitrate" msprop:Generator_UserColumnName="VideoBitrate" msprop:Generator_ColumnPropNameInRow="VideoBitrate" msprop:Generator_ColumnVarNameInTable="columnVideoBitrate" msprop:Generator_ColumnPropNameInTable="VideoBitrateColumn" type="xs:string" /> - <xs:attribute name="AudioFormat" msprop:Generator_UserColumnName="AudioFormat" msprop:Generator_ColumnPropNameInRow="AudioFormat" msprop:Generator_ColumnVarNameInTable="columnAudioFormat" msprop:Generator_ColumnPropNameInTable="AudioFormatColumn" type="xs:string" /> - <xs:attribute name="AudioBitrate" msprop:Generator_UserColumnName="AudioBitrate" msprop:Generator_ColumnPropNameInRow="AudioBitrate" msprop:Generator_ColumnVarNameInTable="columnAudioBitrate" msprop:Generator_ColumnPropNameInTable="AudioBitrateColumn" type="xs:string" /> - <xs:attribute name="Resolution" msprop:Generator_UserColumnName="Resolution" msprop:Generator_ColumnPropNameInRow="Resolution" msprop:Generator_ColumnVarNameInTable="columnResolution" msprop:Generator_ColumnPropNameInTable="ResolutionColumn" type="xs:string" /> - <xs:attribute name="Framerate" msprop:Generator_UserColumnName="Framerate" msprop:Generator_ColumnPropNameInRow="Framerate" msprop:Generator_ColumnVarNameInTable="columnFramerate" msprop:Generator_ColumnPropNameInTable="FramerateColumn" type="xs:string" /> - <xs:attribute name="Languages" msprop:Generator_UserColumnName="Languages" msprop:Generator_ColumnVarNameInTable="columnLanguages" msprop:Generator_ColumnPropNameInRow="Languages" msprop:Generator_ColumnPropNameInTable="LanguagesColumn" type="xs:string" /> - <xs:attribute name="Subtitles" msprop:Generator_UserColumnName="Subtitles" msprop:Generator_ColumnVarNameInTable="columnSubtitles" msprop:Generator_ColumnPropNameInRow="Subtitles" msprop:Generator_ColumnPropNameInTable="SubtitlesColumn" type="xs:string" /> - <xs:attribute name="Size" msprop:Generator_UserColumnName="Size" msprop:Generator_ColumnPropNameInRow="Size" msprop:Generator_ColumnVarNameInTable="columnSize" msprop:Generator_ColumnPropNameInTable="SizeColumn" type="xs:string" /> - <xs:attribute name="Disks" msprop:Generator_UserColumnName="Disks" msprop:Generator_ColumnPropNameInRow="Disks" msprop:Generator_ColumnVarNameInTable="columnDisks" msprop:Generator_ColumnPropNameInTable="DisksColumn" type="xs:string" /> - <xs:attribute name="Picture" msprop:Generator_UserColumnName="Picture" msprop:Generator_ColumnPropNameInRow="Picture" msprop:Generator_ColumnVarNameInTable="columnPicture" msprop:Generator_ColumnPropNameInTable="PictureColumn" type="xs:string" /> - <xs:attribute name="Contents_Id" msprop:Generator_UserColumnName="Contents_Id" msprop:Generator_ColumnPropNameInRow="Contents_Id" msprop:Generator_ColumnVarNameInTable="columnContents_Id" msprop:Generator_ColumnPropNameInTable="Contents_IdColumn" type="xs:int" use="prohibited" /> + <xs:attribute name="Number" msprop:Generator_UserColumnName="Number" msprop:Generator_ColumnVarNameInTable="columnNumber" msprop:Generator_ColumnPropNameInRow="Number" msprop:Generator_ColumnPropNameInTable="NumberColumn" type="xs:int" /> + <xs:attribute name="Checked" msprop:Generator_UserColumnName="Checked" msprop:Generator_ColumnVarNameInTable="columnChecked" msprop:Generator_ColumnPropNameInRow="Checked" msprop:Generator_ColumnPropNameInTable="CheckedColumn" type="xs:string" /> + <xs:attribute name="MediaLabel" msprop:Generator_UserColumnName="MediaLabel" msprop:Generator_ColumnPropNameInRow="MediaLabel" msprop:Generator_ColumnVarNameInTable="columnMediaLabel" msprop:Generator_ColumnPropNameInTable="MediaLabelColumn" type="xs:string" /> + <xs:attribute name="MediaType" msprop:Generator_UserColumnName="MediaType" msprop:Generator_ColumnVarNameInTable="columnMediaType" msprop:Generator_ColumnPropNameInRow="MediaType" msprop:Generator_ColumnPropNameInTable="MediaTypeColumn" type="xs:string" /> + <xs:attribute name="Source" msprop:Generator_UserColumnName="Source" msprop:Generator_ColumnPropNameInRow="Source" msprop:Generator_ColumnVarNameInTable="columnSource" msprop:Generator_ColumnPropNameInTable="SourceColumn" type="xs:string" /> + <xs:attribute name="Date" msprop:Generator_UserColumnName="Date" msprop:Generator_ColumnVarNameInTable="columnDate" msprop:Generator_ColumnPropNameInRow="Date" msprop:Generator_ColumnPropNameInTable="DateColumn" type="xs:string" /> + <xs:attribute name="Borrower" msprop:Generator_UserColumnName="Borrower" msprop:Generator_ColumnVarNameInTable="columnBorrower" msprop:Generator_ColumnPropNameInRow="Borrower" msprop:Generator_ColumnPropNameInTable="BorrowerColumn" type="xs:string" /> + <xs:attribute name="Rating" msprop:Generator_UserColumnName="Rating" msprop:Generator_ColumnVarNameInTable="columnRating" msprop:Generator_ColumnPropNameInRow="Rating" msprop:Generator_ColumnPropNameInTable="RatingColumn" type="xs:decimal" /> + <xs:attribute name="OriginalTitle" msprop:Generator_UserColumnName="OriginalTitle" msprop:Generator_ColumnVarNameInTable="columnOriginalTitle" msprop:Generator_ColumnPropNameInRow="OriginalTitle" msprop:Generator_ColumnPropNameInTable="OriginalTitleColumn" type="xs:string" /> + <xs:attribute name="TranslatedTitle" msprop:Generator_UserColumnName="TranslatedTitle" msprop:Generator_ColumnVarNameInTable="columnTranslatedTitle" msprop:Generator_ColumnPropNameInRow="TranslatedTitle" msprop:Generator_ColumnPropNameInTable="TranslatedTitleColumn" type="xs:string" /> + <xs:attribute name="FormattedTitle" msprop:Generator_UserColumnName="FormattedTitle" msprop:Generator_ColumnVarNameInTable="columnFormattedTitle" msprop:Generator_ColumnPropNameInRow="FormattedTitle" msprop:Generator_ColumnPropNameInTable="FormattedTitleColumn" type="xs:string" /> + <xs:attribute name="Director" msprop:Generator_UserColumnName="Director" msprop:Generator_ColumnVarNameInTable="columnDirector" msprop:Generator_ColumnPropNameInRow="Director" msprop:Generator_ColumnPropNameInTable="DirectorColumn" type="xs:string" /> + <xs:attribute name="Producer" msprop:Generator_UserColumnName="Producer" msprop:Generator_ColumnVarNameInTable="columnProducer" msprop:Generator_ColumnPropNameInRow="Producer" msprop:Generator_ColumnPropNameInTable="ProducerColumn" type="xs:string" /> + <xs:attribute name="Country" msprop:Generator_UserColumnName="Country" msprop:Generator_ColumnVarNameInTable="columnCountry" msprop:Generator_ColumnPropNameInRow="Country" msprop:Generator_ColumnPropNameInTable="CountryColumn" type="xs:string" /> + <xs:attribute name="Category" msprop:Generator_UserColumnName="Category" msprop:Generator_ColumnVarNameInTable="columnCategory" msprop:Generator_ColumnPropNameInRow="Category" msprop:Generator_ColumnPropNameInTable="CategoryColumn" type="xs:string" /> + <xs:attribute name="Year" msprop:Generator_UserColumnName="Year" msprop:Generator_ColumnVarNameInTable="columnYear" msprop:Generator_ColumnPropNameInRow="Year" msprop:Generator_ColumnPropNameInTable="YearColumn" type="xs:string" /> + <xs:attribute name="Length" msprop:Generator_UserColumnName="Length" msprop:Generator_ColumnVarNameInTable="columnLength" msprop:Generator_ColumnPropNameInRow="Length" msprop:Generator_ColumnPropNameInTable="LengthColumn" type="xs:string" /> + <xs:attribute name="Actors" msprop:Generator_UserColumnName="Actors" msprop:Generator_ColumnVarNameInTable="columnActors" msprop:Generator_ColumnPropNameInRow="Actors" msprop:Generator_ColumnPropNameInTable="ActorsColumn" type="xs:string" /> + <xs:attribute name="URL" msprop:Generator_UserColumnName="URL" msprop:Generator_ColumnPropNameInRow="URL" msprop:Generator_ColumnVarNameInTable="columnURL" msprop:Generator_ColumnPropNameInTable="URLColumn" type="xs:string" /> + <xs:attribute name="Description" msprop:Generator_UserColumnName="Description" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInRow="Description" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" type="xs:string" /> + <xs:attribute name="Comments" msprop:Generator_UserColumnName="Comments" msprop:Generator_ColumnVarNameInTable="columnComments" msprop:Generator_ColumnPropNameInRow="Comments" msprop:Generator_ColumnPropNameInTable="CommentsColumn" type="xs:string" /> + <xs:attribute name="VideoFormat" msprop:Generator_UserColumnName="VideoFormat" msprop:Generator_ColumnVarNameInTable="columnVideoFormat" msprop:Generator_ColumnPropNameInRow="VideoFormat" msprop:Generator_ColumnPropNameInTable="VideoFormatColumn" type="xs:string" /> + <xs:attribute name="VideoBitrate" msprop:Generator_UserColumnName="VideoBitrate" msprop:Generator_ColumnVarNameInTable="columnVideoBitrate" msprop:Generator_ColumnPropNameInRow="VideoBitrate" msprop:Generator_ColumnPropNameInTable="VideoBitrateColumn" type="xs:string" /> + <xs:attribute name="AudioFormat" msprop:Generator_UserColumnName="AudioFormat" msprop:Generator_ColumnVarNameInTable="columnAudioFormat" msprop:Generator_ColumnPropNameInRow="AudioFormat" msprop:Generator_ColumnPropNameInTable="AudioFormatColumn" type="xs:string" /> + <xs:attribute name="AudioBitrate" msprop:Generator_UserColumnName="AudioBitrate" msprop:Generator_ColumnVarNameInTable="columnAudioBitrate" msprop:Generator_ColumnPropNameInRow="AudioBitrate" msprop:Generator_ColumnPropNameInTable="AudioBitrateColumn" type="xs:string" /> + <xs:attribute name="Resolution" msprop:Generator_UserColumnName="Resolution" msprop:Generator_ColumnVarNameInTable="columnResolution" msprop:Generator_ColumnPropNameInRow="Resolution" msprop:Generator_ColumnPropNameInTable="ResolutionColumn" type="xs:string" /> + <xs:attribute name="Framerate" msprop:Generator_UserColumnName="Framerate" msprop:Generator_ColumnVarNameInTable="columnFramerate" msprop:Generator_ColumnPropNameInRow="Framerate" msprop:Generator_ColumnPropNameInTable="FramerateColumn" type="xs:string" /> + <xs:attribute name="Languages" msprop:Generator_UserColumnName="Languages" msprop:Generator_ColumnPropNameInRow="Languages" msprop:Generator_ColumnVarNameInTable="columnLanguages" msprop:Generator_ColumnPropNameInTable="LanguagesColumn" type="xs:string" /> + <xs:attribute name="Subtitles" msprop:Generator_UserColumnName="Subtitles" msprop:Generator_ColumnPropNameInRow="Subtitles" msprop:Generator_ColumnVarNameInTable="columnSubtitles" msprop:Generator_ColumnPropNameInTable="SubtitlesColumn" type="xs:string" /> + <xs:attribute name="Size" msprop:Generator_UserColumnName="Size" msprop:Generator_ColumnVarNameInTable="columnSize" msprop:Generator_ColumnPropNameInRow="Size" msprop:Generator_ColumnPropNameInTable="SizeColumn" type="xs:string" /> + <xs:attribute name="Disks" msprop:Generator_UserColumnName="Disks" msprop:Generator_ColumnVarNameInTable="columnDisks" msprop:Generator_ColumnPropNameInRow="Disks" msprop:Generator_ColumnPropNameInTable="DisksColumn" type="xs:string" /> + <xs:attribute name="Picture" msprop:Generator_UserColumnName="Picture" msprop:Generator_ColumnVarNameInTable="columnPicture" msprop:Generator_ColumnPropNameInRow="Picture" msprop:Generator_ColumnPropNameInTable="PictureColumn" type="xs:string" /> + <xs:attribute name="Contents_Id" msprop:Generator_UserColumnName="Contents_Id" msprop:Generator_ColumnVarNameInTable="columnContents_Id" msprop:Generator_ColumnPropNameInRow="Contents_Id" msprop:Generator_ColumnPropNameInTable="Contents_IdColumn" type="xs:int" use="prohibited" /> </xs:complexType> </xs:element> </xs:sequence> - <xs:attribute name="Contents_Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Contents_Id" msprop:Generator_ColumnPropNameInRow="Contents_Id" msprop:Generator_ColumnVarNameInTable="columnContents_Id" msprop:Generator_ColumnPropNameInTable="Contents_IdColumn" type="xs:int" msdata:AllowDBNull="false" use="prohibited" /> - <xs:attribute name="Catalog_Id" msprop:Generator_UserColumnName="Catalog_Id" msprop:Generator_ColumnPropNameInRow="Catalog_Id" msprop:Generator_ColumnVarNameInTable="columnCatalog_Id" msprop:Generator_ColumnPropNameInTable="Catalog_IdColumn" type="xs:int" use="prohibited" /> + <xs:attribute name="Contents_Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Contents_Id" msprop:Generator_ColumnVarNameInTable="columnContents_Id" msprop:Generator_ColumnPropNameInRow="Contents_Id" msprop:Generator_ColumnPropNameInTable="Contents_IdColumn" type="xs:int" msdata:AllowDBNull="false" use="prohibited" /> + <xs:attribute name="Catalog_Id" msprop:Generator_UserColumnName="Catalog_Id" msprop:Generator_ColumnVarNameInTable="columnCatalog_Id" msprop:Generator_ColumnPropNameInRow="Catalog_Id" msprop:Generator_ColumnPropNameInTable="Catalog_IdColumn" type="xs:int" use="prohibited" /> </xs:complexType> </xs:element> </xs:sequence> - <xs:attribute name="AntMovieCatalog_Id" msprop:Generator_UserColumnName="AntMovieCatalog_Id" msprop:Generator_ColumnPropNameInRow="AntMovieCatalog_Id" msprop:Generator_ColumnVarNameInTable="columnAntMovieCatalog_Id" msprop:Generator_ColumnPropNameInTable="AntMovieCatalog_IdColumn" type="xs:int" use="prohibited" /> - <xs:attribute name="Catalog_Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Catalog_Id" msprop:Generator_ColumnPropNameInRow="Catalog_Id" msprop:Generator_ColumnVarNameInTable="columnCatalog_Id" msprop:Generator_ColumnPropNameInTable="Catalog_IdColumn" type="xs:int" msdata:AllowDBNull="false" use="prohibited" /> + <xs:attribute name="AntMovieCatalog_Id" msprop:Generator_UserColumnName="AntMovieCatalog_Id" msprop:Generator_ColumnVarNameInTable="columnAntMovieCatalog_Id" msprop:Generator_ColumnPropNameInRow="AntMovieCatalog_Id" msprop:Generator_ColumnPropNameInTable="AntMovieCatalog_IdColumn" type="xs:int" use="prohibited" /> + <xs:attribute name="Catalog_Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Catalog_Id" msprop:Generator_ColumnVarNameInTable="columnCatalog_Id" msprop:Generator_ColumnPropNameInRow="Catalog_Id" msprop:Generator_ColumnPropNameInTable="Catalog_IdColumn" type="xs:int" msdata:AllowDBNull="false" use="prohibited" /> </xs:complexType> </xs:element> </xs:choice> Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-03-04 14:21:06 UTC (rev 153) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-03-04 16:26:12 UTC (rev 154) @@ -1,3 +1,28 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + using System; using System.Collections; using System.Windows.Forms; @@ -14,9 +39,9 @@ using MediaPortal.Configuration; using MediaPortal.Util; +using NewStringLib; - namespace MesFilms { /// <summary> @@ -26,6 +51,8 @@ { #region Descriptif zones Ecran + const int ID_MesFilmsDetail = 7987; + enum Controls : int { CTRL_BtnSrtBy = 2, @@ -50,11 +77,16 @@ CTRL_ImgGrStar3 = 1053, CTRL_ImgGrStar4 = 1054, CTRL_ImgGrStar5 = 1055, + CTRL_ImgHStar1 = 1056, + CTRL_ImgHStar2 = 1057, + CTRL_ImgHStar3 = 1058, + CTRL_ImgHStar4 = 1059, + CTRL_ImgHStar5 = 1060, CTRL_ImgStar1 = 1061, CTRL_ImgStar2 = 1062, CTRL_ImgStar3 = 1063, CTRL_ImgStar4 = 1064, - CTRL_ImgStar5 = 1065, + CTRL_ImgStar5 = 1065 } [SkinControlAttribute((int)Controls.CTRL_TxtSelect)] protected GUIFadeLabel TxtSelect = null; @@ -77,7 +109,11 @@ int Ctrl_DspImage2; bool boolselect = false; string StrSelect = null; - string StrTxtSelect = " "; + string StrTitleSelect = null; + string StrFilmSelect = ""; + string StrSort = null; + string StrActors = null; + string StrTxtSelect = ""; string StrStorage = null; string StrIdentItem = null; string StrSort1 = null; @@ -91,7 +127,6 @@ string StrViewDfltText = null; string StrFileXml = null; string StrPathImg = null; - string StrSort = null; string StrSortSens = null; public string WStrSort = null; public string WStrSelect = null; @@ -103,11 +138,15 @@ decimal w_rating = 0; int l_index = 0; string FileImage = "9999"; - private AntMovieCatalog mydivx; + AntMovieCatalog mydivx =new AntMovieCatalog(); private string StrPluginName = "Films"; private string CurrentConfig; private int NbConfig; + string TitleDelim = null; + string Wstar; + private int LastID = 0; + #endregion #region events public delegate void FilmsStoppedHandler(int stoptime, string filename); @@ -212,68 +251,11 @@ //--------------------------------------------------------------------------------------- public override void OnAction(Action actionType) { - if ((actionType.wID == Action.ActionType.ACTION_PREVIOUS_MENU) || (actionType.wID == Action.ActionType.ACTION_CONTEXT_MENU)) - // Previous Menu + if ((actionType.wID == Action.ActionType.ACTION_PREVIOUS_MENU))// || (actionType.wID == Action.ActionType.ACTION_CONTEXT_MENU)) + // Previous Menu (I disabled 'press menu button exits plugin' = very annoying) { - if (boolselect) - { - StrSelect = StrTitle1.ToString() + " not like ''"; - StrTxtSelect = " "; - TxtSelect.Label = " "; - boolreturn = false; - boolselect = false; - BtnSrtBy.Label = CurrentSortMethod; - if (StrSortSens == " ASC") - BtnSrtBy.IsAscending = true; - else - BtnSrtBy.IsAscending = false; - Afficherliste(); - return; - } - if (boolreturn) - { - boolreturn = false; - if (WStrSort == "YEAR") - { - BtnSrtBy.IsAscending = false; - WStrSortSens = " DESC"; - } - else - { - BtnSrtBy.IsAscending = true; - WStrSortSens = " ASC"; - } - if (WStrSort == "DateAdded") - getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*"); - else - getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*"); - return; - } - else - { - if (StrTxtSelect == " ") - { - actionType.wID = Action.ActionType.ACTION_PREVIOUS_MENU; - base.OnAction(actionType); - save_config_values(false); - mydivx.Dispose(); - return; - } - else - { - StrSelect = StrTitle1.ToString() + " not like ''"; - boolselect = false; - BtnSrtBy.Label = CurrentSortMethod; - if (StrSortSens == " ASC") - BtnSrtBy.IsAscending = true; - else - BtnSrtBy.IsAscending = false; - StrTxtSelect = " "; - TxtSelect.Label = StrTxtSelect; - Afficherliste(); - return; - } - } + if (GetPrevFilmList()) return; + //actionType.wID = Action.ActionType.ACTION_PREVIOUS_MENU; // exit plugin DEINIT Msg will call save func } base.OnAction(actionType); } @@ -284,6 +266,7 @@ { int dControl = messageType.TargetControlId; int iControl = messageType.SenderControlId; + switch (messageType.Message) { case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: @@ -294,14 +277,13 @@ base.OnMessage(messageType); g_Player.PlayBackStopped += new MediaPortal.Player.g_Player.StoppedHandler(OnPlayBackStopped); g_Player.PlayBackEnded += new MediaPortal.Player.g_Player.EndedHandler(OnPlayBackEnded); - mydivx = new AntMovieCatalog(); if (g_Player.Playing) affich_overlay(); else supprim_overlay(); using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) { - if (PreviousWindowId == 7987) + if (PreviousWindowId == ID_MesFilmsDetail) { CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Current_Config", ""); Load_Config(CurrentConfig); @@ -327,29 +309,57 @@ } return true; + case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: //called when exiting plugin either by prev menu or pressing home button + save_config_values(); + mydivx.Clear(); + mydivx.Dispose(); + return true; // fall through to call base class? + case GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS_CHANGED: //--------------------------------------------------------------------------------------- // Display Informations about List Item //--------------------------------------------------------------------------------------- + if ((iControl == (int)Controls.CTRL_List) && !(boolselect || (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder))) //xxxx + { + if (lsCtlFilm.SelectedListItemIndex > -1) + { + affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, true); + } + } + else + if (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder) + { + affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, false); + } + else + { + masquage_Lstdetail(); + } base.OnMessage(messageType); - if ((iControl == (int)Controls.CTRL_List) && (!boolselect)) - affichage_Lstdetail(lsCtlFilm.SelectedListItemIndex); - else - masquage_Lstdetail(); return true; case GUIMessage.MessageType.GUI_MSG_SETFOCUS: //--------------------------------------------------------------------------------------- // Hide Informations about List Item //--------------------------------------------------------------------------------------- - base.OnMessage(messageType); - if ((dControl == (int)Controls.CTRL_List) && (!boolselect)) +// if ((dControl == (int)Controls.CTRL_List) && (!boolselect)) + if ((dControl == (int)Controls.CTRL_List) && !(boolselect || (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder))) //xxxx { if (lsCtlFilm.SelectedListItemIndex > -1) - affichage_Lstdetail(lsCtlFilm.SelectedListItemIndex); + { + affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId,true); + } } else - masquage_Lstdetail(); + if (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder) + { + affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, false); + } + else + { + masquage_Lstdetail(); + } + base.OnMessage(messageType); return true; case GUIMessage.MessageType.GUI_MSG_CLICKED: @@ -374,8 +384,9 @@ if (control_searchText(keyboard.Text)) { StrSelect = StrTitle1.ToString() + " like '*" + keyboard.Text + "*'"; - TxtSelect.Label = "Selection " + GUILocalizeStrings.Get(369) + " [*" + keyboard.Text + "*]"; - Afficherliste(... [truncated message content] |
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: <mis...@us...> - 2007-03-02 21:08:10
|
Revision: 152 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=152&view=rev Author: misterd_sf Date: 2007-03-02 13:08:07 -0800 (Fri, 02 Mar 2007) Log Message: ----------- Mplayer 0.61: - Fixed localisation issue when parsing MPlayer messages - Fixed time issue when playback starts Modified Paths: -------------- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2007-03-01 20:27:59 UTC (rev 151) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2007-03-02 21:08:07 UTC (rev 152) @@ -26,6 +26,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; using System.Threading; @@ -302,7 +303,7 @@ /// Version number of the player /// </summary> public override string VersionNumber { - get { return "0.6"; } + get { return "0.61"; } } #endregion @@ -397,10 +398,6 @@ mplayerProcess.OutputDataReceived += new DataReceivedEventHandler(mplayerProcess_OutputDataReceived); mplayerProcess.BeginOutputReadLine(); input = mplayerProcess.StandardInput; - sendCommand("get_time_pos"); - sendCommand("osd 0"); - sendCommand("sub_visibility 0"); - sendCommand("forced_subs_only 1"); result = true; } catch (Exception e) { Log.Info("MPlayer Error: " + e.Message); @@ -447,7 +444,7 @@ mplayerInnerPanel.Size = new System.Drawing.Size(0, 0); mplayerInnerPanel.BackColor = Color.FromArgb(16, 16, 16); mplayerOuterPanel.Controls.Add(mplayerInnerPanel); - _playState = PlayState.Playing; + _playState = PlayState.Playing; speed = 1; _volume = 100; } @@ -491,14 +488,17 @@ private void mplayerProcess_OutputDataReceived(object sender, DataReceivedEventArgs e) { String result = e.Data; if (result != null) { + Log.Info("MPlayer: Data received: " + e.Data); if (result.StartsWith("ANS_TIME_POSITION=")) { additionalTime = DateTime.Now; - baseTime = Double.Parse(result.Substring(18).Replace('.', ',')); + baseTime = Double.Parse(result.Substring(18).Replace(".", + CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator)); } else if (result.StartsWith("ANS_PERCENT_POSITION=")) { additionalTime = DateTime.Now; performSeekRelativePercentage(Int32.Parse(result.Substring(21))); } else if (result.StartsWith("ID_LENGTH")) { - duration = Double.Parse(result.Substring(10).Replace('.', ',')); + duration = Double.Parse(result.Substring(10).Replace(".", + CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator)); } else if (result.StartsWith("ID_AUDIO_ID")) { int temp = Int32.Parse(result.Substring(12)); if (!audioNames.ContainsKey(temp)) { @@ -528,6 +528,10 @@ } else if (result.StartsWith("Exiting... (End of file)")) { _playState = PlayState.Ended; } else if (result.StartsWith("VO: [directx] ")) { + sendCommand("get_time_pos"); + sendCommand("osd 0"); + sendCommand("sub_visibility 0"); + sendCommand("forced_subs_only 1"); int pos = result.IndexOf("=> "); String temp = result.Substring(pos + 3); pos = temp.IndexOf('x'); @@ -539,7 +543,6 @@ _needUpdate = true; SetVideoWindow(); } - Log.Info("MPlayer: Data received: " + e.Data); } } 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: <mis...@us...> - 2007-03-01 18:20:31
|
Revision: 150 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=150&view=rev Author: misterd_sf Date: 2007-03-01 10:20:23 -0800 (Thu, 01 Mar 2007) Log Message: ----------- MPlayer: Input fields will be disable in configuration if no element is selected in the corresponding list. Modified Paths: -------------- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2007-03-01 05:58:37 UTC (rev 149) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2007-03-01 18:20:23 UTC (rev 150) @@ -66,6 +66,11 @@ this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.general_Tab = new System.Windows.Forms.TabPage(); + this.label30 = new System.Windows.Forms.Label(); + this.cacheSize = new System.Windows.Forms.ComboBox(); + this.label29 = new System.Windows.Forms.Label(); + this.soundOutputDevice = new System.Windows.Forms.ComboBox(); + this.passthroughAC3_DTS = new System.Windows.Forms.CheckBox(); this.label22 = new System.Windows.Forms.Label(); this.osdFont = new System.Windows.Forms.ComboBox(); this.audioNormalize = new System.Windows.Forms.CheckBox(); @@ -77,31 +82,27 @@ this.noiseDenoise = new System.Windows.Forms.ComboBox(); this.audioChannels = new System.Windows.Forms.ComboBox(); this.video_audio_Tab = new System.Windows.Forms.TabPage(); - this.label25 = new System.Windows.Forms.Label(); - this.videoPlayerUse = new System.Windows.Forms.CheckBox(); - this.videoArgument = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label26 = new System.Windows.Forms.Label(); + this.audioPlayerUse = new System.Windows.Forms.CheckBox(); + this.audioArgument = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.audioExtension = new System.Windows.Forms.TextBox(); + this.audioDelete = new System.Windows.Forms.Button(); + this.audioAdd = new System.Windows.Forms.Button(); + this.audioExtList = new System.Windows.Forms.ListBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.videoExtList = new System.Windows.Forms.ListBox(); + this.videoDelete = new System.Windows.Forms.Button(); this.label24 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); this.videoExtension = new System.Windows.Forms.TextBox(); - this.videoDelete = new System.Windows.Forms.Button(); + this.videoPlayerUse = new System.Windows.Forms.CheckBox(); this.videoAdd = new System.Windows.Forms.Button(); - this.videoExtList = new System.Windows.Forms.ListBox(); + this.videoArgument = new System.Windows.Forms.TextBox(); this.dvd_vcd_svcd_streams_Tab = new System.Windows.Forms.TabPage(); - this.audioCDArguments = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.svcdArguments = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.vcdArguments = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.dvdArguments = new System.Windows.Forms.TextBox(); - this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.fontDialog1 = new System.Windows.Forms.FontDialog(); - this.passthroughAC3_DTS = new System.Windows.Forms.CheckBox(); - this.soundOutputDevice = new System.Windows.Forms.ComboBox(); - this.label29 = new System.Windows.Forms.Label(); - this.label30 = new System.Windows.Forms.Label(); - this.cacheSize = new System.Windows.Forms.ComboBox(); this.label20 = new System.Windows.Forms.Label(); this.unsvArguments = new System.Windows.Forms.TextBox(); this.label19 = new System.Windows.Forms.Label(); @@ -120,23 +121,22 @@ this.ftpArguments = new System.Windows.Forms.TextBox(); this.label12 = new System.Windows.Forms.Label(); this.cueArguments = new System.Windows.Forms.TextBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label26 = new System.Windows.Forms.Label(); - this.audioPlayerUse = new System.Windows.Forms.CheckBox(); - this.audioArgument = new System.Windows.Forms.TextBox(); - this.label27 = new System.Windows.Forms.Label(); - this.label28 = new System.Windows.Forms.Label(); - this.audioExtension = new System.Windows.Forms.TextBox(); - this.audioDelete = new System.Windows.Forms.Button(); - this.audioAdd = new System.Windows.Forms.Button(); - this.audioExtList = new System.Windows.Forms.ListBox(); + this.audioCDArguments = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.svcdArguments = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.vcdArguments = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.dvdArguments = new System.Windows.Forms.TextBox(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.fontDialog1 = new System.Windows.Forms.FontDialog(); this.tabControl1.SuspendLayout(); this.general_Tab.SuspendLayout(); this.video_audio_Tab.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); this.dvd_vcd_svcd_streams_Tab.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // okButton @@ -361,6 +361,58 @@ this.general_Tab.Text = "General"; this.general_Tab.UseVisualStyleBackColor = true; // + // label30 + // + this.label30.Location = new System.Drawing.Point(3, 232); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(117, 23); + this.label30.TabIndex = 38; + this.label30.Text = "Cachesize:"; + // + // cacheSize + // + this.cacheSize.FormattingEnabled = true; + this.cacheSize.Items.AddRange(new object[] { + "2048", + "4096", + "8192"}); + this.cacheSize.Location = new System.Drawing.Point(122, 229); + this.cacheSize.Name = "cacheSize"; + this.cacheSize.Size = new System.Drawing.Size(260, 21); + this.cacheSize.TabIndex = 37; + this.cacheSize.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cacheSize_KeyPress); + // + // label29 + // + this.label29.Location = new System.Drawing.Point(3, 41); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(117, 23); + this.label29.TabIndex = 36; + this.label29.Text = "Sound output device:"; + // + // soundOutputDevice + // + this.soundOutputDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.soundOutputDevice.FormattingEnabled = true; + this.soundOutputDevice.Items.AddRange(new object[] { + "(don\'t decode sound)", + "(don\'t play sound)", + "Win32", + "DirectSound"}); + this.soundOutputDevice.Location = new System.Drawing.Point(122, 38); + this.soundOutputDevice.Name = "soundOutputDevice"; + this.soundOutputDevice.Size = new System.Drawing.Size(260, 21); + this.soundOutputDevice.TabIndex = 35; + // + // passthroughAC3_DTS + // + this.passthroughAC3_DTS.Location = new System.Drawing.Point(6, 378); + this.passthroughAC3_DTS.Name = "passthroughAC3_DTS"; + this.passthroughAC3_DTS.Size = new System.Drawing.Size(178, 23); + this.passthroughAC3_DTS.TabIndex = 34; + this.passthroughAC3_DTS.Text = "Passthrough AC3/DTS"; + this.passthroughAC3_DTS.UseVisualStyleBackColor = true; + // // label22 // this.label22.Location = new System.Drawing.Point(3, 205); @@ -470,31 +522,144 @@ this.video_audio_Tab.Text = "Video/Audio"; this.video_audio_Tab.UseVisualStyleBackColor = true; // - // label25 + // groupBox2 // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(90, 72); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(100, 13); - this.label25.TabIndex = 26; - this.label25.Text = "External Player use:"; + this.groupBox2.Controls.Add(this.label26); + this.groupBox2.Controls.Add(this.audioPlayerUse); + this.groupBox2.Controls.Add(this.audioArgument); + this.groupBox2.Controls.Add(this.label27); + this.groupBox2.Controls.Add(this.label28); + this.groupBox2.Controls.Add(this.audioExtension); + this.groupBox2.Controls.Add(this.audioDelete); + this.groupBox2.Controls.Add(this.audioAdd); + this.groupBox2.Controls.Add(this.audioExtList); + this.groupBox2.Location = new System.Drawing.Point(3, 224); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(394, 201); + this.groupBox2.TabIndex = 30; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Audio"; // - // videoPlayerUse + // label26 // - this.videoPlayerUse.AutoSize = true; - this.videoPlayerUse.Location = new System.Drawing.Point(196, 71); - this.videoPlayerUse.Name = "videoPlayerUse"; - this.videoPlayerUse.Size = new System.Drawing.Size(15, 14); - this.videoPlayerUse.TabIndex = 25; - this.videoPlayerUse.UseVisualStyleBackColor = true; + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(90, 72); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(100, 13); + this.label26.TabIndex = 44; + this.label26.Text = "External Player use:"; // - // videoArgument + // audioPlayerUse // - this.videoArgument.Location = new System.Drawing.Point(196, 45); - this.videoArgument.Name = "videoArgument"; - this.videoArgument.Size = new System.Drawing.Size(192, 20); - this.videoArgument.TabIndex = 24; + this.audioPlayerUse.AutoSize = true; + this.audioPlayerUse.Enabled = false; + this.audioPlayerUse.Location = new System.Drawing.Point(196, 71); + this.audioPlayerUse.Name = "audioPlayerUse"; + this.audioPlayerUse.Size = new System.Drawing.Size(15, 14); + this.audioPlayerUse.TabIndex = 43; + this.audioPlayerUse.UseVisualStyleBackColor = true; // + // audioArgument + // + this.audioArgument.Enabled = false; + this.audioArgument.Location = new System.Drawing.Point(196, 45); + this.audioArgument.Name = "audioArgument"; + this.audioArgument.Size = new System.Drawing.Size(192, 20); + this.audioArgument.TabIndex = 42; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(90, 48); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(60, 13); + this.label27.TabIndex = 41; + this.label27.Text = "Arguments:"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(90, 22); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(56, 13); + this.label28.TabIndex = 40; + this.label28.Text = "Extension:"; + // + // audioExtension + // + this.audioExtension.Enabled = false; + this.audioExtension.Location = new System.Drawing.Point(196, 19); + this.audioExtension.Name = "audioExtension"; + this.audioExtension.Size = new System.Drawing.Size(192, 20); + this.audioExtension.TabIndex = 39; + this.audioExtension.Leave += new System.EventHandler(this.audioExtension_Leave); + // + // audioDelete + // + this.audioDelete.Location = new System.Drawing.Point(174, 169); + this.audioDelete.Name = "audioDelete"; + this.audioDelete.Size = new System.Drawing.Size(75, 23); + this.audioDelete.TabIndex = 38; + this.audioDelete.Text = "&Delete"; + this.audioDelete.UseVisualStyleBackColor = true; + this.audioDelete.Click += new System.EventHandler(this.audioDelete_Click); + // + // audioAdd + // + this.audioAdd.Location = new System.Drawing.Point(93, 169); + this.audioAdd.Name = "audioAdd"; + this.audioAdd.Size = new System.Drawing.Size(75, 23); + this.audioAdd.TabIndex = 37; + this.audioAdd.Text = "&Add"; + this.audioAdd.UseVisualStyleBackColor = true; + this.audioAdd.Click += new System.EventHandler(this.audioAdd_Click); + // + // audioExtList + // + this.audioExtList.FormattingEnabled = true; + this.audioExtList.Location = new System.Drawing.Point(6, 19); + this.audioExtList.Name = "audioExtList"; + this.audioExtList.Size = new System.Drawing.Size(78, 173); + this.audioExtList.TabIndex = 36; + this.audioExtList.SelectedIndexChanged += new System.EventHandler(this.audioExtList_SelectedIndexChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.videoExtList); + this.groupBox1.Controls.Add(this.videoDelete); + this.groupBox1.Controls.Add(this.label24); + this.groupBox1.Controls.Add(this.label23); + this.groupBox1.Controls.Add(this.label25); + this.groupBox1.Controls.Add(this.videoExtension); + this.groupBox1.Controls.Add(this.videoPlayerUse); + this.groupBox1.Controls.Add(this.videoAdd); + this.groupBox1.Controls.Add(this.videoArgument); + this.groupBox1.Location = new System.Drawing.Point(3, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(394, 201); + this.groupBox1.TabIndex = 29; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Video"; + // + // videoExtList + // + this.videoExtList.FormattingEnabled = true; + this.videoExtList.Location = new System.Drawing.Point(6, 19); + this.videoExtList.Name = "videoExtList"; + this.videoExtList.Size = new System.Drawing.Size(78, 173); + this.videoExtList.TabIndex = 18; + this.videoExtList.SelectedIndexChanged += new System.EventHandler(this.videoExtList_SelectedIndexChanged); + // + // videoDelete + // + this.videoDelete.Location = new System.Drawing.Point(174, 169); + this.videoDelete.Name = "videoDelete"; + this.videoDelete.Size = new System.Drawing.Size(75, 23); + this.videoDelete.TabIndex = 20; + this.videoDelete.Text = "&Delete"; + this.videoDelete.UseVisualStyleBackColor = true; + this.videoDelete.Click += new System.EventHandler(this.videoDelete_Click); + // // label24 // this.label24.AutoSize = true; @@ -513,23 +678,33 @@ this.label23.TabIndex = 22; this.label23.Text = "Extension:"; // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(90, 72); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(100, 13); + this.label25.TabIndex = 26; + this.label25.Text = "External Player use:"; + // // videoExtension // + this.videoExtension.Enabled = false; this.videoExtension.Location = new System.Drawing.Point(196, 19); this.videoExtension.Name = "videoExtension"; this.videoExtension.Size = new System.Drawing.Size(192, 20); this.videoExtension.TabIndex = 21; this.videoExtension.Leave += new System.EventHandler(this.videoExtension_Leave); // - // videoDelete + // videoPlayerUse // - this.videoDelete.Location = new System.Drawing.Point(174, 169); - this.videoDelete.Name = "videoDelete"; - this.videoDelete.Size = new System.Drawing.Size(75, 23); - this.videoDelete.TabIndex = 20; - this.videoDelete.Text = "&Delete"; - this.videoDelete.UseVisualStyleBackColor = true; - this.videoDelete.Click += new System.EventHandler(this.videoDelete_Click); + this.videoPlayerUse.AutoSize = true; + this.videoPlayerUse.Enabled = false; + this.videoPlayerUse.Location = new System.Drawing.Point(196, 71); + this.videoPlayerUse.Name = "videoPlayerUse"; + this.videoPlayerUse.Size = new System.Drawing.Size(15, 14); + this.videoPlayerUse.TabIndex = 25; + this.videoPlayerUse.UseVisualStyleBackColor = true; // // videoAdd // @@ -541,14 +716,13 @@ this.videoAdd.UseVisualStyleBackColor = true; this.videoAdd.Click += new System.EventHandler(this.videoAdd_Click); // - // videoExtList + // videoArgument // - this.videoExtList.FormattingEnabled = true; - this.videoExtList.Location = new System.Drawing.Point(6, 19); - this.videoExtList.Name = "videoExtList"; - this.videoExtList.Size = new System.Drawing.Size(78, 173); - this.videoExtList.TabIndex = 18; - this.videoExtList.SelectedIndexChanged += new System.EventHandler(this.videoExtList_SelectedIndexChanged); + this.videoArgument.Enabled = false; + this.videoArgument.Location = new System.Drawing.Point(196, 45); + this.videoArgument.Name = "videoArgument"; + this.videoArgument.Size = new System.Drawing.Size(192, 20); + this.videoArgument.TabIndex = 24; // // dvd_vcd_svcd_streams_Tab // @@ -585,123 +759,6 @@ this.dvd_vcd_svcd_streams_Tab.Text = "DVD/VCD/SVCD/Streams"; this.dvd_vcd_svcd_streams_Tab.UseVisualStyleBackColor = true; // - // audioCDArguments - // - this.audioCDArguments.Location = new System.Drawing.Point(122, 89); - this.audioCDArguments.Name = "audioCDArguments"; - this.audioCDArguments.Size = new System.Drawing.Size(256, 20); - this.audioCDArguments.TabIndex = 23; - // - // label6 - // - this.label6.Location = new System.Drawing.Point(3, 92); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(117, 23); - this.label6.TabIndex = 22; - this.label6.Text = "AudioCD Arguments:"; - // - // label11 - // - this.label11.Location = new System.Drawing.Point(3, 66); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(117, 23); - this.label11.TabIndex = 20; - this.label11.Text = "SVCD Arguments:"; - // - // svcdArguments - // - this.svcdArguments.Location = new System.Drawing.Point(122, 63); - this.svcdArguments.Name = "svcdArguments"; - this.svcdArguments.Size = new System.Drawing.Size(256, 20); - this.svcdArguments.TabIndex = 21; - // - // label10 - // - this.label10.Location = new System.Drawing.Point(3, 40); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(117, 23); - this.label10.TabIndex = 18; - this.label10.Text = "VCD Arguments:"; - // - // vcdArguments - // - this.vcdArguments.Location = new System.Drawing.Point(122, 37); - this.vcdArguments.Name = "vcdArguments"; - this.vcdArguments.Size = new System.Drawing.Size(256, 20); - this.vcdArguments.TabIndex = 19; - // - // label9 - // - this.label9.Location = new System.Drawing.Point(3, 14); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 23); - this.label9.TabIndex = 16; - this.label9.Text = "DVD Arguments:"; - // - // dvdArguments - // - this.dvdArguments.Location = new System.Drawing.Point(122, 11); - this.dvdArguments.Name = "dvdArguments"; - this.dvdArguments.Size = new System.Drawing.Size(256, 20); - this.dvdArguments.TabIndex = 17; - // - // openFileDialog1 - // - this.openFileDialog1.FileName = "openFileDialog1"; - this.openFileDialog1.Title = "Select MPlayer:"; - // - // passthroughAC3_DTS - // - this.passthroughAC3_DTS.Location = new System.Drawing.Point(6, 378); - this.passthroughAC3_DTS.Name = "passthroughAC3_DTS"; - this.passthroughAC3_DTS.Size = new System.Drawing.Size(178, 23); - this.passthroughAC3_DTS.TabIndex = 34; - this.passthroughAC3_DTS.Text = "Passthrough AC3/DTS"; - this.passthroughAC3_DTS.UseVisualStyleBackColor = true; - // - // soundOutputDevice - // - this.soundOutputDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.soundOutputDevice.FormattingEnabled = true; - this.soundOutputDevice.Items.AddRange(new object[] { - "(don\'t decode sound)", - "(don\'t play sound)", - "Win32", - "DirectSound"}); - this.soundOutputDevice.Location = new System.Drawing.Point(122, 38); - this.soundOutputDevice.Name = "soundOutputDevice"; - this.soundOutputDevice.Size = new System.Drawing.Size(260, 21); - this.soundOutputDevice.TabIndex = 35; - // - // label29 - // - this.label29.Location = new System.Drawing.Point(3, 41); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(117, 23); - this.label29.TabIndex = 36; - this.label29.Text = "Sound output device:"; - // - // label30 - // - this.label30.Location = new System.Drawing.Point(3, 232); - this.label30.Name = "label30"; - this.label30.Size = new System.Drawing.Size(117, 23); - this.label30.TabIndex = 38; - this.label30.Text = "Cachesize:"; - // - // cacheSize - // - this.cacheSize.FormattingEnabled = true; - this.cacheSize.Items.AddRange(new object[] { - "2048", - "4096", - "8192"}); - this.cacheSize.Location = new System.Drawing.Point(122, 229); - this.cacheSize.Name = "cacheSize"; - this.cacheSize.Size = new System.Drawing.Size(260, 21); - this.cacheSize.TabIndex = 37; - this.cacheSize.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cacheSize_KeyPress); - // // label20 // this.label20.Location = new System.Drawing.Point(3, 326); @@ -837,118 +894,71 @@ this.cueArguments.Size = new System.Drawing.Size(256, 20); this.cueArguments.TabIndex = 35; // - // groupBox1 + // audioCDArguments // - this.groupBox1.Controls.Add(this.videoExtList); - this.groupBox1.Controls.Add(this.videoDelete); - this.groupBox1.Controls.Add(this.label24); - this.groupBox1.Controls.Add(this.label23); - this.groupBox1.Controls.Add(this.label25); - this.groupBox1.Controls.Add(this.videoExtension); - this.groupBox1.Controls.Add(this.videoPlayerUse); - this.groupBox1.Controls.Add(this.videoAdd); - this.groupBox1.Controls.Add(this.videoArgument); - this.groupBox1.Location = new System.Drawing.Point(3, 6); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(394, 201); - this.groupBox1.TabIndex = 29; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Video"; + this.audioCDArguments.Location = new System.Drawing.Point(122, 89); + this.audioCDArguments.Name = "audioCDArguments"; + this.audioCDArguments.Size = new System.Drawing.Size(256, 20); + this.audioCDArguments.TabIndex = 23; // - // groupBox2 + // label6 // - this.groupBox2.Controls.Add(this.label26); - this.groupBox2.Controls.Add(this.audioPlayerUse); - this.groupBox2.Controls.Add(this.audioArgument); - this.groupBox2.Controls.Add(this.label27); - this.groupBox2.Controls.Add(this.label28); - this.groupBox2.Controls.Add(this.audioExtension); - this.groupBox2.Controls.Add(this.audioDelete); - this.groupBox2.Controls.Add(this.audioAdd); - this.groupBox2.Controls.Add(this.audioExtList); - this.groupBox2.Location = new System.Drawing.Point(3, 224); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(394, 201); - this.groupBox2.TabIndex = 30; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Audio"; + this.label6.Location = new System.Drawing.Point(3, 92); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(117, 23); + this.label6.TabIndex = 22; + this.label6.Text = "AudioCD Arguments:"; // - // label26 + // label11 // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(90, 72); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(100, 13); - this.label26.TabIndex = 44; - this.label26.Text = "External Player use:"; + this.label11.Location = new System.Drawing.Point(3, 66); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(117, 23); + this.label11.TabIndex = 20; + this.label11.Text = "SVCD Arguments:"; // - // audioPlayerUse + // svcdArguments // - this.audioPlayerUse.AutoSize = true; - this.audioPlayerUse.Location = new System.Drawing.Point(196, 71); - this.audioPlayerUse.Name = "audioPlayerUse"; - this.audioPlayerUse.Size = new System.Drawing.Size(15, 14); - this.audioPlayerUse.TabIndex = 43; - this.audioPlayerUse.UseVisualStyleBackColor = true; + this.svcdArguments.Location = new System.Drawing.Point(122, 63); + this.svcdArguments.Name = "svcdArguments"; + this.svcdArguments.Size = new System.Drawing.Size(256, 20); + this.svcdArguments.TabIndex = 21; // - // audioArgument + // label10 // - this.audioArgument.Location = new System.Drawing.Point(196, 45); - this.audioArgument.Name = "audioArgument"; - this.audioArgument.Size = new System.Drawing.Size(192, 20); - this.audioArgument.TabIndex = 42; + this.label10.Location = new System.Drawing.Point(3, 40); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(117, 23); + this.label10.TabIndex = 18; + this.label10.Text = "VCD Arguments:"; // - // label27 + // vcdArguments // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(90, 48); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(60, 13); - this.label27.TabIndex = 41; - this.label27.Text = "Arguments:"; + this.vcdArguments.Location = new System.Drawing.Point(122, 37); + this.vcdArguments.Name = "vcdArguments"; + this.vcdArguments.Size = new System.Drawing.Size(256, 20); + this.vcdArguments.TabIndex = 19; // - // label28 + // label9 // - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(90, 22); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(56, 13); - this.label28.TabIndex = 40; - this.label28.Text = "Extension:"; + this.label9.Location = new System.Drawing.Point(3, 14); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(117, 23); + this.label9.TabIndex = 16; + this.label9.Text = "DVD Arguments:"; // - // audioExtension + // dvdArguments // - this.audioExtension.Location = new System.Drawing.Point(196, 19); - this.audioExtension.Name = "audioExtension"; - this.audioExtension.Size = new System.Drawing.Size(192, 20); - this.audioExtension.TabIndex = 39; + this.dvdArguments.Location = new System.Drawing.Point(122, 11); + this.dvdArguments.Name = "dvdArguments"; + this.dvdArguments.Size = new System.Drawing.Size(256, 20); + this.dvdArguments.TabIndex = 17; // - // audioDelete + // openFileDialog1 // - this.audioDelete.Location = new System.Drawing.Point(174, 169); - this.audioDelete.Name = "audioDelete"; - this.audioDelete.Size = new System.Drawing.Size(75, 23); - this.audioDelete.TabIndex = 38; - this.audioDelete.Text = "&Delete"; - this.audioDelete.UseVisualStyleBackColor = true; + this.openFileDialog1.FileName = "openFileDialog1"; + this.openFileDialog1.Title = "Select MPlayer:"; // - // audioAdd - // - this.audioAdd.Location = new System.Drawing.Point(93, 169); - this.audioAdd.Name = "audioAdd"; - this.audioAdd.Size = new System.Drawing.Size(75, 23); - this.audioAdd.TabIndex = 37; - this.audioAdd.Text = "&Add"; - this.audioAdd.UseVisualStyleBackColor = true; - // - // audioExtList - // - this.audioExtList.FormattingEnabled = true; - this.audioExtList.Location = new System.Drawing.Point(6, 19); - this.audioExtList.Name = "audioExtList"; - this.audioExtList.Size = new System.Drawing.Size(78, 173); - this.audioExtList.TabIndex = 36; - // // ConfigurationForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); @@ -966,12 +976,12 @@ this.general_Tab.ResumeLayout(false); this.general_Tab.PerformLayout(); this.video_audio_Tab.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); this.dvd_vcd_svcd_streams_Tab.ResumeLayout(false); this.dvd_vcd_svcd_streams_Tab.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); this.ResumeLayout(false); } Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2007-03-01 05:58:37 UTC (rev 149) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2007-03-01 18:20:23 UTC (rev 150) @@ -139,10 +139,16 @@ videoExtension.Text = lastVideoSettings.Name; videoArgument.Text = lastVideoSettings.Arguments; videoPlayerUse.Checked = lastVideoSettings.ExtPlayerUse; + videoExtension.Enabled = true; + videoArgument.Enabled = true; + videoPlayerUse.Enabled = true; } else { videoExtension.Text = String.Empty; videoArgument.Text = String.Empty; videoPlayerUse.Checked = false; + videoExtension.Enabled = false; + videoArgument.Enabled = false; + videoPlayerUse.Enabled = false; lastVideoSettings = null; } @@ -234,11 +240,17 @@ audioExtension.Text = lastAudioSettings.Name; audioArgument.Text = lastAudioSettings.Arguments; audioPlayerUse.Checked = lastAudioSettings.ExtPlayerUse; + audioExtension.Enabled = true; + audioArgument.Enabled = true; + audioPlayerUse.Enabled = true; } else { audioExtension.Text = String.Empty; audioArgument.Text = String.Empty; audioPlayerUse.Checked = false; lastAudioSettings = null; + audioExtension.Enabled = false; + audioArgument.Enabled = false; + audioPlayerUse.Enabled = false; } } Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs 2007-03-01 05:58:37 UTC (rev 149) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs 2007-03-01 18:20:23 UTC (rev 150) @@ -89,6 +89,7 @@ // // shareLocation // + this.shareLocation.Enabled = false; this.shareLocation.Location = new System.Drawing.Point(90, 210); this.shareLocation.Name = "shareLocation"; this.shareLocation.Size = new System.Drawing.Size(207, 20); @@ -115,6 +116,7 @@ // // shareName // + this.shareName.Enabled = false; this.shareName.Location = new System.Drawing.Point(90, 184); this.shareName.Name = "shareName"; this.shareName.Size = new System.Drawing.Size(207, 20); Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2007-03-01 05:58:37 UTC (rev 149) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2007-03-01 18:20:23 UTC (rev 150) @@ -129,9 +129,13 @@ lastShare = shareList.SelectedItem as MPlayer_Share; shareName.Text = lastShare.Name; shareLocation.Text = lastShare.Path; + shareName.Enabled = true; + shareLocation.Enabled = true; } else { shareName.Text = String.Empty; shareLocation.Text = String.Empty; + shareName.Enabled = false; + shareLocation.Enabled = false; lastShare = null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <se...@us...> - 2007-03-01 05:58:38
|
Revision: 149 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=149&view=rev Author: sergem1 Date: 2007-02-28 21:58:37 -0800 (Wed, 28 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/ETVNet/Readme.build.txt Modified: trunk/plugins/ETVNet/Readme.build.txt =================================================================== --- trunk/plugins/ETVNet/Readme.build.txt 2007-03-01 05:58:20 UTC (rev 148) +++ trunk/plugins/ETVNet/Readme.build.txt 2007-03-01 05:58:37 UTC (rev 149) @@ -5,7 +5,9 @@ To view, one needs an account with etvnet (free demo accounts available on the site). Make sure to input account data in plugin config dialog in Configuration. +Requires My Videos plugin to be enabled. + Build ===== ETVNet assumes mediaportal build directory is beside its project directory and is called mediaportal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <se...@us...> - 2007-03-01 05:58:23
|
Revision: 148 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=148&view=rev Author: sergem1 Date: 2007-02-28 21:58:20 -0800 (Wed, 28 Feb 2007) Log Message: ----------- back button in keyboard dialog Modified Paths: -------------- trunk/plugins/ETVNet/ETVNet/DialogRuKeyboard.cs trunk/plugins/ETVNet/ETVNet/Plugin.cs trunk/plugins/ETVNet/ETVNet/TODO.txt trunk/plugins/ETVNet/ETVNet/skinfiles/DialogRuKeyboard.xml trunk/plugins/ETVNet/ETVNet/skinfiles/wide/DialogRuKeyboard.xml Modified: trunk/plugins/ETVNet/ETVNet/DialogRuKeyboard.cs =================================================================== --- trunk/plugins/ETVNet/ETVNet/DialogRuKeyboard.cs 2007-02-28 21:05:55 UTC (rev 147) +++ trunk/plugins/ETVNet/ETVNet/DialogRuKeyboard.cs 2007-03-01 05:58:20 UTC (rev 148) @@ -37,13 +37,13 @@ /// </summary> public class DialogRuKeyboard : GUIWindow, IRenderLayer { - #region keyButtons [SkinControlAttribute(20)] protected GUILabelControl inputLabel = null; [SkinControlAttribute(21)] protected GUIButtonControl doneButton = null; - #endregion + [SkinControlAttribute(22)] + protected GUIButtonControl backButton = null; public string inputString; public bool done; @@ -122,7 +122,7 @@ } if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) { - if (doneButton.Focus) + if (doneButton.Focus || backButton.Focus) { Close(); return; @@ -214,7 +214,11 @@ { done = true; Close(); + } else if (control == backButton) + { + Close(); } + if (keyTable.ContainsKey(controlId)) { inputString += (string)keyTable[controlId]; Modified: trunk/plugins/ETVNet/ETVNet/Plugin.cs =================================================================== --- trunk/plugins/ETVNet/ETVNet/Plugin.cs 2007-02-28 21:05:55 UTC (rev 147) +++ trunk/plugins/ETVNet/ETVNet/Plugin.cs 2007-03-01 05:58:20 UTC (rev 148) @@ -287,6 +287,7 @@ DialogRuKeyboard ruKeyboard = (DialogRuKeyboard)GUIWindowManager.GetWindow(7767); if (null != ruKeyboard) { + ruKeyboard.inputString = ""; ruKeyboard.DoModal(GetID); if (ruKeyboard.done) { @@ -305,6 +306,7 @@ DialogRuKeyboard ruKeyboard = (DialogRuKeyboard)GUIWindowManager.GetWindow(7767); if (null != ruKeyboard) { + ruKeyboard.inputString = ""; ruKeyboard.DoModal(GetID); if (ruKeyboard.done) { Modified: trunk/plugins/ETVNet/ETVNet/TODO.txt =================================================================== --- trunk/plugins/ETVNet/ETVNet/TODO.txt 2007-02-28 21:05:55 UTC (rev 147) +++ trunk/plugins/ETVNet/ETVNet/TODO.txt 2007-03-01 05:58:20 UTC (rev 148) @@ -1,14 +1,14 @@ -search keyboard - left arrow to be backspace, instead of back -osd - aspect ratio -support hardware keyboard input automatic web browser connection refresh on no activity - error reporting on data access errors (no login - no date/time, invalid media url) add info screen when there is no info primary streaming link/alternative streaming link +osd + aspect ratio +support hardware keyboard input +demo link playback + localization balance page search keyboard page - animation Modified: trunk/plugins/ETVNet/ETVNet/skinfiles/DialogRuKeyboard.xml =================================================================== --- trunk/plugins/ETVNet/ETVNet/skinfiles/DialogRuKeyboard.xml 2007-02-28 21:05:55 UTC (rev 147) +++ trunk/plugins/ETVNet/ETVNet/skinfiles/DialogRuKeyboard.xml 2007-03-01 05:58:20 UTC (rev 148) @@ -33,6 +33,16 @@ <width>80</width> <onright>9011</onright> </control> + + <control> + <type>button</type> + <id>22</id> + <posX>470</posX> + <posY>212</posY> + <label>Back</label> + <width>80</width> + <onright>9021</onright> + </control> <control> <type>group</type> @@ -89,7 +99,7 @@ <id>9021</id> <label>Ё</label> <width>40</width> - <onleft>9026</onleft> + <onleft>22</onleft> </control> <control> <type>button</type> @@ -121,7 +131,7 @@ <label>К</label> <width>40</width> <onup>9016</onup> - <onright>9021</onright> + <onright>22</onright> </control> <!-- row 3 --> <control> Modified: trunk/plugins/ETVNet/ETVNet/skinfiles/wide/DialogRuKeyboard.xml =================================================================== --- trunk/plugins/ETVNet/ETVNet/skinfiles/wide/DialogRuKeyboard.xml 2007-02-28 21:05:55 UTC (rev 147) +++ trunk/plugins/ETVNet/ETVNet/skinfiles/wide/DialogRuKeyboard.xml 2007-03-01 05:58:20 UTC (rev 148) @@ -33,6 +33,16 @@ <width>152</width> <onright>9011</onright> </control> + + <control> + <type>button</type> + <id>22</id> + <posX>891</posX> + <posY>287</posY> + <label>Back</label> + <width>152</width> + <onright>9021</onright> + </control> <control> <type>group</type> @@ -89,7 +99,7 @@ <id>9021</id> <label>Ё</label> <width>76</width> - <onleft>9026</onleft> + <onleft>22</onleft> </control> <control> <type>button</type> @@ -121,7 +131,7 @@ <label>К</label> <width>76</width> <onup>9016</onup> - <onright>9021</onright> + <onright>22</onright> </control> <!-- row 3 --> <control> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |