Example #1
0
    public void ObtenerAyuda()
    {
        string mensaje = "";

        nAyudas++;
        txtAyudas.text = nAyudas.ToString();

        if (pnlValidar.GetComponent <RectTransform>().localScale.y == 0)
        {
            Ayudas ay = new Ayudas();
            mensaje = ay.ObtenerAyuda(txtTarget.text);
            StartCoroutine(MostrarPanel2(mensaje));
        }
        else
        {
            string s = "";
            if (lblInfo.GetComponent <Text>().text.Contains("Area"))
            {
                s = "El Área de la base de un " + txtTarget.text + " se calcula";
                StartCoroutine(MostrarPanel(false, s, "Area"));
            }
            else if (lblInfo.GetComponent <Text>().text.Contains("Vol"))
            {
                s = "El Volumen de un " + txtTarget.text + " se calcula";
                StartCoroutine(MostrarPanel(false, s, "Volumen"));
            }
        }
    }
Example #2
0
        private void AyudasToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Ayudas AyudasForm = new Ayudas();

            AyudasForm.MdiParent = this;
            AyudasForm.Show();
        }
        public static List <T> CargaLista <T>(string ficheroXml, bool forzarLectura, MetodoCargaListaDelegate <T> metodo, string entidad, int?idEmpresa)
        {
            TablaPersistente <T> tmpTabla;
            string fileName = Path.Combine(VariablesGlobales.rutaFicheros, ficheroXml);

            if (idEmpresa != null && idEmpresa > 0)
            {
                fileName = Path.Combine(VariablesGlobales.rutaFicheros + "/" + idEmpresa, ficheroXml);
            }
            if (File.Exists(fileName) && !forzarLectura)
            {
                var versionRemota = Program.ProxyDSW.LeerVersionTabla(entidad, null);
                try
                {
                    object obj          = Ayudas.DeserializarDesdeXmlAObjeto(typeof(TablaPersistente <T>), fileName);
                    var    versionLocal = ((TablaPersistente <T>)obj).Version;
                    if (versionLocal == versionRemota)
                    {
                        return(((TablaPersistente <T>)obj).Lista);
                    }
                }
                catch
                {
                    tmpTabla = new TablaPersistente <T>(metodo, entidad);
                    Ayudas.SerializarAXML(tmpTabla, fileName);
                    return(tmpTabla.Lista);
                }
            }
            tmpTabla = new TablaPersistente <T>(metodo, entidad);
            Ayudas.SerializarAXML(tmpTabla, fileName);
            return(tmpTabla.Lista);
        }
Example #4
0
        private void CrearComisiones()
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true);
            SplashScreenManager.Default.SetWaitFormCaption("Comisiones");
            SplashScreenManager.Default.SetWaitFormDescription("Generando...");
            try
            {
                var r = Program.ProxyConsultas.CrearComisiones(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, null);
                _listaOriginal = r.Select(ivf => (PComisionArti)Ayudas.Transformar(ivf, typeof(PComisionArti))).ToList();

                if (chAg.Checked)
                {
                    var r2 = Program.ProxyConsultas2.CrearComisiones(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, null);
                    var l2 = r2.Select(ivf => (PComisionArti)Ayudas.Transformar(ivf, typeof(PComisionArti))).ToList();
                    _listaOriginal.AddRange(l2);
                }

                _listaDelegaciones = _listaOriginal;
                AgruparPorVendedor(_listaDelegaciones);
                pnlDel.Visible  = true;
                biEmail.Enabled = biImprimir.Enabled = biExcel.Enabled = biVista.Enabled = true;
            }
            finally
            {
                SplashScreenManager.CloseForm();
            }
        }
Example #5
0
 public int calcularApoyoId()
 {
     if (!ConsultarAyudas().Any())
     {
         return(1);
     }
     else
     {
         Ayudas Ultimo = ConsultarAyudas().Last();
         int    n      = Ultimo.ApoyoId + 1;
         return(n);
     }
 }
Example #6
0
        public void Guardar(Ayudas ayuda)
        {
            using (var command = _connection.CreateCommand())
            {
                command.CommandText = @"Insert Into Ayuda (ValorApoyo,ModalidadApoyo, Fecha) 
                                        values (@ValorA,@ModalidadA,@Fecha)";
                command.Parameters.AddWithValue("@ValorA", ayuda.ValorApoyo);
                command.Parameters.AddWithValue("@ModalidadA", ayuda.ModalidadApoyo);
                command.Parameters.AddWithValue("@Fecha", ayuda.Fecha);

                var filas = command.ExecuteNonQuery();
            }
        }
Example #7
0
        private Ayudas DataReaderMapToPerson(SqlDataReader dataReader)
        {
            if (!dataReader.HasRows)
            {
                return(null);
            }
            Ayudas ayuda = new Ayudas();

            ayuda.ApoyoId        = (int)dataReader["ApoyoId"];
            ayuda.ValorApoyo     = (decimal)dataReader["ValorApoyo"];
            ayuda.ModalidadApoyo = (string)dataReader["ModalidadApoyo"];
            ayuda.Fecha          = (DateTime)dataReader["Fecha"];
            return(ayuda);
        }
        public static List <T> CargaDatosRejilla <T>(GridView gridView)
        {
            var datos = new List <T>();

            if (gridView.GroupCount == 0)
            {
                for (int rowHandle = 0; rowHandle < gridView.RowCount; rowHandle++)
                {
                    var r = gridView.GetRow(rowHandle);
                    if (r == null)
                    {
                        continue;
                    }
                    if (!(r is T))
                    {
                        r = Ayudas.Transformar(r, typeof(T));
                    }
                    datos.Add((T)r);
                }
            }
            else
            {
                for (int rowHandle = -1; gridView.IsValidRowHandle(rowHandle); rowHandle--)
                {
                    if (gridView.GetChildRowHandle(rowHandle, 0) > -1)
                    {
                        for (int childRowHandle = 0; childRowHandle < gridView.GetChildRowCount(rowHandle); childRowHandle++)
                        {
                            var hh = gridView.GetChildRowHandle(rowHandle, childRowHandle);
                            var r  = gridView.GetRow(hh);
                            if (r == null)
                            {
                                continue;
                            }
                            if (!(r is T))
                            {
                                r = Ayudas.Transformar(r, typeof(T));
                            }
                            datos.Add((T)r);
                        }
                    }
                }
            }
            return(datos);
        }
Example #9
0
        public List <Ayudas> ConsultarAyudas()
        {
            SqlDataReader dataReader;
            List <Ayudas> ayudas = new List <Ayudas>();

            using (var command = _connection.CreateCommand())
            {
                command.CommandText = "Select * from Ayuda ";
                dataReader          = command.ExecuteReader();
                if (dataReader.HasRows)
                {
                    while (dataReader.Read())
                    {
                        Ayudas ayuda = DataReaderMapToPerson(dataReader);
                        ayudas.Add(ayuda);
                    }
                }
            }
            return(ayudas);
        }
Example #10
0
        public GuardarPersonaResponse Guardar(Persona persona)
        {
            string mensaje = "";

            try
            {
                if (_context.Personas.Find(persona.Identificacion) == null)
                {
                    decimal suma = _context.Personas.Include(p => p.Ayudas).ToList().Sum(p => p.Ayudas.ValorApoyo);
                    if ((0 + persona.Ayudas.ValorApoyo) > 60000000)
                    {
                        mensaje = "Error: Ayudas superadas. ";
                        return(new GuardarPersonaResponse(mensaje, "NoMoney"));
                    }
                    else
                    {
                        Ayudas ayuda  = persona.Ayudas;
                        int    numero = _context.Personas.Include(p => p.Ayudas).ToList().Count;
                        mensaje      = "Se ha guardado la persona. ";
                        ayuda.Numero = (numero + 1) + ("");
                        persona.AgregarAyuda(ayuda);
                        _context.Personas.Add(persona);
                        _context.SaveChanges();
                        return(new GuardarPersonaResponse(mensaje, persona));
                    }
                }
                else
                {
                    mensaje = "Error: La persona ya se encuentra registrada. ";
                    return(new GuardarPersonaResponse(mensaje, "Duplicado"));
                }
            }
            catch (Exception e)
            {
                return(new GuardarPersonaResponse($"Error en la aplicacion: {e.Message}", "ErrorAplication"));
            }
        }
        void bgwCargaDatos_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

            if (worker != null)
            {
                var vend = chVendedores.Properties.GetCheckedItems() as string;
                DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm((Form)Program.MainForm, typeof(WaitFormCancel), true, true);
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SendCommand(WaitFormCancel.WaitFormCommand.SendObject, locker1);
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("Cargando Datos ...");

                _datosVentas = new List <PVentasArti>();

                var vr = Program.ProxyConsultas.LeerVentasArti(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, vend, chVend.Checked);
                _datosVentas = vr.Select(ivf => (PVentasArti)Ayudas.Transformar(ivf, typeof(PVentasArti))).ToList();
                if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                {
                    var rr  = Program.ProxyConsultas2.LeerVentasArti(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, vend, chVend.Checked);
                    var lr2 = rr.Select(ivf => (PVentasArti)Ayudas.Transformar(ivf, typeof(PVentasArti))).ToList();
                    _datosVentas.AddRange(lr2);
                }
                e.Result = _datosVentas;
            }
        }
Example #12
0
        /// <summary>
        /// [RTF format info]:
        ///
        /// "\b ": bold start.
        /// "\b0 ": bold end.
        ///
        /// "\i ": italic start.
        /// "\i0 ": italic end.
        ///
        /// "\ul ": underline start.
        /// "\ulnone ": underline end.
        ///
        /// "\strike ": strike start.
        /// "\strike0 ": strike end.
        ///
        /// "\sub ": subtext start.
        /// "\nosupersub ": subtext end.
        ///
        /// "\super ": supertext start.
        /// "\nosupersub ": supertext end.
        ///
        /// "\highlight1 ": highlight start.
        /// "\highlight0 ": highlight end.
        ///
        /// "\cf1 ": colored font.
        /// "\cf0 ": default colored font.
        ///
        /// "\pard\qc ": center text.
        /// "\pard ": left text.
        /// "\pard\qr ": right text.
        /// "\pard\qj ": justified text.
        ///
        /// "\fs18 ": font size 9.
        /// "\fs20 ": font size 10.
        /// "\fs22 ": font size 11.
        /// "\fs24 ": font size 12.
        /// "\fs160 ": font size 80.
        /// Note: the font size seems to be the double on the source code than the actual value.
        /// </summary>
        private void ComboBox_Ayuda_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ComboBox_Ayuda.SelectedIndex > -1)
                {
                    float  Zoom        = Variable_Zoom;
                    Ayudas Ayuda       = (Ayudas)ComboBox_Ayuda.SelectedIndex;
                    string Texto_Ayuda = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\nouicompat\\deflang3082{\\fonttbl{\\f0\\fnil\\fcharset0 " + Barra_Estado_Etiqueta_Sugerencia.Font.Name + ";}{\\f1\\fnil\\fcharset0 Calibri;}}\r\n{\\*\\generator Riched20 6.3.9600}\\viewkind4\\uc1 \r\n\\pard\\f0\\fs" + (10 * 2).ToString() + " ";
                    if (Ayuda == Ayudas.Main_window)
                    {
                        Texto_Ayuda +=
                            "\\ul \\b [File menu]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Delete all the saved options from the registry...\":\\b0  deletes all the application settings stored in the Windows registry, useful for making a full \"uninstall\".\\par\r\n" +
                            "\\b - \"Exit\":\\b0  closes the application.\\par\r\n" +

                            "\\par\\ul \\b [View menu]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Always on top\":\\b0  puts the windows of the application on top of other windows of the system.\\par\r\n" +

                            "\\par\\ul \\b [Tools menu]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Open the default tool now...\":\\b0  starts the default tool, if it was some selected.\\par\r\n" +
                            "\\b - \"Default tool every time the program loads\":\\b0  let's you select the tool that will open every time the program starts.\\par\r\n" +
                            "\\b - \"Realistic world viewer in 2D...\":\\b0  tool that loads a Minecraft world ranging 1.12.2- to 1.13+, reading all of it's possible dimensions (it even supports modpacks worlds) and then draws several useful maps to view those worlds and dimensions in lots of new ways.\\par\r\n" +
                            "\\b - \"Slime chunks finder...\":\\b0  tool that displays where are located in the world the chunks (16 x 16 blocks) where slimes will be able to spawn underground, and for that you can input a text seed or a numeric one directly.\\par\r\n" +
                            "\\b - \"Animated 3D skin viewer...\":\\b0  tool that draws any player skin as an animated 3D model, allowing to fully select it's movement, and it also comes with several exclusive filters to enhance the viewing of the skin.\\par\r\n" +
                            "\\b - \"World seeds infinite calculator...\":\\b0  tool that calculates a world numeric seed based on a text seed, but it also supports hundreds of bases and literally infinite numbers.\\par\r\n" +
                            "\\b - \"Finder of differences between JAR versions...\":\\b0  tool that tells you what has changed between 2 versions of the .jar files of Minecraft, very useful when a new snapshot is released.\\par\r\n" +
                            "\\b - \"Pixel art generator with world exporter...\":\\b0  tool that loads any image and converts it to Minecraft blocks from a selected palette, it supports horizontal and vertical new Minecraft world exporting.\\par\r\n" +
                            "\\b - \"Custom structure generator...\":\\b0  tool that exports new Minecraft worlds containing customized massive structures like labyrinths, pyramids, spheres, etc, including the default Minecraft structures but allowing to change it's default block types.\\par\r\n" +
                            "\\b - \"Average color from any image...\":\\b0  tool that displays the average ARGB colors form any image, useful for creating tools like a pixel art generator, where each pixel of any image must be converted to an average color from any Minecraft texture.\\par\r\n" +
                            "\\b - \"Redstone designer (soon)...\":\\b0  tool that allows the design of redstone circuits very easily, with an option to export them as new Minecraft worlds.\\par\r\n" +
                            "\\b - \"Structure generator through commands (soon)...\":\\b0  tool that generates massive structures in real time by writing commands inside the game, but without any mods. Note: this tool might be very dangerous if the game can't keep up the text inputs, and this might result in a world being destroyed forever, so please before using this tool make backup copies of the worlds you're going to load while usign the tool.\\par\r\n" +
                            "\\b - \"Other cool Minecraft tools made by other awesome people\":\\b0  displays a list of other interesting and free Minecraft utilities, some of which are part of this application, while others have similar tools to the ones contained in this program.\\par\r\n" +
                            "\\b - \"Open the Twitch (Curse) default modpacks folder...\":\\b0  opens the default modpacks folder from Twitch (Curse).\\par\r\n" +
                            "\\b - \"Open the Minecraft default save folder...\":\\b0  opens the default Minecraft save folder.\\par\r\n" +

                            "\\par\\ul \\b [Help menu]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Help viewer...\":\\b0  opens the tool you're using right now to read this text.\\par\r\n" +
                            "\\b - \"Exception debugger...\":\\b0  opens a tool that will show you any exception that happened while the application was running even from long ago, and will sort them by it's date.\\par\r\n" +
                            "\\b - \"Website...\":\\b0  navigates to the Jupisoft's website, currently only containing free music albums composed by Júpiter Mauro.\\par\r\n" +
                            "\\b - \"Send an e-mail...\":\\b0  sends an e-mail to Jupisoft, feel free to send any bug you've found or tell any suggestion you have.\\par\r\n" +
                            "\\b - \"Donate...\":\\b0  navigates to the donation site, to give any quantity you want to Jupisoft, so it keeps improving tools like this and developing new ones.\\par\r\n" +
                            "\\b - \"About...\":\\b0  opens the about window, that contains more detailed information about this application and some other interesting features.\\par\r\n" +

                            "\\par\\ul \\b [Status bar]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Exceptions\":\\b0  if this label is visible, that means at least one exception has been registered in the application. Click on that label to open the exception debugger and see what happened.\\par\r\n" +
                            "\\b - \"Memory\":\\b0  this label displays the current memory use by the whole application. And by just measuring that memory use, it might decrease or increase a bit this value.\\par\r\n" +
                            "\\b - \"Tip\":\\b0  this label is designed to kindly welcome the user to the application and to suggest the start of one of it's multiple tools.\\par\r\n" +

                            "\\par\\ul \\b [Controls]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Drag and drop\":\\b0  this window doesn't support any drag and drop operations.\\par\r\n" +
                            "\\b - \"Escape or Delete\":\\b0  pressing any of those keys will close the window and quit the program.";
                    }
                    else if (Ayuda == Ayudas.Realistic_world_viewer_in_2D)
                    {
                        Texto_Ayuda +=
                            "\\ul \\b [Main toolbar]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Map\":\\b0  allows you to select a map type to view the loaded dimension in different ways.\\par\r\n" +
                            "\\b - \"In 3D\":\\b0  allows the use different brightness on the current map depending on the Y value of each block, representing lower blocks with darker areas and higher blocks with brighter areas.\\par\r\n" +
                            "\\b - \"Dimension\":\\b0  allows you to to choose between the available dimensions in the current world.\\par\r\n" +
                            "\\b - \"Zoom\":\\b0  allows to zoom in or out the map to be able to see the blocks with more or less details.\\par\r\n" +
                            "\\b - \"Block\":\\b0  allows you to choose the block type to filter when the current map type is set to \"Search block\".\\par\r\n" +
                            "\\b - \"X\":\\b0  allows you to change the current X (horizontal, from west to east) coordinate.\\par\r\n" +
                            "\\b - \"Y\":\\b0  allows you to change the current Y (vertical, from bottom to top) coordinate.\\par\r\n" +
                            "\\b - \"Z\":\\b0  allows you to change the current Z (depth, from north to south) coordinate.\\par\r\n" +

                            "\\par\\ul \\b [Status bar]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Memory\":\\b0  displays the quantity of memory the application is currently using.\\par\r\n" +
                            "\\b - \"Minecraft\":\\b0  displays the Minecraft version detected after loading any dimension from a world.\\par\r\n" +
                            "\\b - \"Regions\":\\b0  displays the number of regions available for the current dimension.\\par\r\n" +
                            "\\b - \"Min. XZ\":\\b0  displays the minimum X and Z (northwest) coordinates that exists within the available regions.\\par\r\n" +
                            "\\b - \"Max. XZ\":\\b0  displays the maximum X and Z (southeast) coordinates that exists within the available regions.\\par\r\n" +
                            "\\b - \"Blocks\":\\b0  displays the size in blocks of the current map.\\par\r\n" +
                            "\\b - \"Visible\":\\b0  displays the number of visible blocks in the current map.\\par\r\n" +

                            "\\par\\ul \\b [Context menu]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Help viewer...\":\\b0  opens the tool you're using right now to read this text.\\par\r\n" +
                            "\\b - \"About...\":\\b0  opens the about window, that contains more detailed information about this application and some other interesting features.\\par\r\n" +
                            "\\b - \"Exception debugger...\":\\b0  opens the exception debugger, a tool that keeps a registry of all the exceptions that have occured in the program even from long ago.\\par\r\n" +
                            "\\b - \"Open the default save folder for the maps...\":\\b0  opens the default folder used to save the maps, located inside the My Pictures folder.\\par\r\n" +
                            "\\b - \"Refresh and redraw the full map\":\\b0  forces a redraw of the full map.\\par\r\n" +
                            "\\b - \"Clear the current dimension cache after loading any region\":\\b0  if checked, before drawing the map all the regions from the current dimension will deleted from the cache to recover memory.\\par\r\n" +
                            "\\b - \"Clear the other dimensions cache when loading a new one\":\\b0  if checked, before drawing the map all the regions from the other dimensions will deleted from the cache to recover memory.\\par\r\n" +
                            "\\b - \"Clear from all the caches the regions outside of the screen\":\\b0  if checked, before drawing the map all the regions from any dimension that aren't going to be drawed right now will deleted from the cache to recover memory.\\par\r\n" +
                            "\\b - \"Randomize the region and chunk draw order\":\\b0  if checked, before drawing the map the order of the current regions and chunks will be randomized, creating a nicer pattern when drawing.\\par\r\n" +
                            "\\b - \"Show the randomized rainbow chunk grid\":\\b0  if checked, a semi-transparent grid made of randomized and fully saturated colors will be drawn around every chunk border of the current map.\\par\r\n" +
                            "\\b - \"Full screen mode\":\\b0  if checked, the window will change to full screen mode, allowing for more screen space to be used.\\par\r\n" +
                            "\\b - \"Select the background color...\":\\b0  opens a color selector dialog to be able to change the background color of the map.\\par\r\n" +
                            "\\b - \"Clear now the whole cache to recover more memory\":\\b0  forces a full cache deletion in all the loaded dimensions to recover memory, and this means that the next time the map is drawn all the regions will have to be loaded again from the hard drive, thus slowing the drawing of the map at least the next time.\\par\r\n" +
                            "\\b - \"Save the current map as a PNG image...\":\\b0  exports the current map as a .png image inside the My Pictures folder.\\par\r\n" +
                            "\\b - \"Copy the current map to the clipboard\":\\b0  copies the current map to the clipboard to be able to paste it into any other program.\\par\r\n" +
                            "\\b - \"Copy the whole form (useful in fullscreen)\":\\b0  copies the whole form to the clipboard to be able to paste it into any other program.\\par\r\n" +
                            "\\b - \"Restore all this settings to it's default values...\":\\b0  deletes all the settings of the current tool stored in the Windows registry.\\par\r\n" +

                            "\\par\\ul \\b [Controls]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Drag and drop\":\\b0  to load an existing Minecraft world drag it's folder (or any file inside it) and drop it onto the window.\\par\r\n" +
                            "\\b - \"Escape\":\\b0  pressing that key will close the window and will return to the main window.\\par\r\n" +
                            "\\b - \"Mouse middle click\":\\b0  pressing that button will have different effects based on the control that is clicked on, like copy to the clipboard some image or text, reset the control value to it's default one, randomize that value and other interesting effects.";
                    }
                    else if (Ayuda == Ayudas.Slime_chunks_finder)
                    {
                        Texto_Ayuda +=
                            "\\ul \\b [Main toolbar]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Seed\":\\b0  allows you to input a numeric seed or a text seed that will be converted to a numeric one, and based on that seed the map will show you (the green rectangles) where in a Minecraft world with that seed slimes will spawn below Y = 40. Note: Minecraft usually turns a seed 0 to 48, so be aware of that.\\par\r\n" +
                            "\\b - \"Zoom\":\\b0  allows you to change the zoom level of the map to be able to see it better or to see more terrain at once.\\par\r\n" +
                            "\\b - \"Block X\":\\b0  allows you to change the block X coordinate to move around the world and find slime chunks at a specific position.\\par\r\n" +
                            "\\b - \"Block Z\":\\b0  allows you to change the block Z coordinate to move around the world and find slime chunks at a specific position.\\par\r\n" +
                            "\\b - \"Chunk X\":\\b0  allows you to change the chunk X coordinate to move around the world and find slime chunks at a specific position.\\par\r\n" +
                            "\\b - \"Chunk Z\":\\b0  allows you to change the chunk Z coordinate to move around the world and find slime chunks at a specific position.\\par\r\n" +
                            "\\b - \"Region X\":\\b0  allows you to change the region X coordinate to move around the world and find slime chunks at a specific position.\\par\r\n" +
                            "\\b - \"Region Z\":\\b0  allows you to change the region Z coordinate to move around the world and find slime chunks at a specific position.\\par\r\n" +

                            "\\par\\ul \\b [Status bar]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Memory\":\\b0  displays the quantity of memory the application is currently using.\\par\r\n" +
                            "\\b - \"Dimensions\":\\b0  displays the dimensions of the current map measured in chunks (16 x 16 blocks).\\par\r\n" +
                            "\\b - \"Visible chunks\":\\b0  displays how many chunks are visible in the whole map.\\par\r\n" +
                            "\\b - \"Slime chunks\":\\b0  displays how many of the visible chunks are valid for spawning slimes below Y = 40.\\par\r\n" +

                            "\\par\\ul \\b [Context menu]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Help viewer...\":\\b0  opens the tool you're using right now to read this text.\\par\r\n" +
                            "\\b - \"About...\":\\b0  opens the about window, that contains more detailed information about this application and some other interesting features.\\par\r\n" +
                            "\\b - \"Exception debugger...\":\\b0  opens the exception debugger, a tool that keeps a registry of all the exceptions that have occured in the program even from long ago.\\par\r\n" +
                            "\\b - \"Open the default save folder for the maps...\":\\b0  opens the default folder used to save the maps, located inside the My Pictures folder.\\par\r\n" +
                            "\\b - \"Refresh\":\\b0  forces a redraw of the full map.\\par\r\n" +
                            "\\b - \"Show the rulers\":\\b0  if checked, the slime chunk map will display on it's borders some rulers for a better reading of the map.\\par\r\n" +
                            "\\b - \"Copy\":\\b0  copies the current map to the clipboard to be able to paste it into any other program.\\par\r\n" +
                            "\\b - \"Save as a PNG image\":\\b0  exports the current map as a .png image inside the My Pictures folder.\\par\r\n" +
                            "\\b - \"Restore all this settings to it's default values...\":\\b0  deletes all the settings of the current tool stored in the Windows registry.\\par\r\n" +

                            "\\par\\ul \\b [Controls]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Drag and drop\":\\b0  to load an existing Minecraft world drag it's folder (or any file inside it) and drop it onto the window.\\par\r\n" +
                            "\\b - \"Escape\":\\b0  pressing that key will close the window and will return to the main window.\\par\r\n" +
                            "\\b - \"Mouse middle click\":\\b0  pressing that button will have different effects based on the control that is clicked on, like copy to the clipboard some image or text, reset the control value to it's default one, randomize that value and other interesting effects.";
                    }
                    else if (Ayuda == Ayudas.Animated_3D_skin_viewer)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.World_seeds_infinite_calculator)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Finder_of_differences_between_JAR_versions)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Pixel_art_generator_with_world_exporter)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Custom_structure_generator)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Thumbnails_and_average_color_generator)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.NBT_viewer)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Redstone_designer)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Structure_generator_through_commands)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Help_viewer)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.About)
                    {
                        Texto_Ayuda += "\\ul \\b [Coming soon...]\\b0 \\ulnone \\par\r\n";
                    }
                    else if (Ayuda == Ayudas.Secrets)
                    {
                        Texto_Ayuda +=
                            "\\ul \\b [Minecraft secrets]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Debug world\":\\b0  On Minecraft go to \"Create New World\", then click on \"More World Options...\". Now hold down the shift key (not the key you use to sneak on Minecraft, but the real shift key on your keyboard), and while holding it, click several times on \"World Type: Default\" until you see \"World Type: Debug Mode\", finally click on \"Create New World\" (and release the shift key). Now you'll be playing in the debug world used only by the Minecraft creators. There you'll see all the possible block combinations at around Y = 70, and a barrier at Y = 60. This world might be really useful for testing new resource packs for Minecraft. So have fun with it and tell everyone else about this cool secret.\\par\r\n" +

                            "\\par\\ul \\b [Minecraft Tools secrets]\\b0 \\ulnone \\par\r\n" +
                            "\\b - \"Secrets: hidden\":\\b0  if you are programming new tools for Minecraft and need to know how certain parts of the game work, you might take a look at the Minecraft wiki. Doing it that way might take you a lot of time and effort, so now there's a faster way since this application includes several Minecraft versions inside zip files. But they are encrypted by default, and since distributing them directly shouldn't be done, there's an option that lets you decrypt the zip files, but if you decide to do this, first you'll have to promise that you won't redistribute the source codes, that you'll only use them for learning purposes, like checking or updating the Minecraft wiki information (I found 2 bugs for Minecraft 1.12 Data values: the netherrack and quartz slabs have their values inverted and also the acacia and dark oak fence posts), or developing new cool tools for the community, and that you'll never do anything illegal with it (like playing without having purchased the game, etc). If you ever use it wrong, then you'll be the only responsible for that, because I gave it to you encrypted with my best intention and only for learning purposes (like the way I discovered how to load the Minecraft debug world thanks to it's source code). So please use it well, thanks a lot. And remember... you have been warned! To show the secret menus and decrypt options, hold shift while clicking the \"Secrets: hidden\" status bar button (or middle click it) and finally follow the new window instructions. Note: it also includes other cool stuff like an awesome font with the Standard Galactic Alphabet (SGA) for you to use in any text editor, and all the Xbox 360 resource packs and skins reconverted to PC.\\par\r\n";
                    }
                    else
                    {
                        Texto_Ayuda += "The help file for the selected tool couldn't be found.";
                    }
                    Texto_Ayuda                 += "\\pard\\sa200\\sl276\\slmult1\\f1\\fs22\\lang10\\par\r\n}";
                    RichTextBox_Ayuda.Rtf        = Texto_Ayuda;
                    RichTextBox_Ayuda.ZoomFactor = Zoom != 1.5f ? 1.5f : 2.5f;
                    RichTextBox_Ayuda.ZoomFactor = Zoom;
                }
            }
            catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); }
        }
Example #13
0
        public static void CrearProxyAuxiliar(string usuario, string password, ref ISvcAuxdSWin servicio, string servidor)
        {
            var host = Properties.Settings.Default.HostAuxiliar;

            try
            {
                _factoryAuxiliar = new ChannelFactory <ISvcAuxdSWin>(host);
                Ayudas.SetDataContractSerializerBehavior(_factoryAuxiliar.Endpoint.Contract);
                if (_factoryAuxiliar.Credentials != null)
                {
                    _factoryAuxiliar.Credentials.UserName.UserName = usuario;
                    _factoryAuxiliar.Credentials.UserName.Password = password;
                }
                if (servidor == null)
                {
                    servicio = _factoryAuxiliar.CreateChannel();
                }
                else
                {
                    var abs = _factoryAuxiliar.Endpoint.Address.Uri.AbsolutePath;
                    EndpointIdentity spn = EndpointIdentity.CreateSpnIdentity("Prueba");
                    var strUri           = string.Format("http://{0}{1}", servidor, abs);
                    Uri uri     = new Uri(strUri);
                    var address = new EndpointAddress(uri, spn);
                    servicio = _factoryAuxiliar.CreateChannel(address);
                }
                //servicio = _factoryAuxiliar.CreateChannel();
            }
            catch (CommunicationException e)
            {
                Abort((IChannel)servicio, _factoryAuxiliar);

                // if there is a fault then print it out
                FaultException fe  = null;
                Exception      tmp = e;
                while (tmp != null)
                {
                    fe = tmp as FaultException;
                    if (fe != null)
                    {
                        break;
                    }
                    tmp = tmp.InnerException;
                }
                if (fe != null)
                {
                    string msgError = string.Format("Ha ocurrido un error en el Servidor {0} ",
                                                    fe.CreateMessageFault().Reason.GetMatchingTranslation().Text);
                    msgError += Environment.NewLine;
                    ManejoExcepciones.ShowException(msgError, "Error de Aplicación", "Error de Aplicación");
                }
                else
                {
                    string msgError = string.Format("Solicitud erronea {0} ", e);
                    msgError += Environment.NewLine;
                    ManejoExcepciones.ShowException(msgError, "Error de Aplicación", "Error de Aplicación");
                }
            }
            catch (TimeoutException)
            {
                Abort((IChannel)servicio, _factoryAuxiliar);
                string msgError = "Se ha excedido el tiempo de espera";
                msgError += Environment.NewLine;
                ManejoExcepciones.ShowException(msgError, "Error de Aplicación", "Error de Aplicación");
            }
            catch (Exception e)
            {
                Abort((IChannel)servicio, _factoryAuxiliar);
                string msgError = string.Format("Error inesperado en la solicitud {0} ", e);
                msgError += Environment.NewLine;
                ManejoExcepciones.ShowException(msgError, "Error de Aplicación", "Error de Aplicación");
            }
        }
Example #14
0
        private void biValoresDef_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (MessageBox.Show(string.Format("Este proceso asignara los valores indicados en la ficha de los clientes" + Environment.NewLine +
                                              "para subsanar las incidencias detectadas en el proceso de {0}" + Environment.NewLine + "¿Desea Continuar?", TCIncVR.SelectedTabPage.Name == "tpIncVenta" ? "Ventas" : "Reparto"), "Confirmación",
                                MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question) == DialogResult.No)
            {
                return;
            }
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                var proc = new Procedimiento
                {
                    NombreProcedimiento = TCIncVR.SelectedTabPage.Name == "tpIncVenta" ? "Ventas.CorregirIncidenciasVentas" : "Ventas.CorregirIncidenciasReparto",
                    ListaParametros     = new List <ParametroProc>
                    {
                        new ParametroProc
                        {
                            NombreParametro = "@idEmpresa",
                            TipoDato        = DbType.Int32,
                            TipoParametro   = TTipoParametro.Entrada,
                            Valor           = Parametros.IdEmpresa
                        },
                        new ParametroProc
                        {
                            NombreParametro = "@fechaInicio",
                            TipoDato        = DbType.Date,
                            TipoParametro   = TTipoParametro.Entrada,
                            Valor           = (DateTime)edFecIni.EditValue
                        },
                        new ParametroProc
                        {
                            NombreParametro = "@fechaFin",
                            TipoDato        = DbType.Date,
                            TipoParametro   = TTipoParametro.Entrada,
                            Valor           = (DateTime)edFecFin.EditValue
                        },
                    }
                };
                var r = Program.ProxyDSW.EjecutarProcedimiento(proc);

                if (TCIncVR.SelectedTabPage.Name == "tpIncVenta")
                {
                    var rv = Program.ProxyConsultas.LeerIncidenciasVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    _datosVentas.IncVentas = rv.Select(ivf => (PIncVenta)Ayudas.Transformar(ivf, typeof(PIncVenta))).ToList();

                    var rr  = Program.ProxyConsultas2.LeerIncidenciasVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    var lr2 = rr.Select(ivf => (PIncVenta)Ayudas.Transformar(ivf, typeof(PIncVenta))).ToList();
                    _datosVentas.IncVentas.AddRange(lr2);

                    gcIncVentas.DataSource = _datosVentas.IncVentas;
                }
                else
                {
                    var rr = Program.ProxyConsultas.LeerIncidenciasRepartos(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    _datosVentas.IncRepartos = rr.Select(ivf => (PIncReparto)Ayudas.Transformar(ivf, typeof(PIncReparto))).ToList();

                    var rr2 = Program.ProxyConsultas2.LeerIncidenciasRepartos(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    var lr2 = rr2.Select(ivf => (PIncReparto)Ayudas.Transformar(ivf, typeof(PIncReparto))).ToList();
                    _datosVentas.IncRepartos.AddRange(lr2);

                    gcIncRepartos.DataSource = _datosVentas.IncRepartos;
                }
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Example #15
0
        void bgwCargaDatos_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

            if (worker != null)
            {
                DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm((Form)Program.MainForm, typeof(WaitFormCancel), true, true);
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SendCommand(WaitFormCancel.WaitFormCommand.SendObject, locker1);
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("Cargando Datos ...");

                _datosVentas = new DatosVentas();
                if (chIncidencias.Checked && !chRutasPrev.Checked)
                {
                    var r = Program.ProxyConsultas.LeerIncidenciasVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    _datosVentas.IncVentas = r.Select(ivf => (PIncVenta)Ayudas.Transformar(ivf, typeof(PIncVenta))).ToList();

                    if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                    {
                        var r2 = Program.ProxyConsultas2.LeerIncidenciasVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                        var l2 = r2.Select(ivf => (PIncVenta)Ayudas.Transformar(ivf, typeof(PIncVenta))).ToList();
                        _datosVentas.IncVentas.AddRange(l2);
                    }

                    var rr = Program.ProxyConsultas.LeerIncidenciasRepartos(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    _datosVentas.IncRepartos = rr.Select(ivf => (PIncReparto)Ayudas.Transformar(ivf, typeof(PIncReparto))).ToList();

                    if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                    {
                        var rr2 = Program.ProxyConsultas2.LeerIncidenciasRepartos(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                        var lr2 = rr2.Select(ivf => (PIncReparto)Ayudas.Transformar(ivf, typeof(PIncReparto))).ToList();
                        _datosVentas.IncRepartos.AddRange(lr2);
                    }
                }

                if (chVentas.Checked)
                {
                    if (!chRutasPrev.Checked || !chRutasPrev.Visible)
                    {
                        var vr = Program.ProxyConsultas.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "R");
                        _datosVentas.VentasRutas = vr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                        if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                        {
                            var rr  = Program.ProxyConsultas2.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "R");
                            var lr2 = rr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                            _datosVentas.VentasRutas.AddRange(lr2);
                            AgruparVentasRutas();
                        }

                        var vm = Program.ProxyConsultas.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "M");
                        _datosVentas.VentasMuni = vm.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                        if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                        {
                            var rr  = Program.ProxyConsultas2.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "M");
                            var lr2 = rr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                            _datosVentas.VentasMuni.AddRange(lr2);
                            AgruparVentasMuni();
                        }

                        var vv = Program.ProxyConsultas.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "V");
                        _datosVentas.VentasVend = vv.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                        if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                        {
                            var rr  = Program.ProxyConsultas2.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "V");
                            var lr2 = rr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                            _datosVentas.VentasVend.AddRange(lr2);
                            AgruparVentasVend();
                        }
                    }
                    else
                    {
                        var vr = Program.ProxyConsultas.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "RP");
                        _datosVentas.VentasRutas = vr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                        if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                        {
                            var rr  = Program.ProxyConsultas2.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "RP");
                            var lr2 = rr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                            _datosVentas.VentasRutas.AddRange(lr2);
                        }
                    }
                }
                if (chRepartos.Checked && chRepartos.Visible)
                {
                    var vr = Program.ProxyConsultas.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "REP");
                    _datosVentas.Repartos = vr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                    if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                    {
                        var rr  = Program.ProxyConsultas2.LeerVentas(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue, "REP");
                        var lr2 = rr.Select(ivf => (PInfVentasClientes)Ayudas.Transformar(ivf, typeof(PInfVentasClientes))).ToList();
                        _datosVentas.Repartos.AddRange(lr2);
                        AgruparRepartos();
                    }
                }
                if (chVentaDia.Checked)
                {
                    var vr = Program.ProxyConsultas.LeerVentasDias(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                    _datosVentas.VentasRutasD = vr.Select(ivf => (PInfVentasClientesD)Ayudas.Transformar(ivf, typeof(PInfVentasClientesD))).ToList();
                    if (Properties.Settings.Default.USAT != "*" && chAg.Checked)
                    {
                        var rr  = Program.ProxyConsultas2.LeerVentasDias(Parametros.IdEmpresa, Parametros.IdDelegacion, (DateTime)edFecIni.EditValue, (DateTime)edFecFin.EditValue);
                        var lr2 = rr.Select(ivf => (PInfVentasClientesD)Ayudas.Transformar(ivf, typeof(PInfVentasClientesD))).ToList();
                        _datosVentas.VentasRutasD.AddRange(lr2);
                        AgruparVentasRutasD();
                    }
                }
                e.Result = _datosVentas;
            }
        }