本文整理汇总了C#中Data.GetImageNum方法的典型用法代码示例。如果您正苦于以下问题:C# Data.GetImageNum方法的具体用法?C# Data.GetImageNum怎么用?C# Data.GetImageNum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data.GetImageNum方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
if (searchNumber != "")
{
string markerNumber = dat.GetImageNum(searchNumber); //(int.Parse(dat.GetImageNum(searchNumber)) + numofallresults).ToString();
ImageLiteral.Text = imageLiteral + "<div style=\"float: left;\"><img style=\"cursor: pointer;\" onclick=\"myclick(" + markerNumber + ");\" src=" +
"\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
//SearchLiteral.Text += "<script type=\"text/javascript\">var letter = String.fromCharCode(\"A\".charCodeAt(0) + " +
// searchNumber + "); var letteredIcon = new GIcon(baseIcon); document.getElementById('image" + searchNumber +
// "').src = \"http://www.google.com/mapfiles/marker\" + letter + \".png\";</script>";
BeginingLiteral.Text = "<div style=\";background-color:" + color + "; min-height: 33px; width: " + width.ToString() +
"px; padding: 3px; margin-bottom: 3px;\">";
}
else
{
BeginingLiteral.Text = "<div style=\"background-color:" + color + "; width: " + width.ToString() +
"px; padding: 3px; margin-bottom: 3px;\">";
}
SearchLabel.Text = searchLabel;
//search = true is disabled here
if (windowT)
{
SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(searchLabel) + "_" + venueID + "_Venue" + "');");
}
else
{
SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + venueID + "_Venue";
}
string begining = "<div style=\"color: #b1a812; font-family: Arial; font-size: 11px;\">";
string end = "</div>";
TagsLiteral.Text = begining + city + ", " + state + end;
dat.TAG_TYPE = Data.tagType.VENUE;
string tags = dat.getTags(dat.GetData("SELECT DISTINCT C.ID, C.Name AS CategoryName, VC.tagSize FROM Venue_Category VC, VenueCategories C WHERE VC.CATEGORY_ID=C.ID AND VC.VENUE_ID=" + venueID), false, windowT);
TagsLiteral.Text += "<span style=\"color: #b1a812; line-height: 10px; font-size: 11px;\" >" + tags + "</span>";
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
if (IsPostBack)
{
MessageRadWindowManager.VisibleOnPageLoad = false;
}
//take care of mapping to the search map
if (searchNumber != "")
{
string markerNumber = dat.GetImageNum(searchNumber); // (int.Parse(dat.GetImageNum(searchNumber)) + numofallresults).ToString();
ImageLiteral.Text = imageLiteral + "<div style=\"float: left;\"><img style=\"cursor: pointer;\" onclick=\"selectFirstTab();myclick(" + markerNumber + ");\" id='image" + searchNumber + "' src=" +
"\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
//SearchLiteral.Text += "<script type=\"text/javascript\">var letter = String.fromCharCode(\"A\".charCodeAt(0) + " +
// searchNumber + "); var letteredIcon = new GIcon(baseIcon); document.getElementById('image" + searchNumber +
// "').src = \"http://www.google.com/mapfiles/marker\" + letter + \".png\";</script>";
BeginingLiteral.Text = "<div style=\"margin-bottom: 3px;background-color:" +
color + "; width: " + width.ToString() + "px; min-height: 33px; padding: 3px;\">";
}
else
{
BeginingLiteral.Text = "<div style=\"margin-bottom: 3px;background-color:" + color + "; width: " + width.ToString() + "px;padding: 3px;\">";
}
if (calendarLetter != "")
{
ImageLiteral.Text += "<div onclick=\"selectCalendarDate('"+firstDate+"', '"+toolTipID+"');\" align=\"center\" style=\"cursor: pointer;margin-right: 3px;margin-left: 5px; margin-top: 6px;font-weight: bold;width: 20px; height: 14px;color: #1b1b1b;font-size: " +
"10px; padding-top: 6px;float: left; background-image: url(images/CalendarIcon.png);" +
"\">" + calendarLetter + "</div>";
}
if (isGroup)
{
ImageLiteral.Text += "<div style=\"float: left; height: 30px; margin-top: -4px\"><img height=\"40px\" title=\"Group Event\" " +
"name=\"Group Event\" src=\"images/GroupsIcon2.png\" /></div>";
}
//search = true is disabled here
SearchLabel.Text = searchLabel;
if (venueLabel.Trim() != "")
VenueLabel.Text = venueLabel;
else
{
VenueRealLabel.Text = address;
VenueRealLabel.Style.Add("color", "#cccccc");
VenueRealLabel.Style.Add("font-weight", "normal");
VenueRealLabel.Style.Add("pointer", "default");
VenueRealLabel.Style.Add("font-family", "Arial");
VenueRealLabel.Style.Add("font-size", "12px");
}
if (windowT)
{
if (isGroup)
SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
dat.MakeNiceName(searchLabel) + "_" + reoccurrID + "_" + eventID + "_GroupEvent" + "');");
else
SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
dat.MakeNiceName(searchLabel) + "_" + eventID + "_Event" + "');");
if (venueLabel.Trim() != "")
VenueLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
dat.MakeNiceName(venueLabel) + "_" + venueID + "_Venue" + "');");
}
else
{
if (isGroup)
SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" +
reoccurrID + "_" + eventID + "_GroupEvent";
else
SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + eventID + "_Event";
if (venueLabel.Trim() != "")
VenueLabel.NavigateUrl = "../" + dat.MakeNiceName(venueLabel) +
"_" + venueID + "_Venue";
}
//if(numLabel != "")
// NumLabel.Text = numLabel;
DateLabel.Text = datelabel;
string begining = "<a style=\"color: #b1a812; font-family: Arial; font-size: 11px;\">";
string end = "</a>";
string tags = "";
if (isGroup)
{
dat.TAG_TYPE = Data.tagType.GROUP_EVENT;
DataSet ds1 = dat.GetData("SELECT DISTINCT C.ID, C.GroupName AS CategoryName, '22px' AS tagSize FROM GroupEvent_Category VC, GroupCategories C WHERE C.ID=VC.CATEGORY_ID AND VC.GROUPEVENT_ID=" + eventID);
tags = dat.getTags(ds1, false, windowT);
}
else
{
dat.TAG_TYPE = Data.tagType.EVENT;
tags = dat.getTags(dat.GetData("SELECT C.ID, C.Name AS CategoryName, ECM.tagSize FROM Event_Category_Mapping ECM, EventCategories C WHERE ECM.CategoryID=C.ID AND ECM.EventID=" + eventID), false, windowT);
DataSet ds = dat.GetData("SELECT ShortDescription FROM Events WHERE ID=" + eventID);
//ShortDescriptionLabel.Text = dat.BreakUpString(ds.Tables[0].Rows[0]["ShortDescription"].ToString(), 300);
}
//.........这里部分代码省略.........
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
DateTime isn = DateTime.Now;
DateTime.TryParse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"), out isn);
Data dat = new Data(isn);
if (IsPostBack)
{
MessageRadWindowManager.VisibleOnPageLoad = false;
}
string background = "";
if (isFeatured)
{
background = "background-color: #e9f1f4;";
}
else
{
background = "border-bottom: solid 1px #dedbdb;";
}
if (searchNumber != "")
{
string markerNumber = dat.GetImageNum(searchNumber);
ImageLiteral.Text = imageLiteral + "<div class=\"topDiv\" style=\"float: left;padding-right: 5px;height: 50px;\"><img style=\"cursor: " +
"pointer;\" onclick=\"myclick(" + markerNumber + ");\" id='image" + searchNumber + "' src=" +
"\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
BeginingLiteral.Text = "<div style=\"margin-top: 3px;height: 56px;margin-bottom: 3px; width: " + width.ToString() +
"px; padding: 3px;" + background + "\">";
}
else
{
BeginingLiteral.Text = "<div class=\"topDiv\" style=\"margin-top: 3px;margin-bottom: 3px;" + background +
" width: " + width.ToString() + "px;padding: 3px;\">";
}
bool imgAbsolute = false;
VenueLabel.Text = venueLabel;
if (!isVenue)
{
DataView dvEvent = dat.GetDataDV("SELECT * FROM Events WHERE ID=" + eventID);
DataView dvEventsSlider = dat.GetDataDV("SELECT * FROM Events E, Event_Slider_Mapping ESM WHERE E.ID=ESM.EventID AND E.ID=" + eventID);
if (dvEventsSlider.Count > 0)
{
if(bool.Parse(dvEventsSlider[0]["ImgPathAbsolute"].ToString()))
imgAbsolute = true;
if (imgAbsolute)
{
string name = dat.MakeNiceNameFull(dvEventsSlider[0]["PictureName"].ToString().Replace("/", "_").Replace(":", "_").Replace(".", "_"));
int i = 0;
for (i = name.Length - 1; i >= 0; i--)
{
if (name[i] == '_')
{
break;
}
}
Random rand = new Random(DateTime.Now.Millisecond);
name = dat.MakeNiceNameFive(dvEventsSlider[0]["PictureName"].ToString()) + "_" + eventID + "." + name.Substring(i + 1, name.Length - i - 1);
//if (name.Length > 230)
// name = name.Substring(name.Length - 50, 50);
//if (!System.IO.File.Exists(MapPath("../") + "\\Temp\\Temp_" + name))
//{
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(dvEventsSlider[0]["PictureName"].ToString());
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
// read the stream
System.Drawing.Image img = System.Drawing.Image.FromStream(receiveStream);
receiveStream.Close();
response.Close();
SaveThumbnail(img, MapPath("../") + "\\Temp\\Temp_" + name);
//}
EventImageLiteral.Text = "<img style='float: left; padding-right: 5px;' src='http://hippohappenings.com/Temp/Temp_" +
name + "' />";
}
catch (Exception ex)
{
}
}
else
{
if (!System.IO.File.Exists(MapPath("../") + "\\Temp\\Temp_" + dvEventsSlider[0]["PictureName"].ToString()))
{
if (System.IO.File.Exists(MapPath("../") + "\\UserFiles\\" +
//.........这里部分代码省略.........
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
DateTime isn = DateTime.Now;
if (!DateTime.TryParse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"), out isn))
isn = DateTime.Now;
DateTime isNow = isn;
Data dat = new Data(isn);
string background = "";
if (isFeatured)
{
background = "background-color: #e9f1f4;";
}
else
{
background = "border-bottom: solid 1px #dedbdb;";
}
if (searchNumber != "")
{
string markerNumber = dat.GetImageNum(searchNumber);
ImageLiteral.Text = imageLiteral + "<div style=\"float: left;padding-right: 5px;height: 50px;\"><img style=\"cursor: pointer;\" onclick=\"myclick(" + markerNumber + ");\" src=" +
"\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
BeginingLiteral.Text = "<div style=\"clear: both;margin-top: 3px;height: 56px;margin-bottom: 3px; width: " + width.ToString() +
"px; padding: 3px;" + background + "\">";
}
else
{
BeginingLiteral.Text = "<div class=\"topDiv\" style=\"clear: both;background-color:" + color + "; width: " + width.ToString() +
"px; padding: 3px; margin-bottom: 3px;" + background + "\">";
}
SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + venueID + "_Venue";
if (searchLabel.Length > 36)
{
searchLabel = searchLabel.Substring(0, 33) + "...";
}
SearchLabel.Text = dat.stripHTML(searchLabel);
DataView dvEvent = dat.GetDataDV("SELECT * FROM Venues WHERE ID=" + venueID);
string shortDesc = "";
if (dvEvent[0]["Content"].ToString().Trim() != "")
{
shortDesc = dat.stripHTML(dvEvent[0]["Content"].ToString()).Trim();
if (shortDesc.Length > 113)
{
shortDesc = shortDesc.Substring(0, 110) + "...";
}
}
ShortDescriptionLabel.Text = dat.stripHTML(shortDesc);
DataView dvEventsSlider = dat.GetDataDV("SELECT * FROM Venues E, Venue_Slider_Mapping ESM "+
"WHERE E.ID=ESM.VenueID AND E.ID=" + venueID);
if (dvEventsSlider.Count > 0)
{
if (System.IO.File.Exists(MapPath("../") + "\\VenueFiles\\" +
venueID + "\\Slider\\" + dvEventsSlider[0]["PictureName"].ToString()))
{
System.Drawing.Image img = System.Drawing.Image.FromFile(MapPath("../") + "\\VenueFiles\\" +
venueID + "\\Slider\\" + dvEventsSlider[0]["PictureName"].ToString());
SaveThumbnail(img, MapPath("../") + "\\Temp\\Temp_" + dvEventsSlider[0]["PictureName"].ToString());
EventImageLiteral.Text = "<img style='float: left; padding-right: 5px;' src='http://hippohappenings.com/Temp/Temp_" +
dvEventsSlider[0]["PictureName"].ToString() + "' />";
}
}
else
{
EventImageLiteral.Text = "";
}
string begining = "<div class=\"TextNormal\">";
string end = "</div>";
TagsLiteral.Text = begining + end;
dat.TAG_TYPE = Data.tagType.VENUE;
int tagLength = 0;
if (ShortDescriptionLabel.Text.Length > 64)
{
tagLength = 57;
}
else if (ShortDescriptionLabel.Text.Length == 0)
{
tagLength = 183;
}
else
{
tagLength = 122;
}
//.........这里部分代码省略.........
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
DateTime isn = DateTime.Now;
if (!DateTime.TryParse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"), out isn))
isn = DateTime.Now;
DateTime isNow = isn;
Data dat = new Data(isn);
if (IsPostBack)
{
MessageRadWindowManager.VisibleOnPageLoad = false;
}
string background = "";
if (isFeatured)
{
background = "background-color: #e9f1f4;";
}
else
{
background = "border-bottom: solid 1px #dedbdb;";
}
if (searchNumber != "")
{
string markerNumber = dat.GetImageNum(searchNumber);
ImageLiteral.Text = imageLiteral + "<div style=\"float: left;padding-right: 5px;height: 50px;\"><img style=\"cursor: " +
"pointer;\" onclick=\"myclick(" + markerNumber + ");\" id='image" + searchNumber + "' src=" +
"\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
BeginingLiteral.Text = "<div style=\"margin-top: 3px;height: 56px;margin-bottom: 3px; width: " + width.ToString() +
"px; padding: 3px;" + background + "\">";
}
else
{
BeginingLiteral.Text = "<div class=\"topDiv\" style=\"margin-top: 3px;margin-bottom: 3px;" + background +
" width: " + width.ToString() + "px;padding: 3px;\">";
}
if (windowT)
{
SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
dat.MakeNiceName(searchLabel) + "_" + eventID + "_Trip" + "');");
}
else
{
SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + eventID + "_Trip";
}
if (searchLabel.Length > 36)
{
searchLabel = searchLabel.Substring(0, 33) + "...";
}
SearchLabel.Text = searchLabel;
PriceRangeLabel.Text = priceMeansTimeFrame;
DataView dvEvent = dat.GetDataDV("SELECT * FROM Trips WHERE ID=" + eventID);
DataView dvEventsSlider = dat.GetDataDV("SELECT * FROM Trips E, Trip_Slider_Mapping ESM WHERE E.ID=ESM.TripID AND E.ID=" + eventID);
if (dvEventsSlider.Count > 0)
{
if (System.IO.File.Exists(MapPath("../") + "\\Trips\\" +
eventID + "\\Slider\\" + dvEventsSlider[0]["PictureName"].ToString()))
{
System.Drawing.Image img = System.Drawing.Image.FromFile(MapPath("../") + "\\Trips\\" +
eventID + "\\Slider\\" + dvEventsSlider[0]["PictureName"].ToString());
SaveThumbnail(img, MapPath("../") + "\\Temp\\Temp_" + dvEventsSlider[0]["PictureName"].ToString());
EventImageLiteral.Text = "<img style='float: left; padding-right: 5px;' src='http://hippohappenings.com/Temp/Temp_" +
dvEventsSlider[0]["PictureName"].ToString() + "' />";
}
}
else
{
EventImageLiteral.Text = "";
}
string shortDesc = "";
if (dvEvent[0]["ShortDescription"].ToString().Trim() != "")
{
shortDesc = dat.stripHTML(dvEvent[0]["ShortDescription"].ToString()).Trim();
if (shortDesc.Length > 130)
{
shortDesc = shortDesc.Substring(0, 127) + "...";
}
}
if (shortDesc.Trim() == "")
{
shortDesc = dat.stripHTML(dvEvent[0]["Content"].ToString()).Trim();
if (shortDesc.Length > 130)
{
shortDesc = shortDesc.Substring(0, 127) + "...";
}
}
//.........这里部分代码省略.........