コード例 #1
0
ファイル: Controller.cs プロジェクト: acron0/Chancy
 /// <summary>
 /// Determines whether this instance is pending the specified ev.
 /// </summary>
 /// <returns>
 /// <c>true</c> if this instance is pending the specified ev; otherwise, <c>false</c>.
 /// </returns>
 /// <param name='ev'>
 /// If set to <c>true</c> ev.
 /// </param>
 internal static bool IsPending(Event ev)
 {
     return _pendingAddPrimary.Contains(ev) || _pendingAddSecondary.Contains(ev);
 }
コード例 #2
0
ファイル: Event.cs プロジェクト: acron0/Chancy
 /// <summary>
 /// Extends this instance by creating a new Event and setting the sibl.
 /// </summary>
 public Event Extend()
 {
     Event newEvent = new Event ();
     Next = newEvent;
     newEvent.Previous = this;
     return newEvent;
 }
コード例 #3
0
ファイル: Controller.cs プロジェクト: acron0/Chancy
 /// <summary>
 /// Adds an event to the 'pending add' list.
 /// </summary>
 /// <param name='newEvent'>
 /// The new event we're adding.
 /// </param>
 internal static void AddEvent(Event newEvent, bool startImmediately)
 {
     if(startImmediately)
     {
         newEvent.StartEvent ();
         _currentEvents.Add (newEvent);
     }
     else if (!_lockAdd)
     {
         _pendingAddPrimary.Add (newEvent);
     }
     else
     {
         _pendingAddSecondary.Add (newEvent);
     }
 }