コード例 #1
0
            public MAINChat_Controlador(OrdenWeb Orden)
            {
                UIMain             = new UCChat();
                UIMain.DataContext = this;

                if (Orden.IsNotNull())
                {
                    new WorkerHelper(
                        (s, e) =>
                    {
                        try
                        {
                            e.Result = Orden.MercadoLibre.GetChat();
                        }
                        catch (Exception ex)
                        {
                            e.Result = ex;
                        }
                    },
                        (s, e) =>
                    {
                        if (e.Result is Exception)
                        {
                            App.MessageController.Error(e.Result.ToStr(), "Intentá continuar o informá del error si este vuelve a ocurrir.");
                            Chats = new Chat();
                        }
                        else
                        {
                            Chats = e.Result as Chat;
                        }

                        OnPropertyChanged();
                    }).Run();
                }
            }
コード例 #2
0
        private void togglePanels(String userControlPanel)
        {
            colorBtn();
            this.panelAsideMain.Controls.Clear();
            switch (userControlPanel)
            {
            case "chats":
                this.uCChat = new Vista.Navegacion.UCChat(this);
                this.panelAsideMain.Controls.Add(this.uCChat);
                this.uCChat.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCChat.Location = new System.Drawing.Point(0, 0);
                this.uCChat.Name     = "uCChat";
                this.uCChat.Size     = new System.Drawing.Size(724, 485);
                this.uCChat.TabIndex = 1;
                break;

            case "consultas":
                this.uCConsultas = new Vista.Navegacion.UCConsultas(this);
                this.panelAsideMain.Controls.Add(this.uCConsultas);
                this.uCConsultas.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCConsultas.Location = new System.Drawing.Point(0, 0);
                this.uCConsultas.Name     = "uCConsultas";
                this.uCConsultas.Size     = new System.Drawing.Size(724, 485);
                this.uCConsultas.TabIndex = 1;
                break;

            case "cruds":
                this.uCCruds = new Vista.Navegacion.UCCruds(this);
                this.panelAsideMain.Controls.Add(this.uCCruds);
                this.uCCruds.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCCruds.Location = new System.Drawing.Point(0, 0);
                this.uCCruds.Name     = "uCCruds";
                this.uCCruds.Size     = new System.Drawing.Size(724, 485);
                this.uCCruds.TabIndex = 1;
                break;

            case "movimientos":
                this.uCMovimientos = new Vista.Navegacion.UCMovimientos(this);
                this.panelAsideMain.Controls.Add(this.uCMovimientos);
                this.uCMovimientos.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCMovimientos.Location = new System.Drawing.Point(0, 0);
                this.uCMovimientos.Name     = "uCConcepto";
                this.uCMovimientos.Size     = new System.Drawing.Size(724, 485);
                this.uCMovimientos.TabIndex = 1;
                break;

            case "reportes":
                this.uCReportes = new Vista.Navegacion.UCReportes(this);
                this.panelAsideMain.Controls.Add(this.uCReportes);
                this.uCReportes.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCReportes.Location = new System.Drawing.Point(0, 0);
                this.uCReportes.Name     = "uCTipoDocumento";
                this.uCReportes.Size     = new System.Drawing.Size(724, 485);
                this.uCReportes.TabIndex = 1;
                break;

            default:
                break;
            }
        }