Exemple #1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.UserControlScaleXY = ((System.Windows.Media.ScaleTransform)(target));
     return;
     case 2:
     this.UserControlXY = ((System.Windows.Media.TranslateTransform)(target));
     return;
     case 3:
     this.controlBorder = ((System.Windows.Controls.Border)(target));
     return;
     case 4:
     this.Grid0 = ((System.Windows.Controls.Grid)(target));
     return;
     case 5:
     this.Grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 6:
     this.inkCanvas = ((LogicPad2.Diagram.GateInkCanvas)(target));
     return;
     case 7:
     this.pieMenuGateSelector = ((LogicPad2.Diagram.PieMenuGateSelector)(target));
     return;
     case 8:
     this.adornerLayer = ((System.Windows.Controls.Canvas)(target));
     return;
     case 9:
     this.controlRegion = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 10:
     this.btnSave = ((System.Windows.Controls.Button)(target));
     return;
     case 11:
     this.btnCancel = ((System.Windows.Controls.Button)(target));
     return;
     case 12:
     this.btnTransform = ((System.Windows.Controls.Button)(target));
     return;
     case 13:
     this.btnScale = ((System.Windows.Controls.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
Exemple #2
0
        public XElement Save(string path, GateInkCanvas gc, bool isParsable)
        {
            XElement root = new XElement("CircuitGroup");
            root.SetAttributeValue("Version", "1.2");

            XElement maincircuit = CreateCircuitXML(gc.CreateIC("", GateInkCanvas.SELECTED_GATES.ALL));
            maincircuit.SetAttributeValue("Name", null);

            TopologicalSort ts = new TopologicalSort();
            List<UIGates.IC> ics = ts.Sort(icl, icl);

            foreach (UIGates.IC theic in ics)
            {
                root.Add(CreateCircuitXML(theic));
            }
            
            root.Add(maincircuit);

            root.Save(path);

            return root;
        }