public XisInteractionSpace(EA.Repository repository, EA.Package package, EA.Diagram diagram,
     string name, string title, InteractionSpaceType type, bool isMainScreen = false, bool isFirstSubScreen = false)
     : base(repository)
 {
     Element = XisWebHelper.CreateXisInteractionSpace(package, diagram, name, title, type, isMainScreen);
     Widgets = new List<XisWidget>();
     IsMainScreen = isMainScreen;
     IsFirstSubScreen = isFirstSubScreen;
     type = type;
     // Set Default IS size, position and z-order
     SetPosition(diagram, 217, 642, 10, 540);
 }
Exemple #2
0
        public static EA.Element CreateXisInteractionSpace(EA.Package package, EA.Diagram diagram,
            string name, string title, InteractionSpaceType type,bool isMainScreen = false)
        {
            EA.Element element = package.Elements.AddNew(name, "Class");
            element.Stereotype = "XisInteractionSpace";
            element.Update();

            foreach (EA.TaggedValue tv in element.TaggedValues)
            {
                switch (tv.Name)
                {
                    case "isMainScreen":
                        tv.Value = isMainScreen.ToString().ToLower();
                        break;
                    case "name":
                        tv.Value = name;
                        break;
                    case "type":
                        tv.Value = type.ToString();
                        break;
                    case "title":
                        tv.Value = title;
                        break;
                    default:
                        break;
                }
                tv.Update();
            }
            return element;
        }