-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathSgmlDebug.cs
More file actions
75 lines (61 loc) · 2.24 KB
/
Copy pathSgmlDebug.cs
File metadata and controls
75 lines (61 loc) · 2.24 KB
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
71
72
73
74
75
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Text;
using System.Windows.Forms;
using SharpDX.Direct2D1;
namespace SimplexCore
{
public static partial class Sgml
{
public static void show_message(string str)
{
MessageBox.Show(str);
}
public static void show_message_ext(string str, string caption, MessageBoxButtons buttonType)
{
MessageBox.Show(str, caption, buttonType);
}
public static void show_debug_message(string str)
{
Debug.WriteLine(str);
}
public static void show_debug_message_ext(string str, string category)
{
Debug.WriteLine(str, category);
}
public static bool show_question(string str, string caption)
{
return MessageBox.Show(str, caption, MessageBoxButtons.YesNo) == DialogResult.Yes;
}
public static void show_error(string str)
{
throw new Exception(str);
}
public static void show_message_async(string str)
{
//Microsoft.Xna.Framework.Input.MessageBox.Show("", str, new []{"Ok"});
}
public static void show_message_async_ext(string str, string caption, string[] buttons)
{
//Microsoft.Xna.Framework.Input.MessageBox.Show(caption, str, buttons);
}
public static double get_double(string str, string caption, string defaultValue = "")
{
double _res = Double.NaN;
double.TryParse(Microsoft.VisualBasic.Interaction.InputBox(str, caption, defaultValue), NumberStyles.Any, null, out _res);
return _res;
}
public static string get_string(string str, string caption, string defaultValue = "")
{
return Microsoft.VisualBasic.Interaction.InputBox(str, caption, defaultValue);
}
public static double get_int(string str, string caption, string defaultValue = "")
{
int _res = Int32.MinValue;
int.TryParse(Microsoft.VisualBasic.Interaction.InputBox(str, caption, defaultValue), NumberStyles.Any, null, out _res);
return _res;
}
}
}