本文整理汇总了C#中AmazonS3.GetAccountImageArchiveUrls方法的典型用法代码示例。如果您正苦于以下问题:C# AmazonS3.GetAccountImageArchiveUrls方法的具体用法?C# AmazonS3.GetAccountImageArchiveUrls怎么用?C# AmazonS3.GetAccountImageArchiveUrls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AmazonS3
的用法示例。
在下文中一共展示了AmazonS3.GetAccountImageArchiveUrls方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (State == null || State.Count <= 2) { Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "timeOut('../Default.aspx');", true); return; }
AmazonS3 S3 = new AmazonS3();
ArrayList images = S3.GetAccountImageArchiveUrls(State);
DataSet paramsDS = new DataSet("ParameterDataSet");
DataTable paramTable = paramsDS.Tables.Add("ParamTable");
DataColumn paramCol0 = paramTable.Columns.Add("image_url", typeof(String));
DataColumn paramCol1 = paramTable.Columns.Add("id", typeof(String));
int index = 0;
foreach (string url in images)
{
//filter out pages and camera images
string file = url.Substring(url.LastIndexOf("/")+1);
if (file.Length > 30 && file[13] == '-' && file[18] == '-' && file[23] == '-' && file[28] == '-') //this is a camera image
continue;
int n_periods = 0;
foreach (char c in file)
{
if (c == '.')
n_periods++;
}
if (n_periods == 2) // these are storyboard images
continue;
if(file.EndsWith("qrcode.png"))//these are qrcode images
continue;
//string prefix = file.Substring(0, file.IndexOf("."));
//if (apps.Contains(prefix)) //storyboard prefix
// continue;
DataRow paramRow = paramTable.NewRow();
string[] row_array = new string[2];
row_array[0] = url;
row_array[1] = "image" + index.ToString();
paramRow.ItemArray = row_array;
paramTable.Rows.Add(paramRow);
index++;
}
ParamRepeater.DataSource = paramsDS;
ParamRepeater.DataBind();
}