Archive for mayo 2011

Seleccionar un archivo, con un item de un PropertyGrid

Se debe crear una clase que derive de UITypeEditor

public class MyControl : Control
{
    string filePath;
    [Editor(typeof(FileLocationEditor), typeof(UITypeEditor))]
    public string FilePath
   {
        get { return filePath; }
        set { filePath = value; }
    }
}

public class FileLocationEditor : UITypeEditor
{
        public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) {
        return UITypeEditorEditStyle.Modal;
    }

    public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
   {
        using (OpenFileDialog ofd = new OpenFileDialog())
          {
            // set file filter info here
            if (ofd.ShowDialog() == DialogResult.OK) {
                return ofd.FileName;
            }
        }
      return value;
  }
lunes, mayo 30, 2011
Posted by Carlos

Que es postear



Remitir un mensaje al público mediante un foro, bitácora, grupo de noticias u otro medio informático similar

Un post se traduce en español como ‘artículo’, aunque se suele utilizar con la terminología inglesa o el nombre de ‘entradas’ en la publicaciones hechas en blogs.
Los posts son los artículos que vamos publicando en la parte central del blog y que se ordenan de manera cronológica. Por lo general, los posts tienen un titular, un cuerpo del artículo donde se puede introducir texto, fotografía, código html e incluso audio.
Los posts están archivados por categorías y también se acompañan de palabras clave relacionadas con el contenido del artículo.
Además, por lo general, los posts permiten que los lectores realicen comentarios, aunque es una función que se puede habilitar o deshabilitar en función de interés del autor del blog.
Este pequeño artículo que estás leyendo es un post!!!


viernes, mayo 27, 2011
Posted by Carlos

How big should text be? What's the ideal font size?

How can you be certain that everyone in the audience can read the text on your slides?
While the fonts and colors you choose have a definite impact on legibility, the single biggest factor is text size. The 8H rule is the time-honored way to make sure that even the folks in the back row can read the text on your slides.
The 8H rule says that the maximum viewing distance shouldn't be more than 8 times the height (H) of the screen; if that condition is met then as long as your text is at least 1/50th the height of the screen, then it'll be legible at the maximum viewing distance. That assumes that the person in the back row has good eyes, that the projected image is perfectly crisp, and that no other factors interfere. And it's an absolute minimum, not a recommended size.
A normal screen show slide in PowerPoint is 7.5 inches or 540 points tall, so the absolute, don't go below it minimum text size would be 540 / 50 or roughly 11 point text. For 35mm slides or good quality overheads, that's not unreasonable. For screenshow projection, it's wildly optimistic. You simply can't form legible text at this height ... roughly 12 pixels ... in most fonts. For projected 800x600 screens, I'd at least double that, or use 1/25th the screen height to determine minimum text size. That translates to roughly 22 points. Use 24 points to give yourself some extra leeway in case projection conditions or your audience's vision aren't perfect (they won't be).
Keep in mind that your screen may not be big enough to meet the 8H rule. If not, you'll have to compensate. For example, if the screen is 5 feet high in an 80 foot deep room, it's only half the recommended size, so you'll need to double the minimum text height to compensate.
miércoles, mayo 25, 2011
Posted by Carlos

Script para mostrar tablas segun su tamaño físico y numero de registros

Select Tabla,
       cast(Reservado    * d.low as int) ReservadoKB,
       cast(Data         * d.low as int) DatosKB,
       cast((Usado-Data) * d.low as int) IndicesKB,
       cast((Reservado-Data) * d.low as int) NoUsadoKB,
       registros
from (
select left(o.name,35) Tabla, o.id, ii.reserved Reservado,
      isnull(ip1.pages, 0) + isnull(ip2.pages, 0) data,
      ip3.usado,   --indexp= usado - data    no usado = reserved - usado
      r.Registros
from sysobjects o
inner join sysindexes ii on o.id = ii.id
inner join (select id, sum(dpages) pages from sysindexes where indid < 2 group by id) ip1
     on o.id = ip1.id
left  join (select id, isnull(sum(used), 0) pages from sysindexes where indid = 255 group by id) ip2
     on o.id = ip2.id
inner join (select id, sum(used) Usado from sysindexes where indid in (0, 1, 255) group by id) ip3
     on o.id = ip3.id
inner join (select id, rows Registros from sysindexes where indid < 2) r
     on o.id = r.id
where o.xtype = 'U'
and   ii.indid in (0, 1, 255)
) A, master.dbo.spt_values D
where D.number = 1
and   D.type = 'E'
lunes, mayo 23, 2011
Posted by Carlos

Populares!

- Copyright © - Oubliette - -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -