aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Navigation/SyncNavigationManager.cs
blob: 8c06418e6d2c5e6334a0b58c2556d6b3c852ff91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.MachineStudio.Synchronization.Views;

namespace Tango.MachineStudio.Synchronization.Navigation
{
    /// <summary>
    /// Represents the synchronization module views navigation manager.
    /// </summary>
    public class SyncNavigationManager
    {
        /// <summary>
        /// Navigate to the specified view.
        /// </summary>
        /// <param name="view">The view.</param>
        public void NavigateTo(NavigationView view)
        {
            MainView.Instance.TransitionControl.AutoNavigate(view.ToString());
        }
    }
}
an> = e; } public void Call() { handler(sender, e); } } Queue<EventCall> eventCalls = new Queue<EventCall>(); public void DelayedRaise(EventHandler handler, object sender, EventArgs e) { if (handler != null) { eventCalls.Enqueue(new EventCall(handler, sender, e)); } } public void RaiseEvents() { while (eventCalls.Count > 0) eventCalls.Dequeue().Call(); } } }