Exemplo n.º 1
0
        public static void RemoveStringGetFile(int IdVar, string path)
        {
            AllInformation.RemoveAll(x => x.Id == IdVar);
            string json = new JavaScriptSerializer().Serialize(AllInformation);

            File.WriteAllText(path, json);
        }
    public void Save()
    {
        BinaryFormatter tr      = new BinaryFormatter();
        Stream          theFile = File.Create(Application.persistentDataPath + "/save.dat");
        AllInformation  data    = new AllInformation();

        // Inforaciq za savevane
        data.Piano_record = Piano_record;
        data.Quiz_Bio     = Quiz_Bio;
        data.Quiz_Chem    = Quiz_Chem;
        data.Quiz_Phy     = Quiz_Phy;
        //
        tr.Serialize(theFile, data);
        theFile.Close();
    }
 public void Load()
 {
     if (File.Exists(Application.persistentDataPath + "/save.dat"))
     {
         BinaryFormatter tr      = new BinaryFormatter();
         Stream          theFile = File.Open(Application.persistentDataPath + "/save.dat", FileMode.Open);
         AllInformation  data    = new AllInformation();
         data = (AllInformation)tr.Deserialize(theFile);
         theFile.Close();
         // Inforaciq za savevane
         Piano_record = data.Piano_record;
         Quiz_Bio     = data.Quiz_Bio;
         Quiz_Chem    = data.Quiz_Chem;
         Quiz_Phy     = data.Quiz_Phy;
         //
     }
     else
     {
         Save();
     }
 }
Exemplo n.º 4
0
        private void btnServerInfo_Click(object sender, EventArgs e)
        {
            AllInformation alli = new AllInformation();

            alli.Show();
        }