本文整理汇总了C#中MonoTouch.Dialog.Section.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Section.Clear方法的具体用法?C# Section.Clear怎么用?C# Section.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoTouch.Dialog.Section
的用法示例。
在下文中一共展示了Section.Clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DebugPage
public void DebugPage()
{
TraceHelper.AddMessage("Debug: constructor");
// render URL and status
var serviceUrl = new EntryElement("URL", "URL to connect to", WebServiceHelper.BaseUrl);
var service = new Section("Service")
{
serviceUrl,
new StringElement("Store New Service URL", delegate
{
serviceUrl.FetchValue();
// validate that this is a good URL before storing it (a bad URL can hose the phone client)
Uri uri = null;
if (Uri.TryCreate(serviceUrl.Value, UriKind.RelativeOrAbsolute, out uri) &&
(uri.Scheme == "http" || uri.Scheme == "https"))
WebServiceHelper.BaseUrl = serviceUrl.Value;
else
serviceUrl.Value = WebServiceHelper.BaseUrl;
}),
new StringElement("Connected", App.ViewModel.LastNetworkOperationStatus.ToString()),
};
// render user queue
var userQueue = new Section("User Queue");
userQueue.Add(new StringElement(
"Clear Queue",
delegate
{
RequestQueue.DeleteQueue(RequestQueue.UserQueue);
userQueue.Clear ();
}));
List<RequestQueue.RequestRecord> requests = RequestQueue.GetAllRequestRecords(RequestQueue.UserQueue);
if (requests != null)
{
foreach (var req in requests)
{
string typename;
string reqtype;
string id;
string name;
RequestQueue.RetrieveRequestInfo(req, out typename, out reqtype, out id, out name);
var sse = new StyledStringElement(String.Format(" {0} {1} {2} (id {3})", reqtype, typename, name, id))
{
Font = UIFont.FromName("Helvetica", UIFont.SmallSystemFontSize),
};
userQueue.Add (sse);
}
}
// render system queue
var systemQueue = new Section("System Queue");
systemQueue.Add(new StringElement(
"Clear Queue",
delegate
{
RequestQueue.DeleteQueue(RequestQueue.SystemQueue);
systemQueue.Clear ();
}));
requests = RequestQueue.GetAllRequestRecords(RequestQueue.SystemQueue);
if (requests != null)
{
foreach (var req in requests)
{
string typename;
string reqtype;
string id;
string name;
RequestQueue.RetrieveRequestInfo(req, out typename, out reqtype, out id, out name);
var sse = new StyledStringElement(String.Format(" {0} {1} {2} (id {3})", reqtype, typename, name, id))
{
Font = UIFont.FromName("Helvetica", UIFont.SmallSystemFontSize),
};
systemQueue.Add (sse);
}
}
var traceMessages = new Section("Trace Messages");
traceMessages.Add(new StringElement(
"Clear Trace",
delegate
{
TraceHelper.ClearMessages();
traceMessages.Clear ();
}));
traceMessages.Add(new StringElement(
"Send Trace",
delegate
{
TraceHelper.SendMessages(App.ViewModel.User);
}));
foreach (var m in TraceHelper.GetMessages().Split('\n'))
{
// skip empty messages
if (m == "")
continue;
// create a new (small) string element with a detail indicator which
//.........这里部分代码省略.........