Exemplo n.º 1
0
        /// <summary>
        /// constructor.
        /// </summary>
        public ImageWebModel()
        {
            //this.tcpClient = ServiceTcpClient.Instance;
            this.outputDirModel = OutputDirModel.Instance;

            //IsConnected = this.tcpClient.Connected();

            IsConnected = this.outputDirModel.GetTcpClient().Connected();

            OutputDir = this.outputDirModel.OutputDir;

            /*
             * int filesCounter = Directory.GetFiles(OutputDir, "*", SearchOption.AllDirectories).Length;
             * PhotosNum = (filesCounter / 2).ToString();
             */
            StudentsInformation = new List <StudentsInfo>();
            string[] studentsInfoLines = File.ReadAllLines(HttpContext.Current.Server.MapPath("~/App_Data/StudentsInfo.txt"));
            foreach (string line in studentsInfoLines)
            {
                string[] info = line.Split(' ');
                StudentsInformation.Add(new StudentsInfo(info[0], info[1], info[2]));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// constructor.
 /// </summary>
 public PhotosModel()
 {
     this.outputDirModel = OutputDirModel.Instance;
     OutputDir           = this.outputDirModel.OutputDir;
     PhotosInformation   = new List <PhotoInfo>();
 }