public void shouldCreateChronodexListFromTextTime() { ChronodexList cl = new ChronodexList(dayData_simple); Assert.AreEqual(expected: 4, actual: cl.getSectorsCount()); cl = new ChronodexList(dayData_complex); Assert.AreEqual(expected: 5, actual: cl.getSectorsCount()); }
public static Image CreateChronodex(ChronodexList cl) { if (cl.getSectorsCount() == 0) {return null;} Assembly myAssembly = Assembly.GetExecutingAssembly(); Stream myStream = myAssembly.GetManifestResourceStream("Chronodex"); Image myImage = Image.FromStream(myStream); myStream.Close(); Graphics go = Graphics.FromImage(myImage); LayoutChronodex(cl, go); // draw sectors ChronodexSector cs; cs = cl.getFirst(); DrawChronodexSector(cs, go); while (cl.getNext() != cs) { cl.moveForward(); DrawChronodexSector(cl.getCurrent(), go); } return myImage; }