@@ -7,23 +7,14 @@ namespace splitEvent
7
7
{
8
8
static class Program
9
9
{
10
- public class Wildcard : Regex
10
+ private class Wildcard : Regex
11
11
{
12
- /// <summary>
13
- /// Initializes a wildcard with the given search pattern.
14
- /// </summary>
15
- /// <param name="pattern">The wildcard pattern to match.</param>
16
- public Wildcard ( string pattern )
17
- : base ( WildcardToRegex ( pattern ) )
18
- {
19
- }
20
-
21
12
/// <summary>
22
13
/// Initializes a wildcard with the given search pattern and options.
23
14
/// </summary>
24
15
/// <param name="pattern">The wildcard pattern to match.</param>
25
16
/// <param name="options">A combination of one or more
26
- /// <see cref="System.Text.RegexOptions"/>.</param>
17
+ /// <see cref="System.Text.RegularExpressions. RegexOptions"/>.</param>
27
18
public Wildcard ( string pattern , RegexOptions options )
28
19
: base ( WildcardToRegex ( pattern ) , options )
29
20
{
@@ -45,19 +36,23 @@ static void Main(string[] args)
45
36
{
46
37
string fullpath_out ;
47
38
string fullpath_bin ;
39
+
48
40
if ( args . Length == 0 )
49
41
{
50
42
Console . Write ( "Filename: " ) ;
51
- args = new string [ ] { Console . ReadLine ( ) . Trim ( '"' ) } ;
43
+ args = [ Console . ReadLine ( ) . Trim ( '"' ) ] ;
52
44
}
45
+
53
46
fullpath_bin = Path . GetFullPath ( args [ 0 ] ) ;
54
47
string name = Path . GetFileName ( fullpath_bin ) ;
48
+
55
49
Wildcard evwcard = new Wildcard ( "e*" , RegexOptions . IgnoreCase ) ;
56
50
Wildcard mevwcard = new Wildcard ( "me*" , RegexOptions . IgnoreCase ) ;
57
51
Wildcard evxwcard = new Wildcard ( "e*_*" , RegexOptions . IgnoreCase ) ;
58
52
Wildcard mevxwcard = new Wildcard ( "me*_*" , RegexOptions . IgnoreCase ) ;
59
53
Wildcard exfwcard = new Wildcard ( "e*_*.*" , RegexOptions . IgnoreCase ) ;
60
54
Wildcard mexfwcard = new Wildcard ( "me*_*.*" , RegexOptions . IgnoreCase ) ;
55
+
61
56
if ( ! name . EndsWith ( "texlist.prs" , StringComparison . OrdinalIgnoreCase ) )
62
57
{
63
58
if ( mevwcard . IsMatch ( name ) )
@@ -111,22 +106,40 @@ static void Main(string[] args)
111
106
if ( args . Length > 1 )
112
107
{
113
108
fullpath_out = args [ 1 ] ;
114
- if ( fullpath_out [ fullpath_out . Length - 1 ] != '/' ) fullpath_out = string . Concat ( fullpath_out , '/' ) ;
109
+ if ( fullpath_out [ fullpath_out . Length - 1 ] != '/' )
110
+ {
111
+ fullpath_out = string . Concat ( fullpath_out , '/' ) ;
112
+ }
113
+
115
114
fullpath_out = Path . GetFullPath ( fullpath_out ) ;
116
115
}
116
+
117
117
Console . WriteLine ( "Output folder: {0}" , fullpath_out ) ;
118
+
118
119
if ( name . Contains ( "tailsplain" , StringComparison . OrdinalIgnoreCase ) )
120
+ {
119
121
sa2EventTailsPlane . Split ( fullpath_bin , fullpath_out ) ;
122
+ }
120
123
else if ( name . EndsWith ( "texlist.prs" , StringComparison . OrdinalIgnoreCase ) )
124
+ {
121
125
SA2Event . SplitExternalTexList ( fullpath_bin , fullpath_out ) ;
126
+ }
122
127
else if ( mexfwcard . IsMatch ( name ) )
128
+ {
123
129
sa2EventExtra . SplitMini ( fullpath_bin , fullpath_out ) ;
130
+ }
124
131
else if ( exfwcard . IsMatch ( name ) )
132
+ {
125
133
sa2EventExtra . Split ( fullpath_bin , fullpath_out ) ;
134
+ }
126
135
else if ( name . StartsWith ( "me" , StringComparison . OrdinalIgnoreCase ) )
136
+ {
127
137
SA2MiniEvent . Split ( fullpath_bin , fullpath_out ) ;
138
+ }
128
139
else
140
+ {
129
141
SA2Event . Split ( fullpath_bin , fullpath_out ) ;
142
+ }
130
143
}
131
144
}
132
145
}
0 commit comments