|
From: <tim...@us...> - 2009-04-15 13:46:11
|
Revision: 2798
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2798&view=rev
Author: timmyt81
Date: 2009-04-15 13:41:39 +0000 (Wed, 15 Apr 2009)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MyDailyComics/ComicStrip.cs
trunk/plugins/MyDailyComics/MyDailyComics.suo
trunk/plugins/MyDailyComics/MyXmlReader.cs
trunk/plugins/MyDailyComics/gui/Setup.Designer.cs
trunk/plugins/MyDailyComics/gui/Setup.cs
trunk/plugins/MyDailyComics/util/ComicHelper.cs
Modified: trunk/plugins/MyDailyComics/ComicStrip.cs
===================================================================
--- trunk/plugins/MyDailyComics/ComicStrip.cs 2009-04-15 13:27:13 UTC (rev 2797)
+++ trunk/plugins/MyDailyComics/ComicStrip.cs 2009-04-15 13:41:39 UTC (rev 2798)
@@ -127,17 +127,18 @@
set { _urltype = value; }
}
- public string FirstRelease
- {
- get { return _firstRelease; }
- set { _firstRelease = value; }
- }
+ //TODO for future versions, use this approach for numeric types
+ //public string FirstRelease
+ //{
+ // get { return _firstRelease; }
+ // set { _firstRelease = value; }
+ //}
- public string LastRelease
- {
- get { return _lastRelease; }
- set { _lastRelease = value; }
- }
+ //public string LastRelease
+ //{
+ // get { return _lastRelease; }
+ // set { _lastRelease = value; }
+ //}
#endregion
Modified: trunk/plugins/MyDailyComics/MyDailyComics.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/MyDailyComics/MyXmlReader.cs
===================================================================
--- trunk/plugins/MyDailyComics/MyXmlReader.cs 2009-04-15 13:27:13 UTC (rev 2797)
+++ trunk/plugins/MyDailyComics/MyXmlReader.cs 2009-04-15 13:41:39 UTC (rev 2798)
@@ -100,13 +100,14 @@
comic.UrlType = reader.ReadInnerXml();
break;
- case "firstrelease":
- comic.FirstRelease = reader.ReadInnerXml();
- break;
+ //TODO for future versions, use this approach for numeric types
+ //case "firstrelease":
+ // comic.FirstRelease = reader.ReadInnerXml();
+ // break;
- case "lastrelease":
- comic.LastRelease = reader.ReadInnerXml();
- break;
+ //case "lastrelease":
+ // comic.LastRelease = reader.ReadInnerXml();
+ // break;
}
break;
Modified: trunk/plugins/MyDailyComics/gui/Setup.Designer.cs
===================================================================
--- trunk/plugins/MyDailyComics/gui/Setup.Designer.cs 2009-04-15 13:27:13 UTC (rev 2797)
+++ trunk/plugins/MyDailyComics/gui/Setup.Designer.cs 2009-04-15 13:41:39 UTC (rev 2798)
@@ -470,6 +470,7 @@
//
this.rbDatebased.AutoSize = true;
this.rbDatebased.Checked = true;
+ this.rbDatebased.Enabled = false;
this.rbDatebased.Location = new System.Drawing.Point(5, 21);
this.rbDatebased.Margin = new System.Windows.Forms.Padding(2);
this.rbDatebased.Name = "rbDatebased";
@@ -482,6 +483,7 @@
// rbNumeric
//
this.rbNumeric.AutoSize = true;
+ this.rbNumeric.Enabled = false;
this.rbNumeric.Location = new System.Drawing.Point(5, 46);
this.rbNumeric.Margin = new System.Windows.Forms.Padding(2);
this.rbNumeric.Name = "rbNumeric";
Modified: trunk/plugins/MyDailyComics/gui/Setup.cs
===================================================================
--- trunk/plugins/MyDailyComics/gui/Setup.cs 2009-04-15 13:27:13 UTC (rev 2797)
+++ trunk/plugins/MyDailyComics/gui/Setup.cs 2009-04-15 13:41:39 UTC (rev 2798)
@@ -159,8 +159,11 @@
txtLanguage.Text = strip.Language;
txtBanner.Text = strip.Banner;
chkEnabled.Checked = strip.Enabled;
- rbDatebased.Checked = strip.Type.Equals(ComicStrip.TYPE_DATE);
- rbNumeric.Checked = !rbDatebased.Checked;
+ //TODO for future versions, use this approach for numeric types
+ //rbDatebased.Checked = strip.Type.Equals(ComicStrip.TYPE_DATE);
+ //rbNumeric.Checked = !rbDatebased.Checked;
+ rbDatebased.Checked = true;
+
rbUrlGraphic.Checked = strip.UrlType.Equals(ComicStrip.URLTYPE_IMAGE);
rbUrlWebsite.Checked = !rbUrlGraphic.Checked;
txtStartsWith.Text = strip.StartsWith;
@@ -220,7 +223,9 @@
cs.Language = getText(txtLanguage);
cs.StartsWith = getText(txtStartsWith);
cs.EndsWith = getText(txtEndsWith);
- cs.Type = rbDatebased.Checked ? ComicStrip.TYPE_DATE : ComicStrip.TYPE_NUMERIC;
+ //TODO for future versions, use this approach for numeric types
+ //cs.Type = rbDatebased.Checked ? ComicStrip.TYPE_DATE : ComicStrip.TYPE_NUMERIC;
+ cs.Type = ComicStrip.TYPE_DATE;
cs.UrlType = rbUrlGraphic.Checked ? ComicStrip.URLTYPE_IMAGE : ComicStrip.URLTYPE_WEBPAGE;
int idx = lstComics.SelectedIndex;
lstComics.Items.RemoveAt(idx);
Modified: trunk/plugins/MyDailyComics/util/ComicHelper.cs
===================================================================
--- trunk/plugins/MyDailyComics/util/ComicHelper.cs 2009-04-15 13:27:13 UTC (rev 2797)
+++ trunk/plugins/MyDailyComics/util/ComicHelper.cs 2009-04-15 13:41:39 UTC (rev 2798)
@@ -87,8 +87,9 @@
if (comic.Type.Equals(ComicStrip.TYPE_NUMERIC, StringComparison.OrdinalIgnoreCase))
{
+ //TODO for future versions, use this approach for numeric types
+ /*
// numeric type
- //Log.Debug("Comic is numeric type");
// get field "lastrelease"
long lastRelease = 0;
@@ -98,24 +99,21 @@
}
catch (Exception ex)
{
- //Log.Debug(ex.ToString());
throw new Exception("Invalid format in field <lastrelease> of comic '" + comic.ToString() + "'");
}
string replaceSrc = string.Empty;
string replaceDst = string.Empty;
int startIdx = 0;
- //Log.Debug("url = " + comic.Url);
while ((startIdx = comic.Url.IndexOf('#', startIdx)) > 0)
{
replaceSrc += "#";
replaceDst += "0";
startIdx++;
}
- //Log.Debug("replace str = " + replaceSrc);
ret = comic.Url.Replace(replaceSrc, lastRelease.ToString(replaceDst));
- //Log.Debug("URL = " + ret);
+ */
}
else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|