-
Notifications
You must be signed in to change notification settings - Fork 0
/
Import.cs
executable file
·70 lines (63 loc) · 1.88 KB
/
Import.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.IO;
namespace ImportManager
{
public class Import
{
public ArrayList Import_eni(string filePath)
{
FileStream inputStream;
ArrayList returnList = new ArrayList();
StreamReader strReader1;
string strLine;
try
{
inputStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
strReader1 = new StreamReader(inputStream, Encoding.Unicode);
while ((strLine = strReader1.ReadLine()) != null)
{
returnList.Add(strLine);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
returnList = null;
}
return returnList;
}
}
/// <summary>
/// Not Use
/// </summary>
public class FileName
{
private String fullPath;
private char pathSeparator, extensionSeparator;
public FileName(String str, char sep, char ext)
{
fullPath = str;
pathSeparator = sep;
extensionSeparator = ext;
}
public String extension()
{
int dot = fullPath.LastIndexOf(extensionSeparator);
return fullPath.Substring(dot + 1);
}
public String filename()
{
int dot = fullPath.LastIndexOf(extensionSeparator);
int sep = fullPath.LastIndexOf(pathSeparator);
return fullPath.Substring(sep + 1, dot - (sep + 1));
}
public String path()
{
int sep = fullPath.LastIndexOf(pathSeparator);
return fullPath.Substring(0, sep);
}
}
}