public TrackSettingsModal()
        {
            InitializeComponent();

            //ayarları okuma
            m_settings = XMLSerialization.Singleton();
            m_settings = m_settings.DeSerialize(m_settings);

            //m_dataGridViewTrackRoute.Columns.Clear();

            if (m_settings.RouteTrack.TableName == "")
            {
                m_dataGridViewManuelInputTrack.DataSource = TempDataTable();
            }
            else
            {
                m_dataGridViewManuelInputTrack.DataSource = m_settings.RouteTrack;
            }

            m_dataGridViewManuelInputTrack.Columns[0].Width = 50;

            UIOperation.SetDoubleBuffered(m_dataGridViewManuelInputTrack);
            UIOperation.SetDoubleBuffered(m_dataGridViewFromFileTrack);



            m_dataGridViewFromFileTrack.DataSource = MainForm.m_fromFileTracks;

            m_dataGridViewFromFileTrack.Columns[0].Width = 50;
        }
Beispiel #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);
        }
Beispiel #3
0
        public TrainSimModal()
        {
            InitializeComponent();

            //ayarları okuma
            m_settings = XMLSerialization.Singleton();
            m_settings = m_settings.DeSerialize(m_settings);


            TrainLengthCM        = (double)m_settings.TrainLength;
            TrainLengthCMReScale = (TrainLengthCM * RouteScaleRatio);


            m_rect = new Rectangle(offsetX, 100, Convert.ToInt32(TrainLengthCMReScale), 20);

            m_bitmapGraphics = m_panel.CreateGraphics();// Graphics.FromImage(m_bitmapScreen);

            UIOperation.SetDoubleBuffered(m_panel);

            MainForm.m_trainMovement.AddWatcher(this);
        }