Example #1
0
        public void CheckForUpdates()
        {
            var msg = UpdateDataObject.CheckUpdate(Assembly.GetExecutingAssembly().GetName().Name,
                                                   Assembly.GetExecutingAssembly().GetName().Version);

            Debug.Log(Debug.UpdateMask, msg);
        }
Example #2
0
        /// <summary>
        ///     Starts the Server threads
        /// </summary>
        public void Start()
        {
            //_lts = new LogTextStream(Console.OpenStandardOutput(), 0);
            //Debug.AddOutputStream(_lts);


            if (!_noUpdateCheck)
            {
                var msg = UpdateDataObject.CheckUpdate(Assembly.GetExecutingAssembly().GetName().Name,
                                                       Assembly.GetExecutingAssembly().GetName().Version);

                Debug.Log(0, msg);
            }

            Debug.Log(0, "Starting Network Listener on port: " + Port + "...");
            lock (_stopListenLock)
            {
                if (_stopListen)
                {
                    _stopListen     = false;
                    _listenerThread = new Thread(ListenerThread)
                    {
                        IsBackground = true
                    };
                    _listenerThread.Start();
                }
            }


            Debug.Log(0, "Starting Server...");
            lock (_stopLock)
            {
                if (!_stop)
                {
                    return;
                }
                _stop = false;
                if (_multiThread)
                {
                    _serverThread = new Thread(Run)
                    {
                        IsBackground = true
                    };
                    _serverThread.Start();
                }
                else
                {
                    Run();
                }
            }
            isStarted = true;
        }
Example #3
0
        /// <summary>
        ///     Creates a Custom Console on the Supplied PipeStream.
        /// </summary>
        /// <param name="ps">Pipe Stream</param>
        /// <param name="background">Background Color</param>
        /// <param name="fontColor">Font Color</param>
        /// <param name="fontSize">Font Size</param>
        /// <param name="frameTime">Frame time of the main loop</param>
        /// <param name="colorCoding">Color Coding for the Tags</param>
        /// <returns>Reference to the Created Console.(Not Thread Save)</returns>
        public static Form CreateCustomConsole(PipeStream ps, Color background, Color fontColor, float fontSize = 8.25f,
                                               int frameTime = 250, Dictionary <int, SerializableColor> colorCoding = null)
        {
            if (Debug.SendUpdateMessageOnFirstLog)
            {
                var msg = UpdateDataObject.CheckUpdate(Assembly.GetExecutingAssembly().GetName().Name,
                                                       Assembly.GetExecutingAssembly().GetName().Version);
                Debug.Log(Debug.UpdateMask, msg);
            }


            if (!_winFormsFlagsInitialized)
            {
                InitWinForms();
            }

            Form cmd = new CustomCmdForm(ps, background, fontColor, fontSize, frameTime, colorCoding);

            CreateCustomConsole(cmd);
            return(cmd);
        }