public void InitPres() { Debuger.PrintLn("_pres of {0} {1} is null its reininitalasing", uid, name); _pres = new Pres(); Page p1 = new Page(5); p1.elements.Add(PageElement.NewText("Screen uid:", 0, 0, 1, FontType.fontnormal8px)); p1.elements.Add(PageElement.NewText(uid.ToString(), 0, 8, 1, FontType.fontnormal8px)); _pres.pages.Add(p1); Page p2 = new Page(5); p2.elements.Add(PageElement.NewText("Time Now:", 0, 0, 1, FontType.fontnormal8px)); p2.elements.Add(PageElement.NewTime(0, 8, 1, FontType.fontnormal8px)); p2.elements.Add(PageElement.NewDate(32, 8, 1, FontType.fontnormal8px)); _pres.pages.Add(p2); Page p3 = new Page(5); p3.elements.Add(PageElement.NewText("Mikołów pm2,5:", 0, 0, 1, FontType.fontnormal8px)); p3.elements.Add(PageElement.NewSensorPm2_5(444, 0, 8, 1, FontType.fontnormal8px)); _pres.pages.Add(p3); Page p4 = new Page(5); p4.elements.Add(PageElement.NewText("Mikołów pm10:", 0, 0, 1, FontType.fontnormal8px)); p4.elements.Add(PageElement.NewSensorPm10(444, 0, 8, 1, FontType.fontnormal8px)); _pres.pages.Add(p4); }
public void AddPM2_5TemplateClicked() { chooseTeamplate = false; Page p = new Page(10); p.elements.Add(PageElement.NewText("Pm2.5", 0, 0, 1, FontType.fontfat8px)); p.elements.Add(PageElement.NewSensorPm2_5(Pres.UnifiedIdx, 35, 0, 1, FontType.fontfat8px)); p.elements.Add(PageElement.NewText("Pm2.5", 0, 8, 1, FontType.fontfat8px)); PageElement pe = PageElement.NewSensorPm2_5(Pres.UnifiedIdx, 35, 8, 1, FontType.fontfat8px); pe.type = ElementType.SENSOR_PM2_5_PERCENT; p.elements.Add(pe); Pres.pages.Add(p); }