/// <summary> /// Ejecuta la acción que realizá la importación de un tablero al proyecto actual /// </summary> /// <param name="window">La ventana metro activa.</param> public static async void ImportTablero(this MetroWindow window, Project prj, Action <object> TableroLoaded = null) { var controller = await window.ShowProgressAsync("Abriendo por favor espere...", "Abriendo tablero"); controller.SetCancelable(false); controller.SetIndeterminate(); window.ImportTableroTr(prj, ((async(object result) => { Object[] rData = result as Object[]; Boolean succed = (Boolean)rData[0]; String msg = (string)rData[1]; if (msg.Length > 0) { TabalimApp.CurrentTablero = (Tablero)rData[2]; if (!TabalimApp.CurrentProject.Tableros.ContainsKey(TabalimApp.CurrentTablero.Id)) { TabalimApp.CurrentProject.Tableros.Add(TabalimApp.CurrentTablero.Id, TabalimApp.CurrentTablero); } await window.ShowMessageAsync(succed ? "Tablero Cargado" : "Error", msg); TableroLoaded?.Invoke(TabalimApp.CurrentTablero); } await controller.CloseAsync(); }))); }