Exemple #1
1
 public DomainRole(DslDocument Doc, String Name, String DisplayName, String PropertyName, String PropertyDisplayName, Multiplicity Multiplicity)
     : base(Doc.CreateElement("DomainRole"))
 {
     this.Xml.SetAttribute("Id", Guid.NewGuid().ToString());
     this.Xml.SetAttribute("Name", Name);
     this.Xml.SetAttribute("DisplayName", DisplayName);
     this.Xml.SetAttribute("PropertyName", PropertyName);
     this.Xml.SetAttribute("PropertyDisplayName", PropertyDisplayName);
     this.Xml.SetAttribute("Multiplicity", Multiplicity.ToString());
     this.RolePlayer = Name;
 }
Exemple #2
0
 public DomainProperty(DslDocument Doc, String Type, String Name, String DisplayName)
     : base(Doc.CreateElement("DomainProperty"))
 {
     this.Xml.SetAttribute("Id", Guid.NewGuid().ToString());
     this.Xml.SetAttribute("Name", Name);
     this.Xml.SetAttribute("DisplayName", DisplayName);
     this.Type = Type;
 }
Exemple #3
0
 public VisioSync(Logger Logger)
 {
     this.Logger = Logger;
     this.Doc = new DslDocument();
     if (Logger.Document != null)
     {
         string documentPath = VisioHelpers.GetDSLPath(Logger.Document);
         if (!string.IsNullOrEmpty(documentPath))
         {
             this.Doc.Load(documentPath);
         }
         if (Logger.Document.Pages.Count > 0)
         {
             this.Page = new VisioPage(Logger.Document.Pages[1]);
         }
     }
 }
 public RolePlayerConnectDirective(DslDocument Doc)
     : base(Doc.CreateElement("RolePlayerConnectDirective"))
 {
 }
Exemple #5
0
 public Designer(DslDocument Doc)
     : base(Doc.CreateElement("Designer"))
 {
     this.Xml.SetAttribute("EditorGuid", Guid.NewGuid().ToString());
     this.Xml.SetAttribute("FileExtension", "mydsl3");
 }
 protected XmlRelationshipData(DslDocument Doc)
     : base(Doc.CreateElement("XmlRelationshipData"))
 {
 }
Exemple #7
0
 protected Dsl(DslDocument Doc)
     : base(Doc.CreateElement("Dsl"))
 {
     this.Xml.SetAttribute("Id", Guid.NewGuid().ToString());
 }
Exemple #8
0
 public ConnectionBuilder(DslDocument Doc)
     : base(Doc.CreateElement("ConnectionBuilder"))
 {
 }
Exemple #9
0
 protected DomainPath(DslDocument Doc)
     : base(Doc.CreateElement("DomainPath"))
 {
 }
Exemple #10
0
 public DomainPath(DslDocument Doc, String path)
     : base(Doc.CreateElement("DomainPath"))
 {
     Value = path;
 }
Exemple #11
0
 public MonikersCollection(DslDocument OwnerDocument, String MonikerType)
 {
     this.ownerDocument = OwnerDocument;
     this.monikerType = MonikerType + "Moniker";
 }
 protected ElementMergeDirective(DslDocument Doc)
     : base(Doc.CreateElement("ElementMergeDirective"))
 {
 }
Exemple #13
0
 public DomainRole(DslDocument Doc)
     : base(Doc.CreateElement("DomainRole"))
 {
     this.Xml.SetAttribute("Id", Guid.NewGuid().ToString());
 }
Exemple #14
0
        public void ApplyChanges()
        {
            Trace.WriteLine("Applying Changes in " + associatedDocument.Name + (Active ? "" : " Refused"));

            if (!Active) return;

            Trace.Indent();
            //try
            {
                // »нициализаци¤ dsl-документа и возврат к контрольной точке
                String DslPath = VisioHelpers.GetDSLPath(associatedDocument);
                if (File.Exists(DslPath))
                {
                    String TempDslPath = VisioHelpers.GetTempDSLPath(associatedDocument);
                    File.Copy(TempDslPath, DslPath, true);

                    dslDocument = new DslDocument();
                    dslDocument.Load(DslPath);
                }

                if (dslDocument != null)
                {
                    // ¬несение изменений
                    //for (int i = 0; i <= currentAction; i++)
                    //{
                    //    Trace.WriteLine("Apply " + actionList[i].ToString());
                    //    actionList[i].Apply(this);
                    //}

                    // —инхронизаци¤ всего остального
                    new DslSync(this).Synchronize();

                    // —охранение dsl-документа
                    File.WriteAllText(DslPath + ".diagram", String.Empty);
                    dslDocument.Save(DslPath);
                    dslDocument = null;

                    lastSaveTime = new FileInfo(DslPath).LastWriteTime;
                }
            }
            //catch(Exception e)
            //{
            //    Debug.Indent();
            //    Debug.WriteLine(e.TargetSite + ": " + e.Message);
            //    Debug.WriteLine(e.StackTrace);
            //    Debug.Unindent();
            //}
            Trace.Unindent();
        }
Exemple #15
0
 public Diagram(DslDocument Doc)
     : base(Doc.CreateElement("Diagram"))
 {
     this.Xml.SetAttribute("Id", Guid.NewGuid().ToString());
     this.Xml.SetAttribute("Namespace", this.OwnerDocument.Dsl.Xml.GetAttribute("Namespace"));
 }
Exemple #16
0
 protected XmlPropertyData(DslDocument Doc)
     : base(Doc.CreateElement("XmlPropertyData"))
 {
 }
Exemple #17
0
 protected XmlClassData(DslDocument Doc)
     : base(Doc.CreateElement("XmlClassData"))
 {
 }
Exemple #18
0
 public DslSync(Logger Logger)
 {
     this.Logger = Logger;
     this.Doc = Logger.DslDocument;
     this.Page = new VisioPage(Logger.Document.Pages[1]);
 }
 protected XmlSerializationBehavior(DslDocument Doc)
     : base(Doc.CreateElement("XmlSerializationBehavior"))
 {
 }