public void drawBackground() { sResolution res = cDataBase.pResolution.getResolution(); sAttribute attr = new sAttribute(0, 0, (Int32)res.Xres, (Int32)res.Yres, "Background"); attr.pZPosition = -1000; if (res.Xres == 3840 && res.Yres == 2160 && System.IO.File.Exists(cDataBase.getPath("background3840.jpg"))) //4k { pDrawList.Add(new sGraphicImage(attr, "background3840.jpg")); } else if (res.Xres == 3200 && res.Yres == 1800 && System.IO.File.Exists(cDataBase.getPath("background3200.jpg"))) { pDrawList.Add(new sGraphicImage(attr, "background2560.jpg")); } else if (res.Xres == 2560 && res.Yres == 1440 && System.IO.File.Exists(cDataBase.getPath("background2560.jpg"))) //QHD (WQHD) { pDrawList.Add(new sGraphicImage(attr, "background2560.jpg")); } else if (res.Xres == 1920 && res.Yres == 1080 && System.IO.File.Exists(cDataBase.getPath("background1920.jpg"))) // FHD { pDrawList.Add(new sGraphicImage(attr, "background1920.jpg")); } else { pDrawList.Add(new sGraphicImage(attr, "background.jpg")); } }
public void draw(sAttribute attr) { sGraphicElement ele = null; Type type = attr.GetType(); if (type == typeof(sAttributeScreen)) { ele = new sGraphicScreen((sAttributeScreen)attr); } else if (type == typeof(sAttributeLabel)) { ele = new sGraphicLabel((sAttributeLabel)attr); } else if (type == typeof(sAttributePixmap)) { ele = new sGraphicPixmap((sAttributePixmap)attr); } else if (type == typeof(sAttributeWidget)) { //ele = new sGraphicRectangel((sAttributeWidget)attr, false, 1.0F, Color.GreenYellow); ele = new sGraphicWidget((sAttributeWidget)attr); } pDrawList.Add(ele); }
public void drawBackground() { sResolution res = cDataBase.pResolution.getResolution(); sAttribute attr = new sAttribute(0, 0, (Int32)res.Xres, (Int32)res.Yres, "Background"); attr.pZPosition = -1000; pDrawList.Add(new sGraphicImage(attr, "background.jpg")); }