コード例 #1
0
        private void AddPart(string name, CompositeVisual Part, Point posn, Size size, string interfaceDevice, string interfaceElement)
        {
            CompositeVisual _part = AddDevice(
                name: name,
                device: Part,
                size: size,
                posn: posn,
                interfaceDeviceName: interfaceDevice,
                interfaceElementName: interfaceElement
                );

            {
                _part.Name = _generalComponentName + "_" + name;
            };
        }
コード例 #2
0
        private CompositeVisual AddPart(string name, CompositeVisual part, Point posn, Size size, string interfaceDevice, string interfaceElement)
        {
            size.Width  *= SCREENRES;
            size.Height *= SCREENRES;
            posn.X      *= SCREENRES;
            posn.Y      *= SCREENRES;

            CompositeVisual newPart = AddDevice(
                name: name,
                device: part,
                size: size,
                posn: posn,
                interfaceDeviceName: interfaceDevice,
                interfaceElementName: interfaceElement
                );

            // NOTE: this shortens the name of the generated part
            newPart.Name = name;
            return(newPart);
        }
コード例 #3
0
        private void AddPart(string name, CompositeVisual Part, Point posn, Size size, string interfaceDevice, string interfaceElement)
        {
            size.Width  *= SCREENRES;
            size.Height *= SCREENRES;
            posn.X      *= SCREENRES;
            posn.Y      *= SCREENRES;

            CompositeVisual _part = AddDevice(
                name: name,
                device: Part,
                size: size,
                posn: posn,
                interfaceDeviceName: interfaceDevice,
                interfaceElementName: interfaceElement
                );

            {
                _part.Name = name;
            };
        }