예제 #1
0
파일: EventList.cs 프로젝트: dupes/NovaDemo
 public void StartEvent(RequestData.NewEvent newEvent)
 {
     if (m_eventRows.ContainsKey(newEvent.EventId))
     {
         m_eventRows[newEvent.EventId].Cells[(int)DGEventCells.Status].Value = "active";
     }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: dupes/NovaDemo
        /********************************************************************************/

        private void HandlePayload_StartEventInterval(string payload)
        {
            RequestData.NewEvent newEvent = JsonConvert.DeserializeObject <RequestData.NewEvent>(payload);

            // the event is already active, just need to log this message
            UCEventLog.LogMessage("start event interval: " + newEvent.EventId + "\n" + payload);
        }
예제 #3
0
파일: EventList.cs 프로젝트: dupes/NovaDemo
 public void ModifyEvent(RequestData.NewEvent newEvent)
 {
     if (m_eventRows.ContainsKey(newEvent.EventId))
     {
         m_eventRows[newEvent.EventId].Cells[(int)DGEventCells.StartTime].Value = Util.FromEpochToLocalTime(newEvent.DtStartTimet);
         m_eventRows[newEvent.EventId].Cells[(int)DGEventCells.Duration].Value  = newEvent.DurationInSeconds;
     }
 }
예제 #4
0
파일: MainForm.cs 프로젝트: dupes/NovaDemo
        /********************************************************************************/

        private void HandlePayload_ModifyEvent(string payload)
        {
            RequestData.NewEvent newEvent = JsonConvert.DeserializeObject <RequestData.NewEvent>(payload);

            UCEventList.ModifyEvent(newEvent);

            UCEventLog.LogMessage("modify event: " + newEvent.EventId + "\n" + payload);
        }
예제 #5
0
파일: EventList.cs 프로젝트: dupes/NovaDemo
        public void NewEvent(RequestData.NewEvent newEvent)
        {
            if (!m_eventRows.ContainsKey(newEvent.EventId))
            {
                // assume an event can only start if Nova sends a start event message, so
                // the status here will either be complete because the event start time
                // plus duration is in the past, or the event will be pending
                string status = ((Util.FromEpochToLocalTime(newEvent.DtStartTimet).AddSeconds(newEvent.DurationInSeconds) < DateTime.Now) ? "complete" : "pending");

                DGEvent.Rows.Add(newEvent.EventId, Util.FromEpochToLocalTime(newEvent.DtStartTimet), newEvent.DurationInSeconds, newEvent.Status, "optIn");

                // and track the stored row in our dictionary (the row just added is the last row)
                m_eventRows[newEvent.EventId] = DGEvent.Rows[DGEvent.Rows.Count - 1];
            }
            else
            {
                ModifyEvent(newEvent);
            }
        }
예제 #6
0
파일: EventList.cs 프로젝트: dupes/NovaDemo
 public void StartEventInterval(RequestData.NewEvent newEvent)
 {
 }