本文整理匯總了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();
}