| | |
| | | return; |
| | | } |
| | | } |
| | | var result = FunctionList.List.AddScene(scene,out scene); |
| | | if (result == StateCode.SUCCESS) |
| | | var waitPage = new Loading(); |
| | | MainPage.BaseView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | FunctionList.List.scenes.Add(scene); |
| | | backAction(); |
| | | RemoveFromParent(); |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result); |
| | | } |
| | | try |
| | | { |
| | | var serverScene = new Scene(); |
| | | var result = FunctionList.List.AddScene(scene, out serverScene); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (result == StateCode.SUCCESS) |
| | | { |
| | | FunctionList.List.scenes.Add(scene); |
| | | backAction(); |
| | | RemoveFromParent(); |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result); |
| | | } |
| | | }); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Hide(); |
| | | waitPage.RemoveFromParent(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true, Priority = ThreadPriority.AboveNormal }.Start(); |
| | | }; |
| | | } |
| | | |