Beispiel #1
0
        public Principal()
        {
            InitializeComponent();
            //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 5 });
            VIAJE_BUSQUEDA.IsTextSearchCaseSensitive = false;

            var instanceContext = new InstanceContext(this);

            _contenedorClient = new ContenedorClient(instanceContext);
            _contenedorClient.Subscribe();
            _contenedorSimpleClient = new ContenedorSimpleClient(instanceContext);
            _contenedorSimpleClient.Subscribe();

            Timer timer = new Timer();

            timer.Interval  = 180000;
            timer.Elapsed  += Timer_Elapsed;
            timer.AutoReset = true;
            timer.Start();

            _vm     = new ToastViewModel();
            options = new MessageOptions
            {
                FontSize                = 30,    // set notification font size
                ShowCloseButton         = true,  // set the option to show or hide notification close button
                FreezeOnMouseEnter      = false, // set the option to prevent notification dissapear automatically if user move cursor on it
                NotificationClickAction = n =>   // set the callback for notification click event
                {
                    n.Close();                   // call Close method to remove notification
                }
            };

            _Exportaciones = new ObservableCollection <Contenedor>(_contenedorClient.obtenerTodasExportaciones().AsEnumerable());
            _Importaciones = new ObservableCollection <Contenedor>(_contenedorClient.obtenerTodasImportaciones().AsEnumerable());

            //filtro = _Importaciones;
            //filtro2 = _Exportaciones;

            datosVisibles1      = new ObservableCollection <ContenedorSimple>(_contenedorSimpleClient.obtenerTodasImportaciones());
            datosVisibles1copia = new ObservableCollection <ContenedorSimple>(_contenedorSimpleClient.obtenerTodasImportaciones());

            datosVisibles2copia = new ObservableCollection <Contenedor>(_Exportaciones);
            autoCompletado      = new ActualizarAutoCompletado(); //buques en combobox

            construirFiltros();
            cargarFiltros();
            cargarFiltros2();
            colapsarColumnas();
            agrupacionDataGrid();
            paginacionImpo(num, 1);
            paginacionExpo(num, 1);

            //cambioRadioButton(checkViaje, null);
        }
        public Patio_Contenedor(int estado, string regimen)
        {
            InitializeComponent();
            //constructores
            _estado  = estado;
            _regimen = regimen;
            constructores();
            autoCompletado = new ActualizarAutoCompletado();

            cliente_Combobox.DataContext = autoCompletado;
            producto_textbox.DataContext = autoCompletado;
            buque_Combobox.DataContext   = autoCompletado;

            cliente_Combobox.ItemsSource = autoCompletado.GetClientes;
            producto_textbox.ItemsSource = autoCompletado.GetProductos;
            buque_Combobox.ItemsSource   = autoCompletado.GetBuques;
            a = new string[3] {
                "Contenedores", "UUFF", "Carga suelta"
            };
        }