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: <nor...@us...> - 2007-06-24 15:51:39
|
Revision: 623 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=623&view=rev Author: northern_sky Date: 2007-06-24 08:51:37 -0700 (Sun, 24 Jun 2007) Log Message: ----------- fixed a bug with filepath.- there's probaly more old stuff that can be removed now Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-24 15:50:44 UTC (rev 622) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-24 15:51:37 UTC (rev 623) @@ -319,10 +319,11 @@ sqlSelect.AddField("tblFileItem.*"); sqlSelect.AddField("'' as title2"); sqlSelect.AddField("'' as fieldtype2"); - if (pathSubfolders != "") + /* if (pathSubfolders != "") { sqlSelect.AddWhereCond(String.Format("filepath = '{0}'", pathSubfolders)); - } + }*/ + sqlSelect.AddOrderField("isfolder desc"); sqlSelect.AddOrderField("uppertitle"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-24 15:50:47
|
Revision: 622 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=622&view=rev Author: northern_sky Date: 2007-06-24 08:50:44 -0700 (Sun, 24 Jun 2007) Log Message: ----------- forgot to up this change: db filepath removed Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-24 15:31:20 UTC (rev 621) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-24 15:50:44 UTC (rev 622) @@ -183,11 +183,10 @@ return false; skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle text, filename text, arguments text, windowstyle text, startupdir text, useshellexecute text, usequotes text, source_type text, source text, imagefile text, filedirectory text, imagedirectory text, validextensions text, enabled text, importvalidimagesonly text, iposition integer, enableGUIRefresh text, GUIRefreshPossible text, contentID integer, systemdefault text, waitforexit text, preLaunch text, postLaunch text)"); - DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid integer primary key, appid integer, title text, filename text, filepath text, imagefile text, mainGenre text, subGenre text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, uppertitle text, tagdata text, categorydata text, gameInfoUrl text)"); + DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid integer primary key, appid integer, title text, filename text, imagefile text, mainGenre text, subGenre text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, uppertitle text, tagdata text, categorydata text, gameInfoUrl text)"); DatabaseUtility.AddTable(sqlDB, "tblFilterItem", "CREATE TABLE tblFilterItem (appid integer, grouperAppID integer, fileID integer, filename text, tag integer)"); DatabaseUtility.AddTable(sqlDB, "tblSetting", "CREATE TABLE tblSetting (settingid integer primary key, key text, value text)"); DatabaseUtility.AddIndex(sqlDB, "idxFile1", "CREATE INDEX idxFile1 ON tblFileItem(appid)"); - DatabaseUtility.AddIndex(sqlDB, "idxFile2", "CREATE INDEX idxFile2 ON tblFileItem(filepath, uppertitle)"); DatabaseUtility.AddIndex(sqlDB, "idxApp1", "CREATE INDEX idxApp1 ON tblApplicationItem(fatherID)"); DatabaseUtility.AddIndex(sqlDB, "idxFilterItem1", "CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(appID, fileID, grouperAppID)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ze...@us...> - 2007-06-24 15:31:34
|
Revision: 621 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=621&view=rev Author: zebons Date: 2007-06-24 08:31:20 -0700 (Sun, 24 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/My Refresh/MyRefresh.cs trunk/plugins/My Refresh/MyRefresh.csproj Added Paths: ----------- trunk/plugins/My Refresh/MyRefresh.sln Modified: trunk/plugins/My Refresh/MyRefresh.cs =================================================================== --- trunk/plugins/My Refresh/MyRefresh.cs 2007-06-24 12:54:41 UTC (rev 620) +++ trunk/plugins/My Refresh/MyRefresh.cs 2007-06-24 15:31:20 UTC (rev 621) @@ -62,7 +62,7 @@ { this.Refresh(false); } - if ((action.wID == Action.ActionType.ACTION_KEY_PRESSED) && (this._refreshHotkeys.IndexOf('a', 0) != -1)) + if ((action.wID == Action.ActionType.ACTION_KEY_PRESSED) && (this._refreshHotkeys.IndexOf('e', 0) != -1)) { this.Refresh(true); } @@ -91,12 +91,21 @@ } if (refreshEverything) { - GUIFontManager.LoadFonts(@"skin\" + GUIGraphicsContext.Skin + @"\fonts.xml"); + GUIFontManager.LoadFonts(GUIGraphicsContext.Skin + @"\fonts.xml"); GUIFontManager.InitializeDeviceObjects(); } GUIControlFactory.ClearReferences(); GUIControlFactory.LoadReferences(GUIGraphicsContext.Skin + @"\references.xml"); - GUIWindowManager.OnResize(); + if (refreshEverything) + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + bool autosize = xmlreader.GetValueAsBool("general", "autosize", true); + if (autosize && !GUIGraphicsContext.Fullscreen) + Form.ActiveForm.Size = new System.Drawing.Size(GUIGraphicsContext.SkinSize.Width, GUIGraphicsContext.SkinSize.Height); + } + } + GUIWindowManager.OnResize(); GUIWindow window = GUIWindowManager.GetWindow(GUIWindowManager.ActiveWindow); if (GUIWindowManager.IsRouted) { Modified: trunk/plugins/My Refresh/MyRefresh.csproj =================================================================== --- trunk/plugins/My Refresh/MyRefresh.csproj 2007-06-24 12:54:41 UTC (rev 620) +++ trunk/plugins/My Refresh/MyRefresh.csproj 2007-06-24 15:31:20 UTC (rev 621) @@ -94,23 +94,29 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> + <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86" /> <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> + <Reference Include="Utils, Version=2.1.2.0, Culture=neutral, processorArchitecture=x86" /> </ItemGroup> <ItemGroup> <Compile Include="MyRefresh.cs"> <SubType>Code</SubType> </Compile> + <Compile Include="MyRefreshSetup.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="MyRefreshSetup.Designer.cs"> + <DependentUpon>MyRefreshSetup.cs</DependentUpon> + </Compile> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\..\Documents\Coding\Mediaportal Check\Core\Core.csproj"> - <Project>{02FFFC1F-2555-4B99-8B01-3432D0673855}</Project> - <Name>Core</Name> - </ProjectReference> - <ProjectReference Include="..\..\..\Documents\Coding\Mediaportal Check\Utils\Utils.csproj"> - <Project>{6DA0E4DF-6230-4642-98B5-E690BB6942BB}</Project> - <Name>Utils</Name> - </ProjectReference> + <EmbeddedResource Include="MyRefreshSetup.resx"> + <DependentUpon>MyRefreshSetup.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> Added: trunk/plugins/My Refresh/MyRefresh.sln =================================================================== --- trunk/plugins/My Refresh/MyRefresh.sln (rev 0) +++ trunk/plugins/My Refresh/MyRefresh.sln 2007-06-24 15:31:20 UTC (rev 621) @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyRefresh", "MyRefresh.csproj", "{0F2811BE-6B64-42B6-B374-B4ED04648825}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Debug|x86.ActiveCfg = Debug|x86 + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Debug|x86.Build.0 = Debug|x86 + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Release|Any CPU.Build.0 = Release|Any CPU + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Release|x86.ActiveCfg = Release|x86 + {0F2811BE-6B64-42B6-B374-B4ED04648825}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-24 12:54:49
|
Revision: 620 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=620&view=rev Author: northern_sky Date: 2007-06-24 05:54:41 -0700 (Sun, 24 Jun 2007) Log Message: ----------- removed some fixed stuff Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-24 12:52:32 UTC (rev 619) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-24 12:54:41 UTC (rev 620) @@ -40,7 +40,6 @@ -> remove (maybe) obsolete DatabaseSorter.cs, replaced by ProgramSort.cs -> maybe: merging CurrentView/CurrentSort..... code in GUIprograms.cs DatabaseSettings.cs: or having this stuff only in one place - - Filesview in config file sometime remebers wrong appid dirs.. FEATURES: @@ -55,9 +54,7 @@ DB redesign/restructure: - small changes - - remove last remains pincode, - - use parameters in queries?? heah? ;) could you explain this more? - - removing the filepath in fileitems? we can parse it from filename + - use parameters in queries?? heah? ;) could you explain this more? =) we take it on icq=) - only saving filename without " . We add them if use qoutes is enabled when we create the procInfo ThumbnailSupport: @@ -66,12 +63,11 @@ - [low] genre: thumbs for genre, for example it could be created on AllGame lookup, for first file with this genre - ....... -Code: -Revise the code partially. AllTime Todo: --> TESTING ;) --> BugFixing :P + --> Revise the code =) --------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-24 12:52:33
|
Revision: 619 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=619&view=rev Author: northern_sky Date: 2007-06-24 05:52:32 -0700 (Sun, 24 Jun 2007) Log Message: ----------- remembered wrong imagedir,filedir bug fixed Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-06-24 12:51:32 UTC (rev 618) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-06-24 12:52:32 UTC (rev 619) @@ -172,6 +172,12 @@ private void SyncFilePath() { + this.fileDirTextBox.Text = currentApplication.FileDirectory; + + string imageDirectorys = string.Join(";", currentApplication.imageDirs); + this.imageDirsTextBox.Text = imageDirectorys; + + this.fileExtensionsTextBox.Text = currentApplication.ValidExtensions; // filePathsLabel.Text = currentApplication.CurrentFilePath().Replace("&", "&&"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-24 12:51:36
|
Revision: 618 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=618&view=rev Author: northern_sky Date: 2007-06-24 05:51:32 -0700 (Sun, 24 Jun 2007) Log Message: ----------- dbchange: filepath-pincode removed Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -86,7 +86,6 @@ string validExtensions; bool importValidImagesOnly; - int pincode; int contentID; string systemDefault; @@ -358,7 +357,6 @@ appPosition = 0; importValidImagesOnly = false; enableGUIRefresh = false; - pincode = -1; contentID = 100; systemDefault = ""; waitForExit = true; @@ -848,20 +846,73 @@ if (sqlDB == null) return; string sql = ""; - string Pincode = ""; //to remove if (ContentID <= 0) ContentID = 100; try { AppID = GetNewAppID(); // important to avoid subsequent inserts! - sql = String.Format("insert into tblApplicationItem (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", - AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(StartupDir), ProgramUtils.BooleanToStr(UseShellExecute), - ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, - ProgramUtils.BooleanToStr(Enabled), ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), Pincode, - ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch) + sql = String.Format(@" + INSERT INTO + tblApplicationItem + ( + appid, + fatherID, + title, + shorttitle, + filename, + arguments, + windowstyle, + startupdir, + useshellexecute, + usequotes, + source_type, + source, + imagefile, + filedirectory, + imagedirectory, + validextensions, + importvalidimagesonly, + iposition, + enabled, + enableGUIRefresh, + GUIRefreshPossible, + contentID, + systemDefault, + WaitForExit, + preLaunch, + postLaunch + ) + VALUES + ( + '"+ AppID + @"', + '"+ FatherID + @"', + '"+ ProgramUtils.Encode(Title) +@"', + '"+ ProgramUtils.Encode(ShortTitle) +@"', + '"+ ProgramUtils.Encode(Filename) +@"', + '"+ ProgramUtils.Encode(Arguments) + @"', + '"+ ProgramUtils.WindowStyleToStr(WindowStyle) +@"', + '"+ ProgramUtils.Encode(StartupDir) +@"', + '"+ ProgramUtils.BooleanToStr(UseShellExecute) +@"', + '"+ ProgramUtils.BooleanToStr(UseQuotes) +@"', + '"+ ProgramUtils.ApplicationTypeToString(SourceType) +@"', + '"+ ProgramUtils.Encode(Source) +@"', + '"+ ProgramUtils.Encode(Imagefile) +@"', + '"+ ProgramUtils.Encode(FileDirectory) +@"', + '"+ ProgramUtils.Encode(ImageDirectory)+@"', + '"+ ProgramUtils.Encode(ValidExtensions)+@"', + '"+ ProgramUtils.BooleanToStr(importValidImagesOnly)+@"', + '"+ Position+@"', + '"+ ProgramUtils.BooleanToStr(Enabled)+@"', + '"+ ProgramUtils.BooleanToStr(EnableGUIRefresh) +@"', + '" + ProgramUtils.BooleanToStr(GUIRefreshPossible)+@"', + '" + ContentID +@"', + '"+ ProgramUtils.Encode(SystemDefault)+@"', + '"+ ProgramUtils.BooleanToStr(WaitForExit) +@"', + '"+ ProgramUtils.Encode(PreLaunch)+@"', + '"+ ProgramUtils.Encode(PostLaunch)+@"' + )" + ); sqlDB.Execute(sql); } @@ -877,7 +928,6 @@ if (AppID == -1) return; string sql = ""; - string Pincode = ""; //to remove if (ContentID <= 0) ContentID = 100; @@ -907,7 +957,6 @@ fatherID = '" + FatherID + @"', enableGUIRefresh = '" + ProgramUtils.BooleanToStr(EnableGUIRefresh) + @"', GUIRefreshPossible = '" + ProgramUtils.BooleanToStr(GUIRefreshPossible) +@"', - pincode = '" + Pincode + @"', contentID = '" + ContentID + @"', systemDefault = '" + ProgramUtils.Encode(SystemDefault) + @"', WaitForExit = '" + ProgramUtils.BooleanToStr(WaitForExit) + @"', Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -160,7 +160,7 @@ { curFile.Filename = "\"" + curFile.Filename + "\""; } - curFile.Filepath = fileInfo.DirectoryName; + curFile.Imagefile = GetThumbsFile(fileInfo, curFile.TitleNormalized); // not imported properties => set default values Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -182,7 +182,7 @@ if (sqlDB == null) return false; - skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle text, filename text, arguments text, windowstyle text, startupdir text, useshellexecute text, usequotes text, source_type text, source text, imagefile text, filedirectory text, imagedirectory text, validextensions text, enabled text, importvalidimagesonly text, iposition integer, enableGUIRefresh text, GUIRefreshPossible text, contentID integer, systemdefault text, waitforexit text, pincode integer, preLaunch text, postLaunch text)"); + skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle text, filename text, arguments text, windowstyle text, startupdir text, useshellexecute text, usequotes text, source_type text, source text, imagefile text, filedirectory text, imagedirectory text, validextensions text, enabled text, importvalidimagesonly text, iposition integer, enableGUIRefresh text, GUIRefreshPossible text, contentID integer, systemdefault text, waitforexit text, preLaunch text, postLaunch text)"); DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid integer primary key, appid integer, title text, filename text, filepath text, imagefile text, mainGenre text, subGenre text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, uppertitle text, tagdata text, categorydata text, gameInfoUrl text)"); DatabaseUtility.AddTable(sqlDB, "tblFilterItem", "CREATE TABLE tblFilterItem (appid integer, grouperAppID integer, fileID integer, filename text, tag integer)"); DatabaseUtility.AddTable(sqlDB, "tblSetting", "CREATE TABLE tblSetting (settingid integer primary key, key text, value text)"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -49,7 +49,7 @@ string title2; string titleOptimized; string filename; - string filepath; + // string filepath; string imagefile; string mainGenre; @@ -94,7 +94,7 @@ title2 = ""; titleOptimized = ""; filename = ""; - filepath = ""; +// filepath = ""; imagefile = ""; mainGenre = ""; subGenre = ""; @@ -204,7 +204,7 @@ filename = value; } } - public string Filepath + /* public string Filepath { get { @@ -214,7 +214,7 @@ { filepath = value; } - } + }*/ public string Imagefile { get @@ -566,7 +566,6 @@ appid, title, filename, - filepath, imagefile, mainGenre, subGenre, @@ -593,7 +592,6 @@ '" + AppID + @"', '" + ProgramUtils.Encode(Title)+ @"', '" + ProgramUtils.Encode(Filename)+ @"', - '" + ProgramUtils.Encode(Filepath)+ @"', '" + ProgramUtils.Encode(Imagefile)+ @"', '" + ProgramUtils.Encode(MainGenre)+ @"', '" + ProgramUtils.Encode(SubGenre)+ @"', @@ -633,7 +631,7 @@ try { string strSQL = String.Format( - "UPDATE tblFileItem SET title = '{1}', filename = '{2}', filepath = '{3}', imagefile = '{4}', mainGenre = '{5}', subGenre = '{6}', country = '{7}', manufacturer = '{8}', year = '{9}', rating = '{10}', overview = '{11}', system = '{12}', uppertitle = '{13}', tagdata = '{14}', categorydata = '{15}', gameInfoURL = '" + ProgramUtils.Encode(GameInfoURL) +"' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Filepath), ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(MainGenre), ProgramUtils.Encode(SubGenre), ProgramUtils.Encode(Country), ProgramUtils.Encode(Manufacturer), strYear, Rating, ProgramUtils.Encode(Overview), ProgramUtils.Encode(System_), ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(TagData), ProgramUtils.Encode(CategoryData)); + "UPDATE tblFileItem SET title = '{1}', filename = '{2}', imagefile = '{3}', mainGenre = '{4}', subGenre = '{5}', country = '{6}', manufacturer = '{7}', year = '{8}', rating = '{9}', overview = '{10}', system = '{11}', uppertitle = '{12}', tagdata = '{13}', categorydata = '{14}', gameInfoURL = '" + ProgramUtils.Encode(GameInfoURL) +"' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename),ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(MainGenre), ProgramUtils.Encode(SubGenre), ProgramUtils.Encode(Country), ProgramUtils.Encode(Manufacturer), strYear, Rating, ProgramUtils.Encode(Overview), ProgramUtils.Encode(System_), ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(TagData), ProgramUtils.Encode(CategoryData)); sqlDB.Execute(strSQL); } catch (SQLiteException ex) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; -//using System.Diagnostics; +//using System.IO; using SQLite.NET; using MediaPortal.GUI.Library; @@ -51,7 +51,7 @@ { get { - return filePath; + return filePath; } } @@ -74,7 +74,6 @@ newFile.AppID = ProgramUtils.GetIntDef(results, iRecord, "appid", -1); newFile.Title = ProgramUtils.Get(results, iRecord, "title"); newFile.Filename = ProgramUtils.Get(results, iRecord, "filename"); - newFile.Filepath = ProgramUtils.Get(results, iRecord, "filepath"); newFile.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); newFile.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); newFile.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -54,7 +54,6 @@ newLink.TargetAppID = ProgramUtils.GetIntDef(results, iRecord, "targetappid", -1); newLink.Title = ProgramUtils.Get(results, iRecord, "title"); newLink.Filename = ProgramUtils.Get(results, iRecord, "filename"); - newLink.Filepath = ProgramUtils.Get(results, iRecord, "filepath"); newLink.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); newLink.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); newLink.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); @@ -86,7 +85,7 @@ // applicationItem. // SPECIAL: the current application IS NOT the application with the launchinfo! strSQL = String.Format( - "SELECT fi.appid AS targetappid, fi.grouperappid AS grouperappid, f.fileid AS fileid, title, uppertitle, f.filename as filename, filepath, imagefile, mainGenre, subGenre, country, manufacturer, YEAR, rating, overview, SYSTEM, import_flag, manualfilename, lasttimelaunched, launchcount, isfolder, external_id FROM tblFileItem f, tblFilterItem fi WHERE f.fileid = fi.fileid AND grouperappid = {0} ORDER BY filepath, uppertitle", nAppID); + "SELECT fi.appid AS targetappid, fi.grouperappid AS grouperappid, f.fileid AS fileid, title, uppertitle, f.filename as filename, imagefile, mainGenre, subGenre, country, manufacturer, YEAR, rating, overview, SYSTEM, import_flag, manualfilename, lasttimelaunched, launchcount, isfolder, external_id FROM tblFileItem f, tblFilterItem fi WHERE f.fileid = fi.fileid AND grouperappid = {0} ORDER BY fileName, uppertitle", nAppID); results = sqlDB.Execute(strSQL); if (results.Rows.Count == 0) return; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -67,7 +67,6 @@ curFile.AppID = applicationItem.AppID; curFile.Title = myReader["name"].ToString(); curFile.Filename = romFilename; - curFile.Filepath = Path.GetDirectoryName(romFilename); curFile.Imagefile = imgFilename; string strGenre1 = myReader["ParentGenre"].ToString(); string strGenre2 = myReader["Genre"].ToString(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -373,7 +373,6 @@ curFile.AppID = currentApplication.AppID; curFile.Filename = fullRomname; curFile.Imagefile = GetImageFile(curRomname); - curFile.Filepath = Path.GetDirectoryName(fullRomname); if ((curFile.Imagefile == "") && (currentApplication.ImportValidImagesOnly)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 09:49:49
|
Revision: 617 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=617&view=rev Author: chef_koch Date: 2007-06-24 02:49:46 -0700 (Sun, 24 Jun 2007) Log Message: ----------- added some svn ignore properties Property Changed: ---------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/ Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 09:48:09
|
Revision: 616 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=616&view=rev Author: chef_koch Date: 2007-06-24 02:48:03 -0700 (Sun, 24 Jun 2007) Log Message: ----------- added some comments Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-24 09:16:20 UTC (rev 615) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-24 09:48:03 UTC (rev 616) @@ -37,6 +37,7 @@ - fileinfodetails : fixup - cleanup for old/obsolete view/sort/db code -> ApplicationItem.cs: old db-sort code (replaced by ProgramSort) + -> remove (maybe) obsolete DatabaseSorter.cs, replaced by ProgramSort.cs -> maybe: merging CurrentView/CurrentSort..... code in GUIprograms.cs DatabaseSettings.cs: or having this stuff only in one place - Filesview in config file sometime remebers wrong appid dirs.. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 09:16:22
|
Revision: 615 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=615&view=rev Author: chef_koch Date: 2007-06-24 02:16:20 -0700 (Sun, 24 Jun 2007) Log Message: ----------- minor format change Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -24,21 +24,20 @@ #endregion using System; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.IO; +using System.Windows.Forms; +using SQLite.NET; + using MediaPortal.Dialogs; using MediaPortal.GUI.Library; using MediaPortal.Util; -using GUIPrograms; -using SQLite.NET; -using System.Windows.Forms; - +using GUIPrograms; +using GUIPrograms.Database; using GUIPrograms.FileItems; -using GUIPrograms.Database; - namespace GUIPrograms.ApplicationItems { /// <summary> @@ -328,5 +327,4 @@ LoadFiles(); } } - -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -23,9 +23,9 @@ #endregion -using GUIPrograms; using SQLite.NET; +using GUIPrograms; namespace GUIPrograms.ApplicationItems { @@ -67,6 +67,5 @@ } return applicationItem; } - } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -25,11 +25,13 @@ using System; using System.IO; +using SQLite.NET; + using MediaPortal.Dialogs; using MediaPortal.GUI.Library; + using GUIPrograms; using GUIPrograms.Database; -using SQLite.NET; using GUIPrograms.Imports; namespace GUIPrograms.ApplicationItems @@ -134,4 +136,4 @@ LoadFiles(); } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -24,13 +24,14 @@ #endregion using System.Collections.Generic; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; +using GUIPrograms; using GUIPrograms.Database; +using GUIPrograms.FileItems; -using GUIPrograms.FileItems; +using MediaPortal.GUI.Library; + namespace GUIPrograms.ApplicationItems { /// <summary> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -26,10 +26,12 @@ using System; using System.Diagnostics; using System.IO; +using SQLite.NET; + using MediaPortal.Dialogs; using MediaPortal.GUI.Library; + using GUIPrograms; -using SQLite.NET; using GUIPrograms.Imports; namespace GUIPrograms.ApplicationItems @@ -39,7 +41,6 @@ /// </summary> public class ApplicationItemMame : ApplicationItem { - GUIDialogProgress guiDialogProgress = null; bool importOriginalsOnly = true; @@ -155,4 +156,4 @@ guiDialogProgress.Progress(); } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -27,18 +27,20 @@ using System.Collections; using System.Collections.Generic; using System.IO; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; -using GUIPrograms.Imports; +using MediaPortal.GUI.Library; + +using GUIPrograms; using GUIPrograms.ApplicationItems; +using GUIPrograms.Imports; - namespace GUIPrograms.FileItems { public class FileItem { + #region Variables + protected static SQLiteClient sqlDB = null; int fileID; @@ -49,6 +51,7 @@ string filename; string filepath; string imagefile; + string mainGenre; string subGenre; string country; @@ -60,16 +63,20 @@ string manualFilename; DateTime lastTimeLaunched; int launchCount; + int extFileID; string tagData; string categoryData; bool isFolder; string gameInfoURL; - List<FileItemInfo> fileItemInfoList = null; FileItemInfo fileItemInfoFavourite = null; + #endregion + + #region Constructor + public FileItem(SQLiteClient initSqlDB) { // constructor: save SQLiteDB object @@ -77,6 +84,8 @@ Clear(); } + #endregion + public virtual void Clear() { fileID = -1; @@ -119,6 +128,8 @@ return (result.Trim()); } + #region Properties + public int FileID { get @@ -130,7 +141,6 @@ fileID = value; } } - public int AppID { get @@ -142,7 +152,6 @@ appID = value; } } - public string Title { get @@ -154,7 +163,6 @@ title = value; } } - public string Title2 { get @@ -166,7 +174,6 @@ title2 = value; } } - public string TitleNormalized { get @@ -174,7 +181,6 @@ return GetTitleNormalized(); } } - public string TitleOptimized { get @@ -198,7 +204,6 @@ filename = value; } } - public string Filepath { get @@ -210,7 +215,6 @@ filepath = value; } } - public string Imagefile { get @@ -234,7 +238,6 @@ mainGenre = value; } } - public string SubGenre { get @@ -245,9 +248,8 @@ { subGenre = value; } - } - - public string Country + } + public string Country { get { @@ -258,7 +260,6 @@ country = value; } } - public string Manufacturer { get @@ -270,7 +271,6 @@ manufacturer = value; } } - public int Year { get @@ -282,7 +282,6 @@ year = value; } } - public int Rating { get @@ -294,7 +293,6 @@ rating = value; } } - public string Overview { get @@ -306,7 +304,6 @@ overview = value; } } - public string System_ { get @@ -318,7 +315,6 @@ system = value; } } - public string ManualFilename { get @@ -330,7 +326,6 @@ manualFilename = value; } } - public DateTime LastTimeLaunched { get @@ -342,7 +337,6 @@ lastTimeLaunched = value; } } - public int LaunchCount { get @@ -355,6 +349,17 @@ } } + public int ExtFileID + { + get + { + return extFileID; + } + set + { + extFileID = value; + } + } public string TagData { get @@ -366,7 +371,6 @@ tagData = value; } } - public string CategoryData { get @@ -378,7 +382,6 @@ categoryData = value; } } - public bool IsFolder { get @@ -390,19 +393,12 @@ isFolder = value; } } - - public int ExtFileID + public string GameInfoURL { - get - { - return extFileID; - } - set - { - extFileID = value; - } + get { return gameInfoURL; } + set { gameInfoURL = value; } } - + public string YearManu { get @@ -418,7 +414,6 @@ return fileItemInfoList; } } - public FileItemInfo FileInfoFavourite { get @@ -431,6 +426,8 @@ } } + #endregion + private int CountQuotes(string strVal) { int at = 0; @@ -523,8 +520,6 @@ return strRes; } - - public string ExtractArguments() { string strRes = ""; @@ -557,21 +552,9 @@ } return strRes; } + private void Insert() { - string strLastLaunch = ""; - string strLaunchCount = ""; - string strYear = ""; - - strLastLaunch = String.Format("{0}", LastTimeLaunched); - - strLaunchCount = String.Format("{0}", LaunchCount); // poor man's inttostr :-) - - if (Year > 0) - { - strYear = String.Format("{0}", Year); - } - try { string strSQL = String.Format( @@ -616,13 +599,13 @@ '" + ProgramUtils.Encode(SubGenre)+ @"', '" + Country+ @"', '" + ProgramUtils.Encode(Manufacturer)+ @"', - '" + strYear+ @"', + '" + Year.ToString()+ @"', '" + Rating+ @"', '" + ProgramUtils.Encode(Overview)+ @"', '" + ProgramUtils.Encode(System_)+ @"', '" + ProgramUtils.Encode(ManualFilename)+ @"', - '" + strLastLaunch+ @"', - '" + strLaunchCount+ @"', + '" + LastTimeLaunched.ToString()+ @"', + '" + LaunchCount.ToString()+ @"', '" + ProgramUtils.BooleanToStr(IsFolder)+ @"', '" + ExtFileID+ @"', '" + ProgramUtils.Encode(Title.ToUpper())+ @"', @@ -639,7 +622,6 @@ } } - private void Update() { string strYear = ""; @@ -723,12 +705,6 @@ } } - public string GameInfoURL - { - get { return gameInfoURL; } - set { gameInfoURL = value; } - } - public bool FindFileInfo(ScraperType ScraperType) { @@ -1032,7 +1008,5 @@ result = result.TrimEnd('\"'); return result; } - } - -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -26,12 +26,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; + using MediaPortal.Util; using GUIPrograms.ApplicationItems; - - namespace GUIPrograms.FileItems { /// <summary> @@ -39,23 +38,28 @@ /// </summary> public class FileItemInfo { + #region Variables string relevance; int relevanceNorm; - string year; string gameURL; + string title; string mainGenre; string subGenre; + string year; string style; string platform; string rating; int ratingNorm; - string imageURLs; string manufacturer; string overview; + + string imageURLs; bool isLoaded; + #endregion + public FileItemInfo() { // @@ -78,6 +82,9 @@ isLoaded = false; } + + #region Properties + public string RelevanceOrig { get @@ -89,7 +96,6 @@ relevance = value; } } - public int RelevanceNorm { get @@ -101,19 +107,6 @@ relevanceNorm = value; } } - - public string Year - { - get - { - return year; - } - set - { - year = value; - } - } - public string GameURL { get @@ -125,7 +118,6 @@ gameURL = value; } } - public string GameURLPostParams { get @@ -145,7 +137,6 @@ title = value; } } - public string MainGenre { get @@ -157,7 +148,6 @@ mainGenre = value; } } - public string SubGenre { get @@ -170,7 +160,17 @@ subGenre = value; } } - + public string Year + { + get + { + return year; + } + set + { + year = value; + } + } public string Style { get @@ -182,7 +182,6 @@ style = value; } } - public string Platform { get @@ -194,7 +193,6 @@ platform = value; } } - public string RatingOrig { get @@ -206,7 +204,6 @@ rating = value; } } - public int RatingNorm { get @@ -218,7 +215,6 @@ ratingNorm = value; } } - public string Manufacturer { get @@ -230,7 +226,6 @@ manufacturer = value; } } - public string Overview { get @@ -254,7 +249,6 @@ imageURLs = value; } } - public bool Loaded { get @@ -267,6 +261,8 @@ } } + #endregion + public void LaunchURL() { if (GameURL == null) @@ -336,4 +332,4 @@ } } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -26,23 +26,19 @@ using System; using System.Collections.Generic; //using System.Diagnostics; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; +using MediaPortal.GUI.Library; -using GUIPrograms.FileItems; +using GUIPrograms; using GUIPrograms.Database; +using GUIPrograms.FileItems; - namespace GUIPrograms.FileItems { - public class FileItemList : List<object> { - string filePath = ""; - static SQLiteClient sqlDB = null; public FileItemList(SQLiteClient initSqlDB) @@ -59,7 +55,6 @@ } } - public FileItem GetFileItemByID(int fileID) { foreach (FileItem currentFileItem in this) @@ -72,7 +67,6 @@ return null; } - static private FileItem DBGetFileItem(SQLiteResultSet results, int iRecord) { FileItem newFile = new FileItem(sqlDB); @@ -191,5 +185,4 @@ } } } - -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -25,11 +25,12 @@ using System; using System.Collections; +using SQLite.NET; + using MediaPortal.GUI.Library; + using GUIPrograms; -using SQLite.NET; - namespace GUIPrograms.FileItems { /// <summary> @@ -129,6 +130,5 @@ // nothing to update (yet) //...... as all tblFilterItem fields are primary key fields... } - } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -25,11 +25,12 @@ using System; using System.Collections.Generic; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; +using MediaPortal.GUI.Library; +using GUIPrograms; + namespace GUIPrograms.FileItems { /// <summary> @@ -37,15 +38,14 @@ /// </summary> public class FilelinkItemList : List<object> { + static SQLiteClient sqlDB = null; + public FilelinkItemList(SQLiteClient initSqlDB) { // constructor: save SQLiteDB object sqlDB = initSqlDB; } - static SQLiteClient sqlDB = null; - - static private FilelinkItem DBGetFilelinkItem(SQLiteResultSet results, int iRecord) { FilelinkItem newLink = new FilelinkItem(sqlDB); @@ -71,7 +71,6 @@ return newLink; } - public void Load(int nAppID, string strPath) { if (sqlDB == null) @@ -102,6 +101,5 @@ Log.Info("Filedatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } } - } -} +} \ 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: <che...@us...> - 2007-06-24 08:33:24
|
Revision: 614 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=614&view=rev Author: chef_koch Date: 2007-06-24 01:33:23 -0700 (Sun, 24 Jun 2007) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-24 08:03:48 UTC (rev 613) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-24 08:33:23 UTC (rev 614) @@ -386,14 +386,9 @@ public FileItem PrevFile(FileItem curFile) { - if (Files == null) - { - return null; - } - if (Files.Count == 0) - { - return null; - } + if (Files == null) return null; + if (Files.Count == 0) return null; + int index = this.Files.IndexOf(curFile); index = index - 1; if (index < 0) @@ -403,14 +398,9 @@ public FileItem NextFile(FileItem curFile) { - if (Files == null) - { - return null; - } - if (Files.Count == 0) - { - return null; - } + if (Files == null) return null; + if (Files.Count == 0) return null; + int index = this.Files.IndexOf(curFile); index = index + 1; if (index > Files.Count - 1) @@ -418,10 +408,12 @@ return (FileItem)Files[index]; } + /// <summary> + /// look for FileItem and launch it using the found object + /// </summary> + /// <param name="guiListItem"></param> public virtual void LaunchFile(GUIListItem guiListItem) { - // Launch File by GUILISTITEM - // => look for FileItem and launch it using the found object if (guiListItem.MusicTag == null) return; FileItem curFileItem = (FileItem)guiListItem.MusicTag; if (curFileItem == null) return; @@ -538,8 +530,6 @@ this.OnLaunchFilelink(curLink, MPGUIMode); } - - void proc_Exited(object sender, EventArgs e) { @@ -669,24 +659,24 @@ return totalItems; } - void OnRetrieveCoverArt(GUIListItem gli) + void OnRetrieveCoverArt(GUIListItem guiListItem) { - if ((gli.MusicTag != null) && (gli.MusicTag is FileItem)) + if (guiListItem.MusicTag == null) return; + FileItem curFileItem = (FileItem)guiListItem.MusicTag; + if (curFileItem == null) return; + + if (curFileItem.Imagefile != "") { - FileItem curFile = (FileItem)gli.MusicTag; - if (curFile.Imagefile != "") - { - gli.ThumbnailImage = curFile.Imagefile; - gli.IconImageBig = curFile.Imagefile; - gli.IconImage = curFile.Imagefile; - } - else - { - gli.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - gli.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - gli.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; - } + guiListItem.ThumbnailImage = curFileItem.Imagefile; + guiListItem.IconImageBig = curFileItem.Imagefile; + guiListItem.IconImage = curFileItem.Imagefile; } + else + { + guiListItem.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + guiListItem.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + guiListItem.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; + } } /* private void OnItemSelected(GUIListItem item, GUIControl parent) @@ -719,22 +709,19 @@ public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) { GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); - if (null != fileInfoDialog) - { - if (item.MusicTag == null) - { - return; - } - FileItem curFile = (FileItem)item.MusicTag; - fileInfoDialog.App = this; - fileInfoDialog.File = curFile; - fileInfoDialog.IsOverviewVisible = isOverviewVisible; - fileInfoDialog.DoModal(GetID); - isOverviewVisible = fileInfoDialog.IsOverviewVisible; - modalResult = fileInfoDialog.ModalResult; - selectedFileID = fileInfoDialog.SelectedFileID; - return; - } + if (fileInfoDialog == null) return; + if (item.MusicTag == null) return; + FileItem curFile = (FileItem)item.MusicTag; + if (curFile == null) return; + + fileInfoDialog.App = this; + fileInfoDialog.File = curFile; + fileInfoDialog.IsOverviewVisible = isOverviewVisible; + fileInfoDialog.DoModal(GetID); + isOverviewVisible = fileInfoDialog.IsOverviewVisible; + modalResult = fileInfoDialog.ModalResult; + selectedFileID = fileInfoDialog.SelectedFileID; + return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 08:03:49
|
Revision: 613 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=613&view=rev Author: chef_koch Date: 2007-06-24 01:03:48 -0700 (Sun, 24 Jun 2007) Log Message: ----------- fixed small issues Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-24 07:29:01 UTC (rev 612) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-24 08:03:48 UTC (rev 613) @@ -319,6 +319,7 @@ switch (callAction.type) { case CallAction.CallType.Incoming: + callAction.caller = GetCallerFromPhonebook(callAction.caller); OnIncomingCall(callAction); break; case CallAction.CallType.Outgoing: @@ -433,7 +434,7 @@ return MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_unknown"); else { - string strImage = MediaPortal.Util.Utils.GetCoverArtName(Thumbs.Yac, caller.ID); + string strImage = MediaPortal.Util.Utils.GetCoverArtName(Thumbs.Yac, caller.Name); // search image for caller if (_extensiveLogging) Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-24 07:29:01 UTC (rev 612) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-24 08:03:48 UTC (rev 613) @@ -38,18 +38,15 @@ checkBoxExtensiveLogging.Checked = xmlreader.GetValueAsBool("fritzbox", "extensiveLogging", false); - Log.Info("1111111111111"); textBoxAddress.Text = xmlreader.GetValueAsString("fritzbox", "address", "fritz.box"); numericUpDownPort.Value = xmlreader.GetValueAsInt("fritzbox", "port", 1012); - Log.Info("22222222222222"); // notify settings numericUpDownMaxNotifies.Value = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); checkBoxCloseOnTimout.Checked = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); numericUpDownTimeout.Value = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); checkBoxCloseOnConnectionClosed.Checked = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); - Log.Info("3333333333333333"); numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; checkBoxFilterMSNs.Checked = xmlreader.GetValueAsBool("fritzbox", "filterMSNs", false); @@ -61,7 +58,6 @@ if (strMSN != "") comboBoxMSNs.Items.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); - Log.Info("444444444444444444"); checkBoxShowMsnOnHeading.Checked = xmlreader.GetValueAsBool("fritzbox", "showMsnOnHeading", false); // media settings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 07:29:02
|
Revision: 612 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=612&view=rev Author: chef_koch Date: 2007-06-24 00:29:01 -0700 (Sun, 24 Jun 2007) Log Message: ----------- Property Changed: ---------------- trunk/plugins/FritzBox/ trunk/plugins/FritzBox/FritzBox/ trunk/plugins/FritzBox/FritzBox/Properties/ trunk/plugins/FritzBox/FritzBox/gfx/ trunk/plugins/FritzBox/FritzBox/gfx/Thumbs/ trunk/plugins/FritzBox/FritzBox/gfx/Thumbs/YAC/ Property changes on: trunk/plugins/FritzBox ___________________________________________________________________ Name: svn:ignore - *.suo *.user thumbs.db + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/FritzBox/FritzBox ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/FritzBox/FritzBox/Properties ___________________________________________________________________ Name: svn:ignore - *.suo *.user thumbs.db + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/FritzBox/FritzBox/gfx ___________________________________________________________________ Name: svn:ignore - *.suo *.user thumbs.db + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/FritzBox/FritzBox/gfx/Thumbs ___________________________________________________________________ Name: svn:ignore - *.suo *.user thumbs.db + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/FritzBox/FritzBox/gfx/Thumbs/YAC ___________________________________________________________________ Name: svn:ignore - *.suo *.user thumbs.db + bin obj *.suo *.user thumbs.db This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 07:24:15
|
Revision: 611 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=611&view=rev Author: chef_koch Date: 2007-06-24 00:24:13 -0700 (Sun, 24 Jun 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/FritzBox/FritzBox/bin/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 07:22:10
|
Revision: 610 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=610&view=rev Author: chef_koch Date: 2007-06-24 00:22:08 -0700 (Sun, 24 Jun 2007) Log Message: ----------- huge code changes Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox/Caller.cs trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBox.csproj trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs Added Paths: ----------- trunk/plugins/FritzBox/FritzBox/CallAction.cs trunk/plugins/FritzBox/FritzBox/bin/ trunk/plugins/FritzBox/FritzBox/bin/Release/ Added: trunk/plugins/FritzBox/FritzBox/CallAction.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/CallAction.cs (rev 0) +++ trunk/plugins/FritzBox/FritzBox/CallAction.cs 2007-06-24 07:22:08 UTC (rev 610) @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace FritzBox +{ + public class CallAction + { + public enum CallType + { + Incoming, + Outgoing, + ConnectionStarted, + ConnectionClosed, + } + + public CallType type; + public DateTime time = DateTime.MinValue; + public Caller caller = new Caller(); + public string msn = string.Empty; + } +} Modified: trunk/plugins/FritzBox/FritzBox/Caller.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Caller.cs 2007-06-23 16:19:44 UTC (rev 609) +++ trunk/plugins/FritzBox/FritzBox/Caller.cs 2007-06-24 07:22:08 UTC (rev 610) @@ -39,7 +39,7 @@ { this._id = ""; this._name = ""; - this._show = false; + this._show = true; } public Caller(string id, string name, bool show) Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-23 16:19:44 UTC (rev 609) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-24 07:22:08 UTC (rev 610) @@ -54,13 +54,15 @@ public static int _lastVersion = 0; public static bool _extensiveLogging = false; - FritzBoxWatch FritzBoxWatch; - private bool _fritzBoxDisabled = false; + List<CallAction> actionList = new List<CallAction>(); + object tempNotify = null; + // notify settings private int _timeout = -1; // autoclose the dialog after the timeout expired private bool _closeOnTimeout = false; + private bool _closeOnConnectionClosed = false; public static bool _filterMSNs = false; public static List<String> _msnList = new List<String>(); @@ -72,7 +74,7 @@ private bool _resumeMedia = true; // resume media when notify is closed private bool _showNotify = true; - private List<String> notifyQueue = new List<String>(); + private List<CallAction> notifyQueue = new List<CallAction>(); // phonebook settings public static bool _usePhonebook = true; @@ -104,15 +106,16 @@ { _lastVersion = xmlreader.GetValueAsInt("fritzbox", "lastVersion", 0); - _extensiveLogging = xmlreader.GetValueAsBool("fritzbox", "extensiveLogging", false); - FritzBoxWatch.fritzBoxAddress = xmlreader.GetValueAsString("fritzbox", "address", "fritz.box"); - FritzBoxWatch.fritzBoxPort = xmlreader.GetValueAsString("fritzbox", "port", "1012"); + FritzBoxWatch.fritzBoxPort = xmlreader.GetValueAsInt("fritzbox", "port", 1012); + _extensiveLogging = xmlreader.GetValueAsBool("fritzbox", "extensiveLogging", false); + // notify settings FritzBoxWatch.maxNotifies = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); _closeOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); _timeout = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); + _closeOnConnectionClosed = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); if ((!_closeOnTimeout) || (_timeout == 0)) _timeout = -1; @@ -140,7 +143,7 @@ Log.Info("FRITZ!Box: closeOnTimeout = {0}", _closeOnTimeout.ToString()); Log.Info("FRITZ!Box: timeout = {0}", _timeout.ToString()); Log.Info("FRITZ!Box: showMsnOnHeading = {0}", _showMsnOnHeading.ToString()); - Log.Info("FRITZ!Box: maxNotifies = {0}", FritzBoxWatch.maxNotifies.ToString()); + //Log.Info("FRITZ!Box: maxNotifies = {0}", FritzBoxWatch.maxNotifies.ToString()); Log.Info("FRITZ!Box: stopMedia = {0}", _stopMedia.ToString()); Log.Info("FRITZ!Box: resumeMedia = {0}", _resumeMedia.ToString()); @@ -302,208 +305,192 @@ #region FritzBoxActions - private void OnFritzBoxEvent(string dataStream) + public void OnCallAction(CallAction callAction) { + LogAction(callAction); + if (!_showNotify) { Log.Info("External process is running. Notify is queued and will be shown later."); - notifyQueue.Add(dataStream); + notifyQueue.Add(callAction); return; } - string[] strList; // splitted data - - // data-stream can be in following format: - // incoming calls: DateTime;RING;ConnectionID;CallerID;MSN;??POTS??; - // outgoing calls: DateTime;CALL;ConnectionID;??Nebenstelle??;MSN;CallerID;??POTS??; - // connection started: DateTime;CONNECT;ConnectionID;??Nebenstelle??;CallerID; - // connection closed: DateTime;DISCONNECT;ConnectionID;ConnectedTime; - - // DateTime format: - // 12.12.06 12:12:12 - // dd.MM.yy hh:mm:ss - - dataStream = dataStream.Replace("\n", ""); - if (FritzBox._extensiveLogging) - Log.Info("received data: {0}", dataStream); - strList = dataStream.Split(';'); - - switch (strList[1]) + switch (callAction.type) { - case "RING": - OnIncomingCall(strList[0], strList[3], strList[4]); + case CallAction.CallType.Incoming: + OnIncomingCall(callAction); break; - - case "CALL": - OnOutgoingCall(strList[0], strList[3], strList[4], strList[5]); + case CallAction.CallType.Outgoing: break; - - case "CONNECT": - OnConnectionStarted(strList[0], strList[3], strList[4]); + case CallAction.CallType.ConnectionStarted: break; - - case "DISCONNECT": - OnConnectionClosed(strList[0], int.Parse(strList[3])); + case CallAction.CallType.ConnectionClosed: + if (_closeOnConnectionClosed) + { + Log.Info("_closeOnConnectionClosed is enabled. try to close active notify."); + if (tempNotify != null) + { + Action act = new Action(); + act.wID = Action.ActionType.ACTION_CLOSE_DIALOG; + GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY).OnAction(act); + } + } break; } - FritzBoxWatch.notifyCount--; + } - private void OnIncomingCall(string dateTime, string callerId, string msn) + void OnIncomingCall(CallAction callAction) { - Log.Info("incoming call:"); - Log.Info(" DateTime: {0}", dateTime); - if (FritzBox._extensiveLogging) + if (tempNotify != null) { - Log.Info(" Caller: {0}", callerId); - Log.Info(" MSN: {0}", msn); + Log.Info("yet another dialog is active. action is sent to queue."); + if (actionList.Count < FritzBoxWatch.maxNotifies - 1) + actionList.Add(callAction); + return; } - if (!IsMsnEnabled(msn)) return; + //config settings for dialog + string strHeading = String.Empty; + string strImage = String.Empty; + string strText = String.Empty; + + // Set Heading for NotifyDialog + if (_showMsnOnHeading) + strHeading = GUILocalizeStrings.Get(1023) + " on " + callAction.msn; // ???? Incoming call on + else + strHeading = GUILocalizeStrings.Get(1023); // 1023 Incoming call - if (callerId == "") - { - Log.Info("Caller is not identified by CLIP."); - - if (FritzBox._showUnknownCaller) - DialogOnIncomingCall("", msn); - } + // Set Image for NotifyDialog + strImage = GetCallerImage(callAction.caller); + + // Set MessageText for NotifyDialog + if (callAction.caller.ID == "") + strText = GUILocalizeStrings.Get(2014); // 2014 = unknown + else if (callAction.caller.Name == "") + strText = callAction.caller.ID; else - { - if (FritzBox._usePhonebook) - { - bool foundCaller = false; + strText = callAction.caller.Name; - if (phonebook.Count == 0) - { - Log.Info("Phonebook is empty. Caller is added to the phonebook."); - Caller caller = new Caller(callerId, callerId, true); - phonebook.Add(caller); - } - else - { - int i = 0; + //config settings for dialog FINISHED + + //if msn is disabled, stop here + if (!IsMsnEnabled(callAction.msn)) return; - do - { - Caller caller = phonebook[i]; + //if notifies are disabled for this call, stop here + if (!IsCallerEnabled(callAction.caller)) return; - if (caller.ID.Equals(callerId)) - { - Log.Info("Caller is identified by phonebook as {0}.", caller.Name); - foundCaller = true; + ShowNotify(strHeading, strImage, strText); + } - if (caller.Show) - { - Log.Info("Caller is accepted by phonebook and dialog will be shown."); + #endregion - DialogOnIncomingCall(caller.Name, msn); - } - else - { - Log.Info("Caller is denied by phonebook and dialog won't be shown."); - } - } - i++; - } - while (!foundCaller && (i < phonebook.Count)); + #region Helper Methods - if (!foundCaller) - { - Log.Info("Caller is not identified by phonebook."); + Caller GetCallerFromPhonebook(Caller caller) + { + if (caller.ID == "") return caller; - if (FritzBox._saveUnknownCaller) - { - Log.Info("saveUnknownCallers is ON - Caller is added to the phonebook."); - - Caller caller = new Caller(callerId, callerId, FritzBox._showUnknownCaller); - phonebook.Add(caller); - } - - if (FritzBox._showUnknownCaller) - { - Log.Info("showUnknownCallers is ON - Caller is shown."); - - DialogOnIncomingCall(callerId, msn); - } - } - + if (phonebook.Count == 0) + { + Log.Info("Phonebook is empty. Caller is added to the phonebook."); + phonebook.Add(caller); + } + else + { + bool foundCaller = false; + for (int i = 0; i < phonebook.Count; i++) + { + Caller tempCaller = phonebook[i]; + if (tempCaller.ID == caller.ID) + { + Log.Info("Caller is identified by phonebook as {0}.", tempCaller.Name); + caller = tempCaller; + foundCaller = true; } + if (foundCaller) break; } - else - DialogOnIncomingCall(callerId, msn); - } - } - private void OnOutgoingCall(string dateTime, string nebenstelle, string msn, string callerId) - { - Log.Info("outgoing call:"); - Log.Info(" DateTime: {0}", dateTime); - if (FritzBox._extensiveLogging) - { - Log.Info(" Nebenstelle: {0}", nebenstelle); - Log.Info(" MSN: {0}", msn); - Log.Info(" Caller: {0}", callerId); - } - } + if (!foundCaller) + { + if (_showUnknownCaller) + caller.Show = true; + else + caller.Show = false; - private void OnConnectionStarted(string dateTime, string nebenstelle, string callerId) - { - Log.Info("connection started:"); - Log.Info(" DateTime: {0}", dateTime); - if (FritzBox._extensiveLogging) - { - Log.Info(" Nebenstelle: {0}", nebenstelle); - Log.Info(" Caller: {0}", callerId); + if (FritzBox._saveUnknownCaller) + phonebook.Add(caller); + } } - } - private void OnConnectionClosed(string dateTime, int connectedTime) - { - Log.Info("connection closed:"); - Log.Info(" DateTime: {0}", dateTime); - Log.Info(" conneted time (in s): {0}", connectedTime.ToString()); + return caller; } - #endregion - - void DialogOnIncomingCall(string strCallerId, string strMSN) + string GetCallerImage(Caller caller) { - string strImage = null; - string strHeading = null; - - if (strCallerId == "") - { - strCallerId = GUILocalizeStrings.Get(2014); // 2014 = unknown - strImage = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_unknown"); - } + if (caller.ID == "") + return MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_unknown"); else { - //search image for caller - if (_extensiveLogging) - Log.Info("searching image: " + MediaPortal.Util.Utils.GetCoverArtName(Thumbs.Yac, strCallerId)); + string strImage = MediaPortal.Util.Utils.GetCoverArtName(Thumbs.Yac, caller.ID); - if (File.Exists(MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId))) + // search image for caller + if (_extensiveLogging) + Log.Info("searching image: " + strImage); + + if (File.Exists(strImage)) { if (_extensiveLogging) - Log.Info("found image for caller: " + MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId)); + Log.Info("found image for caller: " + strImage); else Log.Info("found image for caller"); - strImage = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId); + return strImage; } else { Log.Info("found NO image for caller"); - strImage = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_noImage"); + return MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_noImage"); } } + } - if (_showMsnOnHeading) - strHeading = GUILocalizeStrings.Get(1023) + " on " + strMSN; // ???? Incoming call on + bool IsMsnEnabled(string msn) + { + if (!_filterMSNs) + { + Log.Info("MSN filter is disabled."); + return true; + } + + if (_msnList.Contains(msn)) + { + Log.Info("MSN is on list."); + return true; + } else - strHeading = GUILocalizeStrings.Get(1023); // 1023 Incoming call + { + Log.Info("MSN is not on list. Notify won't be shown."); + return false; + } + } + bool IsCallerEnabled(Caller caller) + { + if (!_usePhonebook) + { + Log.Info("Phonebook is disabled. Notify will be shown."); + return true; + } + else if (caller.Show) return true; + else return false; + } + + void ShowNotify(string strHeading, string strImage, string strText) + { + if (FritzBoxWatch.notifyCount >= FritzBoxWatch.maxNotifies) return; + //show dialog if (g_Player.Playing && !g_Player.Paused && _stopMedia) g_Player.Pause(); @@ -515,52 +502,35 @@ dlgNotify.ClearAll(); dlgNotify.SetHeading(strHeading); dlgNotify.SetImage(strImage); - dlgNotify.SetText(strCallerId); + dlgNotify.SetText(strText); dlgNotify.TimeOut = _timeout; + tempNotify = dlgNotify; dlgNotify.DoModal(GUIWindowManager.ActiveWindow); if (g_Player.Playing && g_Player.Paused && _stopMedia && _resumeMedia) g_Player.Pause(); - } - #region Helper Methods - - public bool IsFritzBoxConnected(string fritzBoxAddress, string fritzBoxPort) - { - TcpClient TcpClient; - - try + tempNotify = null; + if (actionList.Count > 0) { - TcpClient = new TcpClient(fritzBoxAddress, Int32.Parse(fritzBoxPort)); + CallAction tmpAction = actionList[0]; + actionList.RemoveAt(0); + OnCallAction(tmpAction); } - catch (Exception) - { - return false; - } - - TcpClient.Close(); - return true; } - private bool IsMsnEnabled(string msn) + public void LogAction(CallAction action) { - if (!_filterMSNs) + Log.Info("CallAction Info:"); + Log.Info(" CallType: {0}", action.type.ToString()); + Log.Info(" Date: {0}", action.time.ToShortDateString()); + Log.Info(" Time: {0}", action.time.ToShortTimeString()); + if (_extensiveLogging) { - Log.Info("MSN filter is disabled."); - return true; + Log.Info(" Caller: {0}", action.caller.ID); + Log.Info(" MSN: {0}", action.msn); } - - if (_msnList.Contains(msn)) - { - Log.Info("MSN is on list."); - return true; - } - else - { - Log.Info("MSN is not on list. Notify won't be shown."); - return false; - } } #endregion @@ -600,15 +570,16 @@ public void Start() { Log.Info("FRITZ!Box Plugin {0} starting.", _version); - - FritzBoxWatch = new FritzBoxWatch(); LoadSettings(); - FritzBoxWatch.Start(); - FritzBoxWatch.FritzBoxAction += new FritzBoxWatch.EventHandler(OnFritzBoxEvent); - Utils.OnStartExternal += new Utils.UtilEventHandler(OnStartExternal); Utils.OnStopExternal += new Utils.UtilEventHandler(OnStopExternal); + + FritzBoxWatch.FritzBoxAction += new FritzBoxWatch.EventHandler(OnCallAction); + Thread FBWatchThread = new Thread(new ThreadStart(FritzBoxWatch.WatchThread)); + FBWatchThread.Priority = ThreadPriority.BelowNormal; + FBWatchThread.Name = "FRITZ!Box Monitoring"; + FBWatchThread.Start(); } /// <summary> Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.csproj =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.csproj 2007-06-23 16:19:44 UTC (rev 609) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.csproj 2007-06-24 07:22:08 UTC (rev 610) @@ -70,6 +70,7 @@ </ItemGroup> <ItemGroup> <Compile Include="Caller.cs" /> + <Compile Include="CallAction.cs" /> <Compile Include="FritzBoxSetupFrom.cs"> <SubType>Form</SubType> </Compile> @@ -86,7 +87,6 @@ </ItemGroup> <ItemGroup> <EmbeddedResource Include="Properties\Resources.resx"> - <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs 2007-06-23 16:19:44 UTC (rev 609) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs 2007-06-24 07:22:08 UTC (rev 610) @@ -33,8 +33,9 @@ this.tabGeneral = new System.Windows.Forms.TabPage(); this.checkBoxExtensiveLogging = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.numericUpDownPort = new System.Windows.Forms.NumericUpDown(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.buttonTest = new MediaPortal.UserInterface.Controls.MPButton(); - this.textBoxPort = new MediaPortal.UserInterface.Controls.MPTextBox(); this.textBoxAddress = new MediaPortal.UserInterface.Controls.MPTextBox(); this.labelPort = new MediaPortal.UserInterface.Controls.MPLabel(); this.labelAddress = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -46,6 +47,9 @@ this.checkBoxShowUnknownCaller = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxUsePhonebook = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.groupBoxNotify = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.checkBoxCloseOnConnectionClosed = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.lblMaxNotifies = new MediaPortal.UserInterface.Controls.MPLabel(); + this.numericUpDownMaxNotifies = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); this.checkBoxShowMsnOnHeading = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.buttonMSNsRemove = new MediaPortal.UserInterface.Controls.MPButton(); this.checkBoxFilterMSNs = new MediaPortal.UserInterface.Controls.MPCheckBox(); @@ -57,6 +61,7 @@ this.checkBoxResumeMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxStopMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabPhonebook = new System.Windows.Forms.TabPage(); + this.pictureBoxCaller = new System.Windows.Forms.PictureBox(); this.buttonCallerChange = new MediaPortal.UserInterface.Controls.MPButton(); this.checkBoxCallerShow = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.textBoxCallerName = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -72,23 +77,20 @@ this.buttonSave = new MediaPortal.UserInterface.Controls.MPButton(); this.buttonCancel = new MediaPortal.UserInterface.Controls.MPButton(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.pictureBoxCaller = new System.Windows.Forms.PictureBox(); - this.upDownMaxNotifies = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); - this.lblMaxNotifies = new MediaPortal.UserInterface.Controls.MPLabel(); this.tabControlFritzBoxSettings.SuspendLayout(); this.tabGeneral.SuspendLayout(); this.mpGroupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.tabIncoming.SuspendLayout(); this.groupBoxPhonebook.SuspendLayout(); this.groupBoxNotify.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxNotifies)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); this.groupBoxMedia.SuspendLayout(); this.tabPhonebook.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.upDownMaxNotifies)).BeginInit(); this.SuspendLayout(); // // tabControlFritzBoxSettings @@ -102,7 +104,7 @@ this.tabControlFritzBoxSettings.Location = new System.Drawing.Point(11, 12); this.tabControlFritzBoxSettings.Name = "tabControlFritzBoxSettings"; this.tabControlFritzBoxSettings.SelectedIndex = 0; - this.tabControlFritzBoxSettings.Size = new System.Drawing.Size(531, 337); + this.tabControlFritzBoxSettings.Size = new System.Drawing.Size(581, 383); this.tabControlFritzBoxSettings.TabIndex = 14; // // tabGeneral @@ -112,7 +114,7 @@ this.tabGeneral.Location = new System.Drawing.Point(4, 22); this.tabGeneral.Name = "tabGeneral"; this.tabGeneral.Padding = new System.Windows.Forms.Padding(3); - this.tabGeneral.Size = new System.Drawing.Size(523, 311); + this.tabGeneral.Size = new System.Drawing.Size(573, 357); this.tabGeneral.TabIndex = 0; this.tabGeneral.Text = "General"; this.tabGeneral.UseVisualStyleBackColor = true; @@ -132,9 +134,9 @@ // this.mpGroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.mpGroupBox1.Controls.Add(this.numericUpDownPort); this.mpGroupBox1.Controls.Add(this.pictureBox1); this.mpGroupBox1.Controls.Add(this.buttonTest); - this.mpGroupBox1.Controls.Add(this.textBoxPort); this.mpGroupBox1.Controls.Add(this.textBoxAddress); this.mpGroupBox1.Controls.Add(this.labelPort); this.mpGroupBox1.Controls.Add(this.labelAddress); @@ -142,15 +144,43 @@ this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.mpGroupBox1.Location = new System.Drawing.Point(6, 6); this.mpGroupBox1.Name = "mpGroupBox1"; - this.mpGroupBox1.Size = new System.Drawing.Size(511, 125); + this.mpGroupBox1.Size = new System.Drawing.Size(561, 125); this.mpGroupBox1.TabIndex = 0; this.mpGroupBox1.TabStop = false; this.mpGroupBox1.Text = "connection"; // + // numericUpDownPort + // + this.numericUpDownPort.Location = new System.Drawing.Point(308, 47); + this.numericUpDownPort.Maximum = new decimal(new int[] { + 999999, + 0, + 0, + 0}); + this.numericUpDownPort.Name = "numericUpDownPort"; + this.numericUpDownPort.Size = new System.Drawing.Size(116, 21); + this.numericUpDownPort.TabIndex = 9; + this.numericUpDownPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.numericUpDownPort.Value = new decimal(new int[] { + 1012, + 0, + 0, + 0}); + // + // pictureBox1 + // + this.pictureBox1.Image = global::FritzBox.Properties.Resources.FritzBox; + this.pictureBox1.Location = new System.Drawing.Point(6, 20); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(97, 99); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // // buttonTest // this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonTest.Location = new System.Drawing.Point(430, 20); + this.buttonTest.Location = new System.Drawing.Point(480, 20); this.buttonTest.Name = "buttonTest"; this.buttonTest.Size = new System.Drawing.Size(75, 21); this.buttonTest.TabIndex = 2; @@ -158,16 +188,6 @@ this.buttonTest.UseVisualStyleBackColor = true; this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); // - // textBoxPort - // - this.textBoxPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxPort.BorderColor = System.Drawing.Color.Empty; - this.textBoxPort.Location = new System.Drawing.Point(165, 47); - this.textBoxPort.Name = "textBoxPort"; - this.textBoxPort.Size = new System.Drawing.Size(259, 21); - this.textBoxPort.TabIndex = 1; - // // textBoxAddress // this.textBoxAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -175,7 +195,7 @@ this.textBoxAddress.BorderColor = System.Drawing.Color.Empty; this.textBoxAddress.Location = new System.Drawing.Point(165, 20); this.textBoxAddress.Name = "textBoxAddress"; - this.textBoxAddress.Size = new System.Drawing.Size(259, 21); + this.textBoxAddress.Size = new System.Drawing.Size(309, 21); this.textBoxAddress.TabIndex = 0; // // labelPort @@ -203,7 +223,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.labelHelp.Location = new System.Drawing.Point(165, 73); this.labelHelp.Name = "labelHelp"; - this.labelHelp.Size = new System.Drawing.Size(340, 49); + this.labelHelp.Size = new System.Drawing.Size(390, 49); this.labelHelp.TabIndex = 6; // // tabIncoming @@ -214,7 +234,7 @@ this.tabIncoming.Location = new System.Drawing.Point(4, 22); this.tabIncoming.Name = "tabIncoming"; this.tabIncoming.Padding = new System.Windows.Forms.Padding(3); - this.tabIncoming.Size = new System.Drawing.Size(523, 311); + this.tabIncoming.Size = new System.Drawing.Size(573, 357); this.tabIncoming.TabIndex = 1; this.tabIncoming.Text = "Incoming Call"; this.tabIncoming.UseVisualStyleBackColor = true; @@ -230,7 +250,7 @@ this.groupBoxPhonebook.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBoxPhonebook.Location = new System.Drawing.Point(6, 208); this.groupBoxPhonebook.Name = "groupBoxPhonebook"; - this.groupBoxPhonebook.Size = new System.Drawing.Size(511, 95); + this.groupBoxPhonebook.Size = new System.Drawing.Size(561, 95); this.groupBoxPhonebook.TabIndex = 2; this.groupBoxPhonebook.TabStop = false; this.groupBoxPhonebook.Text = "phonebook settings"; @@ -238,7 +258,7 @@ // mpImportFBMonitor // this.mpImportFBMonitor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.mpImportFBMonitor.Location = new System.Drawing.Point(355, 20); + this.mpImportFBMonitor.Location = new System.Drawing.Point(405, 20); this.mpImportFBMonitor.Name = "mpImportFBMonitor"; this.mpImportFBMonitor.Size = new System.Drawing.Size(150, 23); this.mpImportFBMonitor.TabIndex = 3; @@ -284,8 +304,9 @@ // this.groupBoxNotify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxNotify.Controls.Add(this.checkBoxCloseOnConnectionClosed); this.groupBoxNotify.Controls.Add(this.lblMaxNotifies); - this.groupBoxNotify.Controls.Add(this.upDownMaxNotifies); + this.groupBoxNotify.Controls.Add(this.numericUpDownMaxNotifies); this.groupBoxNotify.Controls.Add(this.checkBoxShowMsnOnHeading); this.groupBoxNotify.Controls.Add(this.buttonMSNsRemove); this.groupBoxNotify.Controls.Add(this.checkBoxFilterMSNs); @@ -296,16 +317,60 @@ this.groupBoxNotify.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBoxNotify.Location = new System.Drawing.Point(6, 6); this.groupBoxNotify.Name = "groupBoxNotify"; - this.groupBoxNotify.Size = new System.Drawing.Size(511, 122); + this.groupBoxNotify.Size = new System.Drawing.Size(561, 122); this.groupBoxNotify.TabIndex = 0; this.groupBoxNotify.TabStop = false; this.groupBoxNotify.Text = "notify settings"; // + // checkBoxCloseOnConnectionClosed + // + this.checkBoxCloseOnConnectionClosed.AutoSize = true; + this.checkBoxCloseOnConnectionClosed.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxCloseOnConnectionClosed.Location = new System.Drawing.Point(6, 43); + this.checkBoxCloseOnConnectionClosed.Name = "checkBoxCloseOnConnectionClosed"; + this.checkBoxCloseOnConnectionClosed.Size = new System.Drawing.Size(199, 17); + this.checkBoxCloseOnConnectionClosed.TabIndex = 9; + this.checkBoxCloseOnConnectionClosed.Text = "auto-close after connection is closed"; + this.checkBoxCloseOnConnectionClosed.UseVisualStyleBackColor = true; + this.checkBoxCloseOnConnectionClosed.CheckedChanged += new System.EventHandler(this.checkBoxCloseOnConnectionClosed_CheckedChanged); + // + // lblMaxNotifies + // + this.lblMaxNotifies.AutoSize = true; + this.lblMaxNotifies.Location = new System.Drawing.Point(21, 68); + this.lblMaxNotifies.Name = "lblMaxNotifies"; + this.lblMaxNotifies.Size = new System.Drawing.Size(94, 13); + this.lblMaxNotifies.TabIndex = 8; + this.lblMaxNotifies.Text = "maximum Notifies:"; + // + // numericUpDownMaxNotifies + // + this.numericUpDownMaxNotifies.Location = new System.Drawing.Point(206, 66); + this.numericUpDownMaxNotifies.Maximum = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.numericUpDownMaxNotifies.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownMaxNotifies.Name = "numericUpDownMaxNotifies"; + this.numericUpDownMaxNotifies.Size = new System.Drawing.Size(53, 21); + this.numericUpDownMaxNotifies.TabIndex = 7; + this.numericUpDownMaxNotifies.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.numericUpDownMaxNotifies.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + // // checkBoxShowMsnOnHeading // this.checkBoxShowMsnOnHeading.AutoSize = true; this.checkBoxShowMsnOnHeading.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxShowMsnOnHeading.Location = new System.Drawing.Point(6, 99); + this.checkBoxShowMsnOnHeading.Location = new System.Drawing.Point(6, 93); this.checkBoxShowMsnOnHeading.Name = "checkBoxShowMsnOnHeading"; this.checkBoxShowMsnOnHeading.Size = new System.Drawing.Size(161, 17); this.checkBoxShowMsnOnHeading.TabIndex = 6; @@ -315,7 +380,7 @@ // buttonMSNsRemove // this.buttonMSNsRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsRemove.Location = new System.Drawing.Point(275, 72); + this.buttonMSNsRemove.Location = new System.Drawing.Point(492, 95); this.buttonMSNsRemove.Name = "buttonMSNsRemove"; this.buttonMSNsRemove.Size = new System.Drawing.Size(63, 21); this.buttonMSNsRemove.TabIndex = 5; @@ -327,7 +392,7 @@ // this.checkBoxFilterMSNs.AutoSize = true; this.checkBoxFilterMSNs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxFilterMSNs.Location = new System.Drawing.Point(6, 49); + this.checkBoxFilterMSNs.Location = new System.Drawing.Point(361, 43); this.checkBoxFilterMSNs.Name = "checkBoxFilterMSNs"; this.checkBoxFilterMSNs.Size = new System.Drawing.Size(194, 17); this.checkBoxFilterMSNs.TabIndex = 2; @@ -338,7 +403,7 @@ // buttonMSNsAdd // this.buttonMSNsAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsAdd.Location = new System.Drawing.Point(206, 72); + this.buttonMSNsAdd.Location = new System.Drawing.Point(423, 95); this.buttonMSNsAdd.Name = "buttonMSNsAdd"; this.buttonMSNsAdd.Size = new System.Drawing.Size(63, 21); this.buttonMSNsAdd.TabIndex = 4; @@ -352,9 +417,9 @@ | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxMSNs.BorderColor = System.Drawing.Color.Empty; this.comboBoxMSNs.FormattingEnabled = true; - this.comboBoxMSNs.Location = new System.Drawing.Point(24, 72); + this.comboBoxMSNs.Location = new System.Drawing.Point(329, 68); this.comboBoxMSNs.Name = "comboBoxMSNs"; - this.comboBoxMSNs.Size = new System.Drawing.Size(176, 21); + this.comboBoxMSNs.Size = new System.Drawing.Size(226, 21); this.comboBoxMSNs.Sorted = true; this.comboBoxMSNs.TabIndex = 3; // @@ -398,7 +463,7 @@ this.groupBoxMedia.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBoxMedia.Location = new System.Drawing.Point(6, 134); this.groupBoxMedia.Name = "groupBoxMedia"; - this.groupBoxMedia.Size = new System.Drawing.Size(511, 68); + this.groupBoxMedia.Size = new System.Drawing.Size(561, 68); this.groupBoxMedia.TabIndex = 1; this.groupBoxMedia.TabStop = false; this.groupBoxMedia.Text = "media settings"; @@ -440,11 +505,21 @@ this.tabPhonebook.Location = new System.Drawing.Point(4, 22); this.tabPhonebook.Name = "tabPhonebook"; this.tabPhonebook.Padding = new System.Windows.Forms.Padding(3); - this.tabPhonebook.Size = new System.Drawing.Size(523, 311); + this.tabPhonebook.Size = new System.Drawing.Size(573, 357); this.tabPhonebook.TabIndex = 2; this.tabPhonebook.Text = "Phonebook"; this.tabPhonebook.UseVisualStyleBackColor = true; // + // pictureBoxCaller + // + this.pictureBoxCaller.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBoxCaller.Location = new System.Drawing.Point(417, 38); + this.pictureBoxCaller.Name = "pictureBoxCaller"; + this.pictureBoxCaller.Size = new System.Drawing.Size(100, 122); + this.pictureBoxCaller.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBoxCaller.TabIndex = 13; + this.pictureBoxCaller.TabStop = false; + // // buttonCallerChange // this.buttonCallerChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -567,7 +642,7 @@ // labelVersion // this.labelVersion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.labelVersion.Location = new System.Drawing.Point(295, 356); + this.labelVersion.Location = new System.Drawing.Point(345, 402); this.labelVersion.Name = "labelVersion"; this.labelVersion.Size = new System.Drawing.Size(85, 25); this.labelVersion.TabIndex = 17; @@ -576,7 +651,7 @@ // buttonSave // this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSave.Location = new System.Drawing.Point(386, 356); + this.buttonSave.Location = new System.Drawing.Point(436, 402); this.buttonSave.Name = "buttonSave"; this.buttonSave.Size = new System.Drawing.Size(75, 25); this.buttonSave.TabIndex = 15; @@ -587,7 +662,7 @@ // buttonCancel // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.Location = new System.Drawing.Point(467, 356); + this.buttonCancel.Location = new System.Drawing.Point(517, 402); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 25); this.buttonCancel.TabIndex = 16; @@ -595,63 +670,11 @@ this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); // - // pictureBox1 - // - this.pictureBox1.Image = global::FritzBox.Properties.Resources.FritzBox; - this.pictureBox1.Location = new System.Drawing.Point(6, 20); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(97, 99); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox1.TabIndex = 2; - this.pictureBox1.TabStop = false; - // - // pictureBoxCaller - // - this.pictureBoxCaller.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBoxCaller.Location = new System.Drawing.Point(417, 38); - this.pictureBoxCaller.Name = "pictureBoxCaller"; - this.pictureBoxCaller.Size = new System.Drawing.Size(100, 122); - this.pictureBoxCaller.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBoxCaller.TabIndex = 13; - this.pictureBoxCaller.TabStop = false; - // - // upDownMaxNotifies - // - this.upDownMaxNotifies.Location = new System.Drawing.Point(465, 20); - this.upDownMaxNotifies.Maximum = new decimal(new int[] { - 20, - 0, - 0, - 0}); - this.upDownMaxNotifies.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.upDownMaxNotifies.Name = "upDownMaxNotifies"; - this.upDownMaxNotifies.Size = new System.Drawing.Size(40, 21); - this.upDownMaxNotifies.TabIndex = 7; - this.upDownMaxNotifies.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.upDownMaxNotifies.Value = new decimal(new int[] { - 20, - 0, - 0, - 0}); - // - // lblMaxNotifies - // - this.lblMaxNotifies.AutoSize = true; - this.lblMaxNotifies.Location = new System.Drawing.Point(365, 22); - this.lblMaxNotifies.Name = "lblMaxNotifies"; - this.lblMaxNotifies.Size = new System.Drawing.Size(94, 13); - this.lblMaxNotifies.TabIndex = 8; - this.lblMaxNotifies.Text = "maximum Notifies:"; - // // FritzBoxSetupFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(552, 393); + this.ClientSize = new System.Drawing.Size(602, 439); this.Controls.Add(this.tabControlFritzBoxSettings); this.Controls.Add(this.labelVersion); this.Controls.Add(this.buttonSave); @@ -668,20 +691,21 @@ this.tabGeneral.PerformLayout(); this.mpGroupBox1.ResumeLayout(false); this.mpGroupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.tabIncoming.ResumeLayout(false); this.groupBoxPhonebook.ResumeLayout(false); this.groupBoxPhonebook.PerformLayout(); this.groupBoxNotify.ResumeLayout(false); this.groupBoxNotify.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxNotifies)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).EndInit(); this.groupBoxMedia.ResumeLayout(false); this.groupBoxMedia.PerformLayout(); this.tabPhonebook.ResumeLayout(false); this.tabPhonebook.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.upDownMaxNotifies)).EndInit(); this.ResumeLayout(false); } @@ -694,7 +718,6 @@ private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox1; private System.Windows.Forms.PictureBox pictureBox1; private MediaPortal.UserInterface.Controls.MPButton buttonTest; - private MediaPortal.UserInterface.Controls.MPTextBox textBoxPort; private MediaPortal.UserInterface.Controls.MPTextBox textBoxAddress; private MediaPortal.UserInterface.Controls.MPLabel labelPort; private MediaPortal.UserInterface.Controls.MPLabel labelAddress; @@ -733,7 +756,9 @@ private MediaPortal.UserInterface.Controls.MPButton buttonSave; private MediaPortal.UserInterface.Controls.MPButton buttonCancel; private System.Windows.Forms.OpenFileDialog openFileDialog; - private MediaPortal.UserInterface.Controls.MPNumericUpDown upDownMaxNotifies; + private MediaPortal.UserInterface.Controls.MPNumericUpDown numericUpDownMaxNotifies; private MediaPortal.UserInterface.Controls.MPLabel lblMaxNotifies; + private System.Windows.Forms.NumericUpDown numericUpDownPort; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxCloseOnConnectionClosed; } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-23 16:19:44 UTC (rev 609) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-24 07:22:08 UTC (rev 610) @@ -38,14 +38,18 @@ checkBoxExtensiveLogging.Checked = xmlreader.GetValueAsBool("fritzbox", "extensiveLogging", false); + Log.Info("1111111111111"); textBoxAddress.Text = xmlreader.GetValueAsString("fritzbox", "address", "fritz.box"); - textBoxPort.Text = xmlreader.GetValueAsString("fritzbox", "port", "1012"); + numericUpDownPort.Value = xmlreader.GetValueAsInt("fritzbox", "port", 1012); + Log.Info("22222222222222"); // notify settings - upDownMaxNotifies.Value = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); + numericUpDownMaxNotifies.Value = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); checkBoxCloseOnTimout.Checked = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); numericUpDownTimeout.Value = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); + checkBoxCloseOnConnectionClosed.Checked = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); + Log.Info("3333333333333333"); numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; checkBoxFilterMSNs.Checked = xmlreader.GetValueAsBool("fritzbox", "filterMSNs", false); @@ -57,6 +61,7 @@ if (strMSN != "") comboBoxMSNs.Items.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); + Log.Info("444444444444444444"); checkBoxShowMsnOnHeading.Checked = xmlreader.GetValueAsBool("fritzbox", "showMsnOnHeading", false); // media settings @@ -86,12 +91,13 @@ xmlwriter.SetValueAsBool("fritzbox", "extensiveLogging", checkBoxExtensiveLogging.Checked); xmlwriter.SetValue("fritzbox", "address", textBoxAddress.Text); - xmlwriter.SetValue("fritzbox", "port", textBoxPort.Text); + xmlwriter.SetValue("fritzbox", "port", numericUpDownPort.Value); // notify settings - xmlwriter.SetValue("fritzbox", "maxNotifies", upDownMaxNotifies.Value); + xmlwriter.SetValue("fritzbox", "maxNotifies", numericUpDownMaxNotifies.Value); xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", checkBoxCloseOnTimout.Checked); xmlwriter.SetValue("fritzbox", "timeout", numericUpDownTimeout.Value); + xmlwriter.SetValueAsBool("fritzbox", "closeOnConnectionClosed", checkBoxCloseOnConnectionClosed.Checked); xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", checkBoxFilterMSNs.Checked); string strMSN = ""; @@ -149,7 +155,7 @@ { labelHelp.Text = "Please wait..."; Application.DoEvents(); - myClient = new TcpClient(textBoxAddress.Text, Int32.Parse(textBoxPort.Text)); + myClient = new TcpClient(textBoxAddress.Text, int.Parse(numericUpDownPort.Value.ToString())); } catch (Exception) { @@ -362,5 +368,10 @@ { SaveDataGridView(); } + + private void checkBoxCloseOnConnectionClosed_CheckedChanged(object sender, EventArgs e) + { + numericUpDownMaxNotifies.Enabled = !checkBoxCloseOnConnectionClosed.Checked; + } } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs 2007-06-23 16:19:44 UTC (rev 609) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs 2007-06-24 07:22:08 UTC (rev 610) @@ -37,39 +37,27 @@ using System.Threading; using MediaPortal.GUI.Library; +using MediaPortal.Configuration; namespace FritzBox { - /// <summary> - /// FritzBoxWatch class - /// </summary> - public class FritzBoxWatch + /// <summary> + /// FritzBoxWatch class + /// </summary> + class FritzBoxWatch { - public delegate void EventHandler(string strLine); - static public event EventHandler FritzBoxAction = null; + public delegate void EventHandler(CallAction callAction); + public static event EventHandler FritzBoxAction = null; - bool stopThread = false; - + public static bool stopThread = false; public static string fritzBoxAddress; // address for the connected fritzbox - public static string fritzBoxPort; // port for the connected fritzbox - + public static int fritzBoxPort; // port for the connected fritzbox public static int maxNotifies = 20; public static int notifyCount = 0; - - public void Start() - { - Thread watchThread = new Thread(new ThreadStart(WatchThread)); - watchThread.Priority = ThreadPriority.BelowNormal; - watchThread.Name = "FRITZ!Box Monitoring"; - watchThread.Start(); - } - public void Stop() - { - stopThread = true; - } + static CallAction currentCallAction; - private void WatchThread() + public static void WatchThread() { try { @@ -82,7 +70,7 @@ // To close the port you can call: #96*4* // create a new connection to the FritzBox and listen to the TCP port - tcpClient = new TcpClient(fritzBoxAddress, Int32.Parse(fritzBoxPort)); + tcpClient = new TcpClient(fritzBoxAddress, fritzBoxPort); tcpClient.ReceiveBufferSize = 1; NetworkStream networkStream = tcpClient.GetStream(); @@ -98,11 +86,11 @@ } if (cChar == '\n') { - if (notifyCount < maxNotifies) - { - FritzBoxAction(strLine); - notifyCount++; - } + CallAction callAction = ParseAction(strLine); + currentCallAction = callAction; + Thread actionThread = new Thread(new ThreadStart(DoAction)); + actionThread.Name = "FRITZ!Box Monitoring"; + actionThread.Start(); strLine = ""; cChar = '\0'; } @@ -116,5 +104,84 @@ return; } } + + static CallAction ParseAction(string dataStream) + { + string[] strList; // splitted data + + dataStream = dataStream.Replace("\n", ""); + if (FritzBox._extensiveLogging) + Log.Info("received data: {0}", dataStream); + strList = dataStream.Split(';'); + + // data-stream can be in following format: + // incoming calls: DateTime;RING;ConnectionID;CallerID;MSN;??POTS??; + // outgoing calls: DateTime;CALL;ConnectionID;??Nebenstelle??;MSN;CallerID;??POTS??; + // connection started: DateTime;CONNECT;ConnectionID;??Nebenstelle??;CallerID; + // connection closed: DateTime;DISCONNECT;ConnectionID;ConnectedTime; + + // DateTime format: + // 12.12.06 12:12:12 + // dd.MM.yy hh:mm:ss + + CallAction callAction = new CallAction(); + + // time when action happens + callAction.time = DateTime.Parse(strList[0]); + + // set the type of the callAction + switch (strList[1]) + { + case "RING": + callAction.type = CallAction.CallType.Incoming; + // sets the callerID + callAction.caller.ID = strList[3]; + callAction.msn = strList[4]; + break; + case "CALL": + callAction.type = CallAction.CallType.Outgoing; + // sets the callerID + callAction.caller.ID = strList[5]; + callAction.msn = strList[4]; + break; + case "CONNECT": + callAction.type = CallAction.CallType.ConnectionStarted; + // sets the callerID + callAction.caller.ID = strList[4]; + break; + case "DISCONNECT": + callAction.type = CallAction.CallType.ConnectionClosed; + break; + } + + return callAction; + } + + static void DoAction() + { + FritzBoxAction(currentCallAction); + } + + public static void Stop() + { + stopThread = true; + } + + public static bool Test() + { + TcpClient TcpClient; + + try + { + TcpClient = new TcpClient(fritzBoxAddress, fritzBoxPort); + } + catch (Exception) + { + return false; + } + + TcpClient.Close(); + return true; + } } } \ 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: <ze...@us...> - 2007-06-23 16:19:49
|
Revision: 609 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=609&view=rev Author: zebons Date: 2007-06-23 09:19:44 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Skin BT Wide update Add an init for new values in setup Modified Paths: -------------- trunk/plugins/MyFilms/MesFilmsSetup.cs trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilmsDetail.xml Modified: trunk/plugins/MyFilms/MesFilmsSetup.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-06-22 23:41:00 UTC (rev 608) +++ trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-06-23 16:19:44 UTC (rev 609) @@ -367,8 +367,9 @@ } if (Config_Menu.Checked) { - MyFilms_xmlwriter.SetValueAsBool("MyFilms", "Menu_Config", Config_Menu.Checked); + MyFilms_xmlwriter.SetValue("MyFilms", "Default_Config", ""); } + MyFilms_xmlwriter.SetValueAsBool("MyFilms", "Menu_Config", Config_Menu.Checked); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "CatalogType", CatalogType.SelectedIndex.ToString()); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "AntCatalog", MesFilmsCat.Text.ToString()); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "AntPicture", MesFilmsImg.Text.ToString()); @@ -705,7 +706,10 @@ //MyFilms_xmlwriter.SetValue("ConfigName" + i, "IndexItem", -1); //MyFilms_xmlwriter.SetValue("ConfigName" + i, "LastID", ""); if (Config_Name.Items.Count == 1) + { MyFilms_xmlwriter.SetValue("MyFilms", "Default_Config", Config_Name.Items[i]); + MyFilms_xmlwriter.SetValue("MyFilms", "Menu_Config", Config_Name.Items[i]); + } } MyFilms_xmlwriter.SetValue("MyFilms", "NbConfig", Config_Name.Items.Count); MyFilms_xmlwriter.SetValue("MyFilms", "PluginName", textBox1.Text.ToString()); Modified: trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml 2007-06-22 23:41:00 UTC (rev 608) +++ trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml 2007-06-23 16:19:44 UTC (rev 609) @@ -146,16 +146,17 @@ <type>thumbnailpanel</type> <scrollOffset>1</scrollOffset> <onleft>6</onleft> - <itemWidth>140</itemWidth> - <itemHeight>192</itemHeight> - <textureWidth>98</textureWidth> - <thumbWidth>70</thumbWidth> - <thumbPosX>14</thumbPosX> - <textureWidthBig>184</textureWidthBig> - <itemWidthBig>204</itemWidthBig> - <thumbWidthBig>140</thumbWidthBig> - <thumbPosXBig>20</thumbPosXBig> - </control> + <width>880</width> + <height>670</height> + <textureWidthBig>168</textureWidthBig> + <textureHeightBig>158</textureHeightBig> + <itemWidthBig>170</itemWidthBig> + <itemHeightBig>180</itemHeightBig> + <thumbWidthBig>128</thumbWidthBig> + <thumbHeightBig>124</thumbHeightBig> + <thumbPosXBig>19</thumbPosXBig> + <thumbPosYBig>16</thumbPosYBig> + </control> <control> <type>listcontrol</type> <description>listcontrol</description> @@ -217,7 +218,7 @@ <description>Star rating</description> <type>image</type> <id>1065</id> - <posX>367</posX> + <posX>387</posX> <posY>430</posY> <width>36</width> <height>36</height> @@ -229,7 +230,7 @@ <description>Star rating half grey</description> <type>image</type> <id>1060</id> - <posX>367</posX> + <posX>387</posX> <posY>430</posY> <width>36</width> <height>36</height> @@ -241,7 +242,7 @@ <description>Star rating grey</description> <type>image</type> <id>1055</id> - <posX>367</posX> + <posX>387</posX> <posY>430</posY> <width>36</width> <height>36</height> @@ -253,7 +254,7 @@ <description>Star rating</description> <type>image</type> <id>1064</id> - <posX>370</posX> + <posX>390</posX> <posY>396</posY> <width>30</width> <height>30</height> @@ -265,7 +266,7 @@ <description>Star rating half grey</description> <type>image</type> <id>1059</id> - <posX>370</posX> + <posX>390</posX> <posY>396</posY> <width>30</width> <height>30</height> @@ -277,7 +278,7 @@ <description>Star rating grey</description> <type>image</type> <id>1054</id> - <posX>370</posX> + <posX>390</posX> <posY>396</posY> <width>30</width> <height>30</height> @@ -289,7 +290,7 @@ <description>Star rating</description> <type>image</type> <id>1063</id> - <posX>373</posX> + <posX>393</posX> <posY>368</posY> <width>24</width> <height>24</height> @@ -301,7 +302,7 @@ <description>Star rating half grey</description> <type>image</type> <id>1058</id> - <posX>373</posX> + <posX>393</posX> <posY>368</posY> <width>24</width> <height>24</height> @@ -313,7 +314,7 @@ <description>Star rating grey</description> <type>image</type> <id>1053</id> - <posX>373</posX> + <posX>393</posX> <posY>368</posY> <width>24</width> <height>24</height> @@ -325,7 +326,7 @@ <description>Star rating</description> <type>image</type> <id>1062</id> - <posX>377</posX> + <posX>397</posX> <posY>346</posY> <width>18</width> <height>18</height> @@ -337,7 +338,7 @@ <description>Star rating half grey</description> <type>image</type> <id>1057</id> - <posX>377</posX> + <posX>397</posX> <posY>346</posY> <width>18</width> <height>18</height> @@ -349,7 +350,7 @@ <description>Star rating grey</description> <type>image</type> <id>1052</id> - <posX>377</posX> + <posX>397</posX> <posY>346</posY> <width>18</width> <height>18</height> @@ -361,7 +362,7 @@ <description>Star rating</description> <type>image</type> <id>1061</id> - <posX>380</posX> + <posX>400</posX> <posY>330</posY> <width>12</width> <height>12</height> @@ -373,7 +374,7 @@ <description>Star rating half grey</description> <type>image</type> <id>1056</id> - <posX>380</posX> + <posX>400</posX> <posY>330</posY> <width>12</width> <height>12</height> @@ -385,7 +386,7 @@ <description>Star rating grey</description> <type>image</type> <id>1051</id> - <posX>380</posX> + <posX>400</posX> <posY>330</posY> <width>12</width> <height>12</height> @@ -431,7 +432,7 @@ <id>1024</id> <posX>155</posX> <posY>680</posY> - <width>180</width> + <width>280</width> <visible>no</visible> <align>left</align> <label>6</label> Modified: trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilmsDetail.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilmsDetail.xml 2007-06-22 23:41:00 UTC (rev 608) +++ trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilmsDetail.xml 2007-06-23 16:19:44 UTC (rev 609) @@ -58,7 +58,7 @@ <id>27</id> <posX>100</posX> <posY>97</posY> - <width>198</width> + <width>98</width> <height>140</height> <layout>StackLayout</layout> <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> @@ -94,7 +94,7 @@ <type>group</type> <description>group element</description> <id>1234</id> - <layout>GridLayout(4,0,0,0)</layout> + <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> @@ -107,9 +107,9 @@ <onright>104</onright> <ondown>319</ondown> <onup>107</onup> - <label>-</label> <height>65</height> <width>10</width> + <label>-</label> <textureFocus>Films_first_focus.png</textureFocus> <textureNoFocus>Films_first_nofocus.png</textureNoFocus> </control> @@ -121,9 +121,9 @@ <onright>103</onright> <ondown>319</ondown> <onup>107</onup> - <label>-</label> <height>65</height> <width>10</width> + <label>-</label> <textureFocus>Films_prior_focus.png</textureFocus> <textureNoFocus>Films_prior_nofocus.png</textureNoFocus> </control> @@ -135,9 +135,9 @@ <onright>105</onright> <ondown>319</ondown> <onup>107</onup> - <label>-</label> <height>65</height> <width>10</width> + <label>-</label> <textureFocus>Films_next_focus.png</textureFocus> <textureNoFocus>Films_next_nofocus.png</textureNoFocus> </control> @@ -149,9 +149,9 @@ <onright>106</onright> <ondown>319</ondown> <onup>107</onup> - <label>-</label> <height>65</height> <width>10</width> + <label>-</label> <textureFocus>Films_last_focus.png</textureFocus> <textureNoFocus>Films_last_nofocus.png</textureNoFocus> </control> @@ -165,19 +165,19 @@ <posY>98</posY> <label>#Title</label> <width>545</width> - <font>font16</font> + <font>font14</font> <colordiffuse>ffffffff</colordiffuse> <textcolor>ffffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> <control> - <description>RecordNumberValue</description> + <description>Original Title</description> <type>fadelabel</type> <id>2026</id> - <posX>750</posX> + <posX>550</posX> <posY>122</posY> <label>#OTitle</label> - <width>280</width> + <width>480</width> <font>font12</font> <colordiffuse>ffe0e0e0</colordiffuse> <textcolor>ffc0c0c0</textcolor> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 23:41:03
|
Revision: 608 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=608&view=rev Author: chef_koch Date: 2007-06-22 16:41:00 -0700 (Fri, 22 Jun 2007) Log Message: ----------- some ideas about thumbs Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-22 23:01:02 UTC (rev 607) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-22 23:41:00 UTC (rev 608) @@ -59,6 +59,11 @@ - removing the filepath in fileitems? we can parse it from filename - only saving filename without " . We add them if use qoutes is enabled when we create the procInfo +ThumbnailSupport: + - [high] general: using thumbs in all views, if you browse files, not in all views the files/games, show their thumbnail + - [low] rating: thumbs for 0-10 maybe as stylish numbers or maybe as smileys :( -> :| -> :), so that the user could choose it for himself + - [low] genre: thumbs for genre, for example it could be created on AllGame lookup, for first file with this genre + - ....... Code: Revise the code partially. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 23:01:05
|
Revision: 607 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=607&view=rev Author: chef_koch Date: 2007-06-22 16:01:02 -0700 (Fri, 22 Jun 2007) Log Message: ----------- removed the genre-bug comment, with fixed view definition your new genre stuff is really rockin ;) yeah Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-22 22:59:41 UTC (rev 606) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-22 23:01:02 UTC (rev 607) @@ -40,7 +40,6 @@ -> maybe: merging CurrentView/CurrentSort..... code in GUIprograms.cs DatabaseSettings.cs: or having this stuff only in one place - Filesview in config file sometime remebers wrong appid dirs.. - - GenreView does not work anymore, what about using an addition genreTable in database, like we do in Music? FEATURES: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 22:59:45
|
Revision: 606 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=606&view=rev Author: chef_koch Date: 2007-06-22 15:59:41 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml Added: trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml (rev 0) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml 2007-06-22 22:59:41 UTC (rev 606) @@ -0,0 +1,277 @@ +<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> +<SOAP-ENV:Body> +<a1:ArrayList id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-2"/> +<_size>7</_size> +<_version>7</_version> +</a1:ArrayList> +<SOAP-ENC:Array id="ref-2" SOAP-ENC:arrayType="xsd:anyType[8]"> +<item href="#ref-3"/> +<item href="#ref-4"/> +<item href="#ref-5"/> +<item href="#ref-6"/> +<item href="#ref-7"/> +<item href="#ref-8"/> +<item href="#ref-9"/> +</SOAP-ENC:Array> +<a3:ViewDefinition id="ref-3" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-11"/> +<name id="ref-12">13031</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-4" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-13"/> +<name id="ref-14">135</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-5" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-15"/> +<name id="ref-16">931</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-6" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-17"/> +<name id="ref-18">987</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-7" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-19"/> +<name id="ref-20">13032</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-8" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-21"/> +<name id="ref-22">13033</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-9" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-23"/> +<name id="ref-24">13034</name> +</a3:ViewDefinition> +<a1:ArrayList id="ref-11" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-25"/> +<_size>2</_size> +<_version>143</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-13" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-26"/> +<_size>3</_size> +<_version>168</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-15" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-27"/> +<_size>2</_size> +<_version>173</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-17" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-28"/> +<_size>2</_size> +<_version>146</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-19" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-29"/> +<_size>1</_size> +<_version>179</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-21" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-30"/> +<_size>1</_size> +<_version>129</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-23" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-31"/> +<_size>2</_size> +<_version>111</_version> +</a1:ArrayList> +<SOAP-ENC:Array id="ref-25" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-32"/> +<item href="#ref-33"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-26" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-34"/> +<item href="#ref-35"/> +<item href="#ref-36"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-27" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-37"/> +<item href="#ref-38"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-28" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-39"/> +<item href="#ref-40"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-29" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-41"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-30" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-42"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-31" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-43"/> +<item href="#ref-44"/> +</SOAP-ENC:Array> +<a3:FilterDefinition id="ref-32" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction id="ref-45"></restriction> +<whereClause id="ref-46">manufacturer</whereClause> +<fromStatement id="ref-47"></fromStatement> +<sqloperator href="#ref-45"/> +<whereValue id="ref-48">*</whereValue> +<selectedValue href="#ref-47"/> +<defaultView id="ref-49">List</defaultView> +<defaultSort id="ref-50">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-33" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause id="ref-51">title</whereClause> +<fromStatement href="#ref-47"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-48"/> +<selectedValue href="#ref-47"/> +<defaultView href="#ref-49"/> +<defaultSort id="ref-52">Title</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-34" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause id="ref-53">mainGenre</whereClause> +<fromStatement href="#ref-47"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-48"/> +<selectedValue href="#ref-47"/> +<defaultView id="ref-54">List</defaultView> +<defaultSort href="#ref-50"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-35" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-47"/> +<whereClause id="ref-55">subGenre</whereClause> +<fromStatement href="#ref-47"/> +<sqloperator href="#ref-47"/> +<whereValue href="#ref-48"/> +<selectedValue href="#ref-47"/> +<defaultView id="ref-56">List</defaultView> +<defaultSort id="ref-57">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-36" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause id="ref-58">title</whereClause> +<fromStatement href="#ref-47"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-48"/> +<selectedValue href="#ref-47"/> +<defaultView href="#ref-54"/> +<defaultSort href="#ref-52"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-37" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>false</sortAscending> +<restriction href="#ref-45"/> +<whereClause id="ref-59">rating</whereClause> +<fromStatement href="#ref-45"/> +<sqloperator href="#ref-45"/> +<whereValue id="ref-60">*</whereValue> +<selectedValue href="#ref-45"/> +<defaultView href="#ref-54"/> +<defaultSort id="ref-61">Rating</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-38" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause href="#ref-58"/> +<fromStatement href="#ref-45"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-60"/> +<selectedValue href="#ref-45"/> +<defaultView href="#ref-54"/> +<defaultSort href="#ref-52"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-39" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause id="ref-62">year</whereClause> +<fromStatement href="#ref-45"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-60"/> +<selectedValue href="#ref-45"/> +<defaultView href="#ref-54"/> +<defaultSort href="#ref-50"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-40" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause href="#ref-58"/> +<fromStatement href="#ref-45"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-60"/> +<selectedValue href="#ref-45"/> +<defaultView href="#ref-54"/> +<defaultSort href="#ref-52"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-41" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>false</sortAscending> +<restriction id="ref-63">0</restriction> +<whereClause id="ref-64">launchcount</whereClause> +<fromStatement href="#ref-45"/> +<sqloperator id="ref-65">></sqloperator> +<whereValue href="#ref-60"/> +<selectedValue href="#ref-45"/> +<defaultView id="ref-66">List</defaultView> +<defaultSort id="ref-67">LaunchCount</defaultSort> +<limit>100</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-42" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>false</sortAscending> +<restriction id="ref-68">01.01.0001 00:00:00</restriction> +<whereClause id="ref-69">lastTimeLaunched</whereClause> +<fromStatement href="#ref-45"/> +<sqloperator id="ref-70">></sqloperator> +<whereValue href="#ref-60"/> +<selectedValue href="#ref-45"/> +<defaultView id="ref-71">List</defaultView> +<defaultSort id="ref-72">LastTimeLaunched</defaultSort> +<limit>100</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-43" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction id="ref-73">1</restriction> +<whereClause id="ref-74">title</whereClause> +<fromStatement href="#ref-45"/> +<sqloperator id="ref-75">group by</sqloperator> +<whereValue id="ref-76">*</whereValue> +<selectedValue href="#ref-45"/> +<defaultView id="ref-77">List</defaultView> +<defaultSort id="ref-78">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-44" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-45"/> +<whereClause href="#ref-74"/> +<fromStatement href="#ref-45"/> +<sqloperator href="#ref-45"/> +<whereValue href="#ref-76"/> +<selectedValue href="#ref-45"/> +<defaultView href="#ref-77"/> +<defaultSort id="ref-79">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +</SOAP-ENV:Body> +</SOAP-ENV:Envelope> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 22:59:22
|
Revision: 605 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=605&view=rev Author: chef_koch Date: 2007-06-22 15:59:18 -0700 (Fri, 22 Jun 2007) Log Message: ----------- fixed: selection item for mainGenre and subGenre added: example ViewDefinition file (again ;) with fixed genre definition), just for testing purposes Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-22 22:23:27 UTC (rev 604) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-22 22:59:18 UTC (rev 605) @@ -160,16 +160,13 @@ "title", "filename", "country", - "genre", "year", "manufacturer", "rating", "launchcount", "lastTimeLaunched", - "genre2", - "genre3", - "genre4", - "genre5", + "mainGenre", + "subGenre", }; string[] sqloperators = new string[] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 22:23:32
|
Revision: 604 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=604&view=rev Author: chef_koch Date: 2007-06-22 15:23:27 -0700 (Fri, 22 Jun 2007) Log Message: ----------- small change Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox/FritzBox.cs Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 22:11:15 UTC (rev 603) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 22:23:27 UTC (rev 604) @@ -332,7 +332,6 @@ { case "RING": OnIncomingCall(strList[0], strList[3], strList[4]); - FritzBoxWatch.notifyCount--; break; case "CALL": @@ -347,6 +346,7 @@ OnConnectionClosed(strList[0], int.Parse(strList[3])); break; } + FritzBoxWatch.notifyCount--; } private void OnIncomingCall(string dateTime, string callerId, string msn) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 22:11:18
|
Revision: 603 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=603&view=rev Author: chef_koch Date: 2007-06-22 15:11:15 -0700 (Fri, 22 Jun 2007) Log Message: ----------- added new option to limit the notifies Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 21:34:44 UTC (rev 602) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 22:11:15 UTC (rev 603) @@ -45,7 +45,7 @@ * - add more comments to code * - split code more in methods/classes */ - [PluginIcons("FritzBox.png", "FritzBoxDisabled.png")] + [PluginIcons("FritzBox.FritzBox.png", "FritzBox.FritzBoxDisabled.png")] public class FritzBox : ISetupForm, IPlugin { #region Variables @@ -110,6 +110,7 @@ FritzBoxWatch.fritzBoxPort = xmlreader.GetValueAsString("fritzbox", "port", "1012"); // notify settings + FritzBoxWatch.maxNotifies = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); _closeOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); _timeout = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); @@ -139,6 +140,7 @@ Log.Info("FRITZ!Box: closeOnTimeout = {0}", _closeOnTimeout.ToString()); Log.Info("FRITZ!Box: timeout = {0}", _timeout.ToString()); Log.Info("FRITZ!Box: showMsnOnHeading = {0}", _showMsnOnHeading.ToString()); + Log.Info("FRITZ!Box: maxNotifies = {0}", FritzBoxWatch.maxNotifies.ToString()); Log.Info("FRITZ!Box: stopMedia = {0}", _stopMedia.ToString()); Log.Info("FRITZ!Box: resumeMedia = {0}", _resumeMedia.ToString()); @@ -330,6 +332,7 @@ { case "RING": OnIncomingCall(strList[0], strList[3], strList[4]); + FritzBoxWatch.notifyCount--; break; case "CALL": Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs 2007-06-22 21:34:44 UTC (rev 602) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.Designer.cs 2007-06-22 22:11:15 UTC (rev 603) @@ -33,7 +33,6 @@ this.tabGeneral = new System.Windows.Forms.TabPage(); this.checkBoxExtensiveLogging = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.buttonTest = new MediaPortal.UserInterface.Controls.MPButton(); this.textBoxPort = new MediaPortal.UserInterface.Controls.MPTextBox(); this.textBoxAddress = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -58,7 +57,6 @@ this.checkBoxResumeMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxStopMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabPhonebook = new System.Windows.Forms.TabPage(); - this.pictureBoxCaller = new System.Windows.Forms.PictureBox(); this.buttonCallerChange = new MediaPortal.UserInterface.Controls.MPButton(); this.checkBoxCallerShow = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.textBoxCallerName = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -74,18 +72,23 @@ this.buttonSave = new MediaPortal.UserInterface.Controls.MPButton(); this.buttonCancel = new MediaPortal.UserInterface.Controls.MPButton(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.pictureBoxCaller = new System.Windows.Forms.PictureBox(); + this.upDownMaxNotifies = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); + this.lblMaxNotifies = new MediaPortal.UserInterface.Controls.MPLabel(); this.tabControlFritzBoxSettings.SuspendLayout(); this.tabGeneral.SuspendLayout(); this.mpGroupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.tabIncoming.SuspendLayout(); this.groupBoxPhonebook.SuspendLayout(); this.groupBoxNotify.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); this.groupBoxMedia.SuspendLayout(); this.tabPhonebook.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.upDownMaxNotifies)).BeginInit(); this.SuspendLayout(); // // tabControlFritzBoxSettings @@ -144,16 +147,6 @@ this.mpGroupBox1.TabStop = false; this.mpGroupBox1.Text = "connection"; // - // pictureBox1 - // - this.pictureBox1.Image = global::FritzBox.Properties.Resources.FritzBox; - this.pictureBox1.Location = new System.Drawing.Point(6, 20); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(97, 99); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox1.TabIndex = 2; - this.pictureBox1.TabStop = false; - // // buttonTest // this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -291,6 +284,8 @@ // this.groupBoxNotify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxNotify.Controls.Add(this.lblMaxNotifies); + this.groupBoxNotify.Controls.Add(this.upDownMaxNotifies); this.groupBoxNotify.Controls.Add(this.checkBoxShowMsnOnHeading); this.groupBoxNotify.Controls.Add(this.buttonMSNsRemove); this.groupBoxNotify.Controls.Add(this.checkBoxFilterMSNs); @@ -450,16 +445,6 @@ this.tabPhonebook.Text = "Phonebook"; this.tabPhonebook.UseVisualStyleBackColor = true; // - // pictureBoxCaller - // - this.pictureBoxCaller.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBoxCaller.Location = new System.Drawing.Point(417, 38); - this.pictureBoxCaller.Name = "pictureBoxCaller"; - this.pictureBoxCaller.Size = new System.Drawing.Size(100, 122); - this.pictureBoxCaller.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBoxCaller.TabIndex = 13; - this.pictureBoxCaller.TabStop = false; - // // buttonCallerChange // this.buttonCallerChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -610,8 +595,60 @@ this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); // - // Form1 + // pictureBox1 // + this.pictureBox1.Image = global::FritzBox.Properties.Resources.FritzBox; + this.pictureBox1.Location = new System.Drawing.Point(6, 20); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(97, 99); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // pictureBoxCaller + // + this.pictureBoxCaller.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBoxCaller.Location = new System.Drawing.Point(417, 38); + this.pictureBoxCaller.Name = "pictureBoxCaller"; + this.pictureBoxCaller.Size = new System.Drawing.Size(100, 122); + this.pictureBoxCaller.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBoxCaller.TabIndex = 13; + this.pictureBoxCaller.TabStop = false; + // + // upDownMaxNotifies + // + this.upDownMaxNotifies.Location = new System.Drawing.Point(465, 20); + this.upDownMaxNotifies.Maximum = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.upDownMaxNotifies.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.upDownMaxNotifies.Name = "upDownMaxNotifies"; + this.upDownMaxNotifies.Size = new System.Drawing.Size(40, 21); + this.upDownMaxNotifies.TabIndex = 7; + this.upDownMaxNotifies.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.upDownMaxNotifies.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + // + // lblMaxNotifies + // + this.lblMaxNotifies.AutoSize = true; + this.lblMaxNotifies.Location = new System.Drawing.Point(365, 22); + this.lblMaxNotifies.Name = "lblMaxNotifies"; + this.lblMaxNotifies.Size = new System.Drawing.Size(94, 13); + this.lblMaxNotifies.TabIndex = 8; + this.lblMaxNotifies.Text = "maximum Notifies:"; + // + // FritzBoxSetupFrom + // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(552, 393); @@ -623,7 +660,7 @@ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; - this.Name = "Form1"; + this.Name = "FritzBoxSetupFrom"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "FRITZ!Box configuration"; this.tabControlFritzBoxSettings.ResumeLayout(false); @@ -631,7 +668,6 @@ this.tabGeneral.PerformLayout(); this.mpGroupBox1.ResumeLayout(false); this.mpGroupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.tabIncoming.ResumeLayout(false); this.groupBoxPhonebook.ResumeLayout(false); this.groupBoxPhonebook.PerformLayout(); @@ -642,8 +678,10 @@ this.groupBoxMedia.PerformLayout(); this.tabPhonebook.ResumeLayout(false); this.tabPhonebook.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.upDownMaxNotifies)).EndInit(); this.ResumeLayout(false); } @@ -695,5 +733,7 @@ private MediaPortal.UserInterface.Controls.MPButton buttonSave; private MediaPortal.UserInterface.Controls.MPButton buttonCancel; private System.Windows.Forms.OpenFileDialog openFileDialog; + private MediaPortal.UserInterface.Controls.MPNumericUpDown upDownMaxNotifies; + private MediaPortal.UserInterface.Controls.MPLabel lblMaxNotifies; } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-22 21:34:44 UTC (rev 602) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-22 22:11:15 UTC (rev 603) @@ -42,6 +42,7 @@ textBoxPort.Text = xmlreader.GetValueAsString("fritzbox", "port", "1012"); // notify settings + upDownMaxNotifies.Value = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); checkBoxCloseOnTimout.Checked = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); numericUpDownTimeout.Value = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); @@ -88,6 +89,7 @@ xmlwriter.SetValue("fritzbox", "port", textBoxPort.Text); // notify settings + xmlwriter.SetValue("fritzbox", "maxNotifies", upDownMaxNotifies.Value); xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", checkBoxCloseOnTimout.Checked); xmlwriter.SetValue("fritzbox", "timeout", numericUpDownTimeout.Value); Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs 2007-06-22 21:34:44 UTC (rev 602) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs 2007-06-22 22:11:15 UTC (rev 603) @@ -52,6 +52,9 @@ public static string fritzBoxAddress; // address for the connected fritzbox public static string fritzBoxPort; // port for the connected fritzbox + + public static int maxNotifies = 20; + public static int notifyCount = 0; public void Start() { @@ -95,7 +98,11 @@ } if (cChar == '\n') { - FritzBoxAction(strLine); + if (notifyCount < maxNotifies) + { + FritzBoxAction(strLine); + notifyCount++; + } strLine = ""; cChar = '\0'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 21:34:45
|
Revision: 602 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=602&view=rev Author: chef_koch Date: 2007-06-22 14:34:44 -0700 (Fri, 22 Jun 2007) Log Message: ----------- added solution file Added Paths: ----------- trunk/plugins/FritzBox/FritzBox.sln Added: trunk/plugins/FritzBox/FritzBox.sln =================================================================== --- trunk/plugins/FritzBox/FritzBox.sln (rev 0) +++ trunk/plugins/FritzBox/FritzBox.sln 2007-06-22 21:34:44 UTC (rev 602) @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FritzBox", "FritzBox\FritzBox.csproj", "{7A458560-A537-429E-A016-1A4513CB586F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7A458560-A537-429E-A016-1A4513CB586F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A458560-A537-429E-A016-1A4513CB586F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A458560-A537-429E-A016-1A4513CB586F}.Debug|x86.ActiveCfg = Debug|x86 + {7A458560-A537-429E-A016-1A4513CB586F}.Debug|x86.Build.0 = Debug|x86 + {7A458560-A537-429E-A016-1A4513CB586F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A458560-A537-429E-A016-1A4513CB586F}.Release|Any CPU.Build.0 = Release|Any CPU + {7A458560-A537-429E-A016-1A4513CB586F}.Release|x86.ActiveCfg = Release|x86 + {7A458560-A537-429E-A016-1A4513CB586F}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 18:39:02
|
Revision: 601 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=601&view=rev Author: chef_koch Date: 2007-06-22 11:39:00 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/FritzBox/FritzBox/Resources/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 18:37:33
|
Revision: 600 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=600&view=rev Author: chef_koch Date: 2007-06-22 11:37:31 -0700 (Fri, 22 Jun 2007) Log Message: ----------- _msn[] is now a List of Strings and called _msnList Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox/FritzBox.cs Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 18:16:25 UTC (rev 599) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 18:37:31 UTC (rev 600) @@ -24,26 +24,20 @@ #endregion using System; -using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Net.Sockets; -using System.Reflection; -using System.Runtime.InteropServices; using System.Threading; using System.Windows.Forms; using System.Xml; -using MediaPortal.Ripper; - -using MediaPortal.Util; -using MediaPortal.GUI.Library; using MediaPortal.Configuration; using MediaPortal.Dialogs; +using MediaPortal.GUI.Library; using MediaPortal.Player; -using System.Collections.Generic; +using MediaPortal.Util; - namespace FritzBox { /* @@ -55,8 +49,13 @@ public class FritzBox : ISetupForm, IPlugin { #region Variables - #region Private Variables + public const string _version = "0.2.2.8"; + public static int _lastVersion = 0; + public static bool _extensiveLogging = false; + + FritzBoxWatch FritzBoxWatch; + private bool _fritzBoxDisabled = false; // notify settings @@ -64,7 +63,7 @@ private bool _closeOnTimeout = false; public static bool _filterMSNs = false; - public static string[] _msn; + public static List<String> _msnList = new List<String>(); public static bool _showMsnOnHeading = false; @@ -73,16 +72,8 @@ private bool _resumeMedia = true; // resume media when notify is closed private bool _showNotify = true; - private List<string> notifyQueue = new List<string>(); + private List<String> notifyQueue = new List<String>(); - #endregion - - #region public Variables - - public const string _version = "0.2.2.8"; - public static int _lastVersion = 0; - public static bool _extensiveLogging = false; - // phonebook settings public static bool _usePhonebook = true; public static bool _showUnknownCaller = true; @@ -92,11 +83,6 @@ #endregion - FritzBoxWatch FritzBoxWatch; - - // Protected Variables - #endregion - #region Constructors/Destructors public FritzBox() @@ -105,8 +91,6 @@ #endregion - #region Private Methods - #region Settings private void LoadSettings() @@ -134,7 +118,7 @@ _filterMSNs = xmlreader.GetValueAsBool("fritzbox", "filterMSNs", false); string strMSN = xmlreader.GetValueAsString("fritzbox", "MSN", ""); - _msn = strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries); + _msnList.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); if (_extensiveLogging) Log.Debug("FRITZ!Box: MSNs loaded: {0}", strMSN); @@ -314,23 +298,6 @@ #endregion - public bool IsFritzBoxConnected(string fritzBoxAddress, string fritzBoxPort) - { - TcpClient TcpClient; - - try - { - TcpClient = new TcpClient(fritzBoxAddress, Int32.Parse(fritzBoxPort)); - } - catch (Exception) - { - return false; - } - - TcpClient.Close(); - return true; - } - #region FritzBoxActions private void OnFritzBoxEvent(string dataStream) @@ -389,7 +356,7 @@ Log.Info(" MSN: {0}", msn); } - if (!CheckMSN(msn)) return; + if (!IsMsnEnabled(msn)) return; if (callerId == "") { @@ -554,35 +521,49 @@ g_Player.Pause(); } - private bool CheckMSN(string msn) + #region Helper Methods + + public bool IsFritzBoxConnected(string fritzBoxAddress, string fritzBoxPort) { - bool foundMSN = false; + TcpClient TcpClient; - if (FritzBox._filterMSNs) + try { - for (int i = 0; i <= FritzBox._msn.GetUpperBound(0); i++) - { - if (FritzBox._msn[i].ToString() == msn) - foundMSN = true; - } - if (foundMSN == true) - { - Log.Info("MSN is on list."); - return true; - } - else - { - Log.Info("MSN is not on list. Notify won't be shown."); - return false; - } + TcpClient = new TcpClient(fritzBoxAddress, Int32.Parse(fritzBoxPort)); } - else + catch (Exception) { + return false; + } + + TcpClient.Close(); + return true; + } + + private bool IsMsnEnabled(string msn) + { + if (!_filterMSNs) + { Log.Info("MSN filter is disabled."); return true; } + + if (_msnList.Contains(msn)) + { + Log.Info("MSN is on list."); + return true; + } + else + { + Log.Info("MSN is not on list. Notify won't be shown."); + return false; + } } + #endregion + + #region ExternalProcess Actions + public void OnStartExternal(Process proc, bool waitForExit) { if (waitForExit) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-22 18:16:27
|
Revision: 599 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=599&view=rev Author: chef_koch Date: 2007-06-22 11:16:25 -0700 (Fri, 22 Jun 2007) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox/FritzBox.cs Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 18:03:18 UTC (rev 598) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-22 18:16:25 UTC (rev 599) @@ -79,7 +79,7 @@ #region public Variables - public const string _version = "0.2.2.0"; + public const string _version = "0.2.2.8"; public static int _lastVersion = 0; public static bool _extensiveLogging = false; @@ -98,14 +98,17 @@ #endregion #region Constructors/Destructors + public FritzBox() { } + #endregion #region Private Methods #region Settings + private void LoadSettings() { char[] charSeparators = new char[] { ';' }; @@ -177,9 +180,11 @@ SavePhonebook(); } + #endregion #region Phonebook + public static void LoadPhonebook() { if ((_lastVersion < 0220) && (!File.Exists(Config.GetFile(Config.Dir.Config, "fritzbox.xml")))) @@ -306,6 +311,7 @@ } return false; } + #endregion public bool IsFritzBoxConnected(string fritzBoxAddress, string fritzBoxPort) @@ -326,6 +332,7 @@ } #region FritzBoxActions + private void OnFritzBoxEvent(string dataStream) { if (!_showNotify) @@ -382,84 +389,79 @@ Log.Info(" MSN: {0}", msn); } - if (CheckMSN(msn) == true) + if (!CheckMSN(msn)) return; + + if (callerId == "") { - if (callerId == "") + Log.Info("Caller is not identified by CLIP."); + + if (FritzBox._showUnknownCaller) + DialogOnIncomingCall("", msn); + } + else + { + if (FritzBox._usePhonebook) { - Log.Info("Caller is not identified by CLIP."); + bool foundCaller = false; - if (FritzBox._showUnknownCaller) - DialogOnIncomingCall("", msn); - } - else - { - if (FritzBox._usePhonebook) + if (phonebook.Count == 0) { + Log.Info("Phonebook is empty. Caller is added to the phonebook."); + Caller caller = new Caller(callerId, callerId, true); + phonebook.Add(caller); + } + else + { + int i = 0; - - - - bool foundCaller = false; - - if (phonebook.Count == 0) + do { - Log.Info("Phonebook is empty. Caller is added to the phonebook."); - Caller caller = new Caller(callerId, callerId, true); - phonebook.Add(caller); - } - else - { - int i = 0; + Caller caller = phonebook[i]; - do + if (caller.ID.Equals(callerId)) { - Caller caller = phonebook[i]; + Log.Info("Caller is identified by phonebook as {0}.", caller.Name); + foundCaller = true; - if (caller.ID.Equals(callerId)) + if (caller.Show) { - Log.Info("Caller is identified by phonebook as {0}.", caller.Name); - foundCaller = true; + Log.Info("Caller is accepted by phonebook and dialog will be shown."); - if (caller.Show) - { - Log.Info("Caller is accepted by phonebook and dialog will be shown."); - - DialogOnIncomingCall(caller.Name, msn); - } - else - { - Log.Info("Caller is denied by phonebook and dialog won't be shown."); - } + DialogOnIncomingCall(caller.Name, msn); } - i++; + else + { + Log.Info("Caller is denied by phonebook and dialog won't be shown."); + } } - while (!foundCaller && (i < phonebook.Count)); + i++; + } + while (!foundCaller && (i < phonebook.Count)); - if (!foundCaller) + if (!foundCaller) + { + Log.Info("Caller is not identified by phonebook."); + + if (FritzBox._saveUnknownCaller) { - Log.Info("Caller is not identified by phonebook."); + Log.Info("saveUnknownCallers is ON - Caller is added to the phonebook."); - if (FritzBox._saveUnknownCaller) - { - Log.Info("saveUnknownCallers is ON - Caller is added to the phonebook."); + Caller caller = new Caller(callerId, callerId, FritzBox._showUnknownCaller); + phonebook.Add(caller); + } - Caller caller = new Caller(callerId, callerId, FritzBox._showUnknownCaller); - phonebook.Add(caller); - } + if (FritzBox._showUnknownCaller) + { + Log.Info("showUnknownCallers is ON - Caller is shown."); - if (FritzBox._showUnknownCaller) - { - Log.Info("showUnknownCallers is ON - Caller is shown."); - - DialogOnIncomingCall(callerId, msn); - } + DialogOnIncomingCall(callerId, msn); } + } - } } - else - DialogOnIncomingCall(callerId, msn); } + else + DialogOnIncomingCall(callerId, msn); } } @@ -492,6 +494,7 @@ Log.Info(" DateTime: {0}", dateTime); Log.Info(" conneted time (in s): {0}", connectedTime.ToString()); } + #endregion void DialogOnIncomingCall(string strCallerId, string strMSN) @@ -580,7 +583,6 @@ } } - public void OnStartExternal(Process proc, bool waitForExit) { if (waitForExit) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |