资源简介
gis原理时做的作业,感觉挺麻烦 四叉树索引 c#

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;
namespace taste.txt
{
public partial class Form1 : Form
{
Font font = new Font(“Arial“ 10 Fontstyle.Regular);
ArrayList arrText = new ArrayList();
ArrayList shuxing = new ArrayList();
ArrayList Peano = new ArrayList();
ArrayList Len = new ArrayList();
int i = -1;
public Form1()
{
InitializeComponent();
}
#region//导入文件
public void input()
{
StreamReader objReader = new StreamReader(openFileDialog1.FileName);
StreamReader objReader1 = new StreamReader(openFileDialog1.FileName);
string sLine = ““;
string Line = ““;
int j = 0;
while (Line != null)
{
Line = objReader1.ReadLine();
i = i + 1;//算出文本的行数
}
string[] tokens = new string[i];
string[][] tokens1 = new string[i][];
while (sLine != null)
{
sLine = objReader.ReadLine();
if (sLine != null)
{
tokens[j] = sLine;
tokens1[j] = new string[sLine.Length];
tokens1[j] = sLine.Split(‘ ‘);
shuxing.Add(tokens1[j][0]);
float[] dian = new float[tokens1[j].Length];
for (int k = 1; k < tokens1[j].Length; k++)
{
dian[k] = Convert.ToSingle(tokens1[j][k]);
}
arrText.Add(dian);
textBox1.Text = textBox1.Text + sLine + “\r\n“;
j++;
}
}
objReader.Close();
}
#endregion
#region//计算Peaon键
private void jisuan()
{
for (int m = 0; m < i; m++)
{
if (((Single[])(arrText[m])).Length == 3)//判断数据是否为点数据
{
Point1 p1 = new Point1();
int M;
double x11 x12;
x11 = Convert.ToDouble(((Single[])(arrText[m]))[1]);
x12 = Convert.ToDouble(((Single[])(arrText[m]))[2]);
p1.ij(x11 x12);
M = p1.resultPeano(p1.i p1.j);//计算点的Peano键并返回给M
Peano.Add(M);
Len.Add(p1.d);
textBox4.Text = textBox4.Text + shuxing[m] + “\t“ + Convert.ToString(Peano[m]) + “\t“ + Convert.ToString(Len[m]) + “\r\n“;
}
else if (((Single[])(arrText[m])).Length == 5)//判断数据是否为线数据
{
Point1 p1 = new Point1();
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28672 2008-12-08 11:09 四叉树索引\taste.txt\bin\Debug\taste.txt.exe
文件 65024 2008-12-08 11:09 四叉树索引\taste.txt\bin\Debug\taste.txt.pdb
文件 5632 2005-12-08 14:51 四叉树索引\taste.txt\bin\Debug\taste.txt.vshost.exe
文件 12587 2008-12-08 11:10 四叉树索引\taste.txt\Form1.cs
文件 9524 2008-11-27 00:04 四叉树索引\taste.txt\Form1.Designer.cs
文件 6420 2008-11-27 00:04 四叉树索引\taste.txt\Form1.resx
文件 433 2008-11-26 22:23 四叉树索引\taste.txt\line.cs
文件 842 2008-11-27 00:04 四叉树索引\taste.txt\obj\Debug\taste.txt.csproj.GenerateResource.Cache
文件 28672 2008-12-08 11:09 四叉树索引\taste.txt\obj\Debug\taste.txt.exe
文件 180 2008-11-27 00:04 四叉树索引\taste.txt\obj\Debug\taste.txt.Form1.resources
文件 65024 2008-12-08 11:09 四叉树索引\taste.txt\obj\Debug\taste.txt.pdb
文件 180 2008-11-16 14:19 四叉树索引\taste.txt\obj\Debug\taste.txt.Properties.Resources.resources
文件 282 2008-12-08 11:10 四叉树索引\taste.txt\obj\taste.txt.csproj.FileList.txt
文件 950 2008-11-28 23:00 四叉树索引\taste.txt\Point.cs
文件 634 2008-11-26 22:22 四叉树索引\taste.txt\Polygon.cs
文件 468 2008-11-16 14:09 四叉树索引\taste.txt\Program.cs
文件 1172 2008-11-16 14:09 四叉树索引\taste.txt\Properties\AssemblyInfo.cs
文件 579 2008-11-26 22:37 四叉树索引\taste.txt\Properties\DataSources\Form1.datasource
文件 2872 2008-11-16 14:09 四叉树索引\taste.txt\Properties\Resources.Designer.cs
文件 5612 2008-11-16 14:09 四叉树索引\taste.txt\Properties\Resources.resx
文件 1092 2008-11-16 14:09 四叉树索引\taste.txt\Properties\Settings.Designer.cs
文件 249 2008-11-16 14:09 四叉树索引\taste.txt\Properties\Settings.settings
文件 3438 2008-11-26 22:54 四叉树索引\taste.txt\taste.txt.csproj
文件 2004 2008-11-25 22:21 四叉树索引\taste.txt\TranPoint.cs
文件 916 2008-11-16 14:09 四叉树索引\taste.txt.sln
..A..H. 21504 2008-12-05 22:19 四叉树索引\taste.txt.suo
目录 0 2008-11-16 15:10 四叉树索引\taste.txt\obj\Debug\Refactor
目录 0 2008-11-16 14:09 四叉树索引\taste.txt\obj\Debug\TempPE
目录 0 2008-11-16 14:19 四叉树索引\taste.txt\bin\Debug
目录 0 2008-12-08 11:09 四叉树索引\taste.txt\obj\Debug
............此处省略9个文件信息
- 上一篇:ASP.NET新闻管理系统-三层架构之MVC模式
- 下一篇:C#多线程进度条
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论