예제 #1
0
        public override void load(StreamReader reader, CMyPointFactory factory)
        {
            reader.ReadLine();
            string line = reader.ReadLine();

            string[] split = line.Split(new Char[] { ' ', ',', '(', ')', '[', ']', '\n' });
            r        = Convert.ToInt32(split[2]);
            x        = Convert.ToInt32(split[5]);
            y        = Convert.ToInt32(split[6]);
            ObjColor = Color.FromName(split[11]);
        }
예제 #2
0
        public override void load(StreamReader reader, CMyPointFactory factory)
        {
            string line = reader.ReadLine();

            string[] split = line.Split(new Char[] { ' ', ',', '(', ')', '\n' });
            count = Convert.ToInt32(split[3]);
            group = new CPoint[count];
            for (int i = 0; i < count; i++)
            {
                line     = reader.ReadLine();
                group[i] = factory.createPoint(line);
                group[i].load(reader, factory);
            }
        }
예제 #3
0
파일: Form1.cs 프로젝트: aisyluG/OOP_labs
        public void loadFromFile(string file)
        {
            StreamReader reader = new StreamReader(file, System.Text.Encoding.Default);
            string       line;

            line = reader.ReadLine();
            string[] split = line.Split(new Char[] { ' ', ',', '(', ')', '\n' });
            Count = Convert.ToInt32(split[3]);
            arr   = new CPoint[Count];
            CMyPointFactory factory = new CMyPointFactory();

            for (int i = 0; i < Count; i++)
            {
                line   = reader.ReadLine();
                arr[i] = factory.createPoint(line);
                arr[i].load(reader, factory);
            }
            reader.Close();
            notifyEveryone();
        }
예제 #4
0
파일: Command.cs 프로젝트: aisyluG/OOP_labs
 public CreateCommand()
 {
     factory = new CMyPointFactory();
     p       = null;
 }
예제 #5
0
 public override void load(StreamReader reader, CMyPointFactory factory)
 {
     point.load(reader, factory);
 }
예제 #6
0
파일: CPoint.cs 프로젝트: aisyluG/OOP_labs
 virtual public void load(StreamReader reader, CMyPointFactory factory)
 {
 }