Exemplo n.º 1
0
 public static bool IsEqualTo(this IRpdChannel channel1, IRpdChannel channel2)
 {
     if (!channel1.DumpCondition.IsEqualTo(channel2.DumpCondition))
     {
         return(false);
     }
     //if (channel1.End != channel2.End) return false;
     if (channel1.IsEnabled != channel2.IsEnabled)
     {
         return(false);
     }
     if (channel1.IsService != channel2.IsService)
     {
         return(false);
     }
     if (channel1.Name != channel2.Name)
     {
         return(false);
     }
     if (channel1.Number != channel2.Number)
     {
         return(false);
     }
     //if (channel1.Start != channel2.Start) return false;
     //if (channel1.Type != channel2.Type) return false;
     return(true);
 }
Exemplo n.º 2
0
        public RpdChannelViewModel(IRpdChannel channel, RpdMeterViewModel meter)
        {
            _channel       = channel;
            TrendChartType = TrendChartType.Rpd;
            Meter          = meter;

            Faults.Add(meter.Fault);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Модель представления канала.
        /// </summary>
        public RpdChannelViewModel(IRpdChannel channel, RpdMeterViewModel rpdMeter,
                                   IRpdConfigurator rpdConfigurator, ConnectionPointsViewModel connectionPointsViewModel)
        {
            this.RpdChannel       = channel;
            this.rpdConfigurator  = rpdConfigurator;
            this.rpdMeter         = rpdMeter;
            this.ConnectionPoints = connectionPointsViewModel;
            this.DumpCondition    = new DumpConditionViewModel(channel.DumpCondition);

            initializeCommands();
        }