Exemplo n.º 1
0
 public Point(int x, int y)
     : this()
 {
     X = x;
     Y = y;
     Prop = new PointProperty() { SomeProperty = 23 };
 }
Exemplo n.º 2
0
        public int UxThemeGetThemePosition(IntPtr hTheme, int iPartId, int iStateId, PointProperty prop, out Point_ result)
        {
            POINT retval;
            int   hresult = UXTheme.GetThemePosition(hTheme, iPartId, iStateId, (int)prop, out retval);

            result = retval.ToPoint();
            return(hresult);
        }
Exemplo n.º 3
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public Point GetPoint(PointProperty prop)
        {
            //valid values are 0xd49 to 0xd50
            SourceGenerated.EnumValidator.Validate(prop, nameof(prop));

            _lastHResult = GetThemePosition(this, Part, State, (int)prop, out Point point);
            return(point);
        }
Exemplo n.º 4
0
 public Point GetPoint(PointProperty prop)
 {
     if (!System.Windows.Forms.ClientUtils.IsEnumValid(prop, (int)prop, 0xd49, 0xd50))
     {
         throw new InvalidEnumArgumentException("prop", (int)prop, typeof(PointProperty));
     }
     System.Windows.Forms.NativeMethods.POINT pPoint = new System.Windows.Forms.NativeMethods.POINT();
     this.lastHResult = System.Windows.Forms.SafeNativeMethods.GetThemePosition(new HandleRef(this, this.Handle), this.part, this.state, (int)prop, pPoint);
     return(new Point(pPoint.x, pPoint.y));
 }
Exemplo n.º 5
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public Point GetPoint(PointProperty prop)
        {
            //valid values are 0xd49 to 0xd50
            if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)PointProperty.Offset, (int)PointProperty.MinSize5))
            {
                throw new InvalidEnumArgumentException(nameof(prop), (int)prop, typeof(PointProperty));
            }

            _lastHResult = GetThemePosition(this, Part, State, (int)prop, out Point point);
            return(point);
        }
Exemplo n.º 6
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public Point GetPoint(PointProperty prop)
        {
            //valid values are 0xd49 to 0xd50
            if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)PointProperty.Offset, (int)PointProperty.MinSize5))
            {
                throw new InvalidEnumArgumentException(nameof(prop), (int)prop, typeof(PointProperty));
            }

            lastHResult = SafeNativeMethods.GetThemePosition(new HandleRef(this, Handle), part, state, (int)prop, out Point point);
            return(point);
        }
        public void Point()
        {
            var expected = new PointProperty {
                Point = new System.Windows.Point(10, 20)
            };
            var actual =
                new SerializationSupport().Assert(expected,
                                                  @"<?xml version=""1.0"" encoding=""utf-8""?><ExtendedXmlSerializerTests-PointProperty xmlns=""clr-namespace:ExtendedXmlSerializer.Tests.ExtensionModel.Xml;assembly=ExtendedXmlSerializer.Tests""><Point><X>10</X><Y>20</Y></Point></ExtendedXmlSerializerTests-PointProperty>");

            Assert.Equal(expected.Point, actual.Point);
        }
Exemplo n.º 8
0
        public Point_ GetPoint(PointProperty prop)
        {
            if (!Enum.IsDefined(typeof(PointProperty), prop))
            {
                throw new System.ComponentModel.InvalidEnumArgumentException("prop", (int)prop, typeof(PointProperty));
            }

            Point_ result;

            last_hresult = VisualStyles.UxThemeGetThemePosition(theme, this.part, this.state, prop, out result);
            return(result);
        }
Exemplo n.º 9
0
        public Resize()
        {
            _sizeProperty = new PointProperty("New size", FilterPropertyType.Size)
            {
                Value = new Size(400, 300)
            };;
            AddProperty(_sizeProperty);

            _input = new InputPin("Input", PinMediaType.Image);
            AddPin(_input);
            _output = new OutputPin("Output", PinMediaType.Image);
            AddPin(_output);
        }
Exemplo n.º 10
0
        protected static List <PointProperty> getParaList()
        {
            List <PointProperty> readlist = new List <PointProperty>();

            MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
            DataSet             data = opt.CreateDataSetOra("select r.para_code,r.VALUE_TAG from ht_pub_tech_para r  where r.para_type like '1___0%' and r.is_del = '0' order by r.para_code ");

            if (data != null && data.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row in data.Tables[0].Rows)
                {
                    PointProperty p = new PointProperty();
                    p.para_code = row["para_code"].ToString();
                    p.tag       = row["VALUE_TAG"].ToString();
                    readlist.Add(p);
                }
            }
            return(readlist);
        }
            public static PointProperty GetOrCreateWellKnownPointProperty(PointSet pointSet,
                                                                          PointSetPropertyType pointSetPropertyType)
            {
                // get the point property if it already exists
                if (pointSet.HasWellKnownProperty(pointSetPropertyType))
                {
                    return(pointSet.GetWellKnownProperty(pointSetPropertyType));
                }
                //
                PointProperty pointProperty = PointProperty.NullObject;

                // otherwise create it and then return it
                using (var transaction = DataManager.NewTransaction())
                {
                    transaction.Lock(pointSet);
                    //
                    pointProperty = pointSet.CreateWellKnownProperty(pointSetPropertyType);
                    //
                    transaction.Commit();
                }
                //
                return(pointProperty);
            }
Exemplo n.º 12
0
 public System.Drawing.Point GetPoint(PointProperty prop)
 {
 }
		public int UxThemeGetThemePosition (IntPtr hTheme, int iPartId, int iStateId, PointProperty prop, out Point result)
		{
			result = Point.Empty;
			return (int)S.S_FALSE;
		}
Exemplo n.º 14
0
 public Point GetPoint(PointProperty prop)
 {
     throw null;
 }
Exemplo n.º 15
0
 get => (PointVisualObject)GetValue(PointProperty); set => SetValue(PointProperty, value);
Exemplo n.º 16
0
 set => this.SetValue(PointProperty, value);
        /// <include file='doc\VisualStyleRenderer.uex' path='docs/doc[@for="VisualStyleRenderer.GetPoint"]/*' />
        /// <devdoc>
        ///    <para>
        ///       [See win32 equivalent.]
        ///    </para>
        /// </devdoc>
        public Point GetPoint(PointProperty prop) {
            //valid values are 0xd49 to 0xd50
            if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)PointProperty.Offset, (int)PointProperty.MinSize5))
            {
                throw new InvalidEnumArgumentException("prop", (int)prop, typeof(PointProperty));
            }

            NativeMethods.POINT point = new NativeMethods.POINT();
            lastHResult = SafeNativeMethods.GetThemePosition(new HandleRef(this, Handle), part, state, (int)prop, point);
            return new Point(point.x, point.y);
        }        
 public Point GetPoint(PointProperty prop)
 {
     if (!System.Windows.Forms.ClientUtils.IsEnumValid(prop, (int) prop, 0xd49, 0xd50))
     {
         throw new InvalidEnumArgumentException("prop", (int) prop, typeof(PointProperty));
     }
     System.Windows.Forms.NativeMethods.POINT pPoint = new System.Windows.Forms.NativeMethods.POINT();
     this.lastHResult = System.Windows.Forms.SafeNativeMethods.GetThemePosition(new HandleRef(this, this.Handle), this.part, this.state, (int) prop, pPoint);
     return new Point(pPoint.x, pPoint.y);
 }
		public Point GetPoint (PointProperty prop)
		{
			if (!Enum.IsDefined (typeof (PointProperty), prop))
				throw new System.ComponentModel.InvalidEnumArgumentException ("prop", (int)prop, typeof (PointProperty));

			Point result;
			last_hresult = VisualStyles.UxThemeGetThemePosition (theme, this.part, this.state, prop, out result);
			return result;
		}
Exemplo n.º 20
0
		public int UxThemeGetThemePosition (IntPtr hTheme, int iPartId, int iStateId, PointProperty prop, out Point result)
		{
			POINT retval;
			int hresult = UXTheme.GetThemePosition (hTheme, iPartId, iStateId, (int)prop, out retval);

			result = retval.ToPoint();
			return hresult;
		}
 public System.Drawing.Point GetPoint(PointProperty prop)
 {
 }
Exemplo n.º 22
0
 set => SetValue(PointProperty, value);
Exemplo n.º 23
0
 public int UxThemeGetThemePosition(IntPtr hTheme, int iPartId, int iStateId, PointProperty prop, out Point result) => throw new InvalidOperationException();