From: <ze...@us...> - 2007-10-28 23:01:43
|
Revision: 1011 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1011&view=rev Author: zebons Date: 2007-10-28 16:01:41 -0700 (Sun, 28 Oct 2007) Log Message: ----------- Some view corrections Modified Paths: -------------- trunk/plugins/MyFilms/MesFilms.cs Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-10-28 18:07:26 UTC (rev 1010) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-10-28 23:01:41 UTC (rev 1011) @@ -969,7 +969,7 @@ string[] arSplit; int Wnb_enr = 0; int wi = 0; - string[] Sep = new string[] { ",", "(", ")" }; + string[] Sep = new string[] { ",", ")" }; conf.Wstar = NewWstar; BtnSrtBy.Label = GUILocalizeStrings.Get(103); @@ -986,15 +986,18 @@ if ((WStrSort == "Date") || (WStrSort == "DateAdded")) champselect = string.Format("{0:yyyy/MM/dd}", enr["DateAdded"]); else - { champselect = enr[WStrSort].ToString(); - } - arSplit = champselect.Split(Sep, StringSplitOptions.None);//will add "" entries also, //StringSplitOptions.RemoveEmptyEntries + arSplit = champselect.Split(Sep,StringSplitOptions.None); // remove entries empty // StringSplitOptions.None);//will add "" entries also + string wzone = ""; for (wi = 0; wi < arSplit.Length; wi++) + { if (arSplit[wi].IndexOf("(") > 0) - w_tableau.Add(arSplit[wi].Substring(0, arSplit[wi].IndexOf("(")).Trim()); + wzone = arSplit[wi].Substring(0, arSplit[wi].IndexOf("(")).Trim(); else - w_tableau.Add(arSplit[wi].Trim()); + wzone = arSplit[wi].Trim(); + if (wzone.Length > 0) + w_tableau.Add(wzone); + } } if (WStrSortSens == " ASC") w_tableau.Sort(0, w_tableau.Count, null); @@ -1003,30 +1006,31 @@ IComparer myComparer = new myReverserClass(); w_tableau.Sort(0, w_tableau.Count, myComparer); } - + item = new GUIListItem(); for (wi = 0; wi != w_tableau.Count; wi++) { champselect = w_tableau[wi].ToString(); - if ((Wnb_enr > 0) && (string.Compare(champselect.ToString(), wchampselect.ToString(), true) == 0)) - { +// if ((Wnb_enr > 0) && (string.Compare(champselect.ToString(), wchampselect.ToString(), true) == 0)) + if (string.Compare(champselect.ToString(), wchampselect.ToString(), true) == 0) Wnb_enr++; - item.Label2 = Wnb_enr.ToString(); - } else { - if (conf.Wstar == "*" || champselect.ToUpper().Contains(conf.Wstar.ToUpper())) + if (conf.Wstar == "*" || champselect.ToUpper().Contains(conf.Wstar.ToUpper())) { + if (Wnb_enr > 0) + { + item = new GUIListItem(); + item.Label = wchampselect.ToString(); + item.Label2 = Wnb_enr.ToString(); + facadeView.Add(item); + if (SelItem != "" && item.Label == SelItem) conf.StrIndex = facadeView.Count - 1; //test if this item is one to select + } Wnb_enr = 1; - item = new GUIListItem(); - item.Label = champselect.ToString(); - item.Label2 = Wnb_enr.ToString(); - facadeView.Add(item); - if (SelItem != "" && item.Label == SelItem) conf.StrIndex = facadeView.Count - 1; //test if this item is one to select + wchampselect = champselect.ToString(); } - else - Wnb_enr = 0; + - wchampselect = champselect.ToString(); + } } conf.StrTxtSelect = "Selection"; @@ -1073,7 +1077,7 @@ { //chargement des films BaseMesFilms.LoadFilm(conf.StrFileXml); - conf = new Configuration(Configuration.CurrentConfig, false); +// conf = new Configuration(Configuration.CurrentConfig, false); } Layout = conf.StrLayOut; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |