Shuxia Ning
2024-11-06 adf8dc1c7cae1b12f486dcdb3d7daf4a5a59ec52
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
using IStation;
using IStation.Epanet.Enums;
using IStation.Epanet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime;
using System.Text;
using System.Threading.Tasks;
 
namespace ConsoleApp1
{
    internal class Program
    {
        private static string _model_file = System.IO.Path.Combine
            (Settings.File.RootDirectory, "ch2_v3_20240801(Clear).inp");
        static void Main(string[] args)
        {
            var err = EpanetMethods.ENopen(_model_file, "", "");
            if (err != ErrorCode.Ok)
            { 
                return;
            }
 
            err = EpanetMethods.ENopenH();
            if (err != ErrorCode.Ok)
            { 
                return;
            }
            EpanetMethods.ENcloseH();
            EpanetMethods.ENclose();
 
            Console.WriteLine("1");
            Console.ReadKey();
        }
    }
}