コード例 #1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ICrew crewsCasted = item.As <ICrew>();

                if ((crewsCasted != null))
                {
                    this._parent.Crews.Add(crewsCasted);
                }
                if ((this._parent.Status == null))
                {
                    IStatus statusCasted = item.As <IStatus>();
                    if ((statusCasted != null))
                    {
                        this._parent.Status = statusCasted;
                        return;
                    }
                }
                if ((this._parent.ValidityInterval == null))
                {
                    IDateTimeInterval validityIntervalCasted = item.As <IDateTimeInterval>();
                    if ((validityIntervalCasted != null))
                    {
                        this._parent.ValidityInterval = validityIntervalCasted;
                        return;
                    }
                }
            }
コード例 #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.CertificationPeriod == null))
                {
                    IDateTimeInterval certificationPeriodCasted = item.As <IDateTimeInterval>();
                    if ((certificationPeriodCasted != null))
                    {
                        this._parent.CertificationPeriod = certificationPeriodCasted;
                        return;
                    }
                }
                if ((this._parent.ErpPerson == null))
                {
                    IErpPerson erpPersonCasted = item.As <IErpPerson>();
                    if ((erpPersonCasted != null))
                    {
                        this._parent.ErpPerson = erpPersonCasted;
                        return;
                    }
                }
                ICraft craftsCasted = item.As <ICraft>();

                if ((craftsCasted != null))
                {
                    this._parent.Crafts.Add(craftsCasted);
                }
                IQualificationRequirement qualificationRequirementsCasted = item.As <IQualificationRequirement>();

                if ((qualificationRequirementsCasted != null))
                {
                    this._parent.QualificationRequirements.Add(qualificationRequirementsCasted);
                }
            }
コード例 #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.WorkTask == null))
                {
                    IWorkTask workTaskCasted = item.As <IWorkTask>();
                    if ((workTaskCasted != null))
                    {
                        this._parent.WorkTask = workTaskCasted;
                        return;
                    }
                }
                ISwitchingStep scheduleStepsCasted = item.As <ISwitchingStep>();

                if ((scheduleStepsCasted != null))
                {
                    this._parent.ScheduleSteps.Add(scheduleStepsCasted);
                }
                if ((this._parent.Interval == null))
                {
                    IDateTimeInterval intervalCasted = item.As <IDateTimeInterval>();
                    if ((intervalCasted != null))
                    {
                        this._parent.Interval = intervalCasted;
                        return;
                    }
                }
                ICrew crewsCasted = item.As <ICrew>();

                if ((crewsCasted != null))
                {
                    this._parent.Crews.Add(crewsCasted);
                }
            }
コード例 #4
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.Status == null))
     {
         IStatus statusCasted = item.As<IStatus>();
         if ((statusCasted != null))
         {
             this._parent.Status = statusCasted;
             return;
         }
     }
     IScheduledEvent scheduledEventsCasted = item.As<IScheduledEvent>();
     if ((scheduledEventsCasted != null))
     {
         this._parent.ScheduledEvents.Add(scheduledEventsCasted);
     }
     if ((this._parent.Window == null))
     {
         IDateTimeInterval windowCasted = item.As<IDateTimeInterval>();
         if ((windowCasted != null))
         {
             this._parent.Window = windowCasted;
             return;
         }
     }
     if ((this._parent.TimeSchedule == null))
     {
         ITimeSchedule timeScheduleCasted = item.As<ITimeSchedule>();
         if ((timeScheduleCasted != null))
         {
             this._parent.TimeSchedule = timeScheduleCasted;
             return;
         }
     }
 }
コード例 #5
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>();

                if ((customerAgreementsCasted != null))
                {
                    this._parent.CustomerAgreements.Add(customerAgreementsCasted);
                }
                if ((this._parent.ValidityInterval == null))
                {
                    IDateTimeInterval validityIntervalCasted = item.As <IDateTimeInterval>();
                    if ((validityIntervalCasted != null))
                    {
                        this._parent.ValidityInterval = validityIntervalCasted;
                        return;
                    }
                }
                IEndDeviceGroup endDeviceGroupsCasted = item.As <IEndDeviceGroup>();

                if ((endDeviceGroupsCasted != null))
                {
                    this._parent.EndDeviceGroups.Add(endDeviceGroupsCasted);
                }
                IEndDeviceControl endDeviceControlsCasted = item.As <IEndDeviceControl>();

                if ((endDeviceControlsCasted != null))
                {
                    this._parent.EndDeviceControls.Add(endDeviceControlsCasted);
                }
            }
コード例 #6
0
 /// <summary>
 /// Sets a value to the given feature
 /// </summary>
 /// <param name="feature">The requested feature</param>
 /// <param name="value">The value that should be set to that feature</param>
 protected override void SetFeature(string feature, object value)
 {
     if ((feature == "STATUS"))
     {
         this.Status = ((IStatus)(value));
         return;
     }
     if ((feature == "WINDOW"))
     {
         this.Window = ((IDateTimeInterval)(value));
         return;
     }
     if ((feature == "TIMESCHEDULE"))
     {
         this.TimeSchedule = ((ITimeSchedule)(value));
         return;
     }
     if ((feature == "SEQUENCENUMBER"))
     {
         this.SequenceNumber = ((int)(value));
         return;
     }
     if ((feature == "RELATIVETIMEINTERVAL"))
     {
         this.RelativeTimeInterval = ((float)(value));
         return;
     }
     if ((feature == "DATETIME"))
     {
         this.DateTime = ((DateTime)(value));
         return;
     }
     base.SetFeature(feature, value);
 }
コード例 #7
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IEndDeviceEvent endDeviceEventsCasted = item.As <IEndDeviceEvent>();

                if ((endDeviceEventsCasted != null))
                {
                    this._parent.EndDeviceEvents.Add(endDeviceEventsCasted);
                }
                if ((this._parent.ServiceDeliveryPoint == null))
                {
                    IServiceDeliveryPoint serviceDeliveryPointCasted = item.As <IServiceDeliveryPoint>();
                    if ((serviceDeliveryPointCasted != null))
                    {
                        this._parent.ServiceDeliveryPoint = serviceDeliveryPointCasted;
                        return;
                    }
                }
                if ((this._parent.CustomerAgreement == null))
                {
                    ICustomerAgreement customerAgreementCasted = item.As <ICustomerAgreement>();
                    if ((customerAgreementCasted != null))
                    {
                        this._parent.CustomerAgreement = customerAgreementCasted;
                        return;
                    }
                }
                if ((this._parent.MeterAsset == null))
                {
                    IMeterAsset meterAssetCasted = item.As <IMeterAsset>();
                    if ((meterAssetCasted != null))
                    {
                        this._parent.MeterAsset = meterAssetCasted;
                        return;
                    }
                }
                if ((this._parent.ValuesInterval == null))
                {
                    IDateTimeInterval valuesIntervalCasted = item.As <IDateTimeInterval>();
                    if ((valuesIntervalCasted != null))
                    {
                        this._parent.ValuesInterval = valuesIntervalCasted;
                        return;
                    }
                }
                IReading readingsCasted = item.As <IReading>();

                if ((readingsCasted != null))
                {
                    this._parent.Readings.Add(readingsCasted);
                }
                IIntervalBlock intervalBlocksCasted = item.As <IIntervalBlock>();

                if ((intervalBlocksCasted != null))
                {
                    this._parent.IntervalBlocks.Add(intervalBlocksCasted);
                }
            }
コード例 #8
0
 public LoadDataCommand(string commandDisplayName, IntervalSource source, IDateTimeInterval dateTimeIntervalContainer, IIntervalsRepository intervalsRepository = null)
 {
     if (intervalsRepository != null)
     {
         _intervalsRepository = intervalsRepository;
     }
     _source = source;
     _dateTimeIntervalContainer = dateTimeIntervalContainer;
     DisplayName = commandDisplayName;
 }
コード例 #9
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.ValidityInterval == null))
     {
         IDateTimeInterval validityIntervalCasted = item.As <IDateTimeInterval>();
         if ((validityIntervalCasted != null))
         {
             this._parent.ValidityInterval = validityIntervalCasted;
             return;
         }
     }
 }
コード例 #10
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.ActivePeriod == null))
     {
         IDateTimeInterval activePeriodCasted = item.As <IDateTimeInterval>();
         if ((activePeriodCasted != null))
         {
             this._parent.ActivePeriod = activePeriodCasted;
             return;
         }
     }
 }
コード例 #11
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IScheduledEvent scheduledEventsCasted = item.As <IScheduledEvent>();

                if ((scheduledEventsCasted != null))
                {
                    this._parent.ScheduledEvents.Add(scheduledEventsCasted);
                }
                if ((this._parent.RequestedWindow == null))
                {
                    IDateTimeInterval requestedWindowCasted = item.As <IDateTimeInterval>();
                    if ((requestedWindowCasted != null))
                    {
                        this._parent.RequestedWindow = requestedWindowCasted;
                        return;
                    }
                }
                if ((this._parent.ForInspectionDataSet == null))
                {
                    IInspectionDataSet forInspectionDataSetCasted = item.As <IInspectionDataSet>();
                    if ((forInspectionDataSetCasted != null))
                    {
                        this._parent.ForInspectionDataSet = forInspectionDataSetCasted;
                        return;
                    }
                }
                if ((this._parent.EstimatedWindow == null))
                {
                    IDateTimeInterval estimatedWindowCasted = item.As <IDateTimeInterval>();
                    if ((estimatedWindowCasted != null))
                    {
                        this._parent.EstimatedWindow = estimatedWindowCasted;
                        return;
                    }
                }
                IDocument documentsCasted = item.As <IDocument>();

                if ((documentsCasted != null))
                {
                    this._parent.Documents.Add(documentsCasted);
                }
                if ((this._parent.Status == null))
                {
                    IStatus statusCasted = item.As <IStatus>();
                    if ((statusCasted != null))
                    {
                        this._parent.Status = statusCasted;
                        return;
                    }
                }
            }
コード例 #12
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ICrew crewsCasted = item.As <ICrew>();

                if ((crewsCasted != null))
                {
                    this._parent.Crews.Add(crewsCasted);
                }
                if ((this._parent.EffectivePeriod == null))
                {
                    IDateTimeInterval effectivePeriodCasted = item.As <IDateTimeInterval>();
                    if ((effectivePeriodCasted != null))
                    {
                        this._parent.EffectivePeriod = effectivePeriodCasted;
                        return;
                    }
                }
            }
コード例 #13
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.ScheduleInterval == null))
                {
                    IDateTimeInterval scheduleIntervalCasted = item.As <IDateTimeInterval>();
                    if ((scheduleIntervalCasted != null))
                    {
                        this._parent.ScheduleInterval = scheduleIntervalCasted;
                        return;
                    }
                }
                ITimePoint timePointsCasted = item.As <ITimePoint>();

                if ((timePointsCasted != null))
                {
                    this._parent.TimePoints.Add(timePointsCasted);
                }
            }
コード例 #14
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.Address == null))
                {
                    IStreetAddress addressCasted = item.As <IStreetAddress>();
                    if ((addressCasted != null))
                    {
                        this._parent.Address = addressCasted;
                        return;
                    }
                }
                if ((this._parent.CallBack == null))
                {
                    ICallBack callBackCasted = item.As <ICallBack>();
                    if ((callBackCasted != null))
                    {
                        this._parent.CallBack = callBackCasted;
                        return;
                    }
                }
                if ((this._parent.MeetingInterval == null))
                {
                    IDateTimeInterval meetingIntervalCasted = item.As <IDateTimeInterval>();
                    if ((meetingIntervalCasted != null))
                    {
                        this._parent.MeetingInterval = meetingIntervalCasted;
                        return;
                    }
                }
                IErpPerson erpPersonsCasted = item.As <IErpPerson>();

                if ((erpPersonsCasted != null))
                {
                    this._parent.ErpPersons.Add(erpPersonsCasted);
                }
            }
コード例 #15
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IIncidentCode incidentCodesCasted = item.As <IIncidentCode>();

                if ((incidentCodesCasted != null))
                {
                    this._parent.IncidentCodes.Add(incidentCodesCasted);
                }
                ITroubleTicket troubleTicketsCasted = item.As <ITroubleTicket>();

                if ((troubleTicketsCasted != null))
                {
                    this._parent.TroubleTickets.Add(troubleTicketsCasted);
                }
                if ((this._parent.Period == null))
                {
                    IDateTimeInterval periodCasted = item.As <IDateTimeInterval>();
                    if ((periodCasted != null))
                    {
                        this._parent.Period = periodCasted;
                        return;
                    }
                }
            }
コード例 #16
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.ActivityInterval == null))
                {
                    IDateTimeInterval activityIntervalCasted = item.As <IDateTimeInterval>();
                    if ((activityIntervalCasted != null))
                    {
                        this._parent.ActivityInterval = activityIntervalCasted;
                        return;
                    }
                }
                ITransactionSummary transactionSummariesCasted = item.As <ITransactionSummary>();

                if ((transactionSummariesCasted != null))
                {
                    this._parent.TransactionSummaries.Add(transactionSummariesCasted);
                }
                IReceiptSummary receiptSummariesCasted = item.As <IReceiptSummary>();

                if ((receiptSummariesCasted != null))
                {
                    this._parent.ReceiptSummaries.Add(receiptSummariesCasted);
                }
            }
コード例 #17
0
 /// <summary>
 /// Handles the event that the Window property must reset
 /// </summary>
 /// <param name="sender">The object that sent this reset request</param>
 /// <param name="eventArgs">The event data for the reset event</param>
 private void OnResetWindow(object sender, System.EventArgs eventArgs)
 {
     this.Window = null;
 }
コード例 #18
0
ファイル: DateTimeInterval.cs プロジェクト: porrey/Holidays
 public Enumerator(IDateTimeInterval dateTimeInterval)
 {
     _dateTimeInterval = dateTimeInterval;
 }