Exemple #1
0
        private void MenuItemOpen_Click(object sender, RoutedEventArgs e)
        {
            Image img;

            for (int i = 0; i < canvas.Children.Count; i++)
            {
                if (canvas.Children[i].GetType() == typeof(Image))
                {
                    img = canvas.Children[i] as Image;
                    igc.DeleteElement(img);
                    i--;
                }
            }

            lc.dList.Clear();

            lc = slc.ReadXML();

            foreach (SpecificElement se in lc.ec.GetAllElements())
            {
                se.ClearDotList();
            }

            igc.RecreateElementsFromSave(lc);
            cogc.RecreateElementsFromSave(lc);

            wgc.UpdateListContainer(lc);
            wgc.RecreateWires();

            cc.UpdateListContainer(lc);
            form.UpdateListContainer(lc);

            form.lc = lc;

            foreach (SpecificElement se in lc.ec.GetAllElements())
            {
                wgc.FindWireConnectedDots(se.GetName());
            }
        }