Exemplo n.º 1
0
        static public UndoTaskHorizontalSplit CreateUndoTask(Event eventTarget, FixtureClass fixtureClassTarget, Event eventSource, DateTime dateTime)
        {
            var task = new UndoTaskHorizontalSplit();

            task.EventTarget           = eventTarget;
            task.FixtureClassTarget    = fixtureClassTarget;
            task.FixtureClassTargetNew = task.EventTarget.FixtureClass;
            task.EventSource           = eventSource;
            task.FixtureClassSource    = eventSource.FixtureClass;
            task.DateTime = dateTime;
            return(task);
        }
Exemplo n.º 2
0
        static public UndoTaskClassify CreateUndoTask(Event @event, FixtureClass fixtureClassTarget, FixtureClass fixtureClassSource, bool manuallyClassifiedOld, bool manuallyClassifiedNew, bool classifiedUsingFixtureListOld, bool classifiedUsingFixtureListNew)
        {
            var task = new UndoTaskClassify();

            task.Event = @event;
            task.FixtureClassTarget            = fixtureClassTarget;
            task.FixtureClassSource            = fixtureClassSource;
            task.ManuallyClassifiedOld         = manuallyClassifiedOld;
            task.ManuallyClassifiedNew         = manuallyClassifiedNew;
            task.ClassifiedUsingFixtureListOld = classifiedUsingFixtureListOld;
            task.ClassifiedUsingFixtureListNew = classifiedUsingFixtureListNew;
            return(task);
        }
Exemplo n.º 3
0
        static private void PopulateDescending()
        {
            List <FixtureClass> listAscending = new List <FixtureClass>();

            foreach (FixtureClass fixtureClass in Items.Values)
            {
                listAscending.Add(fixtureClass);
            }
            for (int i = listAscending.Count - 1; i >= 0; i--)
            {
                FixtureClass fixtureClass = listAscending[i];
                ItemsDescending.Add(fixtureClass.Name, fixtureClass);
            }
        }
Exemplo n.º 4
0
 public FixtureProfile(
     string name,
     FixtureClass fixtureClass,
     double?minVolume, double?maxVolume,
     double?minPeak, double?maxPeak,
     TimeSpan?minDuration, TimeSpan?maxDuration,
     double?minMode, double?maxMode
     )
 {
     Name         = name;
     FixtureClass = fixtureClass;
     MinVolume    = minVolume; MaxVolume = maxVolume;
     MinPeak      = minPeak; MaxPeak = maxPeak;
     MinDuration  = minDuration; MaxDuration = maxDuration;
     MinMode      = minMode; MaxMode = maxMode;
 }
Exemplo n.º 5
0
        public bool IsSimilar(FixtureClass fixtureClass,
                              double?minVolume, double?maxVolume,
                              double?minPeak, double?maxPeak,
                              TimeSpan?minDuration, TimeSpan?maxDuration,
                              double?minMode, double?maxMode
                              )
        {
            var fixtureProfile = new FixtureProfile(fixtureClass.Name,
                                                    fixtureClass,
                                                    minVolume,
                                                    maxVolume,
                                                    minPeak,
                                                    maxPeak,
                                                    minDuration,
                                                    maxDuration,
                                                    minMode,
                                                    maxMode
                                                    );

            return(Event.MatchesFixture(this, fixtureProfile));
        }
Exemplo n.º 6
0
 public FixtureSummary(FixtureClass fixtureClass)
 {
     FixtureClass = fixtureClass;
 }
Exemplo n.º 7
0
 public Event(FixtureClass fixtureClass, double volume, double peak, TimeFrame timeFrame, double mode, int modeFrequency) :
     this(volume, peak, timeFrame, mode, modeFrequency)
 {
     FixtureClass = fixtureClass;
 }
Exemplo n.º 8
0
 public Event(FixtureClass fixtureClass)
 {
     FixtureClass = fixtureClass;
 }
Exemplo n.º 9
0
        static public UndoTaskVerticalMerge CreateUndoTask(Event eventTarget, Event eventSource, FixtureClass fixtureClassTargetOld, FixtureClass fixtureClassSourceOld)
        {
            var task = new UndoTaskVerticalMerge();

            task.EventSource           = eventSource;
            task.FixtureClassSourceOld = fixtureClassSourceOld;
            task.EventTarget           = eventTarget;
            task.FixtureClassTargetOld = fixtureClassTargetOld;
            task.FixtureClassTargetNew = task.EventTarget.FixtureClass;

            return(task);
        }
Exemplo n.º 10
0
        static public UndoTaskHorizontalMerge CreateUndoTask(Event eventTarget, Event eventSource, FixtureClass fixtureClassTargetOld, FixtureClass fixtureClassSourceOld, bool classifiedUsingFixtureListTargetOld, bool classifiedUsingFixtureListSourceOld)
        {
            var task = new UndoTaskHorizontalMerge();

            task.LeftEventIsUserSource = (eventSource.StartTime == eventTarget.StartTime);

            if (task.LeftEventIsUserSource)
            {
                task.EventLeft           = eventSource;
                task.FixtureClassLeftOld = fixtureClassSourceOld;
                task.FixtureClassLeftNew = eventSource.FixtureClass;
                task.ClassifiedUsingFixtureListLeftOld = classifiedUsingFixtureListSourceOld;
                task.ClassifiedUsingFixtureListLeftNew = eventSource.ClassifiedUsingFixtureList;

                task.EventRight           = eventTarget;
                task.FixtureClassRightOld = fixtureClassTargetOld;
                task.FixtureClassRightNew = eventTarget.FixtureClass;
                task.ClassifiedUsingFixtureListRightOld = classifiedUsingFixtureListTargetOld;
                task.ClassifiedUsingFixtureListRightNew = eventTarget.ClassifiedUsingFixtureList;

                task.SplitTime = task.EventLeft.EndTime;
            }
            else
            {
                task.EventLeft           = eventTarget;
                task.FixtureClassLeftOld = fixtureClassTargetOld;
                task.FixtureClassLeftNew = eventTarget.FixtureClass;
                task.ClassifiedUsingFixtureListLeftOld = classifiedUsingFixtureListTargetOld;
                task.ClassifiedUsingFixtureListLeftNew = eventTarget.ClassifiedUsingFixtureList;

                task.EventRight           = eventSource;
                task.FixtureClassRightOld = fixtureClassSourceOld;
                task.FixtureClassRightNew = eventSource.FixtureClass;
                task.ClassifiedUsingFixtureListRightOld = classifiedUsingFixtureListSourceOld;
                task.ClassifiedUsingFixtureListRightNew = eventSource.ClassifiedUsingFixtureList;

                task.SplitTime = task.EventRight.StartTime;
            }

            return(task);
        }
Exemplo n.º 11
0
        static public UndoTaskVerticalSplit CreateUndoTask(Event eventTarget, Event eventSource, FixtureClass fixtureClassTargetOld, DateTime dateTime, double rate)
        {
            var task = new UndoTaskVerticalSplit();

            task.EventTarget           = eventTarget;
            task.FixtureClassTargetOld = fixtureClassTargetOld;
            task.FixtureClassTargetNew = task.EventTarget.FixtureClass;
            task.EventSource           = eventSource;
            task.FixtureClassSource    = eventSource.FixtureClass;
            task.DateTime = dateTime;
            task.Rate     = rate;
            return(task);
        }