aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Properties/Resources.Designer.cs
blob: 666e2da56e15559db7e51bdc672247bb7ac6b2e5 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Tango.PPC.Power.Properties {
    using System;
    
    
    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }
        
        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.Power.Properties.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        
        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
    }
}
>MachinesEvent>> EventsResolved; /// <summary> /// Occurs when the collection of current events has changed. /// </summary> public event EventHandler<IEnumerable<MachinesEvent>> EventsChanged; /// <summary> /// Initializes a new instance of the <see cref="DefaultMachineEventsStateProvider"/> class. /// </summary> public DefaultMachineEventsStateProvider() { _events = new ReadOnlyCollection<MachinesEvent>(new Collection<MachinesEvent>()); } /// <summary> /// Applies the collection of events received from the machine operator. /// </summary> /// <param name="events">The events.</param> public void ApplyEvents(IEnumerable<Event> events) { List<MachinesEvent> receivedEvents = events.Select(x => new MachinesEvent(x)).ToList(); List<MachinesEvent> newEvents = receivedEvents.Where(x => !_events.ToList().Exists(y => y.Type == x.Type)).ToList(); List<MachinesEvent> oldEvents = _events.Where(x => !receivedEvents.Exists(y => y.Type == x.Type)).ToList(); _events = new ReadOnlyCollection<MachinesEvent>(receivedEvents); if (newEvents.Count > 0) { OnNewEvents(newEvents); } if (oldEvents.Count > 0) { OnEventsResolved(oldEvents); } if (newEvents.Count > 0 || oldEvents.Count > 0) { RaisePropertyChanged(nameof(Events)); OnEventsChanged(newEvents.Concat(oldEvents)); } OnEventsReceived(_events); RaisePropertyChanged(nameof(HasEvents)); } /// <summary> /// Called when the new has been events /// </summary> /// <param name="events">The events.</param> protected virtual void OnNewEvents(IEnumerable<MachinesEvent> events) { NewEvents?.Invoke(this, events); } /// <summary> /// Called when the events has been received /// </summary> /// <param name="events">The events.</param> protected virtual void OnEventsReceived(IEnumerable<MachinesEvent> events) { EventsReceived?.Invoke(this, events); } /// <summary> /// Called when the events has been resolved /// </summary> /// <param name="events">The events.</param> protected virtual void OnEventsResolved(IEnumerable<MachinesEvent> events) { EventsResolved?.Invoke(this, events); } /// <summary> /// Called when the events has been changed /// </summary> /// <param name="events">The events.</param> protected virtual void OnEventsChanged(IEnumerable<MachinesEvent> events) { EventsChanged?.Invoke(this, events); } /// <summary> /// Resets the current events tracking. /// </summary> public void Reset() { _events = new ReadOnlyCollection<MachinesEvent>(new List<MachinesEvent>()); RaisePropertyChanged(nameof(Events)); OnEventsChanged(new List<MachinesEvent>()); } } }