コード例 #1
0
 private void BtnUnlock_Click(object sender, EventArgs e)
 {
     if (bloqueado)
     {
         FrmLogin login = new FrmLogin()
         {
             FormBorderStyle = FormBorderStyle.None,
             TopLevel        = false
         };
         login.onLogin += Login_onLogin;
         login.Show();
         this.container = new PoperContainer(login);
         this.container.Show(this.btnUnlock);
     }
     else
     {
         bloqueado                       = true;
         this.btnUnlock.Image            = Resources.locked;
         this.btnArticulos.Enabled       = false;
         this.btnProveedores.Enabled     = false;
         this.btnClientes.Enabled        = false;
         this.btnVentas.Enabled          = false;
         this.btnEstadisticas.Enabled    = false;
         this.btnEntradasSalidas.Enabled = false;
         this.btnMantenimiento.Enabled   = false;
         this.btnConfig.Enabled          = false;
         this.btnPendientes.Enabled      = false;
     }
 }
コード例 #2
0
 private void BtnAgregar_Click(object sender, EventArgs e)
 {
     if (this.frmNuevoCliente == null)
     {
         frmNuevoCliente = new FrmNuevoCliente
         {
             TopLevel        = false,
             FormBorderStyle = FormBorderStyle.None,
             Dock            = DockStyle.Fill
         };
         frmNuevoCliente.OnClienteAddSuccess += FrmNuevoCliente_OnClienteAddSuccess;
     }
     else
     {
         if (this.frmNuevoCliente.IsEditar)
         {
             this.frmNuevoCliente = null;
             frmNuevoCliente      = new FrmNuevoCliente
             {
                 TopLevel        = false,
                 FormBorderStyle = FormBorderStyle.None,
                 Dock            = DockStyle.Fill
             };
             frmNuevoCliente.OnClienteAddSuccess += FrmNuevoCliente_OnClienteAddSuccess;
         }
     }
     this.container = new PoperContainer(frmNuevoCliente);
     this.container.Show(btnAgregar);
 }
コード例 #3
0
 private void BtnVentas_Click(object sender, EventArgs e)
 {
     this.controlVentas = new Ventas();
     this.container     = new PoperContainer(controlVentas);
     this.controlVentas.btnNuevaVenta.Click += BtnNuevaVenta_Click;
     this.container.Show(Cursor.Position);
 }
コード例 #4
0
        private void BtnEditar_Click(object sender, EventArgs e)
        {
            DataGridViewRow dataGridRow = this.dgvClientes.CurrentRow;

            if (dataGridRow != null)
            {
                if (frmNuevoCliente != null)
                {
                    frmNuevoCliente.Close();
                }

                DataRow   row      = ((DataRowView)dataGridRow.DataBoundItem).Row;
                EClientes eCliente = new EClientes(row);

                frmNuevoCliente = new FrmNuevoCliente
                {
                    Dock            = DockStyle.Fill,
                    FormBorderStyle = FormBorderStyle.None,
                    TopLevel        = false,
                    IsEditar        = true
                };
                frmNuevoCliente.AsignarDatos(eCliente);
                frmNuevoCliente.OnClienteEditSuccess += FrmNuevoCliente_OnClienteAddSuccess;
                this.container = new PoperContainer(frmNuevoCliente);
                frmNuevoCliente.Show();
                this.container.Show(btnAgregar);
            }
        }
コード例 #5
0
        private void BtnEditar_Click(object sender, EventArgs e)
        {
            DataGridViewRow dataGridRow = this.dgvEmpleados.CurrentRow;

            if (dataGridRow != null)
            {
                if (FrmNuevoEmpleado != null)
                {
                    FrmNuevoEmpleado.Close();
                }

                DataRow    row       = ((DataRowView)dataGridRow.DataBoundItem).Row;
                EEmpleados eEmpleado = new EEmpleados(row);

                FrmNuevoEmpleado = new FrmNuevoEmpleado
                {
                    Dock            = DockStyle.Fill,
                    FormBorderStyle = FormBorderStyle.None,
                    TopLevel        = false,
                    IsEditar        = true
                };
                FrmNuevoEmpleado.AsignarDatos(eEmpleado);
                FrmNuevoEmpleado.OnEmpleadoEditSuccess += FrmNuevoEmpleado_OnEmpleadoAddSuccess;
                this.container = new PoperContainer(FrmNuevoEmpleado);
                FrmNuevoEmpleado.Show();
                this.container.Show(btnAgregar);
            }
        }
コード例 #6
0
 private void BtnEntradasSalidas_Click(object sender, EventArgs e)
 {
     this.controlEntradasSalidas = new EntradasSalidas();
     this.container = new PoperContainer(controlEntradasSalidas);
     this.controlEntradasSalidas.btnSalidas.Click += BtnSalidas_Click;
     this.container.Show(Cursor.Position);
 }
コード例 #7
0
 private void BtnConfig_Click(object sender, EventArgs e)
 {
     this.configImagen = new ConfiguracionImagen();
     this.configImagen.numericTiempoCaptura.Value = 1;
     this.container          = new PoperContainer(this.configImagen);
     this.container.Closing += ConObservaciones_Closing;
     this.container.Show(this.btnConfig);
 }
コード例 #8
0
        private void contextMenu(ToolTipContentContainer ttc, Point p)
        {
            // set tooltip container context menu
            PoperContainer ttcContainer = new PoperContainer(ttc);

            // show context menu at specified position
            ttcContainer.Show(this, p);
        }
コード例 #9
0
 private void BtnProveedores_Click(object sender, EventArgs e)
 {
     this.controlProveedores = new Proveedores();
     this.container          = new PoperContainer(controlProveedores);
     this.controlProveedores.btnAgregarProveedor.Click    += BtnAgregarProveedor_Click;
     this.controlProveedores.btnEditarProveedor.Click     += BtnEditarProveedor_Click;
     this.controlProveedores.btnObservarProveedores.Click += BtnObservarProveedores_Click;
     this.container.Show(Cursor.Position);
 }
コード例 #10
0
 private void BtnArticulos_Click(object sender, EventArgs e)
 {
     this.controlArticulos = new Articulos();
     this.container        = new PoperContainer(controlArticulos);
     this.controlArticulos.btnAgregarArticulo.Click   += BtnAgregarArticulo_Click;
     this.controlArticulos.btnEditarArticulo.Click    += BtnEditarArticulo_Click;
     this.controlArticulos.btnObservarArticulos.Click += BtnObservarArticulos_Click;
     this.container.Show(Cursor.Position);
 }
コード例 #11
0
 private void BtnAddClient_Click(object sender, EventArgs e)
 {
     this.addCliente = new FrmNuevoCliente();
     this.addCliente.FormBorderStyle = FormBorderStyle.None;
     this.addCliente.TopLevel        = false;
     this.addCliente.FormClosed     += AddCliente_FormClosed;
     this.addCliente.Show();
     this.container = new PoperContainer(addCliente);
     this.container.Show(this.btnAddClient);
 }
コード例 #12
0
ファイル: DeckViewForm.cs プロジェクト: jayrulez/TOMClassic
        public DeckViewForm()
        {
            InitializeComponent();
            virtualRegion = new VirtualRegion(this);
            SubVirtualRegion region;

            for (int i = 0; i < 2; i++)
            {
                region = new ButtonRegion(i + 1, 12 + 120 + 85 * i, 40, 74, 24, "CommonButton1.JPG", "CommonButton1On.JPG");
                region.AddDecorator(new RegionTextDecorator(8, 7, 10, Color.Black));
                virtualRegion.AddRegion(region);
            }
            virtualRegion.SetRegionDecorator(1, 0, "全部卡片");
            virtualRegion.SetRegionDecorator(2, 0, " 新卡片");

            virtualRegion.RegionClicked += OnVRegionClicked;
            virtualRegion.RegionEntered += OnVRegionEntered;
            virtualRegion.RegionLeft    += OnVRegionLeft;

            this.bitmapButtonClose.ImageNormal  = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG");
            bitmapButtonClose.NoUseDrawNine     = true;
            this.bitmapButtonNext.ImageNormal   = PicLoader.Read("ButtonBitmap", "NextButton.JPG");
            bitmapButtonNext.NoUseDrawNine      = true;
            this.bitmapButtonSwitch.ImageNormal = PicLoader.Read("ButtonBitmap", "ButtonBack2.PNG");
            bitmapButtonSwitch.Font             = new Font("宋体", 8 * 1.33f, FontStyle.Regular, GraphicsUnit.Pixel);
            bitmapButtonSwitch.ForeColor        = Color.White;
            bitmapButtonSwitch.IconImage        = PicLoader.Read("Icon", "rot4.PNG");
            bitmapButtonSwitch.IconSize         = new Size(16, 16);
            bitmapButtonSwitch.IconXY           = new Point(4, 4);
            bitmapButtonSwitch.TextOffX         = 8;
            bitmapButtonSwitch.Text             = "切换";
            // bitmapButtonNext.NoUseDrawNine = true;
            this.bitmapButtonPre.ImageNormal   = PicLoader.Read("ButtonBitmap", "PreButton.JPG");
            bitmapButtonPre.NoUseDrawNine      = true;
            this.bitmapButtonNextD.ImageNormal = PicLoader.Read("ButtonBitmap", "NextButton.JPG");
            bitmapButtonNextD.NoUseDrawNine    = true;
            this.bitmapButtonPreD.ImageNormal  = PicLoader.Read("ButtonBitmap", "PreButton.JPG");
            bitmapButtonPreD.NoUseDrawNine     = true;
            this.bitmapButtonDel.ImageNormal   = PicLoader.Read("ButtonBitmap", "DelButton.JPG");
            bitmapButtonDel.NoUseDrawNine      = true;

            cardDetail               = new CardDetail(this, 605, 35, 565);
            cardDetail.Enabled       = false;
            cardDetail.Invalidate   += DetailInvalidate;
            deckStatistic            = new CardDeckStatistic(605, 35, 565);
            cardRegion               = new DeckCardRegion(5 + 120, 35 + yoff, 480, 510);
            cardRegion.Invalidate   += DeckInvalidate;
            selectRegion             = new DeckSelectCardRegion(5, 35, 120, 540);
            selectRegion.Invalidate += SelectDeckInvalidate;

            popMenuDeck  = new PopMenuDeck();
            popContainer = new PoperContainer(popMenuDeck);
            popMenuDeck.PoperContainer = popContainer;
            popMenuDeck.Form           = this;
        }
コード例 #13
0
        private void BtnEditar_Click(object sender, EventArgs e)
        {
            PrecioSmall precioSmall = new PrecioSmall
            {
                PrecioArticulo = this.Articulo.Valor_articulo,
            };

            precioSmall.OnBtnSaveClick += PrecioSmall_OnBtnSaveClick;
            this.container              = new PoperContainer(precioSmall);
            this.container.Show(this.btnEditar);
        }
コード例 #14
0
        private void BtnClientes_Click(object sender, EventArgs e)
        {
            MenuClientes menuClientes = new MenuClientes();

            menuClientes.btnAgregarCliente.Click    += BtnAgregarCliente_Click;
            menuClientes.btnEditarCliente.Click     += BtnEditarCliente_Click;
            menuClientes.btnObservarClientes.Click  += BtnObservarClientes_Click;
            menuClientes.btnInactivarClientes.Click += BtnInactivarClientes_Click;
            container = new PoperContainer(menuClientes);
            container.Show(btnClientes);
        }
コード例 #15
0
        private void BtnAbono_Click(object sender, EventArgs e)
        {
            AbonoSmall abonoSmall = new AbonoSmall
            {
                Saldo_actual = this.Agendamiento.Saldo_restante,
            };

            abonoSmall.OnBtnSaveClick += AbonoSmall_OnBtnSaveClick;
            this.container             = new PoperContainer(abonoSmall);
            this.container.Show(this.btnAbono);
        }
コード例 #16
0
        private void FrmNuevoBarrio_OnBarrioSuccess(object sender, EventArgs e)
        {
            EBarrios eBarrio = (EBarrios)sender;

            if (this.container != null)
            {
                this.container = null;
            }

            this.LlenarListaBarrios();
        }
コード例 #17
0
        private void BtnAdministracion_Click(object sender, EventArgs e)
        {
            MenuAdministracion menuAdministracion = new MenuAdministracion();

            menuAdministracion.btnAgregarEmpleado.Click       += BtnAgregarEmpleado_Click;
            menuAdministracion.btnEditarEmpleado.Click        += BtnEditarEmpleado_Click;
            menuAdministracion.btnObservarempleados.Click     += BtnObservarempleados_Click;
            menuAdministracion.btnConfiguracionAvanzada.Click += BtnConfiguracionAvanzada_Click;
            menuAdministracion.btnReporteCarreras.Click       += BtnReporteCarreras_Click;
            container = new PoperContainer(menuAdministracion);
            container.Show(btnAdministracion);
        }
コード例 #18
0
        private void BtnConfiguracion_Click(object sender, EventArgs e)
        {
            ConfigTime configTime = new ConfigTime
            {
                MinutesDefault = this.MinutesDefault,
                Mensaje        = "Minutos para finalizar"
            };

            configTime.OnNumericEnter += ConfigTime_OnNumericEnter;
            this.container             = new PoperContainer(configTime);
            this.container.Show(btnConfiguracion);
        }
コード例 #19
0
        public FrmDetallePedido()
        {
            InitializeComponent();

            this.ContextMenuDatosPedido = new ContextMenuDatosPedido();
            this.PoperContainer         = new PoperContainer(ContextMenuDatosPedido);

            this.btnInformacionPedido.MouseDown += btnInformacionPedido_MouseDown;
            this.Load += FrmDetallePedido_Load;
            this.btnEditarPedido.Click += BtnEditarPedido_Click;
            this.ContextMenuDatosPedido.btnTerminarPedido.Click           += BtnTerminarPedido_Click;
            this.ContextMenuDatosPedido.btnGuardarPedidosBorradores.Click += BtnGuardarPedidosBorradores_Click;
        }
コード例 #20
0
        private void FrmObservarVentas_Load(object sender, EventArgs e)
        {
            this.resumenVenta     = new ResumenVenta();
            this.containerResumen = new PoperContainer(resumenVenta);

            this.filtrosventa = new Filtrosventa();
            this.filtrosventa.rdNinguno.Checked    = true;
            this.filtrosventa.btnSeleccione.Click += BtnSeleccione_Click;
            this.containerFiltros = new PoperContainer(filtrosventa);
            this.dgvVentas        =
                ConfiguracionDatagridview.ConfigurationGrid(this.dgvVentas);
            this.Horas();
        }
コード例 #21
0
        private void BtnAgregarBarrio_Click(object sender, EventArgs e)
        {
            FrmNuevoBarrio frmNuevoBarrio = new FrmNuevoBarrio
            {
                FormBorderStyle = FormBorderStyle.None,
                Dock            = DockStyle.Fill,
                TopLevel        = false
            };

            frmNuevoBarrio.OnBarrioSuccess += FrmNuevoBarrio_OnBarrioSuccess;
            this.container = new PoperContainer(frmNuevoBarrio);
            this.container.Show(this.btnAgregarBarrio);
        }
コード例 #22
0
        private void BtnVehiculos_Click(object sender, EventArgs e)
        {
            MenuVehiculos menuVehiculos = new MenuVehiculos();

            menuVehiculos.btnAgregarVehiculo.Click   += BtnAgregarVehiculo_Click;
            menuVehiculos.btnEditarVehiculo.Click    += BtnEditarVehiculo_Click;
            menuVehiculos.btnObservarVehiculo.Click  += BtnObservarVehiculo_Click;
            menuVehiculos.btnInactivarVehiculo.Click += BtnInactivarVehiculo_Click;
            menuVehiculos.btnCarreras.Click          += BtnCarreras_Click;
            menuVehiculos.btnEstados.Click           += BtnEstados_Click;
            container = new PoperContainer(menuVehiculos);
            container.Show(btnVehiculos);
        }
コード例 #23
0
        public UploadImage()
        {
            InitializeComponent();

            this.observacion      = new Observacion();
            this.conObservaciones = new PoperContainer(this.observacion);

            this.btnSeleccionar.Click += BtnSeleccionar_Click;
            this.Load                        += UploadImage_Load;
            this.btnLimpiar.Click            += BtnLimpiar_Click;
            this.btnAgregarComentario.Click  += BtnAgregarComentario_Click;
            this.observacion.btnCerrar.Click += BtnCerrar_Click;
            this.conObservaciones.Closing    += ConObservaciones_Closing;
        }
コード例 #24
0
        public FrmObservarClientes()
        {
            InitializeComponent();

            ContextMenuAgregarCliente = new ContextMenuAgregarCliente();
            PoperContainer            = new PoperContainer(ContextMenuAgregarCliente);

            this.Load += FrmObservarClientes_Load;
            this.dgvClientes.DoubleClick     += DgvClientes_DoubleClick;
            this.btnAgregarCliente.MouseDown += BtnAgregarCliente_MouseDown;

            this.txtBusqueda.onKeyPress += TxtBusqueda_onKeyPress;
            this.txtBusqueda.onPxClick  += TxtBusqueda_onPxClick;
        }
コード例 #25
0
        private void BtnNuevaNota_Click(object sender, EventArgs e)
        {
            FrmNuevaNota frmNuevaNota = new FrmNuevaNota
            {
                Dock            = DockStyle.Fill,
                FormBorderStyle = FormBorderStyle.None,
                TopLevel        = false
            };

            frmNuevaNota.AsignarDatos(this.EEmpleado);
            frmNuevaNota.OnRefresh += FrmNuevaNota_OnRefresh;
            this.container          = new PoperContainer(frmNuevaNota);
            this.container.Show(this.btnNuevaNota);
        }
コード例 #26
0
        private void btnInformacionPedido_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                if (this.Editar)
                {
                    Thread      hilo     = new Thread(() => Mensajes.MensajeEspera("Facturando y terminando"));
                    FrmComandas comandas = new FrmComandas();
                    comandas.Id_pedido = this.Id_pedido;
                    comandas.AsignarTablas(this.tablaspedido.ReturnTablaTemp());
                    bool plato    = false;
                    bool bebida   = false;
                    int  imprimir = 0;
                    foreach (DataRow row in this.tablaspedido.ReturnTablaTemp().Rows)
                    {
                        if (row["Tipo"].Equals("PLATO"))
                        {
                            plato = true;
                        }
                        else
                        {
                            bebida = true;
                        }
                        if (plato && bebida)
                        {
                            break;
                        }
                    }

                    if (plato && bebida)
                    {
                        imprimir = 2;
                    }
                    else
                    {
                        imprimir = 1;
                    }
                    comandas.ImprimirFactura(imprimir);
                    hilo.Abort();
                    this.Close();
                }
                else
                {
                    this.SumarPrecios();
                    this.ContextMenuDatosPedido.ObtenerPrecio();
                    PoperContainer.Show(btnInformacionPedido);
                }
            }
        }
コード例 #27
0
 private void BtnAgregar_Click(object sender, EventArgs e)
 {
     if (FrmNuevoEmpleado == null)
     {
         FrmNuevoEmpleado = new FrmNuevoEmpleado
         {
             Dock            = DockStyle.Fill,
             FormBorderStyle = FormBorderStyle.None,
             TopLevel        = false
         };
         FrmNuevoEmpleado.OnEmpleadoAddSuccess += FrmNuevoEmpleado_OnEmpleadoAddSuccess;
         this.container = new PoperContainer(FrmNuevoEmpleado);
     }
     FrmNuevoEmpleado.Show();
     this.container.Show(btnAgregar);
 }
コード例 #28
0
        public FrmFacturarPedido()
        {
            InitializeComponent();
            this.opcionesPedido  = new DescuentosOpcionesPedido();
            this.poperContainer1 = new PoperContainer(opcionesPedido);

            this.datosUsuario    = new DatosUsuario();
            this.poperContainer2 = new PoperContainer(datosUsuario);

            this.lblCliente.Click    += LblCliente_Click;
            this.btnDescuentos.Click += BtnDescuentos_Click;
            this.Load += FrmFacturarPedido_Load;
            this.btnTerminar.Click           += BtnTerminar_Click;
            this.lblMesero.Click             += LblMesero_Click;
            this.datosUsuario.onChangedEmail += DatosUsuario_onChangedEmail;
        }
コード例 #29
0
 private void BtnAgregar_Click(object sender, EventArgs e)
 {
     if (frmNuevoVehiculo == null)
     {
         frmNuevoVehiculo = new FrmNuevoVehiculo
         {
             Dock            = DockStyle.Fill,
             FormBorderStyle = FormBorderStyle.None,
             TopLevel        = false
         };
         frmNuevoVehiculo.OnVehiculoAddSuccess += FrmNuevoVehiculo_OnVehiculoAddSuccess;
         this.container = new PoperContainer(frmNuevoVehiculo);
     }
     frmNuevoVehiculo.Show();
     this.container.Show(btnAgregar);
 }
コード例 #30
0
        public EquipmentForm()
        {
            InitializeComponent();
            bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG");
            bitmapButtonJob.ImageNormal = PicLoader.Read("ButtonBitmap", "LearnButton.JPG");

            vRegion = new VirtualRegion(this);
            var r1 = new PictureRegion(1, 413, 69, 64, 64, PictureRegionCellType.Equip, UserProfile.InfoEquip.Equipon[0].BaseId);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//头盔
            vRegion.AddRegion(r1);
            r1 = new PictureRegion(2, 374, 151, 40, 40, PictureRegionCellType.Equip, UserProfile.InfoEquip.Equipon[1].BaseId);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//武器
            vRegion.AddRegion(r1);
            r1 = new PictureRegion(3, 425, 151, 40, 40, PictureRegionCellType.Equip, UserProfile.InfoEquip.Equipon[2].BaseId);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//防具
            vRegion.AddRegion(r1);
            r1 = new PictureRegion(4, 476, 151, 40, 40, PictureRegionCellType.Equip, UserProfile.InfoEquip.Equipon[3].BaseId);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//饰品
            vRegion.AddRegion(r1);

            vRegion.AddRegion(new SubVirtualRegion(10, 147, 107, 46, 44));
            vRegion.AddRegion(new SubVirtualRegion(11, 200, 107, 46, 44));
            vRegion.AddRegion(new SubVirtualRegion(12, 253, 107, 46, 44));
            vRegion.AddRegion(new SubVirtualRegion(13, 306, 107, 46, 44));
            vRegion.AddRegion(new SubVirtualRegion(14, 147, 170, 46, 44));
            vRegion.AddRegion(new SubVirtualRegion(15, 200, 170, 46, 44));
            vRegion.AddRegion(new SubVirtualRegion(16, 253, 170, 46, 44));

            for (int i = 0; i < GameConstants.EquipOffCount; i++)
            {
                var region = new PictureRegion(20 + i, 38 + (i % 15) * 32, 227 + (i / 15) * 32, 32, 32, PictureRegionCellType.Equip, UserProfile.InfoEquip.Equipoff[i].BaseId);
             //   region.AddDecorator(new RegionBorderDecorator(region, Color.Yellow));
                vRegion.AddRegion(region);
            }

            vRegion.RegionClicked += new VirtualRegion.VRegionClickEventHandler(virtualRegion_RegionClicked);
            vRegion.RegionEntered += new VirtualRegion.VRegionEnteredEventHandler(virtualRegion_RegionEntered);
            vRegion.RegionLeft += new VirtualRegion.VRegionLeftEventHandler(virtualRegion_RegionLeft);
            tempImage = new Bitmap(160, 160);
            selectTar = -1;
            myCursor = new HSCursor(this);

            popMenuEquip = new PopMenuEquip();
            popContainer = new PoperContainer(popMenuEquip);
            popMenuEquip.PoperContainer = popContainer;
            popMenuEquip.Form = this;
        }