IEnumerator Start() { V = this; m_state = ProcessState.WAIT_START; yield return(null); // 全ComponentのStart完了 while (m_state == ProcessState.WAIT_START) { yield return(null); } m_state = ProcessState.RUNNING; while (true) // Update { if (m_canvas.transform.childCount == 1) { var target = m_canvas.transform.GetChild(0); if (target.name == errorpanelname) { GameObject.DestroyImmediate(target.gameObject); } } yield return(null); } }
private void Start() { V = this; }
private void TISWebService_GetStateCompleted(object sender, GetStateCompletedEventArgs e) { try { if (e.Error != null) { throw new SLException(e.Error.Message + " TISMonitor from server which failed"); } if (!e.Result) { throw new SLException(e.strError + " TISMonitor from server"); } TISWebServiceGetStateSupportOUT tout = DCSerializer.DeserializeWithDCS(typeof(TISWebServiceGetStateSupportOUT), e.strOut) as TISWebServiceGetStateSupportOUT; this.m_serverInfo.LastTrainGraphTime = tout.actualRealTimeTrainGraphTime; this.m_serverInfo.ServerTime = tout.ServerTime; List <TrainWebData> onlineTrains = DCSerializer.DeserializeWithDCS(typeof(List <TrainWebData>), e.onlineTrainsData) as List <TrainWebData>; List <TrainWebData> onlineButOnTheMapTrains = DCSerializer.DeserializeWithDCS(typeof(List <TrainWebData>), e.onlineButNotOnTheMapTrainsData) as List <TrainWebData>; List <TrainWebData> offlineTrains = DCSerializer.DeserializeWithDCS(typeof(List <TrainWebData>), e.offlineTrainsData) as List <TrainWebData>; this.DrawTrains(onlineTrains, offlineTrains, onlineButOnTheMapTrains); TrainGraphData data = DCSerializer.DeserializeWithDCS(typeof(TrainGraphData), e.trainGraphData) as TrainGraphData; if (this.m_needToFillTrainGraph) { this.trainGraphControl.ResetData(); } bool needToFillTrainGraph = this.m_needToFillTrainGraph; bool flag2 = false; if (this.m_firstTrainGraphCache != null) { flag2 = true; needToFillTrainGraph = true; data.Curves = this.MergeCachedAndRealTimesCurves(this.m_firstTrainGraphCache.Curves, data.Curves); data.Markers.Clear(); data.Markers.AddRange(this.m_firstTrainGraphCache.Markers); this.m_firstTrainGraphCache = null; } this.m_tgd = data; this.trainGraphControl.TrainGraphData = this.m_tgd; this.trainGraphControl.ActualTime = this.m_serverInfo.ServerTime; this.trainGraphControl.Draw(needToFillTrainGraph); if (this.m_needToFillTrainGraph) { this.m_needToFillTrainGraph = false; } this.UpdateTrainGraphCache(this.m_tgd, this.m_serverInfo); this.UpdateTrainsCache(onlineTrains); this.SetOperationDate(tout.ServerOperationDate, !this.m_isFirstIteration || flag2); this.m_isFirstIteration = false; ErrorDlg.HelperClose(); } catch (SLException exception) { this.AddLog("TISMonitor GetState error custom: " + exception.Message); ErrorDlg.HelperShow("", exception.Message); } catch (Exception exception2) { this.AddLog("TISMonitor GetState error: " + exception2.Message); ErrorDlg.HelperShow("", exception2.Message); this.ResetTrainGraph(); } this.busyIndicator.IsBusy = false; this.m_bInsideTimerForTrains = false; }