public static SocketCommunication Singleton()
        {
            if (m_do == null)
            {
                m_do = new SocketCommunication();
            }

            return(m_do);
        }
Example #2
0
        public MainForm()
        {
            InitializeComponent();

            m_mf = this;

            #region ayarları okuma
            m_settings = XMLSerialization.Singleton();
            m_settings = m_settings.DeSerialize(m_settings);
            #endregion

            CheckForIllegalCrossThreadCalls = false;

            m_allOBATP            = new ConcurrentDictionary <int, OBATP>();
            m_socketCommunication = SocketCommunication.Singleton();
            m_trainMovement       = new TrainMovementCreate();

            //excel tablosundan track listesini ve özelliklerini okuyoruz
            m_fromFileTracks = FileOperation.ReadTrackTableInExcel();


            if (m_settings.TrackInput == Enums.TrackInput.Manuel)
            {
                allTracks = Track.AllTracksAAA(m_settings.RouteTrack);
            }
            else if (m_settings.TrackInput == Enums.TrackInput.FromFile)
            {
                allTracks = Track.AllTracks(m_fromFileTracks);
            }



            m_route = Route.CreateNewRoute(m_settings.StartTrackID, m_settings.EndTrackID, allTracks);


            //DataTable rt = FileOperation.ReadRouteTableInExcel();
            //allRoute = Route.AllRoute(rt, asasas);

            //Route route = new Route();
            //allRoute = route.AllRoute(rt, asasas);


            //List<Route> asdasdasdasdasd =  Route.AllRoute(rt, allTracks);



            ahmet.Columns.Add("ID");


            UIOperation.SetDoubleBuffered(m_listViewFootPrintTracks);
            UIOperation.SetDoubleBuffered(m_listViewVirtualOccupation);


            //m_socketCommunication.Start(SocketCommunication.CommunicationType.Client, "10.2.149.17", 205);
            m_socketCommunication.Start(SocketCommunication.CommunicationType.Client, "127.0.0.1", 5050);
        }