Esempio n. 1
0
        public void SetVersion()
        {
            vObjectProperty pr = GetProperty("VERSION");

            if (pr == null)
            {
                SetProperty(new SpecificationVersion(this));
            }
        }
Esempio n. 2
0
        public void SetPrToComposite(String cn, vObjectProperty newpr)
        {
            vObjectProperty pr = GetProperty(cn);

            if (pr == null)
            {
                SetProperty(pr = new PropertyComposite(cn, this));
            }
            ((PropertyComposite)pr).SetNewProperty(newpr);
        }
Esempio n. 3
0
        public GeographicCoordinates GetGeo()
        {
            vObjectProperty pr = GetProperty("GEO");

            if (pr == null)
            {
                throw new ReferenceToNonExistentPropertyException();
            }
            return((GeographicCoordinates)pr.Value);
        }
Esempio n. 4
0
        public void RemoveCategory(String ct)
        {
            vObjectProperty pr1 = GetProperty("CATEGORIES");
            Categories      pr  = (Categories)pr1;

            pr.RemoveCategory(ct);
            if (pr.empty())
            {
                RemoveProperty("CATEGORIES");
            }
        }
Esempio n. 5
0
        public void SetName(String nm)
        {
            vObjectProperty pr = GetProperty("N");

            if (pr == null)
            {
                SetProperty(new NameProperty(this, nm));
            }
            else
            {
                ((NameProperty)pr).SetName(nm);
            }
        }
Esempio n. 6
0
        public void SetOptionalProperty(String pn, String vl)
        {
            vObjectProperty pr = GetProperty(pn);

            if (pr == null)
            {
                SetProperty(new OptionalProperty(pn, this));
            }
            else
            {
                ((OptionalProperty)pr).SetValue(vl);
            }
        }
Esempio n. 7
0
        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);
            }
        }
Esempio n. 8
0
        public void SetDTEnd(ISODateTime vl)
        {
            vObjectProperty pr = GetProperty("DTEND");

            if (pr == null)
            {
                SetProperty(new EndDateTime(this, vl));
            }
            else
            {
                ((EndDateTime)pr).SetDTEnd(vl);
            }
        }
Esempio n. 9
0
        public void SetPriority(int p)
        {
            vObjectProperty pr = GetProperty("PRIORITY");

            if (pr == null)
            {
                SetProperty(new Priority(this, p));
            }
            else
            {
                ((Priority)pr).SetPriority(p);
            }
        }
Esempio n. 10
0
        public void SetTZ(TimeZoneValue tz)
        {
            vObjectProperty pr = GetProperty("TZ");

            if (pr == null)
            {
                SetProperty(new TZone(this, tz));
            }
            else
            {
                ((TZone)pr).SetTZ(tz);
            }
        }
Esempio n. 11
0
        public void SetSummary(String st)
        {
            vObjectProperty pr = GetProperty("SUMMARY");

            if (pr == null)
            {
                SetProperty(new Summary(this, st));
            }
            else
            {
                ((Summary)pr).SetSummary(st);
            }
        }
Esempio n. 12
0
        public void SetStatus(StatusValue.PosVal vl)
        {
            vObjectProperty pr = GetProperty("STATUS");

            if (pr == null)
            {
                SetProperty(new Status(this, vl));
            }
            else
            {
                ((Status)pr).SetStatus(vl);
            }
        }
Esempio n. 13
0
        public void SetCategory(String ct)
        {
            vObjectProperty pr = GetProperty("CATEGORIES");

            if (pr == null)
            {
                SetProperty(new Categories(this, ct));
            }
            else
            {
                ((CategoriesValue)(pr.Value)).SetNewCategory(ct);
            }
        }
Esempio n. 14
0
        public void SetProdID(TextValue prid)
        {
            vObjectProperty pr = GetProperty("PRODID");

            if (pr == null)
            {
                SetProperty(new ProductID(this, prid));
            }
            else
            {
                ((ProductID)pr).SetProdID(prid);
            }
        }
Esempio n. 15
0
        public void SetDCompleted(ISODateTime dt)
        {
            vObjectProperty pr = GetProperty("COMPLETED");

            if (pr == null)
            {
                SetProperty(new DateTimeCompleted(this, dt));
            }
            else
            {
                ((DateTimeCompleted)pr).SetDCompleted(dt);
            }
        }
Esempio n. 16
0
        public void SetDescription(String dscr)
        {
            vObjectProperty pr = GetProperty("DESCRIPTION");

            if (pr == null)
            {
                SetProperty(new Description(this, dscr));
            }
            else
            {
                ((Description)pr).SetDescription(dscr);
            }
        }
Esempio n. 17
0
        public void SetDue(ISODateTime vl)
        {
            vObjectProperty pr = GetProperty("DUE");

            if (pr == null)
            {
                SetProperty(new DueDateTime(this, vl));
            }
            else
            {
                ((DueDateTime)pr).SetDue(vl);
            }
        }
Esempio n. 18
0
        public void SetDCreated(ISODateTime vl)
        {
            vObjectProperty pr = GetProperty("DCREATED");

            if (pr == null)
            {
                SetProperty(new DateTimeCreated(this, vl));
            }
            else
            {
                ((DateTimeCreated)pr).SetDCreate(vl);
            }
        }
Esempio n. 19
0
        public void SetDTStart(ISODateTime vl)
        {
            vObjectProperty pr = GetProperty("DTSTART");

            if (pr == null)
            {
                SetProperty(new StartDateTime(this, vl));
            }
            else
            {
                ((StartDateTime)pr).SetDTStart(vl);
            }
        }
Esempio n. 20
0
        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)
 {
 }
Esempio n. 22
0
        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)
 {
 }
Esempio n. 25
0
        public CategoriesValue GetCategories()
        {
            vObjectProperty pr = GetProperty("CATEGORIES");

            return((CategoriesValue)(pr.Value));
        }
		public ValueParameter(vObjectProperty owner): base("VALUE",owner)
		{
		}
Esempio n. 27
0
		public void SetNewProperty(vObjectProperty pr)
		{
			_Properties.Add(pr);
		}
		public ValueParameter(vObjectProperty owner,String vt): base("VALUE",owner)
		{
			SetValue(vt);
		}
Esempio n. 29
0
        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);
                }
            }
        }
Esempio n. 30
0
        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;
 }
Esempio n. 32
0
        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);
 }
Esempio n. 34
0
        public TimeZoneValue GetTZ()
        {
            vObjectProperty pr = GetProperty("TZ");

            return((TimeZoneValue)pr.Value);
        }
Esempio n. 35
0
		public PropertyParameter(String nm,vObjectProperty parent)
		{
			_prname=nm;
			_paramowner=parent;
		}
Esempio n. 36
0
		public void SetPrToComposite(String cn,vObjectProperty newpr)
		{
			vObjectProperty pr=GetProperty(cn);
			if(pr==null)SetProperty(pr=new PropertyComposite(cn,this));
			((PropertyComposite)pr).SetNewProperty(newpr);
		}
Esempio n. 37
0
		protected void SetProperty(vObjectProperty prop)
		{
			_proplist.Add(prop);
		}
		public EncodingParameter(vObjectProperty owner,Encoder enc):base("ENCODING",owner)
		{
			ParameterValue=enc.EncoderName;
			ParameterOwner.enc=enc;
		}