自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 资源 (6)
  • 收藏
  • 关注

转载 el-drawer 父容器设置

element-ui的官网中,关于el-drawer的例子都是在body中打开,我的项目需求中,需要在某个DIV中打开。参考了网上的例子,实现了此功能,记录一下父容器的div中,设置:style="position: relative;overflow: hidden;"el-drawer 一定要在父容器的Div里面,设置如下:style="position:absolute"z-index="-1"参考文章:vue+elementUI el-drawer实现在子组件打开抽屉组件效果如下

2020-10-08 09:11:09 5423

原创 eclipse中使用proj4j库进行坐标转换

因为项目的关系,需要后台坐标转换,就想到了proj4库。下面是我在eclipse中使用的记录导入jar在pom.xml中加入 <!-- https://mvnrepository.com/artifact/org.locationtech.proj4j/proj4j --> <dependency> <groupId>org.locationtech.proj4j</groupId> <artifactId>pr

2020-09-16 17:57:16 3076 4

原创 leaflet 加载arcgis server发布的影像切片

leaflet 加载arcgis server发布的影像切片因为项目的关系,需要使用leaflet加载arcgis server 发布的影像切片,再网上查了资料,结合自己的情况,完成了底图的显示,记录一下。首先,加载leaflet.js 和leaflet.css<link href="../leafletmap/css/leaflet.1.3.1.css" type="text/css" rel="stylesheet"/> <script src="../leafletmap

2020-09-05 10:22:05 1808

Microsoft.DirectX 播放声音用到的Dll

Microsoft.DirectX.dll Microsoft.DirectX.DirectSound.dll Microsoft.DirectX.AudioVideoPlayback.dll 简易用法: http://yuyingying1986.blog.hexun.com/28920902_d.html

2009-12-30

Gis图标 16*16

包含放大,缩小,平移,测距,图层控制等图标,都是16*16的小图标,希望能有用

2009-08-12

将SQL2000数据库字段说明生成为Word格式数据字典

开发完程序之后,使用本程序,可以生成数据字典,本资源只支持SQLSERVER2000,如果是2000以上的版本,需要把sysproperties表换成sys.extended_properties,sysproperties.id换成sys.extended_properties.major_id,colid对应sys.extended_properties..minor_id

2009-05-26

C# ListView 支持分组时拖拉排序的控件

using System; using System.Drawing; using System.Windows.Forms; using System.Collections.Generic; namespace WindowsFormsApplication1 { class DragItemListView:ListView { public DragItemListView() { SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); UpdateStyles(); this.MultiSelect = false; this.ListViewItemSorter = new ListViewIndexComparer(); if (OSFeature.Feature.IsPresent(OSFeature.Themes)) { this.AllowDrop = true; this.ItemDrag += new ItemDragEventHandler(DragItemListView_ItemDrag); this.DragEnter += new DragEventHandler(DragItemListView_DragEnter); this.DragLeave += new EventHandler(DragItemListView_DragLeave); this.DragOver += new DragEventHandler(DragItemListView_DragOver); this.DragDrop += new DragEventHandler(DragItemListView_DragDrop); } } void DragItemListView_DragDrop(object sender, DragEventArgs e) { // Retrieve the index of the insertion mark; int targetIndex = this.InsertionMark.Index; // If the insertion mark is not visible, exit the method. if (targetIndex == -1) { return; } // If the insertion mark is to the right of the item with // the corresponding index, increment the target index. // Retrieve the dragged item. ListViewItem draggedItem = (ListViewItem)e.Data.GetData(typeof(ListViewItem)); // Insert a copy of the dragged item at the target index. // A copy must be inserted before the original item is removed // to preserve item index values. ListViewItem NewItem = (ListViewItem)draggedItem.Clone(); if (draggedItem.Index < targetIndex) { if (targetIndex - draggedItem.Index > 1) NewItem.Group = this.Items[targetIndex - 1].Group; else NewItem.Group = this.Items[targetIndex].Group; } else { if (draggedItem.Index - targetIndex > 1) NewItem.Group = this.Items[targetIndex].Group; else NewItem.Group = this.Items[targetIndex - 1].Group; } if (this.InsertionMark.AppearsAfterItem) { targetIndex++; } this.Items.Insert(targetIndex, NewItem); // Remove the original copy of the dragged item. this.Items.Remove(draggedItem); } void DragItemListView_DragOver(object sender, DragEventArgs e) { // Retrieve the client coordinates of the mouse pointer. Point targetPoint = this.PointToClient(new Point(e.X, e.Y)); // Retrieve the index of the item closest to the mouse pointer. //int targetIndex = this.InsertionMark.NearestIndex(targetPoint); int targetIndex = GetNearItem(targetPoint).Index; // Confirm that the mouse pointer is not over the dragged item. if (targetIndex > -1) { // Determine whether the mouse pointer is to the left or // the right of the midpoint of the closest item and set // the InsertionMark.AppearsAfterItem property accordingly. Rectangle itemBounds = this.GetItemRect(targetIndex); if (targetPoint.X > itemBounds.Left + (itemBounds.Width / 2)) { this.InsertionMark.AppearsAfterItem = true; } else { this.InsertionMark.AppearsAfterItem = false; } } // Set the location of the insertion mark. If the mouse is // over the dragged item, the targetIndex value is -1 and // the insertion mark disappears. this.InsertionMark.Index = targetIndex; } void DragItemListView_DragLeave(object sender, EventArgs e) { this.InsertionMark.Index = -1; } void DragItemListView_ItemDrag(object sender, ItemDragEventArgs e) { this.DoDragDrop(e.Item, DragDropEffects.Move); } void DragItemListView_DragEnter(object sender, DragEventArgs e) { e.Effect = e.AllowedEffect; } private class ListViewIndexComparer : System.Collections.IComparer { public int Compare(object x, object y) { return ((ListViewItem)x).Index - ((ListViewItem)y).Index; } } /// <summary> /// 搜索最近的ListViewItem /// </summary> /// <param name="ClientPoint">工作区坐标</param> /// <returns></returns> public ListViewItem GetNearItem(Point ClientPoint) { ListViewItem lvt = this.GetItemAt(ClientPoint.X, ClientPoint.Y); if (lvt != null) return lvt; List<ListViewItem> vt = new List<ListViewItem>(); for (int i = 1; i < 10; i++) { lvt = this.GetItemAt(ClientPoint.X, ClientPoint.Y + i); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X, ClientPoint.Y - i); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X + i, ClientPoint.Y); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X + i, ClientPoint.Y + i); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X + i, ClientPoint.Y - i); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X - i, ClientPoint.Y); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X - i, ClientPoint.Y + i); if (lvt != null) vt.Add(lvt); lvt = this.GetItemAt(ClientPoint.X - i, ClientPoint.Y - i); if (lvt != null) vt.Add(lvt); if (vt.Count > 0) break; } if (vt.Count == 0) { return null; } else if (vt.Count == 1) { return vt[0]; } else { double HisDis = 0; int i = 0; foreach (ListViewItem item in vt) { double dis = GetDistince(ClientPoint, item.Position); if (i == 0 || dis < HisDis) { lvt = item; HisDis = dis; } i++; } return lvt; } } /// <summary> /// 两点间的距离 /// </summary> /// <param name="start">起点</param> /// <param name="end">终点</param> /// <returns></returns> private double GetDistince(Point start, Point end) { double distince2 = Math.Pow((start.X - end.X), 2) + Math.Pow((start.Y - end.Y), 2); return Math.Abs(Math.Sqrt(distince2)); } } }

2009-04-03

C# 自定义组件编辑器 Demo

下拉框的形式,可以展开的类型转换器,自定义UI的属性编辑器(弹出消息),下拉可视控件编辑器,列表等

2009-02-19

vb 10进制与16进制转换 大整数相加

自己写的一个小程序,不知道有没有人能用上

2008-09-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除