Ejemplo n.º 1
0
    public void initializeCsv()
    {
        string outputPath = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "OutputFolderPath");

        outputPath = outputPath + ProfileManager.Instance.profiles[ProfileManager.Instance.currentProfile] + "\\" + ProfileManager.Instance.evaluations[ProfileManager.Instance.currentEvaluation] + "\\";
        System.IO.Directory.CreateDirectory(outputPath);
        currentCsv = new CsvCreator(outputPath);
    }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            var natural = args.Length > 1 && args[1] == "1";

            Console.WriteLine("{0:T} Parsowanie plików TERYT...", DateTime.Now);
            var teryt = new Parser().Parse();

            Console.WriteLine("{0:T} Tworzenie pliku CSV.", DateTime.Now);
            var locations = new CsvCreator().Create(teryt, natural);

            new CSVparser().Export(locations);

            Console.WriteLine("{0:T} Plik został zapisany ", DateTime.Now);
//
            Console.ReadKey();
        }
Ejemplo n.º 3
0
        public static void runMapTool(NameValueCollection loginData)
        {
            FileInfo svgMap = new FileInfo(SVGFileName);

            startTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
            // If the map does not exists, try to download it

            if (!svgMap.Exists)
            {
                HttpClientForKosmor.Login(loginData);
                HttpClientForKosmor.DownloadMap();
            }

            /*
             * If the -date parameter is used, the user has to input the date he
             * wishes to use in place of the current date
             */
            /*		if (useCustomDate) {
             *              System.out.println("Please set the date");
             *              BufferedReader reader = new BufferedReader(
             *                      new InputStreamReader(System.in));
             *              SimpleDateFormat df = new SimpleDateFormat("dd.MM.yyyy HH");
             *              MapTool.date = df.parse(reader.readLine());
             *              cal = MapTool.dateToGMTDate(MapTool.date);
             *          }*/



            planetLister = new PlanetLister(date, getKosmorDate());
            HtmlBuilder.writeHTML(writeWarplanets, writePlanets,
                                  writeNeutral, date,
                                  loginData, fetchInfo);

            if (writeCSV)
            {
                CsvCreator csvCreator = new CsvCreator();
                csvCreator.WriteCSV(date, warplanetList, planetList);
            }

            //XMLParserWriter.serialize(MapTool.planetLister);

            endTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
            long time = (endTime - startTime) / 1000;
        }
Ejemplo n.º 4
0
        public HttpResponseMessage GenerateCsv(ReportPeriod reportPeriod)
        {
            ReportCreator csvCreator = new CsvCreator();

            Report rep = csvCreator.GenerateReport(reportPeriod);

            var result = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new ByteArrayContent(rep.Data)
            };

            result.Content.Headers.ContentDisposition =
                new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment")
            {
                FileName = "Report" + DateTime.Now + ".csv"
            };
            result.Content.Headers.ContentType =
                new MediaTypeHeaderValue("application/octet-stream");

            return(result);
        }
Ejemplo n.º 5
0
    public void Initialize()
    {
        Scope = ProfileManager.Instance.currentEvaluationScope;
        cam   = Camera.main;
        transform.SetParent(cam.transform);
        if (useGazeTracker)
        {
            GameObject go = Instantiate(uvplane, Vector3.zero, Quaternion.identity) as GameObject;
            go.transform.SetParent(Camera.main.transform);
            go.transform.position = Vector3.zero;
            gazeIndicator         = go.transform;
        }

        //initialising GazeData stabilizer
        gazeUtils = new GazeDataValidator(30);

        //activate C# TET client, default port
        GazeManager.Instance.Activate
        (
            GazeManager.ApiVersion.VERSION_1_0,
            GazeManager.ClientMode.Push
        );

        //register for gaze updates
        GazeManager.Instance.AddGazeListener(this);

        /*
         * Initializes the CvsCreator to store data in a log
         */
        dataLogPath = GLPlayerPrefs.GetString(Scope, "TheEyeTribeDataPath");
        Debug.Log("eyetribe path: " + GLPlayerPrefs.GetString(Scope, "TheEyeTribeDataPath"));
        if (dataLogPath.Equals(""))
        {
            csvCreator = new CsvCreator("EyeTribeDataLog\\data.csv");
        }
        else
        {
            csvCreator = new CsvCreator(dataLogPath);
        }
    }
Ejemplo n.º 6
0
    public void StartNeuroSkyData()
    {
        transform.SetParent(Camera.main.transform);
        Scope = ProfileManager.Instance.currentEvaluationScope;
        GameObject prefab = Instantiate(TCGConnectionPrefab, Vector3.zero, Quaternion.identity) as GameObject;

        controller = prefab.GetComponent <TGCConnectionController>();

        if (usePoorSignal)
        {
            controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        }

        if (useAttention)
        {
            controller.UpdateAttentionEvent += OnUpdateAttention;
        }

        if (useMeditation)
        {
            controller.UpdateMeditationEvent += OnUpdateMeditation;
        }

        if (useBlink)
        {
            controller.UpdateBlinkEvent += OnUpdateBlink;
        }


        if (useDelta)
        {
            controller.UpdateDeltaEvent += OnUpdateDelta;
        }

        if (useTheta)
        {
            controller.UpdateThetaEvent += OnUpdateTheta;
        }

        if (useLowAlpha)
        {
            controller.UpdateLowAlphaEvent += OnUpdateLowAlpha;
        }

        if (useHighAlpha)
        {
            controller.UpdateHighAlphaEvent += OnUpdateHighAlpha;
        }


        if (useLowBeta)
        {
            controller.UpdateLowBetaEvent += OnUpdateLowBeta;
        }

        if (useHighBeta)
        {
            controller.UpdateHighBetaEvent += OnUpdateHighBeta;
        }

        if (useLowGamma)
        {
            controller.UpdateLowGammaEvent += OnUpdateLowGamma;
        }

        if (useHighGamma)
        {
            controller.UpdateHighGammaEvent += OnUpdateHighGamma;
        }

        /*
         * Initializes the CvsCreator to store data in a log
         */
        dataLogPath = GLPlayerPrefs.GetString(Scope, "NeuroSkyMindwaveDataPath");
        Debug.Log("neurosky path: " + GLPlayerPrefs.GetString(Scope, "NeuroSkyMindwaveDataPath"));
        if (dataLogPath.Equals(""))
        {
            csvCreator = new CsvCreator("NeuroSkyMindwaveDataLog\\data.csv");
        }
        else
        {
            csvCreator = new CsvCreator(dataLogPath);
        }
    }