public void SetVersion() { vObjectProperty pr = GetProperty("VERSION"); if (pr == null) { SetProperty(new SpecificationVersion(this)); } }
public void SetPrToComposite(String cn, vObjectProperty newpr) { vObjectProperty pr = GetProperty(cn); if (pr == null) { SetProperty(pr = new PropertyComposite(cn, this)); } ((PropertyComposite)pr).SetNewProperty(newpr); }
public GeographicCoordinates GetGeo() { vObjectProperty pr = GetProperty("GEO"); if (pr == null) { throw new ReferenceToNonExistentPropertyException(); } return((GeographicCoordinates)pr.Value); }
public void RemoveCategory(String ct) { vObjectProperty pr1 = GetProperty("CATEGORIES"); Categories pr = (Categories)pr1; pr.RemoveCategory(ct); if (pr.empty()) { RemoveProperty("CATEGORIES"); } }
public void SetName(String nm) { vObjectProperty pr = GetProperty("N"); if (pr == null) { SetProperty(new NameProperty(this, nm)); } else { ((NameProperty)pr).SetName(nm); } }
public void SetOptionalProperty(String pn, String vl) { vObjectProperty pr = GetProperty(pn); if (pr == null) { SetProperty(new OptionalProperty(pn, this)); } else { ((OptionalProperty)pr).SetValue(vl); } }
public void SetGeo(GeographicCoordinates newgeo) { vObjectProperty pr = GetProperty("GEO"); if (pr == null) { SetProperty(new GeographicPosition(this, newgeo)); } else { ((GeographicPosition)pr).SetCoord(newgeo.longitude, newgeo.latitude); } }
public void SetDTEnd(ISODateTime vl) { vObjectProperty pr = GetProperty("DTEND"); if (pr == null) { SetProperty(new EndDateTime(this, vl)); } else { ((EndDateTime)pr).SetDTEnd(vl); } }
public void SetPriority(int p) { vObjectProperty pr = GetProperty("PRIORITY"); if (pr == null) { SetProperty(new Priority(this, p)); } else { ((Priority)pr).SetPriority(p); } }
public void SetTZ(TimeZoneValue tz) { vObjectProperty pr = GetProperty("TZ"); if (pr == null) { SetProperty(new TZone(this, tz)); } else { ((TZone)pr).SetTZ(tz); } }
public void SetSummary(String st) { vObjectProperty pr = GetProperty("SUMMARY"); if (pr == null) { SetProperty(new Summary(this, st)); } else { ((Summary)pr).SetSummary(st); } }
public void SetStatus(StatusValue.PosVal vl) { vObjectProperty pr = GetProperty("STATUS"); if (pr == null) { SetProperty(new Status(this, vl)); } else { ((Status)pr).SetStatus(vl); } }
public void SetCategory(String ct) { vObjectProperty pr = GetProperty("CATEGORIES"); if (pr == null) { SetProperty(new Categories(this, ct)); } else { ((CategoriesValue)(pr.Value)).SetNewCategory(ct); } }
public void SetProdID(TextValue prid) { vObjectProperty pr = GetProperty("PRODID"); if (pr == null) { SetProperty(new ProductID(this, prid)); } else { ((ProductID)pr).SetProdID(prid); } }
public void SetDCompleted(ISODateTime dt) { vObjectProperty pr = GetProperty("COMPLETED"); if (pr == null) { SetProperty(new DateTimeCompleted(this, dt)); } else { ((DateTimeCompleted)pr).SetDCompleted(dt); } }
public void SetDescription(String dscr) { vObjectProperty pr = GetProperty("DESCRIPTION"); if (pr == null) { SetProperty(new Description(this, dscr)); } else { ((Description)pr).SetDescription(dscr); } }
public void SetDue(ISODateTime vl) { vObjectProperty pr = GetProperty("DUE"); if (pr == null) { SetProperty(new DueDateTime(this, vl)); } else { ((DueDateTime)pr).SetDue(vl); } }
public void SetDCreated(ISODateTime vl) { vObjectProperty pr = GetProperty("DCREATED"); if (pr == null) { SetProperty(new DateTimeCreated(this, vl)); } else { ((DateTimeCreated)pr).SetDCreate(vl); } }
public void SetDTStart(ISODateTime vl) { vObjectProperty pr = GetProperty("DTSTART"); if (pr == null) { SetProperty(new StartDateTime(this, vl)); } else { ((StartDateTime)pr).SetDTStart(vl); } }
public void SetCategories(CategoriesValue cts) { if (cts.catlist.Count == 0) { RemoveCategories(); return; } vObjectProperty pr = GetProperty("CATEGORIES"); if (pr == null) { SetProperty(new Categories(this, cts)); } else { ((Categories)pr).SetCategories(cts); } }
public EncodingParameter(vObjectProperty owner) : base("ENCODING", owner) { }
public ISODateTime GetLastModified() { vObjectProperty pr = GetProperty("LAST-MODIFIED"); return((ISODateTime)pr.Value); }
public EncodingParameter(vObjectProperty owner):base("ENCODING",owner) { }
public ValueParameter(vObjectProperty owner) : base("VALUE", owner) { }
public CategoriesValue GetCategories() { vObjectProperty pr = GetProperty("CATEGORIES"); return((CategoriesValue)(pr.Value)); }
public ValueParameter(vObjectProperty owner): base("VALUE",owner) { }
public void SetNewProperty(vObjectProperty pr) { _Properties.Add(pr); }
public ValueParameter(vObjectProperty owner,String vt): base("VALUE",owner) { SetValue(vt); }
public override void ParseFromStream(StreamReader sr) { String tkn = ""; while (true) { tkn = Parser.GetToken(sr); if (tkn == "END") { tkn = Parser.GetToken(sr); if (tkn != ":") { throw new InvalidDocumentStructureExeption(); } tkn = Parser.GetToken(sr); if (tkn != "VCALENDAR") { throw new InvalidDocumentStructureExeption(); } return; } vObjectProperty pr = null; switch (tkn) { case "BEGIN": { tkn = Parser.GetToken(sr); if (tkn != ":") { throw new InvalidDocumentStructureExeption(); } tkn = Parser.GetToken(sr); vObject ent = null; if (tkn == "VEVENT") { ent = new vEvent(); } if (tkn == "VTODO") { ent = new vTodo(); } if ((tkn != "VEVENT") && (tkn != "VTODO")) { throw new InvalidDocumentStructureExeption(); } ent.ParseFromStream(sr); AddEntity(ent); break; } case "GEO": pr = new GeographicPosition(this); break; case "PRODID": pr = new ProductID(this); break; case "TZ": pr = new TZone(this); break; case "VERSION": pr = new SpecificationVersion(this); break; default: if (tkn.Substring(0, 2) == "X-") // Extention property { pr = new ExtensionProperty(tkn, this); } else // Comment this if optional properties support is not required { pr = new OptionalProperty(tkn, this); } break; } if (pr != null) { pr.ParseFromStream(sr); SetProperty(pr); } } }
public VersionValue GetVersion() { vObjectProperty pr = GetProperty("VERSION"); return((VersionValue)pr.Value); }
public EncodingParameter(vObjectProperty owner, Encoder enc) : base("ENCODING", owner) { ParameterValue = enc.EncoderName; ParameterOwner.enc = enc; }
public override void ParseFromStream(StreamReader sr) { String tkn = ""; while (true) { tkn = Parser.GetToken(sr); if (tkn == "END") { tkn = Parser.GetToken(sr); if (tkn != ":") { throw new InvalidDocumentStructureExeption(); } tkn = Parser.GetToken(sr); if (tkn != "VTODO") { throw new InvalidDocumentStructureExeption(); } return; } vObjectProperty pr = null; switch (tkn) { case "BEGIN": throw new InvalidDocumentStructureExeption(); break; case "DCREATED": pr = new DateTimeCreated(this); break; case "COMPLETED": pr = new DateTimeCompleted(this); break; case "DESCRIPTION": pr = new Description(this); break; case "LAST-MODIFIED": pr = new LastModified(this); break; case "CATEGORIES": pr = new Categories(this); break; case "DUE": pr = new DueDateTime(this); break; case "DTEND": pr = new EndDateTime(this); break; case "PRIORITY": pr = new Priority(this); break; case "DTSTART": pr = new StartDateTime(this); break; case "SUMMARY": pr = new Summary(this); break; case "STATUS": pr = new Status(this); break; default: if (tkn.Substring(0, 2) == "X-") // Extention property { pr = new ExtensionProperty(tkn, this); } else // Comment this if optional properties support is not required { pr = new OptionalProperty(tkn, this); } break; } if (pr != null) { pr.ParseFromStream(sr); SetProperty(pr); } } }
public ValueParameter(vObjectProperty owner, String vt) : base("VALUE", owner) { SetValue(vt); }
public TimeZoneValue GetTZ() { vObjectProperty pr = GetProperty("TZ"); return((TimeZoneValue)pr.Value); }
public PropertyParameter(String nm,vObjectProperty parent) { _prname=nm; _paramowner=parent; }
public void SetPrToComposite(String cn,vObjectProperty newpr) { vObjectProperty pr=GetProperty(cn); if(pr==null)SetProperty(pr=new PropertyComposite(cn,this)); ((PropertyComposite)pr).SetNewProperty(newpr); }
protected void SetProperty(vObjectProperty prop) { _proplist.Add(prop); }
public EncodingParameter(vObjectProperty owner,Encoder enc):base("ENCODING",owner) { ParameterValue=enc.EncoderName; ParameterOwner.enc=enc; }