示例#1
0
            async void ThumbnailPathButtonReleased(ReleasedEventArgs args)
            {
                try
                {
                    string oldPath = thumbnailPathText.Value;

                    var result = await MenuUIManager.
                                 FileBrowsingPopUp.
                                 Request(Game.PackageManager.ActivePackage.RootedDirectoryPath,
                                         SelectOption.File,
                                         thumbnailPathText.HasDefaultValue?null : thumbnailPathText.Value);


                    string newPath = result == null ? oldPath : result.RelativePath;
                    await MHUrhoApp.InvokeOnMainSafeAsync(() => thumbnailPathText.Value = newPath);
                }
                catch (OperationCanceledException)
                {
                    //Text should not have changed
                }
            }
示例#2
0
 async void TimeOutExpired(Task task)
 {
     //Do not wait
     await MHUrhoApp.InvokeOnMainSafeAsync(() => Reply(false));
 }
 public override void Post(SendOrPostCallback d, object state)
 {
     MHUrhoApp.InvokeOnMainSafeAsync(() => d(state));
 }