public void SaveFiguresList(FileStream fs, FiguresList.FigureList figs)
        {
            SerialFiguresList SerFigsList = new SerialFiguresList();

            for (int i = 0; i < figs.Size(); i++)
            {
                SerialFigure serfig = new SerialFigure(figs.Item(i));
                SerFigsList.Add(serfig);
            }
            formatter.Serialize(fs, SerFigsList);
        }
Exemple #2
0
        public void SaveFiguresList(FileStream fs, FiguresList.FigureList figs)
        {
            //var usrfigslist = new FiguresList.FigureList();
            var serfigslist = new SerialFiguresList();

            for (int i = 0; i < figs.Size(); i++)
            {
                var serfig = new SerialFigure(figs.Item(i));
                serfigslist.Add(serfig);
                if (figs.Item(i) is UserFigure)
                {
                    for (int j = 0; j < ((UserFigure)figs.Item(i)).SourceFigures.Size(); j++)
                    {
                        ((UserFigure)figs.Item(i)).SourceFigures.Item(j).isUserFigure = true;
                        serfig = new SerialFigure(((UserFigure)figs.Item(i)).SourceFigures.Item(j));
                        serfigslist.Add(serfig);
                    }
                }
            }
            formatter.Serialize(fs, serfigslist);
        }