1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/sucksis-geo-flying

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
GridLayerParaDialog.cs 3.4 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Yonghe Отправлено 02.10.2020 04:33 367b0b1
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;
namespace GeoFly
{
public partial class GridLayerParaDialog : Form
{
public GridLayerParaDialog()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() != DialogResult.OK)
return;
this.textBox_DEM.Text = dlg.FileName;
}
private void button2_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() != DialogResult.OK)
return;
this.textBox_LULC.Text = dlg.FileName;
}
private void button3_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() != DialogResult.OK)
return;
this.textBox_SOIL.Text = dlg.FileName;
}
private void button5_Click(object sender, EventArgs e)
{
this.Close();
}
private void button6_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() != DialogResult.OK)
return;
string filename = dlg.FileName;
StreamReader sr = new StreamReader(filename);
//跳过文件表头
sr.ReadLine();
//下面开始读数据
while (!sr.EndOfStream)
{
string[] strs = sr.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
}
}
private void button7_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() != DialogResult.OK)
return;
}
private void button4_Click(object sender, EventArgs e)
{
string s= this.textBox_DEM.Text;
if (s == "")
{
MessageBox.Show("DEM文件路径设置不能为空");
return;
}
HydroSimulate.g_GridLayerPara.DemFileName = s;
s = this.textBox_LULC.Text;
if (s == "")
{
MessageBox.Show("LULC文件路径设置不能为空");
return;
}
HydroSimulate.g_GridLayerPara.LulcFileName = s;
s = this.textBox_SOIL.Text;
if (s == "")
{
MessageBox.Show("SOIL文件路径设置不能为空");
return;
}
HydroSimulate.g_GridLayerPara.SoilFileName = s;
HydroSimulate.g_GridLayerPara.WriteGridIOFile(HydroSimulate.path + "\\SysPara\\GridIO.txt");
}
private void GridLayerParaDialog_Load(object sender, EventArgs e)
{
this.textBox_DEM.Text = HydroSimulate.g_GridLayerPara.DemFileName;
this.textBox_LULC.Text = HydroSimulate.g_GridLayerPara.LulcFileName;
this.textBox_SOIL.Text = HydroSimulate.g_GridLayerPara.SoilFileName;
}
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/sucksis-geo-flying.git
git@api.gitlife.ru:oschina-mirror/sucksis-geo-flying.git
oschina-mirror
sucksis-geo-flying
sucksis-geo-flying
master