public void LoadDiagrams(string filename) { LoadLayout.Fire(this, new FileEventArgs() { Filename = filename }); }
private void LoadLayout_Tick(object sender, EventArgs e) { if (start == 0) { CargarOGuardarDisenios(UiContenedorVistaErp, false, Usuario, "RecepcionERP"); start = 1; LoadLayout.Stop(); } }
public static async void LoadAppLayout(string name, LoadLayout t) { Uri u = new Uri("ms-appx:///Maps/" + name); RandomAccessStreamReference rass = RandomAccessStreamReference.CreateFromUri(u); IRandomAccessStream ir = await rass.OpenReadAsync(); Stream s = ir.AsStream(); byte[] buff = new byte[s.Length]; s.Read(buff, 0, buff.Length); int c = buff.Length / 4096; LayOut[] l = new LayOut[c]; for (int i = 0; i < c; i++) { l[i] = LoadLayout(ref buff, i * 4096); } t(l); }
void ReleaseDesignerOutlets() { if (ContentLayout != null) { ContentLayout.Dispose(); ContentLayout = null; } if (LoadLayout != null) { LoadLayout.Dispose(); LoadLayout = null; } if (LoadProgress != null) { LoadProgress.Dispose(); LoadProgress = null; } }
private void RecepcionErpVista_Load(object sender, EventArgs e) { VistaCargandosePorPrimeraVez?.Invoke(sender, e); UiFechaInicio.EditValue = DateTime.Now.AddDays(-7); UiFechaFinal.EditValue = DateTime.Now.AddDays(7); UsuarioSeleccionoListaOrdenEncabezadoCompleta = false; UiListaCliente.Properties.PopupFormWidth = UiListaCliente.Width; UiListaErp.Properties.PopupFormWidth = UiListaErp.Width; UiListaAcuerdoComercial.Properties.PopupFormWidth = UiListaAcuerdoComercial.Width; UiListaPolizasDeSeguro.Properties.PopupFormWidth = UiListaPolizasDeSeguro.Width; UiListaOperador.Properties.PopupFormWidth = UiListaOperador.Width; UiListaUbicacion.Properties.PopupFormWidth = UiListaUbicacion.Width; UiListaTipoRecepcion.Properties.PopupFormWidth = UiListaTipoRecepcion.Width; UiListaPrioridad.Properties.PopupFormWidth = UiListaPrioridad.Width; LoadLayout.Start(); UiBarFuente.EditValue = FuenteDeRecepcionDeErp.OrdenDeCompra; UiGridLookUpFuente.DataSource = Enum.GetValues(typeof(FuenteDeRecepcionDeErp)); UiBarFuente.EditValue = FuenteDeRecepcionDeErp.OrdenDeCompra; // seleccionarPrimerRegistroDeLaLista(); }
/// <summary> /// Loads the layout of a particular docking manager instance from persistence /// and checks whether a file should really be reloaded (some files may no longer /// be available). /// </summary> private void LoadDockingManagerLayout(Guid layoutId) { try { _ToolWindowRegistry.PublishTools(); Task.Factory.StartNew((stateObj) => { // Begin Aysnc Task string layoutFileName = Path.Combine(_mAppDir, _mLayoutFileName); string xmlWorkspaces = string.Empty; try { try { if (File.Exists(layoutFileName)) { _MessageManager.Output.AppendLine($" from file: '{layoutFileName}'"); using (FileStream fs = new FileStream(layoutFileName, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (StreamReader reader = ICSharpCode.AvalonEdit.Utils.FileReader.OpenStream(fs, Encoding.Default)) { xmlWorkspaces = reader.ReadToEnd(); } } } } catch { // ignored } if (string.IsNullOrEmpty(xmlWorkspaces) == false) { LayoutSource = LayoutLoaded.FromStorage; LoadLayout?.Invoke(this, new LoadLayoutEventArgs(xmlWorkspaces, layoutId)); } } catch (OperationCanceledException exp) { _MessageManager._MsgBox.Show(exp); } catch (Exception exp) { _MessageManager._MsgBox.Show(exp); } finally { _MessageManager.Output.AppendLine("Loading layout done.\n"); } return(xmlWorkspaces); // End of async task }, null); } catch (Exception exp) { _MessageManager._MsgBox.Show(exp); } }