1 namespace Kuineator.Settings
\r
3 static class FileControl
\r
5 public static string CharacterCode;
\r
7 public static string getOpenFilePath()
\r
9 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
12 string filename = f.FileName;
\r
16 public static string getOpenFilePath(string[] path)
\r
18 string filter = path[0];
\r
19 for (int i = 1; i < path.Length; i++) filter += "|" + path[i];
\r
20 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
27 public static string getOpenFilePath(string current, string[] path)
\r
29 string filter = path[0];
\r
30 for (int i = 1; i < path.Length; i++) filter += "|" + path[i];
\r
31 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
34 f.InitialDirectory = @current;
\r
39 public static System.IO.FileStream getOpenFile()
\r
41 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
44 string filename = f.FileName;
\r
45 if (filename == "") return null;
\r
46 else return new System.IO.FileStream(filename,System.IO.FileMode.OpenOrCreate);
\r
49 public static System.IO.FileStream getOpenFile(string current)
\r
51 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
53 f.InitialDirectory = @current;
\r
55 string filename = f.FileName;
\r
56 if (filename == "") return null;
\r
57 else return new System.IO.FileStream(filename, System.IO.FileMode.OpenOrCreate);
\r
60 public static System.IO.FileStream getOpenFile(string[] path)
\r
62 string filter = path[0];
\r
63 for (int i = 1; i < path.Length; i++) filter += "|" + path[i];
\r
64 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
68 string filename = f.FileName;
\r
69 if (filename == "") return null;
\r
70 else return new System.IO.FileStream(filename, System.IO.FileMode.OpenOrCreate);
\r
73 public static System.IO.FileStream getOpenFile(string current, string[] path)
\r
75 string filter = path[0];
\r
76 for (int i = 1; i < path.Length; i++) filter += "|" + path[i];
\r
77 System.Windows.Forms.OpenFileDialog f = new System.Windows.Forms.OpenFileDialog();
\r
80 f.InitialDirectory = @current;
\r
82 string filename = f.FileName;
\r
83 if (filename == "") return null;
\r
84 else return new System.IO.FileStream(filename, System.IO.FileMode.OpenOrCreate);
\r
87 public static string getSaveFilePath()
\r
89 System.Windows.Forms.SaveFileDialog f = new System.Windows.Forms.SaveFileDialog();
\r
95 public static System.IO.FileStream getSaveFile()
\r
97 System.Windows.Forms.SaveFileDialog f = new System.Windows.Forms.SaveFileDialog();
\r
100 string filename = f.FileName;
\r
101 if (filename == "") return null;
\r
102 else return new System.IO.FileStream(filename, System.IO.FileMode.Create);
\r
105 public static System.IO.FileStream getSaveFile(string current)
\r
107 System.Windows.Forms.SaveFileDialog f = new System.Windows.Forms.SaveFileDialog();
\r
109 f.InitialDirectory = @current;
\r
111 string filename = f.FileName;
\r
112 if (filename == "") return null;
\r
113 else return new System.IO.FileStream(filename, System.IO.FileMode.Create);
\r
116 public static System.IO.FileStream getSaveFile(string[] path)
\r
118 string filter = path[0];
\r
119 for (int i = 1; i < path.Length; i++) filter += "|" + path[i];
\r
120 System.Windows.Forms.SaveFileDialog f = new System.Windows.Forms.SaveFileDialog();
\r
124 string filename = f.FileName;
\r
125 if (filename == "") return null;
\r
126 else return new System.IO.FileStream(filename, System.IO.FileMode.Create);
\r
129 public static System.IO.FileStream getSaveFile(string current, string[] path)
\r
131 string filter = path[0];
\r
132 for (int i = 1; i < path.Length; i++) filter += "|" + path[i];
\r
133 System.Windows.Forms.SaveFileDialog f = new System.Windows.Forms.SaveFileDialog();
\r
136 f.InitialDirectory = @current;
\r
138 string filename = f.FileName;
\r
139 if (filename == "") return null;
\r
140 else return new System.IO.FileStream(filename, System.IO.FileMode.Create);
\r