示例#1
0
        public ServerBlackwoodMain()
        {
            TLServer tl;

            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tl = new TLServer_WM();
            }
            else
            {
                tl = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }
            _con = new ServerBlackwood(tl);
            _con.VerbuseDebugging = Properties.Settings.Default.VerboseDebugging;

            TrackEnabled = Util.TrackUsage();
            Program      = PROGRAM;
            InitializeComponent();
            _con.BWConnectedEvent += new BWConnectedEventHandler(_con_BWConnectedEvent);
            _con.SendDebug        += new DebugDelegate(_dw.GotDebug);

            StatusHandler = new DisplayStatusHandler(DisplayStatus);

            Location = Properties.Settings.Default.wlocation;

            //Avoid painting window off screen.
            Point screen = new Point(SystemInformation.VirtualScreen.Bottom, SystemInformation.VirtualScreen.Right);

            if (this.Top > screen.X - this.Height | this.Left > screen.Y - this.Width)
            {
                this.Location = new Point(300, 300);
            }
        }
        public ServerBlackwoodMain()
        {
            TLServer tl;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tl = new TLServer_WM();
            else
                tl = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            _con = new ServerBlackwood(tl);
            _con.VerbuseDebugging = Properties.Settings.Default.VerboseDebugging;

            //TrackEnabled = Util.TrackUsage(); *Previously used for PracPlay click tracking
            //Program = PROGRAM;                *Previously used for PracPlay click tracking
            InitializeComponent();
            _con.BWConnectedEvent += new BWConnectedEventHandler(_con_BWConnectedEvent);
            _con.SendDebug += new DebugDelegate(_dw.GotDebug);

            StatusHandler = new DisplayStatusHandler(DisplayStatus);

            Location = Properties.Settings.Default.wlocation;

            //Avoid painting window off screen.
            Point screen = new Point (SystemInformation.VirtualScreen.Bottom,SystemInformation.VirtualScreen.Right) ;
            if (this.Top > screen.X - this.Height | this.Left > screen.Y - this.Width)
            {
                this.Location = new Point(300, 300);
            }
        }