xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 0M
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發(fā)布日期: 2021-05-23
  • 語(yǔ)言: 其他
  • 標(biāo)簽: 其他??

資源簡(jiǎn)介

IsoHeightCtrl.zip

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Drawing;
using?System.Runtime.InteropServices;
using?System.Windows;
using?System.Windows.Controls;
using?System.Windows.Interop;
using?System.Windows.Media.Imaging;

namespace?WPFCtrlLib
{
????///?
????///?等高線圖控件
????///?

????public?partial?class?IsoHeightCtrl?:?UserControl
????{
????????private?const?int?grid_w?=?10;
????????private?const?int?grid_h?=?10;

????????private?double?w;
????????private?double?h;
????????private?int?bitmap_w;
????????private?int?bitmap_h;

????????private?int?x_num;
????????private?int?y_num;
????????private?float[]?data;

????????private?float?min;
????????private?float?max;

????????private?byte[]?Rs?Gs?Bs;

????????private?Bitmap?bitmap;
????????private?Graphics?graphics;

????????public?IsoHeightCtrl()
????????{
????????????InitializeComponent();
????????}

????????private?void?UserControl_SizeChanged(object?sender?SizeChangedEventArgs?e)
????????{
????????????Draw();
????????}

????????///?
????????///?離散高度點(diǎn)列表
????????///?XY總長(zhǎng)為單位1
????????///?

????????public?MeasureData[]?HeightDots
????????{
????????????get?{?return?(MeasureData[])GetValue(HeightDotsProperty);?}
????????????set?{?SetValue(HeightDotsProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?HeightDotsProperty?=
????????????DependencyProperty.Register(“HeightDots“?typeof(MeasureData[])?typeof(IsoHeightCtrl)?new?Propertymetadata(null?(s?e)?=>
????????????{
????????????????IsoHeightCtrl?ihc?=?s?as?IsoHeightCtrl;
????????????????ihc.Draw();
????????????}));

????????///?
????????///?顏色列表
????????///?其數(shù)量決定了等高線的層數(shù)
????????///?

????????public?string?ColorList
????????{
????????????get?{?return?(string)GetValue(ColorListProperty);?}
????????????set?{?SetValue(ColorListProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?ColorListProperty?=
????????????DependencyProperty.Register(“ColorList“?typeof(string)?typeof(IsoHeightCtrl)?new?Propertymetadata(“#072FFA#0779FA#07C4FA#07DFD0#07FAA7#79FA57#ECFA07#F3D307#FAAD07#F67207#FA1207“?(s?e)?=>
????????????{
????????????????IsoHeightCtrl?ihc?=?s?as?IsoHeightCtrl;
????????????????ihc.ParseColor();
????????????}));

????????///?
????????///?繪制圖形
????????///?

????????private?void?Draw()
????????{
????????????if?(HeightDots?==?null)
????????????{
????????????????return;
????????????}

????????????w?=?this.ActualWidth;
????????????h?=?this.ActualHeight;
????????????if?(w?<=?0?||?h?<=?0)
????????????{
????????????????return;
????????????}

????????????if?(Rs?==?null)
????????????{
????????????????ParseColor();
????????????}

????????????InitData();
????????????CreateBitmap();

????????????float?gap?=?(max?-?min)?/?Rs.Length;
????????????for?(int?i?=?0;?i?????????????{
????????????????List

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????16965??2019-06-12?11:05??IsoHeightCtrl.xaml.cs
?????文件?????????579??2019-06-12?09:10??IsoHeightCtrl.xaml

評(píng)論

共有 條評(píng)論