当前位置: 首页>>代码示例>>C#>>正文


C# Draw类代码示例

本文整理汇总了C#中Draw的典型用法代码示例。如果您正苦于以下问题:C# Draw类的具体用法?C# Draw怎么用?C# Draw使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Draw类属于命名空间,在下文中一共展示了Draw类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: eval

 public static int eval(this Game o, Draw d, GameType gt, PrizeCategory pc)
 {
     if(gt == GameType.Undefined || pc == PrizeCategory.Undefined)
         return 0;
     o.notNull(); d.notNull();
     return o.Playslips.Sum(playslip => eval((Playslip)playslip, d, gt, pc));
 }
开发者ID:bjornebjornson,项目名称:LottoEf4,代码行数:7,代码来源:X.cs

示例2: Intersect

        public Intersect()
        {
            InitializeComponent();

            MyMap.Layers.LayersInitialized += Layers_LayersInitialized;

            MyMap.MinimumResolution = double.Epsilon;

            MyDrawObject = new Draw(MyMap)
            {
                DrawMode = DrawMode.Polygon,
                IsEnabled = false,
                FillSymbol = LayoutRoot.Resources["CyanFillSymbol"] as ESRI.ArcGIS.Client.Symbols.FillSymbol
            };
            MyDrawObject.DrawComplete += MyDrawObject_DrawComplete;

            parcelGraphicsLayer = MyMap.Layers["ParcelsGraphicsLayer"] as GraphicsLayer;
            intersectGraphicsLayer = MyMap.Layers["IntersectGraphicsLayer"] as GraphicsLayer;

            geometryService =
              new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");

            geometryService.SimplifyCompleted += GeometryService_SimplifyCompleted;
            geometryService.IntersectCompleted += GeometryService_IntersectCompleted;
            geometryService.Failed += GeometryService_Failed;

            random = new Random();
        }
开发者ID:konglingjie,项目名称:arcgis-samples-silverlight,代码行数:28,代码来源:Intersect.xaml.cs

示例3: DriveTimes

        public DriveTimes()
        {
            InitializeComponent();

            graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;

            bufferSymbols = new List<FillSymbol>(
                    new FillSymbol[] { LayoutRoot.Resources["FillSymbol1"] as FillSymbol,
                        LayoutRoot.Resources["FillSymbol2"] as FillSymbol,
                        LayoutRoot.Resources["FillSymbol3"] as FillSymbol });

            _geoprocessorTask = new Geoprocessor("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/GPServer/Generate%20Service%20Areas");
            _geoprocessorTask.JobCompleted += GeoprocessorTask_JobCompleted;
            _geoprocessorTask.StatusUpdated += GeoprocessorTask_StatusUpdated;
            _geoprocessorTask.GetResultDataCompleted += GeoprocessorTask_GetResultDataCompleted;
            _geoprocessorTask.Failed += GeoprocessorTask_Failed;

            MyDrawObject = new Draw(MyMap)
            {
                IsEnabled = true,
                DrawMode = DrawMode.Point
            };

            MyDrawObject.DrawComplete += MyDrawObject_DrawComplete;
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:25,代码来源:DriveTimes.xaml.cs

示例4: DrawTimer

    IEnumerator DrawTimer(byte id, Draw canvas)
    {
        float time = drawTime;

        while (time > 0f)
        {
            time -= Time.deltaTime;
            countDownText.text = ((int)time).ToString();
            yield return null;

            if (Input.GetKeyDown(KeyCode.Space))
                break;
        }

        countDownText.text = "";
        activeGUI = true;

        switch (id)
        {
            case 0:
                faceStore.LiegeFace = canvas.EndDraw(); break;
            case 1:
                faceStore.BlueVassalFace = canvas.EndDraw(); break;
            case 2:
                faceStore.RedVassalFace = canvas.EndDraw(); break;
        }
        Destroy(canvas.gameObject);

        transfer.Transfer();
    }
开发者ID:ErikUggeldahl,项目名称:GGJ14,代码行数:30,代码来源:PlayerSetupMenu.cs

示例5: Image

		public Image(Map map, Draw.Image image, Geometry2D.Single.Box source, Geometry2D.Single.Box destination)
		{
			this.Map = map;
			this.Data = image;
			this.Source = source;
			this.Destination = destination;
		}
开发者ID:imintsystems,项目名称:Kean,代码行数:7,代码来源:Image.cs

示例6: Distance

		public override float Distance(Draw.Image other)
		{
			float result = 0;
			if (other.IsNull())
				result = float.MaxValue;
			else if (!(other is YuvPacked))
				using (YuvPacked o = other.Convert<YuvPacked>())
					result = this.Distance(o);
			else if (this.Size != other.Size)
				using (YuvPacked o = other.ResizeTo(this.Size) as YuvPacked)
					result = this.Distance(o);
			else
			{
				for (int y = 0; y < this.Size.Height; y++)
					for (int x = 0; x < this.Size.Width; x++)
					{
						Color.Yuv c = this[x, y];
						Color.Yuv o = (other as YuvPacked)[x, y];
						if (c.Distance(o) > 0)
						{
							Color.Yuv maximum = o;
							Color.Yuv minimum = o;
							for (int otherY = Integer.Maximum(0, y - this.DistanceRadius); otherY < Integer.Minimum(y + 1 + this.DistanceRadius, this.Size.Height); otherY++)
								for (int otherX = Integer.Maximum(0, x - this.DistanceRadius); otherX < Integer.Minimum(x + 1 + this.DistanceRadius, this.Size.Width); otherX++)
									if (otherX != x || otherY != y)
									{
										Color.Yuv pixel = (other as YuvPacked)[otherX, otherY];
										if (maximum.Y < pixel.Y)
											maximum.Y = pixel.Y;
										else if (minimum.Y > pixel.Y)
											minimum.Y = pixel.Y;
										if (maximum.U < pixel.U)
											maximum.U = pixel.U;
										else if (minimum.U > pixel.U)
											minimum.U = pixel.U;
										if (maximum.V < pixel.V)
											maximum.V = pixel.V;
										else if (minimum.V > pixel.V)
											minimum.V = pixel.V;
									}
							float distance = 0;
							if (c.Y < minimum.Y)
								distance += Single.Squared(minimum.Y - c.Y);
							else if (c.Y > maximum.Y)
								distance += Single.Squared(c.Y - maximum.Y);
							if (c.U < minimum.U)
								distance += Single.Squared(minimum.U - c.U);
							else if (c.U > maximum.U)
								distance += Single.Squared(c.U - maximum.U);
							if (c.V < minimum.V)
								distance += Single.Squared(minimum.V - c.V);
							else if (c.V > maximum.V)
								distance += Single.Squared(c.V - maximum.V);
							result += Single.SquareRoot(distance) / 3;
						}
					}
				result /= this.Size.Length;
			}
			return result;
		}
开发者ID:imintsystems,项目名称:Kean,代码行数:60,代码来源:YuvPacked.cs

示例7: AreaAndLengths

        public AreaAndLengths()
        {
            InitializeComponent();
            ESRI.ArcGIS.Client.Geometry.Envelope initialExtent =
                new ESRI.ArcGIS.Client.Geometry.Envelope(
            ESRI.ArcGIS.Client.Bing.Transform.GeographicToWebMercator(
                new ESRI.ArcGIS.Client.Geometry.MapPoint(-130, 20)),
            ESRI.ArcGIS.Client.Bing.Transform.GeographicToWebMercator(
                new ESRI.ArcGIS.Client.Geometry.MapPoint(-65, 55)));

            initialExtent.SpatialReference = new SpatialReference(102100);

            MyMap.Extent = initialExtent;

            MyDrawObject = new Draw(MyMap)
            {
                DrawMode = DrawMode.Polygon,
                IsEnabled = false,
                FillSymbol = LayoutRoot.Resources["DefaultFillSymbol"] as ESRI.ArcGIS.Client.Symbols.FillSymbol
            };
            MyDrawObject.DrawComplete += MyDrawObject_DrawComplete;
            MyDrawObject.DrawBegin += MyDrawObject_DrawBegin;

            List<CalculationType> enumVals = new List<CalculationType>();
            foreach (var val in typeof(CalculationType).GetFields())
            {
                if (val.IsLiteral)
                    enumVals.Add((CalculationType)val.GetValue(typeof(CalculationType)));
            }
            CalcTypeListBox.ItemsSource = enumVals;
            CalcTypeListBox.SelectedIndex = 0;
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:32,代码来源:AreaAndLengths.xaml.cs

示例8: GetSets

        private IEnumerable<List<int>> GetSets(Draw draw, int s)
        {
            List<int> balls = draw.BallSorted;

            for (int a = 0; a < 6; a++)
            {
                for (int b = a+1; b < 6; b++)
                {
                    for (int c = b+1; c < 6; c++)
                    {
                        for (int d = c+1; d < 6; d++)
                        {
                            for (int e = d+1; e < 6; e++)
                            {
                                for (int f = e+1; f < 6; f++)
                                {
                                    if (s == 6)
                                        yield return new List<int>() { balls[a], balls[b], balls[c], balls[d], balls[e], balls[f] };
                                }
                                if (s == 5)
                                    yield return new List<int>() { balls[a], balls[b], balls[c], balls[d], balls[e] };
                            }
                            if (s == 4)
                                yield return new List<int>() { balls[a], balls[b], balls[c], balls[d] };
                        }
                        if (s == 3)
                            yield return new List<int>() { balls[a], balls[b], balls[c] };
                    }
                    if (s == 2)
                        yield return new List<int>() { balls[a], balls[b] };
                }
                if (s == 1)
                    yield return new List<int>() { balls[a] };
            }
        }
开发者ID:chrismoutray,项目名称:LottoStats,代码行数:35,代码来源:OccuranceOfNumbersGT3.cs

示例9: MainPage

        public MainPage()
        {
            InitializeComponent();

            activateIdentify = true;

            MyDrawObject = new Draw(myMap)
            {
                FillSymbol = LayoutRoot.Resources["DefaultFillSymbol"] as ESRI.ArcGIS.Client.Symbols.FillSymbol,
                DrawMode = DrawMode.Rectangle

            };

            MyDrawObject.DrawComplete += myDrawObject_DrawComplete;
            MyDrawObject.IsEnabled = false;
            _toolMode = "";
            _previousExtentImage = btnPrevExtent.Content as Image;
            _nextExtentImage = btnNextExtent.Content as Image;

            // Initializes the graphics layer
            graphicsLayer = myMap.Layers["myGraphicsLayer"] as GraphicsLayer;

            myMeasureObject = new Draw(myMap)
            {
                // Sets the initial drawing of the line and polygon
                FillSymbol = LayoutRoot.Resources["RedFillSymbol"] as ESRI.ArcGIS.Client.Symbols.FillSymbol,
                LineSymbol = LayoutRoot.Resources["RedLineSymbol"] as ESRI.ArcGIS.Client.Symbols.CartographicLineSymbol
            };

            // Runs the measure draw complete method
            myMeasureObject.DrawComplete += myMeasureObject_DrawComplete;
            // Disables the measure drawing once a graphic is drawn - in other words, I don't want to draw multiple graphics
            myMeasureObject.IsEnabled = false;
        }
开发者ID:csergent45,项目名称:Hybrid,代码行数:34,代码来源:MainPage.xaml.cs

示例10: Demo2

        //普通实现方法
        public static void Demo2()
        {
            IService s1 = new Saving();
            IService s2 = new Draw();
            IService s3 = new Fund();

            //要办理业务的三个客户队列
            List<IService> list = new List<IService>();
            list.Add(s1);
            list.Add(s2);
            list.Add(s3);

            foreach (IService item in list)
            {
                if (item is Saving)
                {
                    Console.WriteLine("存款");

                }
                else if (item is Draw)
                {
                    Console.WriteLine("取款");
                }
                else if (item is Fund)
                {
                    Console.WriteLine("基金");
                }
            }
        }
开发者ID:aloneplayer,项目名称:BenProjects,代码行数:30,代码来源:BankDemo.cs

示例11: FiledPlayslipDto

 public FiledPlayslipDto(Playslip playslip, Draw draw)
 {
     playslip.notNull();
     RefId = playslip.RefId;
     IsInvalidOrEmpty = playslip.invalid() || !playslip.valid();
     IsWin = playslip.valid() && null != draw && playslip.win(draw);
 }
开发者ID:bjornebjornson,项目名称:LottoEf4,代码行数:7,代码来源:FiledPlayslipDto.cs

示例12: IcnRecode

 public IcnRecode(Project project, double width, double heigth, Draw draw)
 {
     DrawLine = draw;
     _width = width;
     _heigth = heigth;
     _project = project;
 }
开发者ID:gabrielgio,项目名称:Vivacity,代码行数:7,代码来源:IcnRecode.cs

示例13: AreasAndLengths

        public AreasAndLengths()
        {
            InitializeComponent();

            ESRI.ArcGIS.Client.Geometry.Envelope initialExtent =
                    new ESRI.ArcGIS.Client.Geometry.Envelope(
                mercator.FromGeographic(
                    new ESRI.ArcGIS.Client.Geometry.MapPoint(-130, 20)) as MapPoint,
                mercator.FromGeographic(
                    new ESRI.ArcGIS.Client.Geometry.MapPoint(-65, 55)) as MapPoint);

            initialExtent.SpatialReference = new SpatialReference(102100);

            MyMap.Extent = initialExtent;

            MyDrawObject = new Draw(MyMap)
            {
                DrawMode = DrawMode.Polygon,
                IsEnabled = true,
                FillSymbol = LayoutRoot.Resources["DefaultFillSymbol"] as ESRI.ArcGIS.Client.Symbols.FillSymbol
            };
            MyDrawObject.DrawComplete += MyDrawObject_DrawComplete;
            MyDrawObject.DrawBegin += MyDrawObject_DrawBegin;

            calculationTypeCombo.ItemsSource = Enum.GetValues(typeof(CalculationType));
            calculationTypeCombo.SelectedIndex = 0;
        }
开发者ID:ahthakore,项目名称:arcgis-samples-silverlight,代码行数:27,代码来源:AreasAndLengths.xaml.cs

示例14: DrawDto

 public DrawDto(Draw draw)
 {
     draw.notNull();
     Super6 = draw.S6String;
     Spiel77 = draw.S77String;
     Lotto = draw.LString;
     Superzahl = draw.Sz.ToString();
     Zusatzzahl = draw.Zz.ToString();
 }
开发者ID:bjornebjornson,项目名称:LottoEf4,代码行数:9,代码来源:DrawDto.cs

示例15: BoardDto

 public BoardDto(Board board, Draw draw)
 {
     board.notNull();
     Combo = board.Combo;
     IsInvalid = board.invalid();
     Position = board.Position.ToString();
     Numbers = new List<byte>(board.AsArray);
     IsWin = board.valid() && null != draw && board.win(draw);
 }
开发者ID:bjornebjornson,项目名称:LottoEf4,代码行数:9,代码来源:BoardDto.cs


注:本文中的Draw类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。