From: <ze...@us...> - 2007-04-25 19:33:42
|
Revision: 344 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=344&view=rev Author: zebons Date: 2007-04-25 12:33:39 -0700 (Wed, 25 Apr 2007) Log Message: ----------- Add Views by Icons/Large Icons Modified Paths: -------------- trunk/plugins/MyFilms/MesFilms.cs trunk/plugins/MyFilms/MesFilms.csproj trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs trunk/plugins/MyFilms/MesFilmsSetup.cs trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-04-25 19:33:39 UTC (rev 344) @@ -33,6 +33,7 @@ using System.IO; using System.Data; +using System.Drawing; using MediaPortal.Dialogs; using MediaPortal.Player; @@ -59,6 +60,7 @@ CTRL_BtnViewAs = 3, CTRL_BtnSearchT = 4, CTRL_BtnSearchA = 5, + CTRL_BtnLayout = 6, CTRL_TxtSelect = 12, CTRL_BtnStop = 319, CTRL_BtnPause = 315, @@ -72,6 +74,7 @@ CTRL_TxtYear = 1022, CTRL_TxtGenre = 1024, CTRL_Texte = 1025, + CTRL_Title = 1027, CTRL_ImgGrStar1 = 1051, CTRL_ImgGrStar2 = 1052, CTRL_ImgGrStar3 = 1053, @@ -86,16 +89,21 @@ CTRL_ImgStar2 = 1062, CTRL_ImgStar3 = 1063, CTRL_ImgStar4 = 1064, - CTRL_ImgStar5 = 1065 + CTRL_ImgStar5 = 1065, + CTRL_NbObjects = 2073 } [SkinControlAttribute((int)Controls.CTRL_TxtSelect)] protected GUIFadeLabel TxtSelect = null; [SkinControlAttribute((int)Controls.CTRL_BtnSrtBy)] protected GUISortButtonControl BtnSrtBy = null; [SkinControlAttribute((int)Controls.CTRL_List)] - protected GUIListControl lsCtlFilm = null; + protected GUIFacadeControl facadeView = null; + //[SkinControlAttribute((int)Controls.CTRL_List)] + //protected GUIListControl lsCtlFilm = null; [SkinControlAttribute((int)Controls.CTRL_Texte)] protected GUITextScrollUpControl ScrlLstText = null; + [SkinControlAttribute((int)Controls.CTRL_Title)] + protected GUIFadeLabel TitleSelect = null; [SkinControlAttribute((int)Controls.CTRL_TxtYear)] protected GUILabelControl TxtLstYear = null; [SkinControlAttribute((int)Controls.CTRL_TxtGenre)] @@ -104,7 +112,8 @@ protected GUIImage ImgLstFilm = null; [SkinControlAttribute((int)Controls.CTRL_Image2)] protected GUIImage ImgLstFilm2 = null; - + public int Layout = 0; + int Ctrl_DspImage; int Ctrl_DspImage2; bool boolselect = false; @@ -129,11 +138,13 @@ string StrFileType = null; string StrPathImg = null; string StrSortSens = null; + int StrLayOut = 0; public string WStrSort = null; public string WStrSelect = null; public string WStrSortSens = null; public bool boolreturn = false; public bool boolstorage = false; + string wselectedlabel = null; string StrDfltSelect = null; string CurrentSortMethod = null; decimal w_rating = 0; @@ -330,22 +341,24 @@ //--------------------------------------------------------------------------------------- // Display Informations about List Item //--------------------------------------------------------------------------------------- - if ((iControl == (int)Controls.CTRL_List) && !(boolselect || (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder))) //xxxx + if ((iControl == (int)Controls.CTRL_List) && !(boolselect || (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder))) //xxxx { - if (lsCtlFilm.SelectedListItemIndex > -1) + if (facadeView.SelectedListItemIndex > -1) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, true); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, true, facadeView.SelectedListItem.Label); } } else - if (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder) + { + if (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, false); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, false, facadeView.SelectedListItem.Label); } else { masquage_Lstdetail(); } + } base.OnMessage(messageType); return true; @@ -353,17 +366,22 @@ //--------------------------------------------------------------------------------------- // Hide Informations about List Item //--------------------------------------------------------------------------------------- - if ((dControl == (int)Controls.CTRL_List) && !(boolselect || (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder))) //xxxx + if ((iControl == 0) && (dControl == (int)Controls.CTRL_List)) { - if (lsCtlFilm.SelectedListItemIndex > -1) + base.OnMessage(messageType); + return true; + } + if ((dControl == (int)Controls.CTRL_List) && !(boolselect || (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder))) //xxxx + { + if (facadeView.SelectedListItemIndex > -1) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId,true); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, true, facadeView.SelectedListItem.Label); } } else - if (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder) + if (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, false); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, false, facadeView.SelectedListItem.Label); } else { @@ -482,14 +500,39 @@ Selection_type_Video(); return base.OnMessage(messageType); } + if ((iControl == (int)Controls.CTRL_BtnLayout) && !boolselect) + // Change Layout View + { + if (Layout == 1) + { + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(417)); + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + Layout = 2; + } + else if (Layout == 2) + { + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(101)); + facadeView.View = GUIFacadeControl.ViewMode.List; + Layout = 0; + } + else + { + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(100)); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + Layout = 1; + } + GetFilmList(); + return base.OnMessage(messageType); + } + if (iControl == (int)Controls.CTRL_List) { - if (lsCtlFilm.SelectedListItemIndex > -1) + if (facadeView.SelectedListItemIndex > -1) { - if (!lsCtlFilm.SelectedListItem.IsFolder && !boolselect) + if (!facadeView.SelectedListItem.IsFolder && !boolselect) // New Window for detailed selected item information { - //l_index = lsCtlFilm.SelectedListItemIndex; + //l_index = facadeView.SelectedListItemIndex; save_config_values(); mydivx.Clear(); GUIWindowManager.ActivateWindow(ID_MesFilmsDetail); @@ -497,10 +540,12 @@ else // View List as selected { + wselectedlabel = facadeView.SelectedListItem.Label; + Change_LayOut(Layout); do { if (StrTitleSelect != "") StrTitleSelect += TitleDelim; - StrTitleSelect += lsCtlFilm.SelectedListItem.Label; + StrTitleSelect += wselectedlabel; } while (GetFilmList() == false); //keep calling while single folders found } } @@ -571,7 +616,7 @@ if (boolselect) { - string sLabel = lsCtlFilm.SelectedListItem.Label; + string sLabel = wselectedlabel; if (WStrSort == "Date") StrSelect = "Date" + " like '" + string.Format("{0:dd/MM/yyyy}",DateTime.Parse(sLabel).ToShortDateString()) + "'"; else @@ -611,7 +656,7 @@ /// <returns>If returns false means is currently displaying a single folder</returns> bool GetFilmList<T>(T gSelItem) { - int iCnt = 0; + int iCnt = 0; int DelimCnt = 0, DelimCnt2; GUIListItem item = new GUIListItem(); string sTitle; @@ -629,8 +674,7 @@ BtnSrtBy.Label = CurrentSortMethod; if (StrTitleSelect != "") DelimCnt = NewString.PosCount(TitleDelim, StrTitleSelect, false) + 1; //get num .'s in title - lsCtlFilm.Clear(); - + facadeView.Clear(); //---------------------------------------------------------------------------------------- // Load the DataSet. foreach (DataRow r in LectureDonn\xE9es(StrFilmSelect, StrSort, StrSortSens)) @@ -685,25 +729,32 @@ item.Label2 = r[StrSort1].ToString(); break; } - lsCtlFilm.Add(item); + if (r["Picture"].ToString().IndexOf(":\\") == -1) + item.ThumbnailImage = StrPathImg + "\\" + r["Picture"].ToString(); + else + item.ThumbnailImage = r["Picture"].ToString(); + //item.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + facadeView.Add(item); + if (iSelItem == -2) //set selected item = passed in string? { - if (sTitle == SelItem) l_index = lsCtlFilm.Count - 1; //test if this item is one to select + if (sTitle == SelItem) l_index = facadeView.Count - 1; //test if this item is one to select } } if (iSelItem >= 0) //-1 = ignore, >=0 = itemID to locate (test every item in case item is from within a folder) { - if ((int)(r["Number"]) == iSelItem) l_index = lsCtlFilm.Count - 1; //test if this item is one to select + if ((int)(r["Number"]) == iSelItem) l_index = facadeView.Count - 1; //test if this item is one to select } sPrevTitle = sTitle; } - if ((l_index > lsCtlFilm.Count - 1) || (l_index < 0)) + if ((l_index > facadeView.Count - 1) || (l_index < 0)) l_index = 0; - GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)l_index); - GUIPropertyManager.SetProperty("#nbobjects", lsCtlFilm.Count.ToString() + " " + GUILocalizeStrings.Get(127)); - return !(lsCtlFilm.Count == 1 && item.IsFolder); //ret false if single folder found + + GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)l_index); + GUIPropertyManager.SetProperty("#nbobjects", facadeView.Count.ToString() + " " + GUILocalizeStrings.Get(127)); + return !(facadeView.Count == 1 && item.IsFolder); //ret false if single folder found } @@ -759,7 +810,7 @@ //---------------------------------------------------------------------------------------- // Display Detailed Info (Image, Description, Year, Category) //---------------------------------------------------------------------------------------- - private void affichage_Lstdetail(int ItemId, bool wrep)//wrep = false display only image + private void affichage_Lstdetail(int ItemId, bool wrep, string wlabel)//wrep = false display only image { DataRow[] r = LectureDonn\xE9es("Number = " + ItemId.ToString(), "", ""); @@ -818,7 +869,17 @@ } ScrlLstText.Clear(); ScrlLstText.Label = r[0]["Description"].ToString().Replace('|', ' '); - GUIControl.ShowControl(GetID, (int)Controls.CTRL_Texte); + TitleSelect.Label = wlabel; + if (Layout == 0) + { + GUIControl.ShowControl(GetID, (int)Controls.CTRL_Texte); + GUIControl.HideControl(GetID, (int)Controls.CTRL_Title); + } + else + { + GUIControl.ShowControl(GetID, (int)Controls.CTRL_Title); + GUIControl.HideControl(GetID, (int)Controls.CTRL_Texte); + } TxtLstGenre.Label = r[0]["Category"].ToString(); GUIControl.ShowControl(GetID, (int)Controls.CTRL_TxtGenre); TxtLstYear.Label = r[0]["Year"].ToString(); @@ -853,7 +914,7 @@ StrSortSens = " DESC"; if (!boolselect) GetFilmList(); - else + else getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, StrSortSens, "*", true, ""); return; } @@ -956,7 +1017,10 @@ } dlg.DoModal(GetID); - if (dlg.SelectedLabel == -1) return; + if (dlg.SelectedLabel == -1) + { + return; + } Change_view(choice_view[dlg.SelectedLabel].ToString()); return; } @@ -986,7 +1050,7 @@ boolselect = true; boolreturn = true; if (ClearIndex) l_index = 0; - lsCtlFilm.Clear(); + facadeView.Clear(); foreach (DataRow enr in LectureDonn\xE9es(WstrSelect, WStrSort, WStrSortSens)) { @@ -1027,8 +1091,8 @@ item = new GUIListItem(); item.Label = champselect.ToString(); item.Label2 = Wnb_enr.ToString(); - lsCtlFilm.Add(item); - if (SelItem != "" && item.Label == SelItem) l_index = lsCtlFilm.Count - 1; //test if this item is one to select + facadeView.Add(item); + if (SelItem != "" && item.Label == SelItem) l_index = facadeView.Count - 1; //test if this item is one to select } else Wnb_enr = 0; @@ -1042,11 +1106,11 @@ StrSelect = WstrSelect; StrFilmSelect = ""; - if ((l_index > lsCtlFilm.Count - 1) || (l_index < 0)) //check index within bounds, will be unless xml file heavily edited + if ((l_index > facadeView.Count - 1) || (l_index < 0)) //check index within bounds, will be unless xml file heavily edited l_index = 0; GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)l_index); - GUIPropertyManager.SetProperty("#nbobjects", lsCtlFilm.Count.ToString() + " " + GUILocalizeStrings.Get(127)); + GUIPropertyManager.SetProperty("#nbobjects", facadeView.Count.ToString() + " " + GUILocalizeStrings.Get(127)); } //---------------------------------------------------------------------------------------------- @@ -1076,10 +1140,11 @@ xmlwriter.SetValue(CurrentConfig, "CurrentSortMethod", CurrentSortMethod.ToString()); xmlwriter.SetValue(CurrentConfig, "StrSortSens", StrSortSens.ToString()); xmlwriter.SetValue(CurrentConfig, "Selection", StrTxtSelect); - xmlwriter.SetValue(CurrentConfig, "IndexItem", (lsCtlFilm.SelectedListItemIndex > -1) ? ((boolselect) ? lsCtlFilm.SelectedListItemIndex.ToString() : lsCtlFilm.SelectedListItem.ItemId.ToString()) : "-1"); //may need to check if there is no item selected and so save -1 + xmlwriter.SetValue(CurrentConfig, "IndexItem", (facadeView.SelectedListItemIndex > -1) ? ((boolselect) ? facadeView.SelectedListItemIndex.ToString() : facadeView.SelectedListItem.ItemId.ToString()) : "-1"); //may need to check if there is no item selected and so save -1 xmlwriter.SetValueAsBool(CurrentConfig, "boolselect", boolselect); xmlwriter.SetValue(CurrentConfig, "WStrSort", WStrSort); xmlwriter.SetValue(CurrentConfig, "Wstar", Wstar); + xmlwriter.SetValue(CurrentConfig, "WLayOut", Layout); switch (StrFileType) { case "0": @@ -1114,6 +1179,8 @@ StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalog", ""); StrFileType = xmlreader.GetValueAsString(CurrentConfig, "CatalogType", "0"); StrPathImg = xmlreader.GetValueAsString(CurrentConfig, "AntPicture", ""); + StrLayOut = xmlreader.GetValueAsInt(CurrentConfig, "LayOut", 0); + StrLayOut = xmlreader.GetValueAsInt(CurrentConfig, "WLayOut", StrLayOut); switch (StrFileType) { case "0": @@ -1219,6 +1286,8 @@ dlgOk.SetLine(2, "Verify your file with the plugin setup"); dlgOk.DoModal(GetID); } + Layout = StrLayOut; + Change_LayOut(Layout); if (StrSelect == "") StrSelect = StrTitle1.ToString() + " not like ''"; if (StrSort1.Length == 0) @@ -1243,7 +1312,7 @@ if (!(LoadDfltSlct)) GetFilmList(l_index); else - { + { if ((StrViewDfltItem.Length == 0) || (StrViewDfltItem == "(none)")) { StrSelect = StrTitle1.ToString() + " not like ''"; @@ -1286,7 +1355,6 @@ else BtnSrtBy.IsAscending = false; GetFilmList(l_index); - } } @@ -1299,6 +1367,31 @@ } } //-------------------------------------------------------------------------------------------- + // Change LayOut + //-------------------------------------------------------------------------------------------- + private void Change_LayOut(int wLayOut) + { + switch (wLayOut) + { + case 1: + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(100)); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + break; + case 2: + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(417)); + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + break; + default: + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(101)); + facadeView.View = GUIFacadeControl.ViewMode.List; + break; + } + GUIControl.HideControl(GetID, facadeView.GetID); + int iControl = facadeView.GetID; + GUIControl.ShowControl(GetID, iControl); + GUIControl.FocusControl(GetID, iControl); + } + //-------------------------------------------------------------------------------------------- // Change View Response //-------------------------------------------------------------------------------------------- private void Change_view(string choice_view) @@ -1315,6 +1408,7 @@ if (choice_view == "Year") { // Change View by Year + Change_LayOut(0); WStrSort = "YEAR"; WStrSortSens = " DESC"; BtnSrtBy.IsAscending = false; @@ -1325,6 +1419,7 @@ if (choice_view == "Category") { // Change View by "Category": + Change_LayOut(0); WStrSort = "CATEGORY"; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1334,6 +1429,7 @@ if (choice_view == "Country") { // Change View by "Country": + Change_LayOut(0); WStrSort = "COUNTRY"; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1359,6 +1455,7 @@ if (choice_view == "View1") { // Change View by "View1": + Change_LayOut(0); WStrSort = StrViewItem1; // specific user View1 WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1371,6 +1468,7 @@ if (choice_view == "View2") { // Change View by "View2": + Change_LayOut(0); WStrSort = StrViewItem2; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; Modified: trunk/plugins/MyFilms/MesFilms.csproj =================================================================== --- trunk/plugins/MyFilms/MesFilms.csproj 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilms.csproj 2007-04-25 19:33:39 UTC (rev 344) @@ -29,28 +29,26 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2576.34540, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Core.dll</HintPath> + <HintPath>..\..\Mediaportal\Core\bin\Release\Core.dll</HintPath> </Reference> - <Reference Include="Databases, Version=1.0.2548.1828, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Databases, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\Mediaportal\Dialogs\bin\Release\Databases.dll</HintPath> - <Private>False</Private> + <HintPath>..\..\Mediaportal\Dialogs\bin\Release\Databases.dll</HintPath> </Reference> - <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\Mediaportal\Dialogs\bin\Release\Dialogs.dll</HintPath> - <Private>False</Private> + <HintPath>..\..\Mediaportal\Dialogs\bin\Release\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.2576.34538, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Utils, Version=2.1.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Utils.dll</HintPath> + <HintPath>..\..\Mediaportal\Core\bin\Release\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-04-25 19:33:39 UTC (rev 344) @@ -155,6 +155,8 @@ this.Config_Name = new System.Windows.Forms.ComboBox(); this.label12 = new System.Windows.Forms.Label(); this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.label14 = new System.Windows.Forms.Label(); + this.LayOut = new System.Windows.Forms.ComboBox(); this.label13 = new System.Windows.Forms.Label(); this.CatalogType = new System.Windows.Forms.ComboBox(); this.ButSave = new System.Windows.Forms.Button(); @@ -703,7 +705,7 @@ this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(69, 13); this.label10.TabIndex = 34; - this.label10.Text = "Version 4.1.0"; + this.label10.Text = "Version 4.2.0"; // // textBox1 // @@ -743,6 +745,8 @@ // // groupBox7 // + this.groupBox7.Controls.Add(this.label14); + this.groupBox7.Controls.Add(this.LayOut); this.groupBox7.Controls.Add(this.label13); this.groupBox7.Controls.Add(this.CatalogType); this.groupBox7.Controls.Add(this.ButSave); @@ -776,6 +780,28 @@ this.groupBox7.TabStop = false; this.groupBox7.Text = "Config Infos"; // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(597, 130); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(78, 13); + this.label14.TabIndex = 44; + this.label14.Text = "Default LayOut"; + // + // LayOut + // + this.LayOut.FormattingEnabled = true; + this.LayOut.Items.AddRange(new object[] { + "List", + "Small Icons", + "Large Icons"}); + this.LayOut.Location = new System.Drawing.Point(681, 127); + this.LayOut.Name = "LayOut"; + this.LayOut.Size = new System.Drawing.Size(112, 21); + this.LayOut.TabIndex = 43; + this.LayOut.Text = "List"; + // // label13 // this.label13.AutoSize = true; @@ -962,6 +988,8 @@ private TextBox TitleDelim; private Label label13; private ComboBox CatalogType; + private Label label14; + private ComboBox LayOut; } } \ No newline at end of file Modified: trunk/plugins/MyFilms/MesFilmsSetup.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-04-25 19:33:39 UTC (rev 344) @@ -272,7 +272,11 @@ // currentLanguage = xmlreader.GetValueAsString("skin", "language", "English"); //} //string LanguageDirectory = Config.GetFolder(Config.Dir.Language); - + int WLayOut = 0; + if (LayOut.Text == "Small Icons") + WLayOut = 1; + if (LayOut.Text == "Large Icons") + WLayOut = 2; if (AntTitle2.Text.Length == 0) AntTitle2.Text = "(none)"; if (Config_Dflt.Checked) @@ -326,8 +330,7 @@ MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "StrSortSens", ""); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "IndexItem", ""); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "TitleDelim", TitleDelim.Text); - - + MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "LayOut", WLayOut); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "StrDfltSelect", StrDfltSelect); string w_Config_Name = Config_Name.Text; @@ -413,6 +416,13 @@ View_Dflt_Item.Items.Add(AntViewItem1.Text); if (!(AntViewItem2.Text == "Country") & !(AntViewItem2.Text == "Category") & !(AntViewItem2.Text == "Year") & !(AntViewItem2.Text == "(none)")) View_Dflt_Item.Items.Add(AntViewItem2.Text); + int WLayOut = MyFilms_xmlreader.GetValueAsInt(Config_Name.Text.ToString(), "LayOut", 0); + if (WLayOut == 0) + LayOut.Text = "List"; + if (WLayOut == 1) + LayOut.Text = "Small Icons"; + if (WLayOut == 2) + LayOut.Text = "Large Icons"; View_Dflt_Item.Items.Remove(""); } private void Refresh_Items(bool all) @@ -461,6 +471,7 @@ AntItem2.ResetText(); AntItem3.ResetText(); TitleDelim.ResetText(); + LayOut.ResetText(); View_Dflt_Item.ResetText(); View_Dflt_Text.ResetText(); } @@ -528,6 +539,7 @@ MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "StrSortSens"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "IndexItem"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "TitleDelim"); + MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "LayOut"); if ((Config_Name.Text) == MyFilms_xmlreader.GetValueAsString("MyFilms", "Default_Config", "")) MyFilms_xmlwriter.RemoveEntry("MyFilms", "Default_Config"); Config_Name.Items.Remove(Config_Name.Text); Modified: trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml 2007-04-25 19:33:39 UTC (rev 344) @@ -1,6 +1,6 @@ <window> <id>7986</id> - <defaultcontrol>1026</defaultcontrol> + <defaultcontrol>6</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> <import>common.time.xml</import> @@ -55,13 +55,27 @@ </padding> </mpe> <control> - <type>sortbutton</type> - <id>2</id> + <type>button</type> + <description>Layout</description> + <id>6</id> <posX>60</posX> <posY>97</posY> <onleft>5</onleft> <onright>1026</onright> <onup>5</onup> + <ondown>2</ondown> + <animation>unfocus</animation> + <label>101</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>sortbutton</type> + <id>2</id> + <posX>60</posX> + <posY>129</posY> + <onleft>6</onleft> + <onright>1026</onright> + <onup>6</onup> <ondown>3</ondown> <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> <font>font13</font> @@ -84,7 +98,7 @@ <description>Switch view</description> <id>3</id> <posX>60</posX> - <posY>129</posY> + <posY>161</posY> <onleft>2</onleft> <onright>1026</onright> <onup>2</onup> @@ -98,7 +112,7 @@ <description>Search by Films</description> <id>4</id> <posX>60</posX> - <posY>161</posY> + <posY>193</posY> <onleft>3</onleft> <onright>1026</onright> <onup>3</onup> @@ -112,15 +126,16 @@ <description>Search by Actors</description> <id>5</id> <posX>60</posX> - <posY>193</posY> + <posY>225</posY> <onleft>4</onleft> <onright>1026</onright> <onup>4</onup> - <ondown>319</ondown> + <ondown>6</ondown> <animation>unfocus</animation> <label>137</label> <textcolor>ff000000</textcolor> </control> + </control> <control> <type>fadelabel</type> @@ -136,69 +151,58 @@ </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> + <description>composite control consisting of a list control and a thumbnail panel</description> + <type>facadeview</type> + <id>1026</id> <control> + <description>Thumbnail Panel</description> + <type>thumbnailpanel</type> + <scrollOffset>1</scrollOffset> + <onleft>6</onleft> + <onright>1026</onright> + <itemWidth>72</itemWidth> + <textureWidth>58</textureWidth> + <thumbWidth>44</thumbWidth> + <thumbPosX>7</thumbPosX> + <textureWidthBig>85</textureWidthBig> + <textureHeightBig>116</textureHeightBig> + <itemWidthBig>108</itemWidthBig> + <itemHeightBig>138</itemHeightBig> + <thumbWidthBig>64</thumbWidthBig> + <thumbHeightBig>90</thumbHeightBig> + <thumbPosXBig>10</thumbPosXBig> + </control> + <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> + <onleft>6</onleft> <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> + <description>Filmstrip view</description> + <type>filmstrip</type> + <width>440</width> + <height>354</height> + <onleft>6</onleft> + <backgroundx>354</backgroundx> + <backgroundy>99</backgroundy> + <backgroundwidth>238</backgroundwidth> + <backgroundheight>336</backgroundheight> + <InfoImagex>366</InfoImagex> + <InfoImagey>118</InfoImagey> + <InfoImagewidth>197</InfoImagewidth> + <InfoImageheight>274</InfoImageheight> + </control> + </control> <control> <type>textboxscrollup</type> <description>Biography value</description> @@ -208,7 +212,7 @@ <width>440</width> <height>106</height> <colordiffuse>ffffffff</colordiffuse> - <onleft>2</onleft> + <onleft>6</onleft> <onright>1026</onright> <onup>1026</onup> <ondown>1026</ondown> @@ -217,12 +221,27 @@ <textcolor>FFFFFFFF</textcolor> <label>-</label> </control> + <control> + <type>fadelabel</type> + <description>Title (during Icons)</description> + <id>1027</id> + <posX>65</posX> + <posY>470</posY> + <onleft>6</onleft> + <onright>1026</onright> + <onup>1026</onup> + <ondown>1026</ondown> + <font>font12</font> + <width>175</width> + <height>24</height> + <label>-</label> + </control> </control> <control> <type>image</type> <id>1065</id> - <posX>224</posX> - <posY>350</posY> + <posX>219</posX> + <posY>370</posY> <width>36</width> <height>36</height> <visible>no</visible> @@ -232,8 +251,8 @@ <control> <type>image</type> <id>1064</id> - <posX>227</posX> - <posY>316</posY> + <posX>222</posX> + <posY>336</posY> <width>30</width> <height>30</height> <visible>no</visible> @@ -243,8 +262,8 @@ <control> <type>image</type> <id>1063</id> - <posX>230</posX> - <posY>288</posY> + <posX>225</posX> + <posY>308</posY> <width>24</width> <height>24</height> <visible>no</visible> @@ -254,8 +273,8 @@ <control> <type>image</type> <id>1062</id> - <posX>233</posX> - <posY>266</posY> + <posX>228</posX> + <posY>286</posY> <width>18</width> <height>18</height> <visible>no</visible> @@ -265,8 +284,8 @@ <control> <type>image</type> <id>1061</id> - <posX>236</posX> - <posY>250</posY> + <posX>231</posX> + <posY>270</posY> <width>12</width> <height>12</height> <visible>no</visible> @@ -276,8 +295,8 @@ <control> <type>image</type> <id>1060</id> - <posX>224</posX> - <posY>350</posY> + <posX>219</posX> + <posY>370</posY> <width>36</width> <height>36</height> <visible>no</visible> @@ -287,8 +306,8 @@ <control> <type>image</type> <id>1059</id> - <posX>227</posX> - <posY>316</posY> + <posX>222</posX> + <posY>336</posY> <width>30</width> <height>30</height> <visible>no</visible> @@ -298,8 +317,8 @@ <control> <type>image</type> <id>1058</id> - <posX>230</posX> - <posY>288</posY> + <posX>225</posX> + <posY>308</posY> <width>24</width> <height>24</height> <visible>no</visible> @@ -309,8 +328,8 @@ <control> <type>image</type> <id>1057</id> - <posX>233</posX> - <posY>266</posY> + <posX>228</posX> + <posY>286</posY> <width>18</width> <height>18</height> <visible>no</visible> @@ -320,8 +339,8 @@ <control> <type>image</type> <id>1056</id> - <posX>236</posX> - <posY>250</posY> + <posX>231</posX> + <posY>270</posY> <width>12</width> <height>12</height> <visible>no</visible> @@ -331,8 +350,8 @@ <control> <type>image</type> <id>1055</id> - <posX>224</posX> - <posY>350</posY> + <posX>219</posX> + <posY>370</posY> <width>36</width> <height>36</height> <visible>no</visible> @@ -342,8 +361,8 @@ <control> <type>image</type> <id>1054</id> - <posX>227</posX> - <posY>316</posY> + <posX>222</posX> + <posY>336</posY> <width>30</width> <height>30</height> <visible>no</visible> @@ -353,8 +372,8 @@ <control> <type>image</type> <id>1053</id> - <posX>230</posX> - <posY>288</posY> + <posX>225</posX> + <posY>308</posY> <width>24</width> <height>24</height> <visible>no</visible> @@ -364,8 +383,8 @@ <control> <type>image</type> <id>1052</id> - <posX>233</posX> - <posY>266</posY> + <posX>228</posX> + <posY>286</posY> <width>18</width> <height>18</height> <visible>no</visible> @@ -375,8 +394,8 @@ <control> <type>image</type> <id>1051</id> - <posX>236</posX> - <posY>250</posY> + <posX>231</posX> + <posY>270</posY> <width>12</width> <height>12</height> <visible>no</visible> @@ -387,9 +406,9 @@ <type>image</type> <id>1021</id> <posX>65</posX> - <posY>250</posY> - <width>155</width> - <height>220</height> + <posY>270</posY> + <width>145</width> + <height>200</height> <texture>-</texture> <keepaspectratio>yes</keepaspectratio> </control> @@ -424,8 +443,8 @@ <control> <type>image</type> <id>1020</id> - <posX>80</posX> - <posY>235</posY> + <posX>85</posX> + <posY>260</posY> <width>122</width> <height>160</height> <texture>-</texture> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |