Ignore:
Timestamp:
Jun 4, 2010, 10:19:48 PM (14 years ago)
Author:
Sam Habiel
Message:

Some debugging code to attach the program to the console to print messages.
Letters:

  • Cancellation letters now work.
  • Initial work on Rebook Letters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs

    r772 r788  
    33using System.Collections;
    44using System.Data;
    5 using System.Text;
    65using System.Diagnostics;
    7 using System.Net;
    8 using System.Net.Sockets;
    9 using System.Threading;
    10 using System.IO;
    116using IndianHealthService.BMXNet;
    12 using System.Configuration;
    137using Mono.Options;
     8using System.Runtime.InteropServices;
    149
    1510namespace IndianHealthService.ClinicalScheduling
     
    259254                                && m_VerifyCode != String.Empty)
    260255                                m_ConnectInfo.LoadConnectInfo(m_Server, m_Port, m_AccessCode, m_VerifyCode);
    261 
    262256                            else if (m_Server != String.Empty && m_Port != 0)
    263                                 m_ConnectInfo.LoadConnectInfo(m_Server, m_Port);
    264 
     257                                m_ConnectInfo.LoadConnectInfo(m_Server, m_Port, "", "");
    265258                            else
    266                                                             m_ConnectInfo.LoadConnectInfo();
     259                                m_ConnectInfo.LoadConnectInfo();
    267260                        }
    268261                                                bRetry = false;
     
    347340                }
    348341
    349                 [STAThread()] static void Main(string[] args)
    350                 {
     342        //To write to the console
     343        [DllImport("kernel32.dll")]
     344        static extern bool AttachConsole(int dwProcessId);
     345        private const int ATTACH_PARENT_PROCESS = -1;
     346
     347                [STAThread()]
     348        static void Main(string[] args)
     349                {
     350#if DEBUG
     351            // Print console messages to console if launched from console
     352            AttachConsole(ATTACH_PARENT_PROCESS);
     353#endif
    351354            try
    352             {   
     355            {
    353356                 //Store the current manager
    354357                _current = new CGDocumentManager();
    355358               
     359                //Get command line options; store in private variables
    356360                var opset = new OptionSet () {
    357361                    { "s=", s => _current.m_Server = s },
Note: See TracChangeset for help on using the changeset viewer.