Esempio n. 1
0
        private void ARITHOP()
        {
            Needing(new SymbolType[] { SymbolType.STRING, SymbolType.DOUBLE, SymbolType.DOUBLE });
            var op = DATA.Pop();
            var lh = DATA.Pop();
            var rh = DATA.Pop();

            switch (op.Value.ToString())
            {
            case "+":
                DATA.Push(SYMTAB.CreateSymbol(SymbolType.DOUBLE, (double)lh.Value + (double)rh.Value));
                break;

            case "-":
                DATA.Push(SYMTAB.CreateSymbol(SymbolType.DOUBLE, (double)lh.Value - (double)rh.Value));
                break;

            case "*":
                DATA.Push(SYMTAB.CreateSymbol(SymbolType.DOUBLE, (double)lh.Value * (double)rh.Value));
                break;

            case "/":
                DATA.Push(SYMTAB.CreateSymbol(SymbolType.DOUBLE, (double)lh.Value / (double)rh.Value));
                break;
            }
        }
Esempio n. 2
0
        private void ASNUM()
        {
            DataNeeds(1);
            var val = DATA.Pop();

            DATA.Push(SYMTAB.CreateSymbol(SymbolType.DOUBLE, double.Parse(val.Value.ToString())));
        }
Esempio n. 3
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from o in data.orderList
                         group o by o.OrderId into g
                         select new { ID = g.Key, List = g.ToList() };

            // LAMBDA
            var result2 = data.orderList.GroupBy(o => o.OrderId,
                                                 (key, g) => new
            {
                ID   = key,
                List = g.ToList()
            });


            Console.WriteLine("\nGroup:");
            Console.WriteLine("Vstupni pole: order list");
            Console.WriteLine("Sloucim do skupiny [GroupBy] podle OrderId.");
            foreach (var item in result2)
            {
                Console.WriteLine("Key: {0} with list: {1}", item.ID, string.Join(",", item.List));
            }
        }
Esempio n. 4
0
        private void SetData()
        {
            if (Request.IsAjaxRequest())
            {
                try
                {
                    var form = Request.Form;
                    DATA = form.ToDictionary(); //JsonConvert.DeserializeObject<Dictionary<string, string>>(form);
                }
                catch (Exception e)
                {
                    var ex = e.Message;
                    DATA = new Dictionary <string, string>();
                }
            }
            else
            {
                DATA = Request.Form.ToDictionary();
            }
            var dataUrls = GetDataFromRawUrl(Request.RawUrl);

            if (!Equals(dataUrls, null))
            {
                foreach (var item in dataUrls)
                {
                    DATA.Add(item.Key, item.Value);
                }
            }
        }
Esempio n. 5
0
        private void lector_DataEvent(DATA accion, string codigo)
        {
            switch (accion)
            {
            case DATA.DATA_ENROLL:
                //registrarHuella(codigo);
                break;

            case DATA.DATA_IDENTIFY_CAPTURE:
            {
                GestorDePersonas gestorPersonas = new GestorDePersonas();
                Persona          persona        = gestorPersonas.validarUsuario(codigo, lector);
                if (persona != null)
                {
                    speechSynth.SelectVoice("ScanSoft Isabel_Dri40_16kHz");
                    speechSynth.Speak("Bienvenida Alicia");

                    MessageBox.Show("Persona reconocida", "Atención", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Persona no reconocida", "Atención", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                break;
            }
            }
        }
Esempio n. 6
0
    private void MainPageListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        ListView list     = sender as ListView;
        DATA     selected = (DATA)list.SelectedItem;

        passData.Add(selected);
    }
Esempio n. 7
0
 private void DATA_Click(object sender, EventArgs e)
 {
     if (DATA.Text.Equals("    -  -"))
     {
         DATA.Select(0, 0);
     }
 }
Esempio n. 8
0
            public FichierPOR(String CheminFichier, DATA data)
            {
                _CheminFichier = CheminFichier;
                _Data          = data;

                _Fonctions = new Dictionary <string, Action <StreamReader> >();
                //fonctions.Add("debut du fichier", null);
                //fonctions.Add("version", null);
                //fonctions.Add("SI", null);
                //fonctions.Add("nom du fichier", null);
                //fonctions.Add("date", null);
                //fonctions.Add("heure", null);
                //fonctions.Add("ossature", null);
                _Fonctions.Add("noeuds", PNoeud);
                _Fonctions.Add("poutres", PPoutre);
                _Fonctions.Add("sections", PSection);
                _Fonctions.Add("materiaux", PMateriau);
                //fonctions.Add("liaisons", null);
                //fonctions.Add("gpesanteur", null);
                _Fonctions.Add("cas de charges", PCasDeCharge);
                _Fonctions.Add("combinaisons", PCombinaison);
                //fonctions.Add("modes propres", null);
                //fonctions.Add("maillage", null);
                //fonctions.Add("fin du fichier", null);
            }
Esempio n. 9
0
    //Saves data from the game
    public bool SaveGame()
    {
        try
        {
            string path = Application.persistentDataPath + "/SaveData";
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            path += "/ProfileData";
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Create(path + "/profile" + profileNo + ".dat");

            DATA d = new DATA();
            d.name            = proName;
            d.currentID       = currentHub;
            savedID           = currentHub;
            d.collectedAmount = collectedAmount;
            savedAmount       = collectedAmount;

            bf.Serialize(file, d);
            file.Close();
            return(true);
        }
        catch (Exception ex)
        {
            Debug.Log(ex.ToString());
            return(false);
        }
    }
Esempio n. 10
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from c in data.customerList
                         join o in data.orderList on c.CustomerId equals o.OrderId into g
                         select new
                         {
                             Cus = c.Name, 
                             Grp = g
                         };

            // LAMBDA
            var result2 = data.customerList.GroupJoin(data.orderList,
                customer => customer.CustomerId,
                order => order.OrderId,
                (customer, g) => new
                {
                    Cus = customer.Name,
                    Grp = g.ToList()
                });


            Console.WriteLine("\nGroupJoin:");
            Console.WriteLine("Vstupni pole: customer a order list");
            Console.WriteLine("Spojim [Join] a sloucim do skupiny [Group] podle CustomerId a OrderId.");
            foreach (var item in result2)
            {
                Console.WriteLine("Group: {0} with list: {1}", item.Grp, item.Cus);
            }
        }
Esempio n. 11
0
        public void load(string file)
        {
            byte[]       f  = File.ReadAllBytes(file);
            BinaryReader br = new BinaryReader(new MemoryStream(f, 0, f.Length));

            hdr.parseHeader(br);
            readEntries(br);

            for (int i = 0; i < amtaData.Count; i++)
            {
                f  = amtaData[i];
                br = new BinaryReader(new MemoryStream(f, 0, f.Length));
                AMTA amta = new AMTA();
                amta.parseAMTA(br);
                DATA data = new DATA();
                data.parseDATA(br);
                MARK mark = new MARK();
                mark.parseMARK(br);
                EXT_ ext = new EXT_();
                ext.parseEXT_(br);
                STRG strg = new STRG();
                strg.parseSTRG(br);
                strgList.Add(strg);
                br.Close();
            }
        }
Esempio n. 12
0
    /**
     * 에너지 추가 남은 시간을 확인 및 UI 변경하는 코르틴함수
     */
    IEnumerator EnergyChargeText()
    {
        DATA data = DATA.getData();                                             // 저장 데이터 클래스 가져오기

        System.DateTime saveTime = System.Convert.ToDateTime(data.ENERGYTIME);  // 저장된 마지막 시간 가져오기
        System.DateTime dateTime = System.DateTime.Now;                         // 현재시간 가져오기
        System.TimeSpan timeCal  = dateTime - saveTime;                         // 현재시간과 저장된 시간 차이 구하기

        Debug.Log(timeCal.Seconds);
        int seconds = 180 - timeCal.Seconds;                                     // 초 구하기

        do
        {
            yield return(new WaitForSeconds(1));

            seconds -= 1;
            ReflashEnergyTimeText(seconds);

            if (seconds == 0)
            {
                energy += 1;
                DATA.getData().ENERGY = energy;
                if (energy < 7)
                {
                    seconds = 180;
                }
                ReflashEnergyText();
            }
        } while(energy < 7);

        ReflashEnergyTimeText(0);
    }
Esempio n. 13
0
        static void Main(string[] args)
        {
            DATA[] Data = new DATA[2];

            Data[0].var1 = 1;
            Data[0].var2 = 0.5f;
            Data[0].str1 = "Test1";
            Data[1].var1 = 2;
            Data[1].var2 = 1.5f;
            Data[1].str1 = "Test2";

            using (FileStream fs1 =
                       new FileStream("test.dat", FileMode.Create))
            {
                BinaryFormatter bf = new BinaryFormatter();
                bf.Serialize(fs1, Data);
            }

            DATA[] ResultData;

            using (FileStream fs2 = new FileStream("test.dat", FileMode.Open))
            {
                BinaryFormatter bf2 = new BinaryFormatter();
                ResultData = (DATA[])bf2.Deserialize(fs2);
            }

            for (int i = 0; i < 2; i++)
            {
                Console.WriteLine("{0} {1} {2}",
                                  ResultData[i].var1, ResultData[i].var2, ResultData[i].str1);
            }
        }
Esempio n. 14
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from c in data.customerList
                         join o in data.orderList on c.CustomerId equals o.OrderId
                         select new { c.Name, o.OrderName };

            // LAMBDA
            var result2 = data.customerList.Join(data.orderList,
                c => c.CustomerId,
                o => o.OrderId,
                (c, o) => new 
                { 
                    c.Name, 
                    o.OrderName
                });


            Console.WriteLine("\nJoin:");
            Console.WriteLine("Vstupni pole: customer list a order list");
            Console.WriteLine("Spojim [Join]  podle CustomerId a OrderId.");
            foreach (var group in result)
            {
                Console.WriteLine("Customer: {0} bought {1}", group.Name, group.OrderName);
            }
        }
Esempio n. 15
0
    public void ScoreCalculation()
    {
        // 플레이어 스코어값 가져오기
        score = GameManager.SingleTon.GetScore();

        // 게임매니저 최대이동거리 값 가져오기
        float distance = GameManager.SingleTon.GetDistance();

        // 저장된 거리값과 비교 - 크면 새로운 값 저장
        if (DATA.getData().MAXDISTANCE < distance)
        {
            DATA.getData().MAXDISTANCE = (int)distance;
            SocialManager.AchievementsCheck(distance);
        }

        // 저장된 스코어 비교 - 크면 새로운 값 저장
        if (DATA.getData().BESTSCORE < score)
        {
            DATA.getData().BESTSCORE = score;
        }

        // 스코어의 10% 돈으로 저장
        DATA.getData().MONEY += (score / 10);

        StartCoroutine(ScoreAnimation());
    }
Esempio n. 16
0
 public BNKFile(string fileLocation, bool isAudioBank = false, bool isEventBank = false, bool isChampionBank = false, bool extractAudio = false)
 {
     fileLoc = fileLocation;
     br      = new BinaryReader(File.Open(fileLocation, FileMode.Open));
     if (isAudioBank == true)
     {
         bkhd = new BKHD(br);
         if (isChampionBank == true)
         {
             br.ReadBytes(12);
         }
         didx = new DIDX(br);
         data = new DATA(br, didx, bkhd);
         if (extractAudio == true)
         {
             foreach (var a in didx.Files)
             {
                 Console.ForegroundColor = ConsoleColor.Cyan;
                 Console.WriteLine("Extracting " + a.ID.ToString() + ".wem");
                 DIDXEmbeddedWEMFile.ExportAudio(a.ID.ToString() + ".wem", a.Data, this);
             }
         }
     }
     else if (isEventBank == true)
     {
         bkhd = new BKHD(br);
     }
 }
Esempio n. 17
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from o in data.orderList
                         group o by o.OrderId into g
                         select new { ID = g.Key, List = g.ToList() };

            // LAMBDA
            var result2 = data.orderList.GroupBy(o => o.OrderId,
                (key, g) => new
                {
                    ID = key,
                    List = g.ToList()
                });


            Console.WriteLine("\nGroup:");
            Console.WriteLine("Vstupni pole: order list");
            Console.WriteLine("Sloucim do skupiny [GroupBy] podle OrderId.");
            foreach (var item in result2)
            {
                Console.WriteLine("Key: {0} with list: {1}", item.ID, string.Join(",",  item.List));
            }
        }
Esempio n. 18
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from c in data.customerList
                         join o in data.orderList on c.CustomerId equals o.OrderId into g
                         select new
            {
                Cus = c.Name,
                Grp = g
            };

            // LAMBDA
            var result2 = data.customerList.GroupJoin(data.orderList,
                                                      customer => customer.CustomerId,
                                                      order => order.OrderId,
                                                      (customer, g) => new
            {
                Cus = customer.Name,
                Grp = g.ToList()
            });


            Console.WriteLine("\nGroupJoin:");
            Console.WriteLine("Vstupni pole: customer a order list");
            Console.WriteLine("Spojim [Join] a sloucim do skupiny [Group] podle CustomerId a OrderId.");
            foreach (var item in result2)
            {
                Console.WriteLine("Group: {0} with list: {1}", item.Grp, item.Cus);
            }
        }
Esempio n. 19
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from o in data.orderList
                         orderby o.OrderName
                         select new { ID = o.OrderId, Name = o.OrderName };

            // LAMBDA

            /*
             * var result2 = data.orderList.OrderBy(o => o.OrderName, () => new
             * {
             *  ID = o.
             *  Name = o.
             * });
             */

            Console.WriteLine("\nOrder by:");
            Console.WriteLine("Vstupni pole: order list");
            Console.WriteLine("Seradim pole [OrderBy] podle OrderId.");
            foreach (var item in result)
            {
                Console.WriteLine("Id: {0}, name: {1}", item.ID, item.Name);
            }
        }
Esempio n. 20
0
            public BAR(Stream stream)
            {
                var data = new byte[0x10];

                stream.Read(data, 0, data.Length);

                header.magic  = DATA.ByteToInt(data, 0, 4);
                header.count  = DATA.ByteToInt(data, 4, 4);
                header.dunno1 = DATA.ByteToInt(data, 8, 4);
                header.dunno2 = DATA.ByteToInt(data, 12, 4);

                if (header.magic != MagicCode)
                {
                    throw new InvalidDataException();
                }

                if (header.count != 0)
                {
                    entries = new Entry[header.count];
                    for (int i = 0; i < header.count; i++)
                    {
                        stream.Read(data, 0, data.Length);
                        entries[i].type     = DATA.ByteToInt(data, 0, 4);
                        entries[i].name     = DATA.ByteToInt(data, 4, 4);
                        entries[i].position = DATA.ByteToInt(data, 8, 4);
                        entries[i].size     = DATA.ByteToInt(data, 12, 4);
                    }
                }
                this.stream = stream;
            }
        private void Country()
        {
            ddlCountry.Items.Clear();
            ddlCountry2.Items.Clear();
            ddlCountry3.Items.Clear();
            con.Open();
            SqlCommand Show = new SqlCommand();

            Show.Connection  = con;
            Show.CommandText = @"select ID, Name from Country order by Name";
            SqlDataReader DATA;

            DATA = Show.ExecuteReader();
            ddlCountry.Items.Add(new ListItem("Select Country", "0"));
            ddlCountry2.Items.Add(new ListItem("Select Country", "0"));
            ddlCountry3.Items.Add(new ListItem("Select Country", "0"));
            while (DATA.Read())
            {
                ListItem new_Item = new ListItem();
                new_Item.Text  = DATA["Name"].ToString();
                new_Item.Value = DATA["ID"].ToString();
                ddlCountry.Items.Add(new_Item);
                ddlCountry2.Items.Add(new_Item);
                ddlCountry3.Items.Add(new_Item);
            }
            con.Close();
        }
Esempio n. 22
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from c in data.customerList
                         join o in data.orderList on c.CustomerId equals o.OrderId
                         select new { c.Name, o.OrderName };

            // LAMBDA
            var result2 = data.customerList.Join(data.orderList,
                                                 c => c.CustomerId,
                                                 o => o.OrderId,
                                                 (c, o) => new
            {
                c.Name,
                o.OrderName
            });


            Console.WriteLine("\nJoin:");
            Console.WriteLine("Vstupni pole: customer list a order list");
            Console.WriteLine("Spojim [Join]  podle CustomerId a OrderId.");
            foreach (var group in result)
            {
                Console.WriteLine("Customer: {0} bought {1}", group.Name, group.OrderName);
            }
        }
Esempio n. 23
0
 public static bool Login(string userName, string password /*, string deviceID*/)
 {
     using (DATA db = new DATA())
     {
         return(db.Users.Any(u => u.userName == userName && u.Password == password /*&& u.deviceID == deviceID*/));
     }
 }
Esempio n. 24
0
    public MainPage()
    {
        this.InitializeComponent();

        myData = new DATA[20] {
            new DATA("Breakfast", 4.00, "Gourment Pancakes"),
            new DATA("Breakfast", 6.00, "Eggs & Toast"),
            new DATA("Breakfast", 7.50, "Oatmeal with OJ"),
            new DATA("Breakfast", 10.75, "Fresh Waffles"),
            new DATA("Breakfast", 11.00, "Bacon Egg & Cheese"),
            new DATA("Breakfast", 4.00, "Bagel & Cream Cheese"),
            new DATA("Breakfast", 4.00, "Butter Potatoes with Toast"),

            new DATA("Lunch", 9.50, "Tuna Fish"),
            new DATA("Lunch", 8.00, "Ham & Cheese"),
            new DATA("Lunch", 14.00, "Buffalo Chicken Wrap"),
            new DATA("Lunch", 13.00, "Cheeseburger with Fries"),
            new DATA("Lunch", 6.00, " Jumbo Cheese Pizza"),
            new DATA("Lunch", 9.00, "Hotdog with Fries"),
            new DATA("Lunch", 9.00, "Philly Cheese Stake"),

            new DATA("Dinner", 22.00, "Salmon with Two Sides"),
            new DATA("Dinner", 24.00, "Steak with Two Sides"),
            new DATA("Dinner", 17.00, "Chicken Parm Dinner"),
            new DATA("Dinner", 25.00, "Extra Large Lasagna"),
            new DATA("Dinner", 15.00, "Stuffed Shells"),
            new DATA("Dinner", 16.00, "Penne Ala Vodka"),
        };
        this.DataContext = this;
        passData         = new List <DATA>();
    }
Esempio n. 25
0
    public GameObject Player;               // 플레이어 오브젝트


    // Use this for initialization
    void Start()
    {
        LoddingViewActive(startGame);       // 로딩화면

        // 기본 초기화
        Player.SetActive(false);
        audio = GetComponent <AudioSource>();

        SetGameSpeed(0);
        backgroundColor       = new Color(1, 1, 1);
        distanceText.fontSize = (int)((25f * (Screen.height * 0.2f)) / 72);
        distanceText.rectTransform.sizeDelta = new Vector2(Screen.width, Screen.height * 0.2f);

        if (SingleTon == null)
        {
            SingleTon = this;
        }

        Player.GetComponent <Player>().SetGameManager(SingleTon);

        // 설정창 프레임 표시 확인 후 스크립트 추가
        if (DATA.getData().FPSView)
        {
            this.gameObject.AddComponent <FPSDisplay>();
        }

        ScoreUI = Instantiate(Resources.Load("Prefab/DeadCutScene")) as GameObject;
        ScoreUI.SetActive(false);

        // 초기화 준비 완료 로딩화면 지워도 된다는 신호
        Lodding.SetCoroutineFlag(true);
    }
Esempio n. 26
0
        public static void ShowExample()
        {
            DATA data = new DATA();

            // SQL
            var result = from o in data.orderList
                         orderby o.OrderName
                         select new { ID = o.OrderId, Name = o.OrderName };

            // LAMBDA
            /*
            var result2 = data.orderList.OrderBy(o => o.OrderName, () => new
            {
                ID = o.
                Name = o.
            });
            */    

            Console.WriteLine("\nOrder by:");
            Console.WriteLine("Vstupni pole: order list");
            Console.WriteLine("Seradim pole [OrderBy] podle OrderId.");
            foreach (var item in result)
            {
                Console.WriteLine("Id: {0}, name: {1}", item.ID, item.Name);
            }
        }
Esempio n. 27
0
 public static DATA getData()
 {
     if (SingleTon == null)
     {
         SingleTon = new DATA();
     }
     return(SingleTon);
 }
Esempio n. 28
0
            public FichierRES(String CheminFichier, DATA data)
            {
                _CheminFichier = CheminFichier;
                _Data          = data;

                _Fonctions = new Dictionary <string, Action <StreamReader> >();
                _Fonctions.Add("Analyse statique", PAnalyseStatique);
            }
Esempio n. 29
0
        private void CHR()
        {
            DataNeeds(1);
            Check(0, SymbolType.DOUBLE);
            var chr = DATA.Pop();

            DATA.Push(SYMTAB.CreateSymbol(SymbolType.STRING, (char)((int)chr.Value)));
        }
Esempio n. 30
0
        public void DEF()
        {
            var defname = DATA.Pop().Value
                          .ToString();
            var defvalue = DATA.Pop().Value;

            SYMTAB.UpdateEntry(defname, SymbolType.STRING, defvalue);
        }
Esempio n. 31
0
    // Update is called once per frame
    void FixedUpdate()
    {

        if (!withAndroid)
        {
            rot = Vector3.zero;
			//Debug.Log (this.transform.rotation);


            if (Input.GetKey("left"))
            {


                if (transform.rotation.eulerAngles.x < 40 || transform.rotation.eulerAngles.x > 260)
                {
                    rot += rLeft;
                }


            }
            if (Input.GetKey("right"))
            {
                if (transform.rotation.eulerAngles.x > 320 || transform.rotation.eulerAngles.x < 100)
                {
                    rot += rRight;
                }

            }

            this.transform.Rotate(rot);

        }
        if (withAndroid)
        {	
            data = server.GetComponent<ServerHandler>().getData();
			currentRot = new Quaternion( data.x , data.y, data.z, data.w);
			//currentRot = Quaternion.identity;
			//Debug.Log(currentRot);
			//this.transform.rotation = currentRot;
			float EulerCurrentx = currentRot.eulerAngles.x;
			float EulerCurrenty = currentRot.eulerAngles.y;
			float EulerCurrentz = currentRot.eulerAngles.z;
			if (EulerCurrentx < 180)
			{
				EulerCurrentx = 0;
			}
			transform.rotation = Quaternion.Euler(new Vector3(EulerCurrentz,0,EulerCurrentx));
            //float EulerCurrenty = currentRot.eulerAngles.y;
			//float toChangex = transform.rotation.eulerAngles.x - EulerCurrentx;
            //float toChangey = transform.rotation.eulerAngles.y - EulerCurrenty;
			//transform.rotation = Quaternion.AngleAxis( EulerCurrentx , Vector3.left);
            //transform.Rotate(new Vector3(0, 0, -20)); 
        }
		//data = server.GetComponent<ServerHandler>().getData();
		//currentRot = new Quaternion(data.x,data.y,-data.z, data.w);
		//currentRot = new Quaternion(1,0,0,1);

    }
Esempio n. 32
0
        void WisObj_DataEvent(DATA status, string Template)
        {
            switch (status)
            {
            case DATA.DATA_ENROLL:
                /*indx = nEnrolled.ToString();
                 * msg = "User #" + indx + " is enrolled successfully!!";
                 * this.Invoke(new CompleteHandler(Complete), new object[] { msg });
                 * DB[nEnrolled] = string.Copy(str);
                 * nEnrolled++;*/
                huella.Huella = string.Copy(Template);
                //this.huellaIdentificada[0] = string.Copy(Template);
                this.lblMensajes.Text = "Huella Enrolada !!!!";
                //         MessageBox.Show("Huella Identificada: " + this.huellaIdentificada[0].ToString());
                //         MessageBox.Show("longitud: " + this.huellaIdentificada[0].Length.ToString());

                //         huella.DedoHuella = new TablaEntity("reloj", 4, double.Parse(this.cmbHuella.SelectedValue.ToString()));
                huella.DedoHuella = new TablaEntity("reloj", 4, this.idDedo);
                //huella.Huella = this.huellaIdentificada[0].ToString();
                huellasNegocio.Guardar(huella);
                break;

            case DATA.DATA_IDENTIFY_CAPTURE:
                //   string[] hu = new string[10];
                int i = 0;
                List <HuellaEntity> huellas = huellasNegocio.getLista();
                foreach (HuellaEntity h in huellas)
                {
                    huellaIdentificada[i] = h.Huella;
                    i++;
                }

                int nMatched;
                nMatched = WisObj.Identify(Template, huellaIdentificada);
                if (nMatched < 0)
                {
                    this.lblMensajes.Text = "No se encontró huella válida!!";
                    //MessageBox.Show("No se encontró huella válida!!");
                    this.cmbEmpleados.SelectedValue = -1;
                    //this.Invoke(new CompleteHandler(Complete), new object[] { msg });
                }
                else
                {
                    //indx = nMatched.ToString();
                    //msg = "User #" + indx + " is matched!!";
                    //this.lblMensajes.Text = "Huella Identificada ! id=" + nMatched;
                    //MessageBox.Show( "Huella Identificada ! legajo=" + huellas[nMatched].Legajo);
                    this.lblMensajes.Text           = "Huella Identificada ! legajo=" + huellas[nMatched].Legajo.ToString();
                    this.cmbEmpleados.SelectedValue = huellas[nMatched].Legajo;
                    //this.Invoke(new CompleteHandler(Complete), new object[] { msg });
                }
                this.capturando = false;
                break;

            case DATA.DATA_VERIFY_CAPTURE:
                break;
            }
        }
Esempio n. 33
0
        private void button1_Click(object sender, EventArgs e)
        {
            DATA temp = new DATA() //发送一个DATASET请求
            {
                CMD = "GET"
            };

            SocketManager.client.SendTo(BufferFormatV2.FormatFCA(temp));
        }
Esempio n. 34
0
        private void Check(int v, SymbolType t)
        {
            var elt = DATA.ElementAt(v);

            if (elt.Type != t)
            {
                throw new Exception($"Type error element {v}: needs {t}");
            }
        }
Esempio n. 35
0
        public static void ReadOnMember()
        {
            string Path = @"E:\CODEGYM\Module2\BaitapModule2_lan2\BaitapModule2_lan2\Bai3\database.json";

            using (StreamReader sr = File.OpenText(Path))
            {
                var dataa = sr.ReadToEnd();
                data = JsonConvert.DeserializeObject <DATA>(dataa);
            }
        }
        public JsonResult Insert(JsonCustom model)
        {
            bool complete = false;
            int new_id = -1;
            if (model != null)
            {
                DATA data = new DATA();
                if (model.id == "")
                {
                    CONSUMERS client = new CONSUMERS();
                    client.NAME = model.Name;
                    storeDB.CONSUMERS.Add(client);
                    storeDB.SaveChanges();

                    CONSUMER_LINK cons_link = new CONSUMER_LINK();
                    cons_link.ID_CONS = client.ID;
                    cons_link.ID_CUST = model.cust_id;
                    storeDB.CONSUMER_LINK.Add(cons_link);
                    storeDB.SaveChanges();

                    data.ID_CONS = client.ID;
                    data.ID_CUST = model.cust_id;
                    data.PROFIT = model.profit;
                    data.START = model.start;
                    data.FINISH = model.finish;
                    new_id = client.ID;
                }
                else
                {
                    int id;
                    int.TryParse(model.id, out id);
                    data.ID_CONS = id;
                    data.ID_CUST = model.cust_id;
                    data.PROFIT = model.profit;
                    data.START = model.start;
                    data.FINISH = model.finish;
                }
                storeDB.DATA.Add(data);
                storeDB.SaveChanges();
                complete = true;
            }
            else
            {
                ;
            }
            return Json(complete ? ("new_id:" + new_id) : "fail", JsonRequestBehavior.AllowGet);
        }
Esempio n. 37
0
	// Update is called once per frame
	void Update () {
		data = server.GetComponent<ServerHandler> ().getData ();
		rigidbody.AddForce( new Vector3 (data.getX (), data.getY (), data.getZ ()), ForceMode.Acceleration);
	}
Esempio n. 38
0
        void WisObj_DataEvent(DATA status, string Template)
        {
            switch (status)
            {
                case DATA.DATA_ENROLL:
                    /*indx = nEnrolled.ToString();
                    msg = "User #" + indx + " is enrolled successfully!!";
                    this.Invoke(new CompleteHandler(Complete), new object[] { msg });
                    DB[nEnrolled] = string.Copy(str);
                    nEnrolled++;*/
                    huella.Huella = string.Copy(Template);
                    //this.huellaIdentificada[0] = string.Copy(Template);
                    this.lblMensajes.Text = "Huella Enrolada !!!!";
               //         MessageBox.Show("Huella Identificada: " + this.huellaIdentificada[0].ToString());
               //         MessageBox.Show("longitud: " + this.huellaIdentificada[0].Length.ToString());

               //         huella.DedoHuella = new TablaEntity("reloj", 4, double.Parse(this.cmbHuella.SelectedValue.ToString()));
                    huella.DedoHuella = new TablaEntity("reloj", 4, this.idDedo);
                    //huella.Huella = this.huellaIdentificada[0].ToString();
                    huellasNegocio.Guardar(huella);
                    break;

                case DATA.DATA_IDENTIFY_CAPTURE:
                 //   string[] hu = new string[10];
                    int i = 0;
                    List<HuellaEntity> huellas = huellasNegocio.getLista();
                    foreach (HuellaEntity h in huellas)
                    {
                        huellaIdentificada[i] = h.Huella;
                        i++;
                    }

                    int nMatched;
                    nMatched = WisObj.Identify(Template, huellaIdentificada);
                    if (nMatched < 0)
                    {
                        this.lblMensajes.Text = "No se encontró huella válida!!";
                        //MessageBox.Show("No se encontró huella válida!!");
                        this.cmbEmpleados.SelectedValue = -1;
                        //this.Invoke(new CompleteHandler(Complete), new object[] { msg });
                    }
                    else
                    {
                        //indx = nMatched.ToString();
                        //msg = "User #" + indx + " is matched!!";
                        //this.lblMensajes.Text = "Huella Identificada ! id=" + nMatched;
                        //MessageBox.Show( "Huella Identificada ! legajo=" + huellas[nMatched].Legajo);
                        this.lblMensajes.Text = "Huella Identificada ! legajo=" + huellas[nMatched].Legajo.ToString();
                        this.cmbEmpleados.SelectedValue = huellas[nMatched].Legajo;
                        //this.Invoke(new CompleteHandler(Complete), new object[] { msg });
                    }
                    this.capturando = false;
                    break;

                case DATA.DATA_VERIFY_CAPTURE:
                    break;
            }
        }
Esempio n. 39
0
        ///* address maps */

        static string memmapname(DATA n)
        {
            StringBuilder sb = new StringBuilder();

            switch (n.mem)
            {
                case MemType.MEMTYPE_NONE: return "NONE";
                case MemType.MEMTYPE_UNKNOWN: return "UNKNOWN";
                case MemType.MEMTYPE_CODE: return "CODE";
                case MemType.MEMTYPE_DATA:
                    sb.Append("DATA:");

                    foreach (var spec in n.spec)
                    {
                        switch (spec)
                        {
                            case SpecType.MD_LONG: sb.Append("L"); break;
                            case SpecType.MD_LONGNUM: sb.Append("N"); break;
                            case SpecType.MD_RATIONAL: sb.Append("R"); break;
                            case SpecType.MD_VECTOR: sb.Append("V"); break;
                            case SpecType.MD_WORD: sb.Append("W"); break;
                            default: sb.Append("?"); break;

                        }
                    }
                    return sb.ToString();

                default:
                    return string.Format("?0x{0:X}?", n);
            }
        }
Esempio n. 40
0
 public RANGE(UInt64 _start, UInt64 _end, ulong _offset)
 {
     start = _start;
     end = _end;
     data = null;
     fileoffset = _offset;
 }
Esempio n. 41
0
	// Update is called once per frame
	void Update () 
    {	

        // on regarde si on doit activer l'invincibilité

        
		if (withAndroid) 
		{
            // si on est sous android, on récupère la feuille de données
			data = server.GetComponent<ServerHandler>().getData();
			
			if ( data.shield && withAndroid && invincible == false && floatEnergy > 100)
			{
				StartCoroutine (invincibility());
			}
		}

		if (Input.GetKeyDown(KeyCode.A) && !withAndroid && invincible == false && floatEnergy > 100) 
		{
			StartCoroutine (invincibility());
		}
        




        // on regarde si les différentes variables sont bien dans les bornes sinon on les remet a la borne
        
		int intEnergy = (int)floatEnergy;
		
		
		if (intEnergy > 150) 
		{
			intEnergy = 150;
		}
		
		if (intEnergy < 0) 
		{
			intEnergy = 0;
		}
		
		if (intHealth > 100) 
		{ 
			intHealth = 100;
		}
		
		if (intHealth < 0) 
		{ 
			intHealth = 0;
		}
		

        // on met à jour le score à l'écran

		score.text = intScore.ToString ();

        // on met à jour les jauge à l'écran 

        if (intHealth > 20)
        {
            health.texture = vert;
            health.pixelInset = new Rect(healthLeftIndent, healthTopIndent, jaugeWidth, -jaugeHeight * intHealth /100);
        }
        else
        {
            health.texture = rouge;
            health.pixelInset = new Rect(healthLeftIndent, healthTopIndent, jaugeWidth, -jaugeHeight * intHealth /100);
        }

        if (floatEnergy < 100)
        {
            energy.texture = gris;
            energy.pixelInset = new Rect(energyLeftIndent, energyTopIndent, jaugeWidth, -jaugeHeight * floatEnergy/150);
        }
        else
        {
            if (floatEnergy == 150)
            {
                energy.texture = orange;
                energy.pixelInset = new Rect(energyLeftIndent, energyTopIndent, jaugeWidth, -jaugeHeight * floatEnergy / 150);
            }
            else
            {
                energy.texture = jaune;
                energy.pixelInset = new Rect(energyLeftIndent, energyTopIndent, jaugeWidth, -jaugeHeight * floatEnergy / 150);
            }
        }

        // Execution dépendant de l'état de l'energie;

		if (intEnergy < 100) 
		{
			stockEnergy (Time.deltaTime * 3);
            if (shieldReady && !invincible)
            {
                shieldReady = false;
                audio.clip = ShieldOff;
                audio.Play();
            }
		}
		if (intEnergy >= 100) 
		{
			stockEnergy (Time.deltaTime* 1.5f);
            if (!shieldReady && !invincible)
            {
                audio.clip = ShieldUP;
                audio.Play();
                shieldReady = true;
            }
		}
	
	}
Esempio n. 42
0
    void inputChoiceWindow(int windowID)
    {
        GUILayout.Space(15);

        if (iWantToPlayWithAndroid == false && iWantToPlayWithoutAndroid == false)
        {
            GUILayout.Label("Bienvenue dans Space Samourai");
            GUILayout.Label("Choisissez comment vous voulez jouer");

            GUILayout.Space(15);

            if (GUILayout.Button("Jouer avec Android", GUILayout.Height(buttonHeight)))
            {
                iWantToPlayWithAndroid = true;
                server = (GameObject)Instantiate(server);


            }

            GUILayout.Space(10);

            if (GUILayout.Button("Jouer sans Android", GUILayout.Height(buttonHeight)))
            {
                

				iWantToPlayWithoutAndroid = true;
                launched = true;
                currentGame = (GameObject)Instantiate(game);
				Time.timeScale = 1f;
				myHudHandler = GameObject.FindGameObjectWithTag ("HUD").GetComponent<hudHandler>();
                // on instancie le jeu;
            }

        }

        if (iWantToPlayWithAndroid == true)
        {

            if (connected == true)
            {
                data = server.GetComponent<ServerHandler>().getData();
                if (data.go == true)
                {
                    if (!launched)
                    {
                        // on lance le jeu avec android
                        launched = true;
                        currentGame = (GameObject)Instantiate(game);
						Time.timeScale = 1f;
						myHudHandler = GameObject.FindGameObjectWithTag ("HUD").GetComponent<hudHandler>();
                    }

                }
                else
                {
                    GUILayout.Label(" Vous etes connecté, cliquer pour commencer ");
                }

            }
            else
            {
                GUILayout.Label(" Connectez vous à l'adresse IP : " + adresseIP + " sur le port 3000");
            }
        }
    }
Esempio n. 43
0
using System;
Esempio n. 44
0
    private void HandleClientComm(object client)
    {
        TcpClient tcpClient = (TcpClient)client;
        tcpClient.NoDelay = true;
        clientStream = tcpClient.GetStream();

        encoder = new ASCIIEncoding();
        //byte[] buffer = encoder.GetBytes("Hello Client!");

        //clientStream.Write(buffer, 0, buffer.Length);
        //clientStream.Flush();


        String xmlSheet;
        byte[] message = new byte[4096];
        int bytesRead;

        while (true)
        {
            bytesRead = 0;

            try
            {
                //blocks until a client sends a message
                bytesRead = clientStream.Read(message, 0, 4096);
            }
            catch
            {
                //a socket error has occured
                break;
            }

            if (bytesRead == 0 || disconect == true)
            {
                //the client has disconnected from the server
                break;
            }


            //message has successfully been received
            xmlSheet = encoder.GetString(message, 0, bytesRead);
              
             String[] split = xmlSheet.Split(new String[] { "</DATA>" }, StringSplitOptions.None);
              
             String toDeserialize =split[0]+"</DATA>";
            

            StringReader sReader = new StringReader(toDeserialize);
            data = (DATA)XMLseri.Deserialize(sReader);
			//Debug.Log("x");
			//Debug.Log(data.x);
			//Debug.Log("y");
			//Debug.Log(data.y);
			//Debug.Log("z");
			//Debug.Log(data.z);
			//Debug.Log("w");
            //Debug.Log(data.w);

            //Debug.Log(data.go); 
			//Debug.Log(data.shield);
                
        }

        tcpClient.Close();
        Debug.Log("Disconnected");
    }
Esempio n. 45
0
        void WisObj_DataEvent(DATA status, string Template)
        {
            switch (status)
            {
                case DATA.DATA_ENROLL:
                    break;

                case DATA.DATA_IDENTIFY_CAPTURE:
                    int i = 0;
                    this.arrayHuellas = new string[huellas.Count];
                    foreach (HuellaEntity h in huellas)
                    {
                        this.arrayHuellas[i] = h.Huella;
                        i++;
                    }

                    int nMatched;
                    nMatched = WisObj.Identify(Template, this.arrayHuellas);
                    if (nMatched < 0)
                    {
                        //MessageBox.Show("No se encontró huella válida!!");
                        labelUltimaFichadaApellidoNombre.Text = "!!!! ERROR !!!!";
                    }
                    else
                    {
                        //MessageBox.Show("Huella Identificada ! legajo=" + huellas[nMatched].Legajo);
                        //huella = new HuellaEntity(huellas[nMatched].Legajo);
                        this.fichada = new FichadaEntity(0, huellas[nMatched].Legajo);
                        this.procesaFichada(fichada);
                    }
                    this.capturando = false;
                    break;

                case DATA.DATA_VERIFY_CAPTURE:
                    break;
            }
        }
Esempio n. 46
0
 public RANGE(UInt64 _start, UInt64 _end, DATA _data)
 {
     start = _start;
     end = _end;
     data = _data;
     fileoffset = 0;
 }
Esempio n. 47
0
        static bool parsememtype(string arg, out DATA memp)
        {
            memp = new DATA();

            string wtf = "memory type";
            if (arg != null && arg.Length > 0)
            {
                if (arg != null && arg != "")
                {
                    switch (arg[0])
                    {
                        case 'C':
                        case 'c':
                            memp.mem = MemType.MEMTYPE_CODE;
                            break;

                        case 'D':
                        case 'd':
                            wtf = "data type";
                            memp.mem = MemType.MEMTYPE_DATA;
                            memp.spec.Add(SpecType.MD_WORD);

                            int sp = arg.LastIndexOf(':');
                            if (sp != -1)
                            {
                                memp.spec.Clear(); // remove above default of MD_WORD
                                sp++;
                                while (sp < arg.Length)
                                {
                                    char c = arg[sp++];

                                    SpecType md;
                                    switch (Char.ToLower(c))
                                    {
                                        case 'l': md = SpecType.MD_LONG; break;
                                        case 'n': md = SpecType.MD_LONGNUM; break;
                                        case 'r': md = SpecType.MD_RATIONAL; break;
                                        case 'v': md = SpecType.MD_VECTOR; break;
                                        case 'w': md = SpecType.MD_WORD; break;
                                        default:
                                            Log("{0}: unrecognized {1} at \"{2}\"\n", cmdname, wtf, arg);
                                            showhelp(memtypehelp);
                                            return true;
                                    }
                                    memp.spec.Add(md);
                                }
                            }
                            break;

                        case 'n':
                        case 'N':
                            memp.mem = MemType.MEMTYPE_NONE;
                            break;

                        case 'u':
                        case 'U':
                            memp.mem = MemType.MEMTYPE_UNKNOWN;
                            break;

                        case 'v':
                        case 'V':
                            memp.mem = MemType.MEMTYPE_DATA;
                            memp.spec.Add(SpecType.MD_VECTOR);
                            break;

                        default:
                            Log("{0}: unrecognized {1} at \"{2}\"\n", cmdname, wtf, arg);
                            showhelp(memtypehelp);
                            return true;
                    }
                }
            }

            return false;
        }
Esempio n. 48
0
        public Program( )
        {
            String lFilename = "";

            while( _fileread == false )
            {
                Console.WriteLine( "Input FileName" );

                lFilename = "";

                // key Input
                while(true)
                {
                    ConsoleKeyInfo info = Console.ReadKey( true );

                    // Ctrl + V ( Paste )
                    if( ( ConsoleModifiers.Control & info.Modifiers ) != 0 )
                    {
                        if( Convert.ToInt32( info.KeyChar ) == 22 )
                        {
                            lFilename = Clipboard.GetText();
                            Console.Write( Clipboard.GetText() + "\n" );
                        }
                    }
                    else if ( info.Key == ConsoleKey.Enter ) // Press Enter
                    {
                        Console.WriteLine();
                        break;
                    }
                    else
                    {
                        lFilename += info.KeyChar;
                        Console.Write( info.KeyChar );
                    }
                }

                CreateIfMissing( filePath );

                FileLoad( lFilename );
            }

            while( true )
            {
                //_commander = Console.ReadLine( );
                //if( _commander == "exit" )
                //{
                //	_thread.Abort( );
                //	break;
                //}
                //else
                {
                    if( _fileread )
                    {
                        while( _fileread )
                        {
                            if( SR == null )
                                SR = new StreamReader( FS );

                            String[] splitResult;
                            String readLineStr = SR.ReadLine( );

                            if( readLineStr == null )
                            {
                                Console.WriteLine( "End Press Enter" );
                                Console.ReadLine( );
                                _fileread = false;
                                break;
                            }

                            splitResult = readLineStr.Split( mainDelimiter );

                            // Skip Global Info
                            while( _dataStart == false )
                            {
                                if( splitResult[0] == "Parameter" )
                                {
                                    _dataStart = true;
                                    break;
                                }
                                readLineStr = SR.ReadLine( );
                                splitResult = readLineStr.Split( mainDelimiter );
                            }

                            // Get Paramater
                            if( splitResult[0] == "Parameter" ) // Parameter Split
                            {
                                Console.WriteLine( "Parameter" );

                                int valueCount = 0;
                                List<String> list = new List<String>( );

                                FileStream tempFS = new FileStream( filePath + "FileInfoCount" + ".txt", FileMode.Create, FileAccess.ReadWrite );
                                StreamWriter SW = new StreamWriter( tempFS );

                                String otherSignalName = null;
                                String currentSignalNum = null;
                                String currentFreq = null;
                                String currentSignalName = null;
                                DATA currentDATA = null;

                                for( int i = 1; i < splitResult.Length; ++i )
                                {
                                    // data[data.Length - 1] SignalName
                                    // data[data.Length - 2] Frequency
                                    // data[1] otherSignalName
                                    // data[0] signalNum

                                    LineList.Add( splitResult[i] );

                                    String[] data = splitResult[i].Split( stringDelemiter );

                                    currentSignalName = data[data.Length - 1];
                                    currentFreq = data[data.Length - 2];
                                    currentSignalNum = data[0];
                                    otherSignalName = data[1];

                                    if( DataDic.TryGetValue( currentSignalName, out currentDATA ) == false )
                                    {
                                        currentDATA = new DATA( currentSignalName );
                                        DataDic.Add( currentSignalName, currentDATA );

                                        currentDATA.Frequency["S11"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S12"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S13"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S21"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S22"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S23"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S31"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S32"] = new Dictionary<String, Dictionary<String, Double>>( );
                                        currentDATA.Frequency["S33"] = new Dictionary<String, Dictionary<String, Double>>( );

                                        foreach ( var freqItem in currentDATA.Frequency )
                                        {
                                            currentDATA.Frequency[freqItem.Key]["MAG"] = new Dictionary<String, Double>( );
                                            currentDATA.Frequency[freqItem.Key]["ANG"] = new Dictionary<String, Double>( );
                                        }
                                    }

                                    if( currentDATA.Frequency.ContainsKey( currentSignalNum ) == false )
                                    {
                                        currentDATA.Frequency[currentSignalNum] = new Dictionary<String, Dictionary<String, Double>>( );
                                    }

                                    if( currentDATA.Frequency[currentSignalNum].ContainsKey( otherSignalName ) == false )
                                    {
                                        currentDATA.Frequency[currentSignalNum][otherSignalName] = new Dictionary<String, Double>( );
                                    }

                                    if( currentDATA.Frequency[currentSignalNum][otherSignalName].ContainsKey( currentFreq ) == false )
                                    {
                                        foreach ( var freqItem in currentDATA.Frequency )
                                        {
                                            currentDATA.Frequency[freqItem.Key]["MAG"][currentFreq] = 0.0;
                                            currentDATA.Frequency[freqItem.Key]["ANG"][currentFreq] = 0.0;
                                        }
                                    }
                                }

                                foreach( var dataItem in DataDic )
                                {
                                    DATA data = dataItem.Value;
                                    SW.Write( data.SignalName + "\n" );

                                    foreach( var freq in data.Frequency )
                                    {
                                        SW.Write( freq.Key + ", " );
                                        foreach( var signalOtherName in freq.Value )
                                        {
                                            SW.Write( signalOtherName.Key + "-" );
                                            SW.Write( signalOtherName.Value.Values.Count + ", " );

                                            valueCount += signalOtherName.Value.Values.Count;
                                        }
                                        SW.Write( "\n" );
                                    }
                                    SW.Write( "\n" );
                                }

                                SW.Write( "LineList Count: " + LineList.Count );

                                SW.Close( );
                                tempFS.Close( );
                            }
                            else
                            {
                                String[] splitData = readLineStr.Split( mainDelimiter );
                                String unitNum = splitData[0];

                                for( int i = 1; i < splitData.Length - 1; ++i )
                                {
                                    // data[data.Length - 1] SignalName
                                    // data[data.Length - 2] Frequency
                                    // data[1] otherSignalName
                                    // data[0] signalNum

                                    String[] dataSplit = LineList[i - 1].Split( stringDelemiter );

                                    String SignalName = dataSplit[dataSplit.Length - 1];
                                    String Freq = dataSplit[dataSplit.Length - 2];
                                    String OtherSignalName = dataSplit[1];
                                    String SignalNum = dataSplit[0];

                                    if( SignalNum == "PID" )
                                        continue;

                                    DataDic[SignalName].Frequency[SignalNum][OtherSignalName][Freq] = Convert.ToDouble( splitData[i] );
                                }

                                //splitData[stringCount++];

                                foreach( var dataItem in DataDic )
                                {
                                    DATA data = dataItem.Value;

                                    FileStream tempFS =
                                        new FileStream( filePath + data.SignalName + "-" + unitNum + ".s4p",
                                            FileMode.Create, FileAccess.ReadWrite );

                                    StreamWriter SW = new StreamWriter( tempFS );
                                    SW.Write("#\tHZ\tS\tDB\tR50.0\n");
                                    SW.Write("!\t" + "{0:MM}/{0:dd}/{0:yyyy}\t" + "{1}" + "\n", DateTime.Now, DateTime.Now.ToString("hh:mm:ss tt", new CultureInfo("en-US")));
                                    SW.Write( "Freq\t" );

                                    // freqResult[Frequency]
                                    Dictionary<String, List<Double>> freqMAGResult = new Dictionary<String, List<Double>>( );
                                    Dictionary<String, List<Double>> freqANGResult = new Dictionary<String, List<Double>>( );

                                    foreach( var signalNum in dataItem.Value.Frequency )
                                    {

                                        SW.Write( signalNum.Key + "\t\t" );

                                        foreach( var OtherSignalName in signalNum.Value )
                                        {

                                            // Convert row to column ( frequency )
                                            if( OtherSignalName.Key == "MAG" )
                                            {
                                                foreach( var freq in OtherSignalName.Value )
                                                {
                                                    List<Double> list = null;
                                                    if( freqMAGResult.TryGetValue( freq.Key, out list ) == false )
                                                    {
                                                        list = new List<Double>( );
                                                        freqMAGResult[freq.Key] = list;
                                                    }
                                                    freqMAGResult[freq.Key].Add( freq.Value );
                                                }
                                            }
                                            else
                                            {
                                                foreach( var freq in OtherSignalName.Value )
                                                {
                                                    List<Double> list = null;
                                                    if( freqANGResult.TryGetValue( freq.Key, out list ) == false )
                                                    {
                                                        list = new List<Double>( );
                                                        freqANGResult[freq.Key] = list;
                                                    }
                                                    freqANGResult[freq.Key].Add( freq.Value );
                                                }
                                            }
                                        }
                                    }
                                    SW.Write( "\n" );
                                    // Write Frequency
                                    foreach( var result in freqMAGResult )
                                    {
                                        SW.Write( result.Key + "\t" );

                                        for( int i = 0; i < result.Value.Count; ++i )
                                        {
                                            SW.Write( result.Value[i] + "\t" );
                                            SW.Write( freqANGResult[result.Key][i] + "\t" );
                                        }

                                        SW.Write( "\n" );
                                    }

                                    SW.Close( );
                                    tempFS.Close( );
                                }

                                Console.WriteLine( splitData[0] );
                            }
                        }
                    }
                    else // File dont Read
                    {
                        break;
                    }
                }
            }
            Console.WriteLine( "" );
        }