Ejemplo n.º 1
0
        public static void SaveData()
        {
            foreach (MyNewCollection item in list)
            {
                item.RemoveOffered();
                string path = $@"C:\Users\vinog\source\repos\Lab16\Lab16\bin\Debug\Магазины\{item.Name}";
                Directory.CreateDirectory(path);
                serializator.Serialize(item, $@"{path}\{item.Name}___{DateTime.Now.Day}_{DateTime.Now.Hour}_{DateTime.Now.Minute}_{DateTime.Now.Second}", journal);
            }

            string save =
                $@"C:\Users\vinog\source\repos\Lab16\Lab16\bin\Debug\Stores\Магазины_{DateTime.Now.Hour}_{
                        DateTime.Now.Minute
                    }_Количество_{list.Count}";

            serializator.SerializeAllMarkets(list, save);
            list = serializator.Deserializator(save);
            MarkertsRemove();
        }