Beispiel #1
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(libraryName, preferredRepositoryVersion);
     registrar.RegisterShapeType(new ShapeType("BusBar", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new BusBarSymbol(shapeType, t)); },
                                               BusBarSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceHorizontalBar));
     registrar.RegisterShapeType(new ShapeType("Disconnector", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new DisconnectorSymbol(shapeType, t)); },
                                               DisconnectorSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceCircleWithBar));
     registrar.RegisterShapeType(new ShapeType("AutoDisconnector", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new AutoDisconnectorSymbol(shapeType, t)); },
                                               AutoDisconnectorSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceCircleWithBar));
     registrar.RegisterShapeType(new ShapeType("AutoSwitch", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new AutoSwitchSymbol(shapeType, t)); },
                                               AutoSwitchSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceQuadrangle));
     registrar.RegisterShapeType(new ShapeType("Switch", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new SwitchSymbol(shapeType, t)); },
                                               SwitchSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceQuadrangle));
     registrar.RegisterShapeType(new ShapeType("Transformer", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new TransformerSymbol(shapeType, t)); },
                                               TransformerSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceDoubleCircle));
     registrar.RegisterShapeType(new ShapeType("Earth", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new EarthSymbol(shapeType, t)); },
                                               EarthSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
     registrar.RegisterShapeType(new ShapeType("Feeder", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new FeederSymbol(shapeType, t)); },
                                               FeederSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
     registrar.RegisterShapeType(new ShapeType("Rectifier", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new RectifierSymbol(shapeType, t)); },
                                               RectifierSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
     registrar.RegisterShapeType(new ShapeType("DisconnectingPoint", libraryName, libraryName,
                                               delegate(ShapeType shapeType, Template t) { return(new DisconnectingPoint(shapeType, t)); },
                                               DisconnectingPoint.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
 }
        public static void Initialize(IRegistrar registrar)
        {
            // Register library
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
            // Register model object types
            TerminalId maxTerminalId = 2;

            registrar.RegisterModelObjectType(new GenericModelObjectType("ValueDevice", namespaceName, categoryTitle,
                                                                         ValueDevice.CreateInstance, ValueDevice.GetPropertyDefinitions, maxTerminalId));
        }
Beispiel #3
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(libraryName, repositoryVersion);
     registrar.RegisterShapeType(Bracket.GetShapeType());
     registrar.RegisterShapeType(Coax.GetShapeType());
     registrar.RegisterShapeType(Ethernet.GetShapeType());
     registrar.RegisterShapeType(Optic.GetShapeType());
     registrar.RegisterShapeType(Power.GetShapeType());
     registrar.RegisterShapeType(Undefined.GetShapeType());
     registrar.RegisterShapeType(Wire.GetShapeType());
 }
Beispiel #4
0
        public static void Initialize(IRegistrar registrar)
        {
            if (registrar == null)
            {
                throw new ArgumentNullException("registrar");
            }
            if (registrar is Project)
            {
                foreach (ShapeType shapeType in ((Project)registrar).ShapeTypes)
                {
                    switch (shapeType.FullName)
                    {
                    case "FhisPrimitives.Круг":
                        Watch.CircleType       = shapeType;
                        Thermometer.CircleType = shapeType;
                        Barometer.CircleType   = shapeType;
                        break;

                    case "FhisPrimitives.Прямоугольник":
                        Calendar.BoxType    = shapeType;
                        Thermometer.BoxType = shapeType;
                        break;

                    case "FhisPrimitives.Полилиния":
                        Watch.PolylineType       = shapeType;
                        Windvane.PolylineType    = shapeType;
                        Thermometer.PolylineType = shapeType;
                        Barometer.PolylineType   = shapeType;
                        break;
                    }
                }
            }

            // Register library
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);

            registrar.RegisterShapeType(new ShapeType("Календарь", namespaceName, resourceString,
                                                      Calendar.CreateInstance, Calendar.GetPropertyDefinitions));

            registrar.RegisterShapeType(new ShapeType("Часы", namespaceName, resourceString,
                                                      Watch.CreateInstance, Watch.GetPropertyDefinitions));

            registrar.RegisterShapeType(new ShapeType("Флюгер", namespaceName, resourceString,
                                                      Windvane.CreateInstance, Windvane.GetPropertyDefinitions));

            registrar.RegisterShapeType(new ShapeType("Гигрометр", namespaceName, resourceString,
                                                      Hygrometer.CreateInstance, Hygrometer.GetPropertyDefinitions));

            registrar.RegisterShapeType(new ShapeType("Термометр", namespaceName, resourceString,
                                                      Thermometer.CreateInstance, Thermometer.GetPropertyDefinitions));

            registrar.RegisterShapeType(new ShapeType("Барометр", namespaceName, resourceString,
                                                      Barometer.CreateInstance, Barometer.GetPropertyDefinitions));
        }
        public static void Initialize(IRegistrar registrar)
        {
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);

            registrar.RegisterModelObjectType(new GenericModelObjectType("AutoDisconnector", namespaceName, categoryTitle,
                                                                         modelObjectType => new AutoDisconnector(modelObjectType),
                                                                         AutoDisconnector.GetPropertyDefinitions, 2));
            registrar.RegisterModelObjectType(new GenericModelObjectType("BusBar", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new BusBar(modelObjectType)); },
                                                                         BusBar.GetPropertyDefinitions, 1));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Disconnector", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Disconnector(modelObjectType)); },
                                                                         Disconnector.GetPropertyDefinitions, 2));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Earth", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Earth(modelObjectType)); },
                                                                         Earth.GetPropertyDefinitions, 1));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Feeder", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Feeder(modelObjectType)); },
                                                                         Feeder.GetPropertyDefinitions, 1));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Title", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Label(modelObjectType)); },
                                                                         Label.GetPropertyDefinitions, 0));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Line", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Line(modelObjectType)); },
                                                                         Line.GetPropertyDefinitions, 1));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Measurement", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Measurement(modelObjectType)); },
                                                                         Measurement.GetPropertyDefinitions, 0));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Picture", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Picture(modelObjectType)); },
                                                                         Picture.GetPropertyDefinitions, 0));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Switch", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Switch(modelObjectType)); },
                                                                         Switch.GetPropertyDefinitions, 2));
            registrar.RegisterModelObjectType(new GenericModelObjectType("Transformer", namespaceName, categoryTitle,
                                                                         delegate(ModelObjectType modelObjectType) { return(new Transformer(modelObjectType)); },
                                                                         Transformer.GetPropertyDefinitions, 3));
        }
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterShapeType(
         new ShapeType("ElementNodeShape", namespaceName, namespaceName,
                       ElementNodeShape.CreateInstance, ElementNodeShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("ControllerShape", namespaceName, namespaceName,
                       ControllerShape.CreateInstance, ControllerShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("OutputShape", namespaceName, namespaceName,
                       OutputShape.CreateInstance, OutputShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("FilterShape", namespaceName, namespaceName,
                       FilterShape.CreateInstance, FilterShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("DataFlowConnectionLine", namespaceName, namespaceName,
                       DataFlowConnectionLine.CreateInstance, DataFlowConnectionLine.GetPropertyDefinitions)
         );
 }
Beispiel #7
0
        public static void Initialize(IRegistrar registrar)
        {
            if (registrar == null)
            {
                throw new ArgumentNullException("registrar");
            }
            // Register library
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);


            //	// Register linear shapes
            //	registrar.RegisterShapeType(new ShapeType("Polyline", namespaceName, namespaceName,
            //		Polyline.CreateInstance, Polyline.GetPropertyDefinitions));
            //	registrar.RegisterShapeType(new ShapeType("RectangularLine", namespaceName, namespaceName,
            //		RectangularLine.CreateInstance, RectangularLine.GetPropertyDefinitions));
            //	registrar.RegisterShapeType(new ShapeType("CircularArc", namespaceName, namespaceName,
            //		"With only two points, it behaves like a straight line, with all three points, it behaves like a circular arc.",
            //		CircularArc.CreateInstance, CircularArc.GetPropertyDefinitions));
            //
            //	// Register text shapes
            //	registrar.RegisterShapeType(new ShapeType("Text", namespaceName, namespaceName,
            //		"Supports automatic sizing to its text.",
            //		Text.CreateInstance, Text.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceQuadrangle));
            //	registrar.RegisterShapeType(new ShapeType("Label", namespaceName, namespaceName,
            //		"Supports autosizing to its text and connecting to other shapes. If the label's 'pin' is connected to a shape, the label will move with its partner shape.",
            //		Label.CreateInstance, Label.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceQuadrangle));
            //
            //	registrar.RegisterShapeType(new ShapeType("RegularPolygone", namespaceName, namespaceName,
            //		RegularPolygone.CreateInstance, RegularPolygone.GetPropertyDefinitions));

            // Register triangle shapes
            //	registrar.RegisterShapeType(new ShapeType("FreeTriangle", namespaceName, namespaceName,
            //		FreeTriangle.CreateInstance, FreeTriangle.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceTriangle));
            //	registrar.RegisterShapeType(new ShapeType("IsoscelesTriangle", namespaceName, namespaceName,
            //		IsoscelesTriangle.CreateInstance, IsoscelesTriangle.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceTriangle));

            // Register round shapes
            //	registrar.RegisterShapeType(new ShapeType("Circle", namespaceName, namespaceName,
            //		Circle.CreateInstance, Circle.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceCircle));
            //	registrar.RegisterShapeType(new ShapeType("Ellipse", namespaceName, namespaceName,
            //		Ellipse.CreateInstance, Ellipse.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceCircle));

            // Register quadrangle shapes
            //	registrar.RegisterShapeType(new ShapeType("Square", namespaceName, namespaceName,
            //		Square.CreateInstance, Square.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceQuadrangle));
            //	registrar.RegisterShapeType(new ShapeType("Box", namespaceName, namespaceName,
            //		Box.CreateInstance, Box.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceQuadrangle));
            //	registrar.RegisterShapeType(new ShapeType("RoundedBox", namespaceName, namespaceName,
            //		RoundedBox.CreateInstance, RoundedBox.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceQuadrangle));
            //	registrar.RegisterShapeType(new ShapeType("Diamond", namespaceName, namespaceName,
            //		Diamond.CreateInstance, Diamond.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceDiamond));

            // Register other shapes
            //	registrar.RegisterShapeType(new ShapeType("ThickArrow", namespaceName, namespaceName,
            //		delegate (ShapeType shapeType, Template t) { return (Shape)new ThickArrow(shapeType, t); },
            //		ThickArrow.GetPropertyDefinitions));
            //	registrar.RegisterShapeType(new ShapeType("Picture", namespaceName, namespaceName,
            //		Picture.CreateInstance, Picture.GetPropertyDefinitions,
            //		Properties.Resources.ShaperReferenceQuadrangle));

            registrar.RegisterShapeType(new ShapeType("Ресурс", namespaceName, resourceString,
                                                      Resource.CreateInstance, Resource.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));

            registrar.RegisterShapeType(new ShapeType("Свойство", namespaceName, resourceString,
                                                      Property.CreateInstance, Property.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceTriangle));

            registrar.RegisterShapeType(new ShapeType("Действие", namespaceName, resourceString,
                                                      delegate(ShapeType shapeType, Template t) { return((Shape) new Action(shapeType, t)); },
                                                      Action.GetPropertyDefinitions));
        }
Beispiel #8
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterShapeType(new ShapeType("Terminator", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new TerminatorSymbol(shapeType, t); },
         TerminatorSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Process", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ProcessSymbol(shapeType, t); },
         ProcessSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Decision", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DecisionSymbol(shapeType, t); },
         DecisionSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("InputOutput", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new InputOutputSymbol(shapeType, t); },
         InputOutputSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Document", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DocumentSymbol(shapeType, t); },
         DocumentSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("OffpageConnector", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new OffpageConnectorSymbol(shapeType, t); },
         OffpageConnectorSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Connector", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ConnectorSymbol(shapeType, t); },
         ConnectorSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("PredefinedProcess", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new PredefinedProcessSymbol(shapeType, t); },
         PredefinedProcessSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Extract", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ExtractSymbol(shapeType, t); },
         ExtractSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Merge", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new MergeSymbol(shapeType, t); },
         MergeSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("OnlineStorage", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new OnlineStorageSymbol(shapeType, t); },
         OnlineStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("OfflineStorage", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new OfflineStorageSymbol(shapeType, t); },
         OfflineStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("DrumStorage", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DrumStorageSymbol(shapeType, t); },
         DrumStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("DiskStorage", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DiskStorageSymbol(shapeType, t); },
         DiskStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("TapeStorage", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new TapeStorageSymbol(shapeType, t); },
         TapeStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Preparation", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new PreparationSymbol(shapeType, t); },
         PreparationSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("ManualInput", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ManualInputSymbol(shapeType, t); },
         ManualInputSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Core", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new CoreSymbol(shapeType, t); },
         CoreSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Display", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DisplaySymbol(shapeType, t); },
         DisplaySymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Tape", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new TapeSymbol(shapeType, t); },
         TapeSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("ManualOperation", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ManualOperationSymbol(shapeType, t); },
         ManualOperationSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Sort", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new SortSymbol(shapeType, t); },
         SortSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Collate", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new CollateSymbol(shapeType, t); },
         CollateSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Card", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new CardSymbol(shapeType, t); },
         CardSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("CommLink", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new CommLinkSymbol(shapeType, t); },
         CommLinkSymbol.GetPropertyDefinitions));
 }
Beispiel #9
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterModelObjectType(new GenericModelObjectType("MyBusinessObjectType", namespaceName, categoryTitle,
         (ModelObjectType type) => { return new MyBusinessObject(type); }, MyBusinessObject.GetPropertyDefinitions, 0));
 }
		public static void Initialize(IRegistrar registrar) {
			registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);

			registrar.RegisterModelObjectType(new GenericModelObjectType("AutoDisconnector", namespaceName, categoryTitle,
				modelObjectType => new AutoDisconnector(modelObjectType),
				AutoDisconnector.GetPropertyDefinitions, 2));
			registrar.RegisterModelObjectType(new GenericModelObjectType("BusBar", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new BusBar(modelObjectType); },
				BusBar.GetPropertyDefinitions, 1));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Disconnector", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Disconnector(modelObjectType); },
				Disconnector.GetPropertyDefinitions, 2));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Earth", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Earth(modelObjectType); },
				Earth.GetPropertyDefinitions, 1));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Feeder", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Feeder(modelObjectType); },
				Feeder.GetPropertyDefinitions, 1));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Title", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Label(modelObjectType); },
				Label.GetPropertyDefinitions, 0));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Line", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Line(modelObjectType); },
				Line.GetPropertyDefinitions, 1));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Measurement", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Measurement(modelObjectType); },
				Measurement.GetPropertyDefinitions, 0));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Picture", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Picture(modelObjectType); },
				Picture.GetPropertyDefinitions, 0));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Switch", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Switch(modelObjectType); },
				Switch.GetPropertyDefinitions, 2));
			registrar.RegisterModelObjectType(new GenericModelObjectType("Transformer", namespaceName, categoryTitle,
				delegate(ModelObjectType modelObjectType) { return new Transformer(modelObjectType); },
				Transformer.GetPropertyDefinitions, 3));
		}
Beispiel #11
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterModelObjectType(new GenericModelObjectType("ValueDevice", namespaceName, categoryTitle,
                                                                  ValueDevice.CreateInstance, ValueDevice.GetPropertyDefinitions, 2));
 }
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterShapeType(
         new ShapeType("ElementNodeShape", namespaceName, namespaceName,
                       ElementNodeShape.CreateInstance, ElementNodeShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("ControllerShape", namespaceName, namespaceName,
                       ControllerShape.CreateInstance, ControllerShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("OutputShape", namespaceName, namespaceName,
                       OutputShape.CreateInstance, OutputShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("FilterShape", namespaceName, namespaceName,
                       FilterShape.CreateInstance, FilterShape.GetPropertyDefinitions)
         );
     registrar.RegisterShapeType(
         new ShapeType("DataFlowConnectionLine", namespaceName, namespaceName,
                       DataFlowConnectionLine.CreateInstance, DataFlowConnectionLine.GetPropertyDefinitions)
         );
 }
Beispiel #13
0
        public static void Initialize(IRegistrar registrar)
        {
            if (registrar == null)
            {
                throw new ArgumentNullException("registrar");
            }
            // Register library
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);

            // Register linear shapes
            registrar.RegisterShapeType(new ShapeType("Полилиния", namespaceName, resourceString,           // "Polyline"
                                                      Polyline.CreateInstance, Polyline.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("ПрямоугольнаяЛиния", namespaceName, resourceString,  // "RectangularLine"
                                                      RectangularLine.CreateInstance, RectangularLine.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("Дуга", namespaceName, resourceString,                // "CircularArc"
                                                      "With only two points, it behaves like a straight line, with all three points, it behaves like a circular arc.",
                                                      CircularArc.CreateInstance, CircularArc.GetPropertyDefinitions));

            // Register text shapes
            registrar.RegisterShapeType(new ShapeType("Текст", namespaceName, resourceString,               // "Text"
                                                      "Supports automatic sizing to its text.",
                                                      Text.CreateInstance, Text.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Метка", namespaceName, resourceString,               // "Label"
                                                      "Supports autosizing to its text and connecting to other shapes. If the label's 'pin' is connected to a shape, the label will move with its partner shape.",
                                                      Label.CreateInstance, Label.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));

            registrar.RegisterShapeType(new ShapeType("Многогранник", namespaceName, resourceString,                // "RegularPolygone"
                                                      RegularPolygone.CreateInstance, RegularPolygone.GetPropertyDefinitions));

            // Register triangle shapes
            registrar.RegisterShapeType(new ShapeType("Треугольник", namespaceName, resourceString,             // "FreeTriangle"
                                                      FreeTriangle.CreateInstance, FreeTriangle.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceTriangle));
            registrar.RegisterShapeType(new ShapeType("РавнобедренныйТреугольник", namespaceName, resourceString,               // "IsoscelesTriangle"
                                                      IsoscelesTriangle.CreateInstance, IsoscelesTriangle.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceTriangle));

            // Register round shapes
            registrar.RegisterShapeType(new ShapeType("Круг", namespaceName, resourceString,                // "Circle"
                                                      Circle.CreateInstance, Circle.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceCircle));
            registrar.RegisterShapeType(new ShapeType("Эллипс", namespaceName, resourceString,              // "Ellipse"
                                                      Ellipse.CreateInstance, Ellipse.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceCircle));

            // Register quadrangle shapes
            registrar.RegisterShapeType(new ShapeType("Квадрат", namespaceName, resourceString,             // "Square"
                                                      Square.CreateInstance, Square.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Прямоугольник", namespaceName, resourceString,               // "Box"
                                                      Box.CreateInstance, Box.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("СкруглённыйПрямоугольник", namespaceName, resourceString,                // "RoundedBox"
                                                      RoundedBox.CreateInstance, RoundedBox.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Ромб", namespaceName, resourceString,                // "Diamond"
                                                      Diamond.CreateInstance, Diamond.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceDiamond));

            // Register other shapes
            registrar.RegisterShapeType(new ShapeType("Стрела", namespaceName, resourceString,              // "ThickArrow"
                                                      delegate(ShapeType shapeType, Template t) { return((Shape) new ThickArrow(shapeType, t)); },
                                                      ThickArrow.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("Изображение", namespaceName, resourceString,             // "Picture"
                                                      Picture.CreateInstance, Picture.GetPropertyDefinitions,
                                                      Properties.Resources.ShaperReferenceQuadrangle));
        }
Beispiel #14
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(libraryName, preferredRepositoryVersion);
     registrar.RegisterShapeType(new ShapeType("BusBar", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new BusBarSymbol(shapeType, t); },
         BusBarSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceHorizontalBar));
     registrar.RegisterShapeType(new ShapeType("Disconnector", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new DisconnectorSymbol(shapeType, t); },
         DisconnectorSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceCircleWithBar));
     registrar.RegisterShapeType(new ShapeType("AutoDisconnector", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new AutoDisconnectorSymbol(shapeType, t); },
         AutoDisconnectorSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceCircleWithBar));
     registrar.RegisterShapeType(new ShapeType("AutoSwitch", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new AutoSwitchSymbol(shapeType, t); },
         AutoSwitchSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceQuadrangle));
     registrar.RegisterShapeType(new ShapeType("Switch", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new SwitchSymbol(shapeType, t); },
         SwitchSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceQuadrangle));
     registrar.RegisterShapeType(new ShapeType("Transformer", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new TransformerSymbol(shapeType, t); },
         TransformerSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceDoubleCircle));
     registrar.RegisterShapeType(new ShapeType("Earth", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new EarthSymbol(shapeType, t); },
         EarthSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
     registrar.RegisterShapeType(new ShapeType("Feeder", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new FeederSymbol(shapeType, t); },
         FeederSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
     registrar.RegisterShapeType(new ShapeType("Rectifier", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new RectifierSymbol(shapeType, t); },
         RectifierSymbol.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
     registrar.RegisterShapeType(new ShapeType("DisconnectingPoint", libraryName, libraryName,
         delegate(ShapeType shapeType, Template t) { return new DisconnectingPoint(shapeType, t); },
         DisconnectingPoint.GetPropertyDefinitions, Dataweb.NShape.ElectricalShapes.Properties.Resources.ShaperReferenceEarthSymbol));
 }
Beispiel #15
0
 public static void Initialize(IRegistrar registrar)
 {
     // Register library
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     // Register shape types
     registrar.RegisterShapeType(new ShapeType("DataFlow", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DataFlowArrow(shapeType, t)); },
                                               DataFlowArrow.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Dependency", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DependencyArrow(shapeType, t)); },
                                               DependencyArrow.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Database", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DatabaseSymbol(shapeType, t)); },
                                               DatabaseSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Entity", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new EntitySymbol(shapeType, t)); },
                                               EntitySymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Annotation", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new AnnotationSymbol(shapeType, t)); },
                                               AnnotationSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Cloud", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new CloudSymbol(shapeType, t)); },
                                               CloudSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Class", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ClassSymbol(shapeType, t)); },
                                               ClassSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Component", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ComponentSymbol(shapeType, t)); },
                                               ComponentSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Document", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DocumentSymbol(shapeType, t)); },
                                               DocumentSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Interface", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new InterfaceSymbol(shapeType, t)); },
                                               InterfaceSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("InterfaceUsage", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new InterfaceUsageSymbol(shapeType, t)); },
                                               InterfaceUsageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Server", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Tower.emf", Assembly.GetExecutingAssembly());
         result.Text = "Server";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("RTU", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.RTU.emf", Assembly.GetExecutingAssembly());
         result.Text = "RTU";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Actor", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Actor.emf", Assembly.GetExecutingAssembly());
         result.Text = "Actor";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Monitor", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Monitor.emf", Assembly.GetExecutingAssembly());
         result.Text = "Monitor";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("PC", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Desktop.emf", Assembly.GetExecutingAssembly());
         result.Text = "PC";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Tower", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Tower.emf", Assembly.GetExecutingAssembly());
         result.Text = "Tower";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Laptop", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
                                                         "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Laptop.emf", Assembly.GetExecutingAssembly());
         result.Text = "Notebook";
         return(result);
     }, VectorImage.GetPropertyDefinitions));
 }
Beispiel #16
0
        public static void Initialize(IRegistrar registrar)
        {
            if (registrar == null)
            {
                throw new ArgumentNullException("registrar");
            }
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);

            // Register linear shapes
            registrar.RegisterShapeType(new ShapeType("Polyline", namespaceName, namespaceName,
                                                      Polyline.CreateInstance, Polyline.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("RectangularLine", namespaceName, namespaceName,
                                                      RectangularLine.CreateInstance, RectangularLine.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("CircularArc", namespaceName, namespaceName,
                                                      "With only two points, it behaves like a straight line, with all three points, it behaves like a circular arc.",
                                                      CircularArc.CreateInstance, CircularArc.GetPropertyDefinitions));
            // new Type(typeof(BezierLine).Name, BezierLine.CreateInstance,
            // BezierLine.GetPropertyDefinitions(null)).Register(registrar);
            // Planar GeneralShapes

            // Register text shapes
            registrar.RegisterShapeType(new ShapeType("Text", namespaceName, namespaceName,
                                                      "Supports automatic sizing to its text.",
                                                      Text.CreateInstance, Text.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Label", namespaceName, namespaceName,
                                                      "Supports autosizing to its text and connecting to other shapes. If the label's 'pin' is connected to a shape, the label will move with its partner shape.",
                                                      Label.CreateInstance, Label.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));

            registrar.RegisterShapeType(new ShapeType("RegularPolygone", namespaceName, namespaceName,
                                                      RegularPolygone.CreateInstance, RegularPolygone.GetPropertyDefinitions));

            // Register triangle shapes
            registrar.RegisterShapeType(new ShapeType("FreeTriangle", namespaceName, namespaceName,
                                                      FreeTriangle.CreateInstance, FreeTriangle.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceTriangle));
            registrar.RegisterShapeType(new ShapeType("IsoscelesTriangle", namespaceName, namespaceName,
                                                      IsoscelesTriangle.CreateInstance, IsoscelesTriangle.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceTriangle));

            // Register round shapes
            registrar.RegisterShapeType(new ShapeType("Circle", namespaceName, namespaceName,
                                                      Circle.CreateInstance, Circle.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceCircle));
            registrar.RegisterShapeType(new ShapeType("Ellipse", namespaceName, namespaceName,
                                                      Ellipse.CreateInstance, Ellipse.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceCircle));

            // Register quadrangle shapes
            registrar.RegisterShapeType(new ShapeType("Square", namespaceName, namespaceName,
                                                      Square.CreateInstance, Square.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Box", namespaceName, namespaceName,
                                                      Box.CreateInstance, Box.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("RoundedBox", namespaceName, namespaceName,
                                                      RoundedBox.CreateInstance, RoundedBox.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Diamond", namespaceName, namespaceName,
                                                      Diamond.CreateInstance, Diamond.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceDiamond));

            // Register other shapes
            registrar.RegisterShapeType(new ShapeType("ThickArrow", namespaceName, namespaceName,
                                                      delegate(ShapeType shapeType, Template t) { return((Shape) new ThickArrow(shapeType, t)); },
                                                      ThickArrow.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("Picture", namespaceName, namespaceName,
                                                      Picture.CreateInstance, Picture.GetPropertyDefinitions,
                                                      Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
        }
Beispiel #17
0
		public static void Initialize(IRegistrar registrar) {
			registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
			registrar.RegisterModelObjectType(new GenericModelObjectType("MyBusinessObjectType", namespaceName, categoryTitle,
				(ModelObjectType type) => { return new MyBusinessObject(type); }, MyBusinessObject.GetPropertyDefinitions, 0));
		}
Beispiel #18
0
        public static void Initialize(IRegistrar registrar)
        {
            if (registrar == null) throw new ArgumentNullException("registrar");
            registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);

            // Register linear shapes
            registrar.RegisterShapeType(new ShapeType("Polyline", namespaceName, namespaceName,
                Polyline.CreateInstance, Polyline.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("RectangularLine", namespaceName, namespaceName,
                RectangularLine.CreateInstance, RectangularLine.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("CircularArc", namespaceName, namespaceName,
                "With only two points, it behaves like a straight line, with all three points, it behaves like a circular arc.",
                CircularArc.CreateInstance, CircularArc.GetPropertyDefinitions));
            // new Type(typeof(BezierLine).Name, BezierLine.CreateInstance,
            // BezierLine.GetPropertyDefinitions(null)).Register(registrar);
            // Planar GeneralShapes

            // Register text shapes
            registrar.RegisterShapeType(new ShapeType("Text", namespaceName, namespaceName,
                "Supports automatic sizing to its text.",
                Text.CreateInstance, Text.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Label", namespaceName, namespaceName,
                "Supports autosizing to its text and connecting to other shapes. If the label's 'pin' is connected to a shape, the label will move with its partner shape.",
                Label.CreateInstance, Label.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));

            registrar.RegisterShapeType(new ShapeType("RegularPolygone", namespaceName, namespaceName,
                RegularPolygone.CreateInstance, RegularPolygone.GetPropertyDefinitions));

            // Register triangle shapes
            registrar.RegisterShapeType(new ShapeType("FreeTriangle", namespaceName, namespaceName,
                FreeTriangle.CreateInstance, FreeTriangle.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceTriangle));
            registrar.RegisterShapeType(new ShapeType("IsoscelesTriangle", namespaceName, namespaceName,
                IsoscelesTriangle.CreateInstance, IsoscelesTriangle.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceTriangle));

            // Register round shapes
            registrar.RegisterShapeType(new ShapeType("Circle", namespaceName, namespaceName,
                Circle.CreateInstance, Circle.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceCircle));
            registrar.RegisterShapeType(new ShapeType("Ellipse", namespaceName, namespaceName,
                Ellipse.CreateInstance, Ellipse.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceCircle));

            // Register quadrangle shapes
            registrar.RegisterShapeType(new ShapeType("Square", namespaceName, namespaceName,
                Square.CreateInstance, Square.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Box", namespaceName, namespaceName,
                Box.CreateInstance, Box.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("RoundedBox", namespaceName, namespaceName,
                RoundedBox.CreateInstance, RoundedBox.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
            registrar.RegisterShapeType(new ShapeType("Diamond", namespaceName, namespaceName,
                Diamond.CreateInstance, Diamond.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceDiamond));

            // Register other shapes
            registrar.RegisterShapeType(new ShapeType("ThickArrow", namespaceName, namespaceName,
                delegate(ShapeType shapeType, Template t) { return (Shape)new ThickArrow(shapeType, t); },
                ThickArrow.GetPropertyDefinitions));
            registrar.RegisterShapeType(new ShapeType("Picture", namespaceName, namespaceName,
                Picture.CreateInstance, Picture.GetPropertyDefinitions,
                Dataweb.NShape.GeneralShapes.Properties.Resources.ShaperReferenceQuadrangle));
        }
Beispiel #19
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterModelObjectType(new GenericModelObjectType("ValueDevice", namespaceName, categoryTitle,
         ValueDevice.CreateInstance, ValueDevice.GetPropertyDefinitions, 2));
 }
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterShapeType(new ShapeType("DataFlow", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DataFlowArrow(shapeType, t); },
         DataFlowArrow.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Dependency", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DependencyArrow(shapeType, t); },
         DependencyArrow.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Database", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DatabaseSymbol(shapeType, t); },
         DatabaseSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Entity", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new EntitySymbol(shapeType, t); },
         EntitySymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Annotation", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new AnnotationSymbol(shapeType, t); },
         AnnotationSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Cloud", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new CloudSymbol(shapeType, t); },
         CloudSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Class", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ClassSymbol(shapeType, t); },
         ClassSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Component", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new ComponentSymbol(shapeType, t); },
         ComponentSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Document", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new DocumentSymbol(shapeType, t); },
         DocumentSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Interface", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new InterfaceSymbol(shapeType, t); },
         InterfaceSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("InterfaceUsage", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) { return new InterfaceUsageSymbol(shapeType, t); },
         InterfaceUsageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Server", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
             "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Tower.emf", Assembly.GetExecutingAssembly());
         result.Text = "Server";
         return result;
         }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("RTU", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
             "Dataweb.NShape.SoftwareArchitectureShapes.Resources.RTU.emf", Assembly.GetExecutingAssembly());
         result.Text = "RTU";
         return result;
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Actor", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
             "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Actor.emf", Assembly.GetExecutingAssembly());
         result.Text = "Actor";
         return result;
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Monitor", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
             "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Monitor.emf", Assembly.GetExecutingAssembly());
         result.Text = "Monitor";
         return result;
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("PC", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
             "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Desktop.emf", Assembly.GetExecutingAssembly());
         result.Text = "PC";
         return result;
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Tower", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
         VectorImage result = VectorImage.CreateInstance(shapeType, t,
             "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Tower.emf", Assembly.GetExecutingAssembly());
         result.Text = "Tower";
         return result;
     }, VectorImage.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Laptop", namespaceName, namespaceName,
         delegate(ShapeType shapeType, Template t) {
             VectorImage result = VectorImage.CreateInstance(shapeType, t,
                 "Dataweb.NShape.SoftwareArchitectureShapes.Resources.Laptop.emf", Assembly.GetExecutingAssembly());
             result.Text = "Notebook";
             return result;
         }, VectorImage.GetPropertyDefinitions));
 }
Beispiel #21
0
 public static void Initialize(IRegistrar registrar)
 {
     registrar.RegisterLibrary(namespaceName, preferredRepositoryVersion);
     registrar.RegisterShapeType(new ShapeType("Terminator", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new TerminatorSymbol(shapeType, t)); },
                                               TerminatorSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Process", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ProcessSymbol(shapeType, t)); },
                                               ProcessSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Decision", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DecisionSymbol(shapeType, t)); },
                                               DecisionSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("InputOutput", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new InputOutputSymbol(shapeType, t)); },
                                               InputOutputSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Document", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DocumentSymbol(shapeType, t)); },
                                               DocumentSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("OffpageConnector", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new OffpageConnectorSymbol(shapeType, t)); },
                                               OffpageConnectorSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Connector", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ConnectorSymbol(shapeType, t)); },
                                               ConnectorSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("PredefinedProcess", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new PredefinedProcessSymbol(shapeType, t)); },
                                               PredefinedProcessSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Extract", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ExtractSymbol(shapeType, t)); },
                                               ExtractSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Merge", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new MergeSymbol(shapeType, t)); },
                                               MergeSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("OnlineStorage", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new OnlineStorageSymbol(shapeType, t)); },
                                               OnlineStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("OfflineStorage", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new OfflineStorageSymbol(shapeType, t)); },
                                               OfflineStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("DrumStorage", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DrumStorageSymbol(shapeType, t)); },
                                               DrumStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("DiskStorage", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DiskStorageSymbol(shapeType, t)); },
                                               DiskStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("TapeStorage", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new TapeStorageSymbol(shapeType, t)); },
                                               TapeStorageSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Preparation", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new PreparationSymbol(shapeType, t)); },
                                               PreparationSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("ManualInput", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ManualInputSymbol(shapeType, t)); },
                                               ManualInputSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Core", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new CoreSymbol(shapeType, t)); },
                                               CoreSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Display", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new DisplaySymbol(shapeType, t)); },
                                               DisplaySymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Tape", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new TapeSymbol(shapeType, t)); },
                                               TapeSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("ManualOperation", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new ManualOperationSymbol(shapeType, t)); },
                                               ManualOperationSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Sort", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new SortSymbol(shapeType, t)); },
                                               SortSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Collate", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new CollateSymbol(shapeType, t)); },
                                               CollateSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("Card", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new CardSymbol(shapeType, t)); },
                                               CardSymbol.GetPropertyDefinitions));
     registrar.RegisterShapeType(new ShapeType("CommLink", namespaceName, namespaceName,
                                               delegate(ShapeType shapeType, Template t) { return(new CommLinkSymbol(shapeType, t)); },
                                               CommLinkSymbol.GetPropertyDefinitions));
 }