本文整理汇总了C#中NSUrl.Append方法的典型用法代码示例。如果您正苦于以下问题:C# NSUrl.Append方法的具体用法?C# NSUrl.Append怎么用?C# NSUrl.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NSUrl
的用法示例。
在下文中一共展示了NSUrl.Append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Done
void Done (object sender, EventArgs args)
{
var syncPoint = UrlField.Text;
if (String.IsNullOrWhiteSpace (syncPoint)) {
Pop ();
return;
}
var remoteUrl = new NSUrl (syncPoint);
// If user just enters the server URL, fill in a default database name:
if (String.IsNullOrWhiteSpace (remoteUrl.Path) || remoteUrl.Path == "/") {
remoteUrl = remoteUrl.Append ("grocery-sync", false);
syncPoint = remoteUrl.AbsoluteString;
}
NSUserDefaults.StandardUserDefaults.SetString (syncPoint, SyncUrlKey);
Pop ();
}
示例2: CloudFile
public CloudFile (string path, NSUrl documentsUrl)
{
this.documentsUrl = documentsUrl;
Path = path;
LocalUrl = documentsUrl.Append (Path, false);
LocalPath = LocalUrl.Path;
ModifiedTime = DateTime.UtcNow;
IsDownloaded = true;
DownloadProgress = 1;
}
示例3: Done
void Done(object sender, EventArgs args)
{
var syncPoint = UrlField.Text;
if (String.IsNullOrWhiteSpace(syncPoint)) {
Pop ();
return;
}
var remoteUrl = new NSUrl (syncPoint);
if (remoteUrl.Scheme == "http") {
var alert = new UIAlertView (
"Invalid Url",
"You entered an invalid URL. Do you want to fix it or revert back to what it was before?",
null,
"Fix It",
"Revert"
);
alert.Dismissed += (alertView, e) => {
if (e.ButtonIndex > 0) Pop(); // Go back to the main screen without saving the URL
};
alert.Show ();
} else {
// If user just enters the server URL, fill in a default database name:
if (String.IsNullOrWhiteSpace(remoteUrl.Path) || remoteUrl.Path == "/")
{
remoteUrl = remoteUrl.Append("grocery-sync", false);
syncPoint = remoteUrl.AbsoluteString;
}
NSUserDefaults.StandardUserDefaults.SetString (syncPoint, SyncUrlKey);
Pop();
}
}