|
From: <ze...@us...> - 2007-02-12 20:12:06
|
Revision: 113
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=113&view=rev
Author: zebons
Date: 2007-02-12 12:11:45 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs
trunk/plugins/MyFilms/AntMovieCatalog.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/MesFilmsSetup.resx
trunk/plugins/MyFilms/Properties/AssemblyInfo.cs
trunk/plugins/WebBrowser/GUIWebBrowser.suo
Modified: trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs
===================================================================
--- trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs 2007-02-12 17:42:33 UTC (rev 112)
+++ trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs 2007-02-12 20:11:45 UTC (rev 113)
@@ -1135,7 +1135,7 @@
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public MovieRow AddMovieRow(
- int Number,
+ string 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(int), null, System.Data.MappingType.Attribute);
+ this.columnNumber = new System.Data.DataColumn("Number", typeof(string), 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);
@@ -1609,10 +1609,10 @@
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public int Number {
+ public string Number {
get {
try {
- return ((int)(this[this.tableMovie.NumberColumn]));
+ return ((string)(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);
Modified: trunk/plugins/MyFilms/AntMovieCatalog.cs
===================================================================
(Binary files differ)
Modified: trunk/plugins/MyFilms/AntMovieCatalog.xsd
===================================================================
--- trunk/plugins/MyFilms/AntMovieCatalog.xsd 2007-02-12 17:42:33 UTC (rev 112)
+++ trunk/plugins/MyFilms/AntMovieCatalog.xsd 2007-02-12 20:11:45 UTC (rev 113)
@@ -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_ColumnVarNameInTable="columnProperties" msprop:Generator_ColumnPropNameInRow="Properties" msprop:Generator_ColumnPropNameInTable="PropertiesColumn" type="xs:string" minOccurs="0" msdata:Ordinal="1" />
+ <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="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_ColumnVarNameInTable="columnDateAdded" msprop:Generator_ColumnPropNameInRow="DateAdded" 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_ColumnPropNameInRow="DateAdded" msprop:Generator_ColumnVarNameInTable="columnDateAdded" msprop:Generator_ColumnPropNameInTable="DateAddedColumn" type="xs:dateTime" minOccurs="0" msdata:Ordinal="29" />
</xs:sequence>
- <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: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:complexType>
</xs:element>
</xs:sequence>
- <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: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:complexType>
</xs:element>
</xs:sequence>
- <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: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:complexType>
</xs:element>
</xs:choice>
Modified: trunk/plugins/MyFilms/MesFilms.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilms.cs 2007-02-12 17:42:33 UTC (rev 112)
+++ trunk/plugins/MyFilms/MesFilms.cs 2007-02-12 20:11:45 UTC (rev 113)
@@ -4,8 +4,8 @@
using System.Text.RegularExpressions;
using System.Globalization;
using MediaPortal.GUI.Library;
+using System.Xml;
-
using System.IO;
using System.Data;
using MediaPortal.Dialogs;
@@ -87,6 +87,8 @@
string StrViewText1 = null;
string StrViewItem2 = null;
string StrViewText2 = null;
+ string StrViewDfltItem = null;
+ string StrViewDfltText = null;
string StrFileXml = null;
string StrPathImg = null;
string StrSort = null;
@@ -103,6 +105,8 @@
string FileImage = "9999";
private AntMovieCatalog mydivx;
private string StrPluginName = "Films";
+ private string CurrentConfig;
+ private int NbConfig;
#endregion
#region events
@@ -168,9 +172,9 @@
public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
{
string wPluginName = StrPluginName;
- using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
{
- wPluginName = xmlreader.GetValueAsString("MesFilms", "pluginName", "My Films");
+ wPluginName = xmlreader.GetValueAsString("MyFilms", "PluginName", "My Films");
}
strButtonText = wPluginName;
@@ -225,12 +229,7 @@
BtnSrtBy.IsAscending = false;
Afficherliste();
return;
- // TxtSelect.Label = StrTxtSelect;
- // boolselect = false;
- // boolreturn = false;
- // Afficherliste();
- // return;
- }
+ }
if (boolreturn)
{
boolreturn = false;
@@ -295,90 +294,36 @@
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();
- string StrFilterItem1 = null;
- string StrFilterText1 = null;
- string StrFilterItem2 = null;
- string StrFilterText2 = null;
- using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
{
- StrStorage = xmlreader.GetValueAsString("MesFilms", "AntStorage", "");
- StrIdentItem = xmlreader.GetValueAsString("MesFilms", "AntIdentItem", "");
- StrTitle1 = xmlreader.GetValueAsString("MesFilms", "AntTitle1", "");
- StrFilterItem1 = xmlreader.GetValueAsString("MesFilms", "AntFilterItem1", "");
- StrTSort1 = xmlreader.GetValueAsString("MesFilms", "AntTSort", "");
- StrSort1 = xmlreader.GetValueAsString("MesFilms", "AntSort", "");
- StrFilterText1 = xmlreader.GetValueAsString("MesFilms", "AntFilterText1", "");
- StrFilterItem2 = xmlreader.GetValueAsString("MesFilms", "AntFilterItem2", "");
- StrFilterText2 = xmlreader.GetValueAsString("MesFilms", "AntFilterText2", "");
- StrViewItem1 = xmlreader.GetValueAsString("MesFilms", "AntViewItem1", "");
- StrViewText1 = xmlreader.GetValueAsString("MesFilms", "AntViewText1", "");
- StrViewItem2 = xmlreader.GetValueAsString("MesFilms", "AntViewItem2", "");
- StrViewText2 = xmlreader.GetValueAsString("MesFilms", "AntViewText2", "");
- StrFileXml = xmlreader.GetValueAsString("MesFilms", "AntCatalog", "");
- StrPathImg = xmlreader.GetValueAsString("MesFilms", "AntPicture", "");
- StrSelect = xmlreader.GetValueAsString("MesFilms", "StrSelect", "");
- StrSort = xmlreader.GetValueAsString("MesFilms", "StrSort", "");
- CurrentSortMethod = xmlreader.GetValueAsString("MesFilms", "CurrentSortMethod", "");
- TxtSelect.Label = xmlreader.GetValueAsString("MesFilms", "Selection", "");
- StrSortSens = xmlreader.GetValueAsString("MesFilms", "StrSortSens", "");
- l_index = xmlreader.GetValueAsInt("MesFilms", "IndexItem", -1);
- }
- mydivx = new AntMovieCatalog();
- if (!ControlFichierDonn\xE9es())
- base.OnPreviousWindow();
- try
- {
- mydivx.ReadXml(StrFileXml);
- }
- catch
- {
- GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
- dlgOk.SetHeading("Error");//my videos
- dlgOk.SetLine(1, "Invalid character in the XML File after enreg : " + mydivx.Movie[mydivx.Movie.Count - 1]["Number"]);
- dlgOk.SetLine(2, "Verify the few next enregs with ANT Movie Catalog");
- dlgOk.DoModal(GetID);
- }
- StrDfltSelect = "";
- if (StrSort1.Length == 0)
- StrSort1 = "(none)";
- if (!(StrFilterItem1 == null) && !(StrFilterItem1 == "(none)") && !(StrFilterItem1 == ""))
- StrDfltSelect = "(" + StrFilterItem1 + " not like '" + StrFilterText1 + "' or " + StrFilterItem1 + " is null) AND ";
- if (!(StrFilterItem2 == null) && !(StrFilterItem2 == "(none)") && !(StrFilterItem2 == ""))
- StrDfltSelect = "(" + StrDfltSelect + StrFilterItem2 + " not like '" + StrFilterText2 + "' or " + StrFilterItem2 + " is null) AND ";
- if (StrSelect == "")
- StrSelect = StrTitle1.ToString() + " not like ''";
- if (StrSort == "")
- StrSort = StrTitle1;
- if (StrSortSens == "")
- StrSortSens = " ASC";
- if (CurrentSortMethod == "")
- CurrentSortMethod = GUILocalizeStrings.Get(103);
- else
- BtnSrtBy.Label = CurrentSortMethod.ToString();
- string BtnSearchT = GUILocalizeStrings.Get(137) + " " + GUILocalizeStrings.Get(342);
- string BtnSearchA = GUILocalizeStrings.Get(137) + " " + GUILocalizeStrings.Get(344);
- GUIButtonControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnSearchT, BtnSearchT);
- GUIButtonControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnSearchA, BtnSearchA);
- // TxtSelect.HorizontalAlignment = MediaPortal.Drawing.HorizontalAlignment.Right;
- BtnSrtBy.SortChanged += new SortEventHandler(SortChanged);
- if (PreviousWindowId == 7987)
- Afficherliste();
- else
- {
- StrSelect = StrTitle1.ToString() + " not like ''";
- TxtSelect.Label = StrTxtSelect = " ";
- boolselect = false;
- l_index = -1;
- BtnSrtBy.Label = CurrentSortMethod;
- if (StrSortSens == " ASC")
- BtnSrtBy.IsAscending = true;
+ if (PreviousWindowId == 7987)
+ {
+ CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Current_Config", "");
+ Load_Config(CurrentConfig);
+ Fin_Charge_Init(false);
+ }
else
- BtnSrtBy.IsAscending = false;
- Afficherliste();
+ {
+ CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Default_Config", "");
+ NbConfig = xmlreader.GetValueAsInt("MyFilms", "NbConfig", 0);
+ if ((CurrentConfig == "") && (NbConfig == 0))
+ {
+ StrFileXml = "";
+ Fin_Charge_Init(false);
+ }
+ else
+ {
+ if (CurrentConfig == "")
+ CurrentConfig = Choice_Config();
+ Load_Config(CurrentConfig);
+ Fin_Charge_Init(true);
+ }
+ }
}
return true;
@@ -712,7 +657,7 @@
//----------------------------------------------------------------------------------------
private void affichage_Lstdetail(int w_item)
{
- DataRow[] r = LectureDonn\xE9es(StrDfltSelect + StrSelect, StrSort, StrSortSens);
+ DataRow[] r = LectureDonn\xE9es(StrSelect, StrSort, StrSortSens);
if (r.Length == 0)
{
masquage_Lstdetail();
@@ -859,128 +804,51 @@
//--------------------------------------------------------------------------------------------
private void Selection_type_Video()
{
+ ArrayList choice_view = new ArrayList();
GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
if (dlg == null) return;
dlg.Reset();
dlg.SetHeading(924); // menu
dlg.Add(GUILocalizeStrings.Get(342));//videos
+
dlg.Add(GUILocalizeStrings.Get(345));//year
dlg.Add(GUILocalizeStrings.Get(135));//genre
dlg.Add(GUILocalizeStrings.Get(200026));//pays
+ choice_view.Add("All");
+ choice_view.Add("Year");
+ choice_view.Add("Category");
+ choice_view.Add("Country");
if (!(StrStorage.Length == 0) && !(StrStorage == "(none)"))
- dlg.Add(GUILocalizeStrings.Get(154) + " " + GUILocalizeStrings.Get(1951));//pays
+ {
+ dlg.Add(GUILocalizeStrings.Get(154) + " " + GUILocalizeStrings.Get(1951));//storage
+ choice_view.Add("Storage");
+ }
if (!(StrViewItem1 == null) && !(StrViewItem1 == "(none)"))
- if ((StrViewText1 == null) || (StrViewText1 == null))
+ {
+ choice_view.Add("View1");
+ if ((StrViewText1 == null) || (StrViewText1.Length == 0))
dlg.Add(StrViewItem1); // specific user View1
else
dlg.Add(StrViewText1); // specific Text for View1
+ }
if (!(StrViewItem2 == null) && !(StrViewItem2 == "(none)"))
- if ((StrViewText2 == null) || (StrViewText2 == null))
+ {
+ choice_view.Add("View2");
+ if ((StrViewText2 == null) || (StrViewText2.Length == 0))
dlg.Add(StrViewItem2); // specific user View2
else
dlg.Add(StrViewText2); // specific Text for View2
+ }
+ if (NbConfig > 1)
+ {
+ dlg.Add(GUILocalizeStrings.Get(6029) + " " + GUILocalizeStrings.Get(6022)); // Change Config
+ choice_view.Add("Config");
+ }
dlg.DoModal(GetID);
if (dlg.SelectedLabel == -1) return;
- boolstorage = false;
- switch (dlg.SelectedLabel)
- {
- case 0:
- StrSelect = StrTitle1.ToString() + " not like ''";
- TxtSelect.Label = " ";
- boolselect = false;
- BtnSrtBy.Label = CurrentSortMethod;
- if (StrSortSens == " ASC")
- BtnSrtBy.IsAscending = true;
- else
- BtnSrtBy.IsAscending = false;
- Afficherliste();
- break;
- case 1:
- WStrSort = "YEAR";
- WStrSortSens = " DESC";
- BtnSrtBy.IsAscending = false;
- boolreturn = true;
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- case 2:
- WStrSort = "CATEGORY";
- WStrSortSens = " ASC";
- BtnSrtBy.IsAscending = true;
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- case 3:
- WStrSort = "COUNTRY";
- WStrSortSens = " ASC";
- BtnSrtBy.IsAscending = true;
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- case 4:
- if (!(StrStorage.Length == 0) && !(StrStorage == "(none)"))
- {
- StrSelect = "((" + StrTitle1.ToString() + " not like '') and (" + StrStorage.ToString() + " not like ''))";
- TxtSelect.Label = GUILocalizeStrings.Get(154) + " " + GUILocalizeStrings.Get(1951);
- StrTxtSelect = TxtSelect.Label;
- boolselect = false;
- boolreturn = false;
- BtnSrtBy.Label = CurrentSortMethod;
- if (StrSortSens == " ASC")
- BtnSrtBy.IsAscending = true;
- else
- BtnSrtBy.IsAscending = false;
- Afficherliste();
- break;
- }
- else
- {
- if (!(StrViewItem1 == null) && !(StrViewItem1 == "(none)"))
- WStrSort = StrViewItem1; // specific user View1
- else
- WStrSort = StrViewItem2;
- WStrSortSens = " ASC";
- BtnSrtBy.IsAscending = true;
- if (WStrSort == "DateAdded")
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*");
- else
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- }
- case 5:
- if (!(StrStorage.Length == 0) && !(StrStorage == "(none)"))
- {
- if (!(StrViewItem1 == null) && !(StrViewItem1 == "(none)"))
- WStrSort = StrViewItem1; // specific user View1
- else
- WStrSort = StrViewItem2;
- WStrSortSens = " ASC";
- BtnSrtBy.IsAscending = true;
- if (WStrSort == "DateAdded")
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*");
- else
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- }
- else
- {
- WStrSort = StrViewItem2; // specific user View2
- WStrSortSens = " ASC";
- BtnSrtBy.IsAscending = true;
- if (WStrSort == "DateAdded")
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*");
- else
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- }
- case 6:
- WStrSort = StrViewItem2; // specific user View2
- WStrSortSens = " ASC";
- BtnSrtBy.IsAscending = true;
- if (WStrSort == "DateAdded")
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*");
- else
- getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
- break;
- }
+ Change_view(choice_view[dlg.SelectedLabel].ToString());
+ return;
}
//----------------------------------------------------------------------------------------------------
// Search for the selected choice in the ANT Item
@@ -1110,21 +978,267 @@
}
}
//-----------------------------------------------------------------------------------------------
- // save Config Parameters in MediaPortal.xml file (section MesFilm)
+ // save Config Parameters in MyFilms.xml file (section MesFilm)
//-----------------------------------------------------------------------------------------------
private void save_config_values(bool save_index)
{
- using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml"))
{
- xmlwriter.SetValue("MesFilms", "StrSelect", StrSelect.ToString());
- xmlwriter.SetValue("MesFilms", "StrSort", StrSort.ToString());
- xmlwriter.SetValue("MesFilms", "CurrentSortMethod", CurrentSortMethod.ToString());
- xmlwriter.SetValue("MesFilms", "StrSortSens", StrSortSens.ToString());
- xmlwriter.SetValue("MesFilms", "Selection", TxtSelect.Label.ToString());
+ xmlwriter.SetValue(CurrentConfig, "StrSelect", StrSelect.ToString());
+ xmlwriter.SetValue(CurrentConfig, "StrDfltSelect", StrDfltSelect.ToString());
+ xmlwriter.SetValue(CurrentConfig, "StrSort", StrSort.ToString());
+ xmlwriter.SetValue(CurrentConfig, "CurrentSortMethod", CurrentSortMethod.ToString());
+ xmlwriter.SetValue(CurrentConfig, "StrSortSens", StrSortSens.ToString());
+ xmlwriter.SetValue(CurrentConfig, "Selection", TxtSelect.Label.ToString());
if (save_index)
- xmlwriter.SetValue("MesFilms", "IndexItem", lsCtlFilm.SelectedListItemIndex.ToString());
+ xmlwriter.SetValue(CurrentConfig, "IndexItem", lsCtlFilm.SelectedListItemIndex.ToString());
}
}
+ private void Load_Config(string CurrentConfig)
+ {
+ //-----------------------------------------------------------------------------------------------
+ // Load Config Parameters in MyFilms.xml file (section CurrentConfig)
+ //-----------------------------------------------------------------------------------------------
+ using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml"))
+ {
+ xmlwriter.SetValue("MyFilms", "Current_Config", CurrentConfig);
+ }
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
+ {
+ StrStorage = xmlreader.GetValueAsString(CurrentConfig, "AntStorage", "");
+ StrIdentItem = xmlreader.GetValueAsString(CurrentConfig, "AntIdentItem", "");
+ StrTitle1 = xmlreader.GetValueAsString(CurrentConfig, "AntTitle1", "");
+ StrTSort1 = xmlreader.GetValueAsString(CurrentConfig, "AntTSort", "");
+ StrSort1 = xmlreader.GetValueAsString(CurrentConfig, "AntSort", "");
+ StrViewItem1 = xmlreader.GetValueAsString(CurrentConfig, "AntViewItem1", "");
+ StrViewText1 = xmlreader.GetValueAsString(CurrentConfig, "AntViewText1", "");
+ StrViewItem2 = xmlreader.GetValueAsString(CurrentConfig, "AntViewItem2", "");
+ StrViewText2 = xmlreader.GetValueAsString(CurrentConfig, "AntViewText2", "");
+ StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalog", "");
+ StrPathImg = xmlreader.GetValueAsString(CurrentConfig, "AntPicture", "");
+ StrSelect = xmlreader.GetValueAsString(CurrentConfig, "StrSelect", "");
+ StrDfltSelect = xmlreader.GetValueAsString(CurrentConfig, "StrDfltSelect", "");
+ StrSort = xmlreader.GetValueAsString(CurrentConfig, "StrSort", "");
+ CurrentSortMethod = xmlreader.GetValueAsString(CurrentConfig, "CurrentSortMethod", "");
+ TxtSelect.Label = xmlreader.GetValueAsString(CurrentConfig, "Selection", "");
+ StrSortSens = xmlreader.GetValueAsString(CurrentConfig, "StrSortSens", "");
+ l_index = xmlreader.GetValueAsInt(CurrentConfig, "IndexItem", -1);
+ StrViewDfltItem = xmlreader.GetValueAsString(CurrentConfig, "ViewDfltItem", "");
+ StrViewDfltText = xmlreader.GetValueAsString(CurrentConfig, "ViewDfltText", "");
+
+ }
+ }
+ //--------------------------------------------------------------------------------------------
+ // Change View Response
+ //--------------------------------------------------------------------------------------------
+ private void Change_view(string choice_view)
+ {
+ boolstorage = false;
+ if (choice_view == "All")
+ {
+ // Change View All Films
+ StrSelect = StrTitle1.ToString() + " not like ''";
+ TxtSelect.Label = " ";
+ boolselect = false;
+ BtnSrtBy.Label = CurrentSortMethod;
+ if (StrSortSens == " ASC")
+ BtnSrtBy.IsAscending = true;
+ else
+ BtnSrtBy.IsAscending = false;
+ Afficherliste();
+ return;
+ }
+ if (choice_view == "Year")
+ {
+ // Change View by Year
+ WStrSort = "YEAR";
+ WStrSortSens = " DESC";
+ BtnSrtBy.IsAscending = false;
+ boolreturn = true;
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
+ return;
+ }
+ if (choice_view == "Category")
+ {
+ // Change View by "Category":
+ WStrSort = "CATEGORY";
+ WStrSortSens = " ASC";
+ BtnSrtBy.IsAscending = true;
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
+ return;
+ }
+ if (choice_view == "Country")
+ {
+ // Change View by "Country":
+ WStrSort = "COUNTRY";
+ WStrSortSens = " ASC";
+ BtnSrtBy.IsAscending = true;
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
+ return;
+ }
+ if (choice_view == "Storage")
+ {
+ // Change View by "Storage":
+ StrSelect = "((" + StrTitle1.ToString() + " not like '') and (" + StrStorage.ToString() + " not like ''))";
+ TxtSelect.Label = GUILocalizeStrings.Get(154) + " " + GUILocalizeStrings.Get(1951);
+ StrTxtSelect = TxtSelect.Label;
+ boolselect = false;
+ boolreturn = false;
+ BtnSrtBy.Label = CurrentSortMethod;
+ if (StrSortSens == " ASC")
+ BtnSrtBy.IsAscending = true;
+ else
+ BtnSrtBy.IsAscending = false;
+ Afficherliste();
+ return;
+ }
+ if (choice_view == "View1")
+ {
+ // Change View by "View1":
+ WStrSort = StrViewItem1; // specific user View1
+ WStrSortSens = " ASC";
+ BtnSrtBy.IsAscending = true;
+ if (WStrSort == "DateAdded")
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*");
+ else
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
+ return;
+ }
+ if (choice_view == "View2")
+ {
+ // Change View by "View2":
+ WStrSort = StrViewItem2;
+ WStrSortSens = " ASC";
+ BtnSrtBy.IsAscending = true;
+ if (WStrSort == "DateAdded")
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", "Date", " DESC", "*");
+ else
+ getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*");
+ return;
+ }
+ if (choice_view == "Config")
+ {
+ //Change "Config":
+ mydivx.Clear();
+ Load_Config(Choice_Config());
+ Fin_Charge_Init(true);
+ return;
+ }
+ }
+ //--------------------------------------------------------------------------------------------
+ // Choice Configuration
+ //--------------------------------------------------------------------------------------------
+ private string Choice_Config()
+ {
+ GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
+ if (dlg == null)
+ {
+ StrFileXml = "";
+ return "";
+ }
+ dlg.Reset();
+ dlg.SetHeading(924); // menu
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
+ {
+ int MesFilms_nb_config = xmlreader.GetValueAsInt("MyFilms", "NbConfig", -1);
+ for (int i = 0; i < (int)MesFilms_nb_config; i++)
+ {
+ dlg.Add(xmlreader.GetValueAsString("MyFilms", "ConfigName" + i, ""));
+ }
+ }
+ dlg.DoModal(GetID);
+ if (dlg.SelectedLabel == -1)
+ {
+ StrFileXml = "";
+ return "";
+ }
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
+ {
+ CurrentConfig = xmlreader.GetValueAsString("MyFilms", "ConfigName" + dlg.SelectedLabel, "");
+ }
+ return CurrentConfig;
+ }
+ //--------------------------------------------------------------------------------------------
+ // Initial Windows load. If LoadDfltSlct = true => load default select if any
+ // LoadDfltSlct = false => return from MesFilmsDetail
+ //--------------------------------------------------------------------------------------------
+ private void Fin_Charge_Init(bool LoadDfltSlct)
+ {
+ if (!ControlFichierDonn\xE9es())
+ base.OnPreviousWindow();
+ try
+ {
+ mydivx.ReadXml(StrFileXml);
+ }
+ catch
+ {
+ GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ dlgOk.SetHeading("Error");//my videos
+ dlgOk.SetLine(1, "Invalid character in the XML File after enreg : " + mydivx.Movie[mydivx.Movie.Count - 1]["Number"]);
+ dlgOk.SetLine(2, "Verify your file with the plugin setup");
+ dlgOk.DoModal(GetID);
+ }
+ if (StrSelect == "")
+ StrSelect = StrTitle1.ToString() + " not like ''";
+ if (StrSort1.Length == 0)
+ StrSort1 = "(none)";
+ if (StrSort == "")
+ StrSort = StrTitle1;
+ if (StrSortSens == "")
+ StrSortSens = " ASC";
+ if (CurrentSortMethod == "")
+ CurrentSortMethod = GUILocalizeStrings.Get(103);
+ BtnSrtBy.Label = CurrentSortMethod.ToString();
+ string BtnSearchT = GUILocalizeStrings.Get(137) + " " + GUILocalizeStrings.Get(342);
+ string BtnSearchA = GUILocalizeStrings.Get(137) + " " + GUILocalizeStrings.Get(344);
+ GUIButtonControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnSearchT, BtnSearchT);
+ GUIButtonControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnSearchA, BtnSearchA);
+ // TxtSelect.HorizontalAlignment = MediaPortal.Drawing.HorizontalAlignment.Right;
+ BtnSrtBy.SortChanged += new SortEventHandler(SortChanged);
+ if (!(LoadDfltSlct))
+ Afficherliste();
+ else
+ {
+ if ((StrViewDfltItem.Length == 0) || (StrViewDfltItem == "(none)"))
+ {
+ StrSelect = StrTitle1.ToString() + " not like ''";
+ TxtSelect.Label = StrTxtSelect = " ";
+ boolselect = false;
+ l_index = -1;
+ if (StrSortSens == " ASC")
+ BtnSrtBy.IsAscending = true;
+ else
+ BtnSrtBy.IsAscending = false;
+ Afficherliste();
+ }
+ else
+ {
+ if (StrViewDfltText.Length == 0)
+ {
+ Change_view(StrViewDfltItem);
+ }
+ else
+ // View List as selected
+ {
+ boolselect = false;
+ boolreturn = true;
+ WStrSort = StrViewDfltItem;
+ if (StrViewDfltItem == "DateAdded")
+ StrSelect = "Date" + " like '" + DateTime.Parse(StrViewDfltText).ToShortDateString() + "'";
+ else
+ StrSelect = StrViewDfltItem + " like '*" + StrViewDfltText + "*'";
+ TxtSelect.Label = "[" + StrViewDfltText + "]";
+ BtnSrtBy.Label = CurrentSortMethod;
+ if (StrSortSens == " ASC")
+ BtnSrtBy.IsAscending = true;
+ else
+ BtnSrtBy.IsAscending = false;
+ Afficherliste();
+ }
+
+ }
+ }
+ }
#endregion
}
}
\ No newline at end of file
Modified: trunk/plugins/MyFilms/MesFilms.csproj
===================================================================
--- trunk/plugins/MyFilms/MesFilms.csproj 2007-02-12 17:42:33 UTC (rev 112)
+++ trunk/plugins/MyFilms/MesFilms.csproj 2007-02-12 20:11:45 UTC (rev 113)
@@ -30,15 +30,15...
[truncated message content] |