/[OhmsLawCalc]/trunk/OhmsLawCalc/Form1.cs
ViewVC logotype

Contents of /trunk/OhmsLawCalc/Form1.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (show annotations) (download)
Wed Jan 29 03:17:59 2014 UTC (6 years ago) by william
File size: 1490 byte(s)

1 
2 #define SHOW_DEBUG_MENU // when defined the debug menu will be shown
3 #define ENABLE_API_TESTING // when defined will enable API_TESTING
4 using Enterprise.Logging;
5 using System;
6 using System.Collections.Generic;
7 using System.ComponentModel;
8 using System.Data;
9 using System.Drawing;
10 using System.Text;
11 using System.Windows.Forms;
12
13 namespace OhmsLawCalc
14 {
15 public partial class Form1 : Form
16 {
17 public Form1()
18 {
19 InitializeComponent();
20 NativeMethods.AttachToConsole(true);
21 gLog.CreateLog("OhmsLawCalc.log", false, LogLevel.kLogLevel_All_NoProgress, null);
22 #if SHOW_DEBUG_MENU
23 #warning SHOW_DEBUG_MENU is defined -- please undefine it after your are done testing the API
24 mnuDebug.Visible = true;
25 #else
26 mnuDebug.Visible = false;
27 #endif
28 }
29
30 private void mnuItemExit_Click(object sender, EventArgs e)
31 {
32 this.Close();
33 }
34
35 private void mnuItemTestAPI_Click(object sender, EventArgs e)
36 {
37 #if !ENABLE_API_TESTING
38 // ENABLE_API_TESTING is not defined
39 MessageBox.Show("API Testing has not been enabled.", "Feature Unavailable", MessageBoxButtons.OK, MessageBoxIcon.Warning);
40 return;
41 #else
42 // ENABLE_API_TESTING is defined
43 #warning ENABLE_API_TESTING is defined -- please undefine it after your are done testing the API
44
45 // test API
46 #endif
47 }
48 }
49 }

  ViewVC Help
Powered by ViewVC 1.1.22