Exemple #1
0
 public Story(string Data)
 {
     char[]   chars = { '>', '=', '#' };
     string[] data  = Data.Split(chars);
     this.State    = data[0];
     this.Place    = data[1];
     this.Fact     = data[2];
     this.Date     = Methods.CreateDate(data[3]);
     this.Location = new Point();
 }
Exemple #2
0
 public Suspect(string Data)
 {
     History = new StoryCollection();
     Char[]   a       = new Char[] { '~' };
     string[] alldata = Data.Split(a);
     this.PhysData    = new HumanPhysData(alldata[0], alldata[1], alldata[2], Methods.CreateDate(alldata[3]), alldata[4], alldata[5], alldata[6], alldata[7], Convert.ToInt32(alldata[8]));
     this.CrimeNumber = Convert.ToInt32(alldata[9]);
     this.LastCrime   = Methods.SetCrime(alldata[10], '>');
     this.IfWife      = Convert.ToBoolean(alldata[11]);
     this.IfChildren  = Convert.ToBoolean(alldata[12]);
     this.LastSeen    = alldata[13];
     this.Crimes      = CreateDictionary(alldata[14]);
     this.SearchedIn  = alldata[15];
     this.Status      = alldata[16];
     this.PicLoc      = alldata[17];
     History.FillCollection(alldata[18]);
 }
Exemple #3
0
        protected virtual Dictionary <Crime, DateTime> CreateDictionary(string param)
        {
            Dictionary <Crime, DateTime> result = new Dictionary <Crime, DateTime>();

            Char[]   Characters = new Char[] { ',' };
            string[] a          = param.Split(Characters);
            for (int i = 0; i < a.Length; i++)
            {
                result.Add(Methods.SetCrime(a[i].Substring(0, a[i].IndexOf(':')), '>'), Methods.CreateDate(a[i].Substring(a[i].IndexOf(':') + 1)));
            }
            return(result);
        }