예제 #1
0
 public SlideBounds(Slide s, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     slide       = s;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
예제 #2
0
        Init(
            DownloadableFile modelFile = null,
            DownloadableFile labelFile = null,
            IDelegate optDelegate      = null)
        {
            String defaultLocalSubfolder = "CocoSsdMobilenetV1";

            if (modelFile == null)
            {
                modelFile = new DownloadableFile(
                    "https://github.com/emgucv/models/raw/master/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29/detect.tflite",
                    defaultLocalSubfolder,
                    "E4B118E5E4531945DE2E659742C7C590F7536F8D0ED26D135ABCFE83B4779D13"
                    );
            }

            if (labelFile == null)
            {
                labelFile = new DownloadableFile(
                    "https://github.com/emgucv/models/raw/master/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29/labelmap.txt",
                    defaultLocalSubfolder,
                    "C7E79C855F73CBBA9F33D649D60E1676EB0A974021A41696D1AC0D4B7F7E0211"
                    );
            }


#if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID || UNITY_STANDALONE
            return(base.Init(modelFile, labelFile, optDelegate));
#else
            await base.Init(modelFile, labelFile, optDelegate);
#endif
        }
예제 #3
0
        Init(
            DownloadableFile modelFile = null,
            DownloadableFile labelFile = null,
            IDelegate optDelegate      = null)
        {
            String defaultLocalSubfolder = "CocoSsdMobilenetV3";

            if (modelFile == null)
            {
                modelFile = new DownloadableFile(
                    "https://github.com/emgucv/models/raw/master/coco_ssd_mobilenet_v3_small_2020_01_14/model.tflite",
                    defaultLocalSubfolder,
                    "0F52F7A4884DD6426D38F4AFC06DA75105EFE77F7C83E470254C267FE34CC43C"
                    );
            }

            if (labelFile == null)
            {
                labelFile = new DownloadableFile(
                    "https://github.com/emgucv/models/raw/master/coco_ssd_mobilenet_v3_small_2020_01_14/labelmap.txt",
                    defaultLocalSubfolder,
                    "C7E79C855F73CBBA9F33D649D60E1676EB0A974021A41696D1AC0D4B7F7E0211"
                    );
            }

#if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID || UNITY_STANDALONE
            return(base.Init(modelFile, labelFile, optDelegate));
#else
            await base.Init(modelFile, labelFile, optDelegate);
#endif
        }
예제 #4
0
 public HOPOBounds(HOPO h, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     hopo        = h;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
예제 #5
0
        protected override void OnPresent(IDelegate coordinatorDelegate = null)
        {
            _delegate = coordinatorDelegate as GameDelegate;
            ViewProvider.Instance.Preloader.SetActive(true);

            StartTimer();
        }
예제 #6
0
 public VibratoBounds(Vibrato v, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     vibrato     = v;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
예제 #7
0
        Init(
            DownloadableFile modelFile = null,
            DownloadableFile labelFile = null,
            IDelegate optDelegate      = null)
        {
            if (!Imported)
            {
                _downloadManager.Clear();

                _downloadManager.AddFile(modelFile);
                _downloadManager.AddFile(labelFile);

#if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID || UNITY_STANDALONE
                yield return(_downloadManager.Download());
#else
                await _downloadManager.Download();
#endif
                if (_downloadManager.AllFilesDownloaded)
                {
                    ImportGraph(optDelegate);
                }
                else
                {
                    System.Diagnostics.Trace.WriteLine("Failed to download all files");
                }
            }
        }
예제 #8
0
        /// <summary>
        /// Removes the given item from the collection
        /// </summary>
        /// <returns>True, if the item was removed, otherwise False</returns>
        /// <param name="item">The item that should be removed</param>
        public virtual bool Remove(NMF.Models.Meta.IType item)
        {
            IComponentType componentTypeItem = item.As <IComponentType>();

            if (((componentTypeItem != null) &&
                 this._parent.ComponentTypes.Remove(componentTypeItem)))
            {
                return(true);
            }
            IInterface interfaceItem = item.As <IInterface>();

            if (((interfaceItem != null) &&
                 this._parent.Interfaces.Remove(interfaceItem)))
            {
                return(true);
            }
            ISystemSpecification systemSpecificationItem = item.As <ISystemSpecification>();

            if (((systemSpecificationItem != null) &&
                 this._parent.SystemSpecifications.Remove(systemSpecificationItem)))
            {
                return(true);
            }
            IDelegate delegateItem = item.As <IDelegate>();

            if (((delegateItem != null) &&
                 this._parent.Delegates.Remove(delegateItem)))
            {
                return(true);
            }
            return(false);
        }
예제 #9
0
 public BendBounds(Bend b, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     bend        = b;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
예제 #10
0
 public TieBounds(Tie t, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     tie         = t;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
예제 #11
0
        } // end of HandleAvailabilitiesSpecialServiceRequest

        #endregion

        #region HandleRequireDocs

        /// <summary>
        /// Handles a request to send doctors for consultation or assisting between departments
        /// </summary>
        /// <param name="del">The original request for doctors to consult or assist</param>
        /// <param name="controlUnit">Control unit that filed request for assistance or consultation</param>
        /// <param name="time">Time request was filed</param>
        /// <param name="simEngine">SimEngine responsible for simulation execution</param>
        /// <returns>True if request has been handled</returns>
        static public bool HandleRequireDocs(IDelegate del, ControlUnit controlUnit, DateTime time, ISimulationEngine simEngine)
        {
            foreach (SkillSet reqSkill in ((DelegateRequestDocsForAssisting)del).RequiredSkillSets)
            {
                List <EntityDoctor> possibleDoc = ((ControlUnitHealthCare)controlUnit).FindDoctorWithSkillSet(reqSkill);

                if (possibleDoc.Count == 0)
                {
                    break;
                }

                EntityDoctor chosenDoc = null;

                foreach (EntityDoctor doc in possibleDoc)
                {
                    if (doc.ParentControlUnit == controlUnit)
                    {
                        ActivityMove possibleMove = doc.GetPossibleMovingActivity();

                        if (possibleMove != null &&
                            (possibleMove.Destination == del.OriginControlUnit ||
                             possibleMove.Destination == doc.BaseControlUnit))
                        {
                            chosenDoc = doc;
                            break;
                        } // end if
                    }     // end if

                    if (((ControlUnitHealthCare)doc.ParentControlUnit).ControlUnitType == Enums.ControlUnitType.Inpatient)
                    {
                        chosenDoc = doc;
                        break;
                    } // end if
                }     // end foreach

                if (chosenDoc == null)
                {
                    chosenDoc = possibleDoc.First();
                }

                if (chosenDoc.ParentControlUnit == controlUnit)
                {
                    ActivityMove possibleMove = chosenDoc.GetPossibleMovingActivity();

                    if (possibleMove != null && possibleMove.Destination == chosenDoc.BaseControlUnit)
                    {
                        simEngine.RemoveScheduledEvent(possibleMove.EndEvent);
                        chosenDoc.StopCurrentActivities(time, simEngine);
                        ActivityMove move = new ActivityMove(controlUnit, chosenDoc, controlUnit, del.OriginControlUnit, del, TimeSpan.FromMinutes(1));
                        move.StartEvent.Trigger(time, simEngine);
                    } // end if
                }
                else
                {
                    controlUnit.SendDelegateTo(chosenDoc.ParentControlUnit, new DelegateSentDocForAssistedTreatment((ControlUnitHealthCare)del.OriginControlUnit, reqSkill));
                } // end if
            }     // end foreach

            return(true);
        } // end of HandleRequireDocs
예제 #12
0
        /// <summary>
        /// Adds the given element to the collection
        /// </summary>
        /// <param name="item">The item to add</param>
        public virtual void Add(NMF.Models.Meta.IType item)
        {
            IComponentType componentTypesCasted = item.As <IComponentType>();

            if ((componentTypesCasted != null))
            {
                this._parent.ComponentTypes.Add(componentTypesCasted);
            }
            IInterface interfacesCasted = item.As <IInterface>();

            if ((interfacesCasted != null))
            {
                this._parent.Interfaces.Add(interfacesCasted);
            }
            ISystemSpecification systemSpecificationsCasted = item.As <ISystemSpecification>();

            if ((systemSpecificationsCasted != null))
            {
                this._parent.SystemSpecifications.Add(systemSpecificationsCasted);
            }
            IDelegate delegatesCasted = item.As <IDelegate>();

            if ((delegatesCasted != null))
            {
                this._parent.Delegates.Add(delegatesCasted);
            }
        }
예제 #13
0
        public NoteDrawingStrategy(Note n, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            note = n;
        }
예제 #14
0
        public PinchHarmonicDrawingStrategy(PinchHarmonic ph, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info           = v_info;
            pinch_harmonic = ph;
        }
예제 #15
0
        public BendDrawingStrategy(Bend b, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            bend = b;
        }
예제 #16
0
        public PalmMuteDrawingStrategy(PalmMute pm, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info      = v_info;
            palm_mute = pm;
        }
예제 #17
0
        public TieDrawingStrategy(Tie t, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            tie  = t;
        }
예제 #18
0
        public HOPODrawingStrategy(HOPO h, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            hopo = h;
        }
예제 #19
0
        public SlideDrawingStrategy(Slide s, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info  = v_info;
            slide = s;
        }
예제 #20
0
        public VibratoDrawingStrategy(Vibrato v, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info    = v_info;
            vibrato = v;
        }
예제 #21
0
 public Delegate(
     long token,
     IDelegate @delegate
     )
     : base(token)
 {
     this.@delegate = @delegate;
 }
예제 #22
0
        public PartDrawingStrategy(Part p, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            part = p;
        }
예제 #23
0
        public MeasureDrawingStrategy(Measure m, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info    = v_info;
            measure = m;
        }
예제 #24
0
        public ChordBounds(Chord c, VisualInfo v_info, IDelegate del)
        {
            ChordBar   = new ChordBar(c.Length.NoteType);
            ChordTuple = new ChordTuple(c.Length);

            BoundsDelegate = del;
            chord          = c;
            info           = v_info;
        }
 /// <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="parentControlUnit">Control unit the event is triggered, i.e. the unit the staff member enters or leaves</param>
 /// <param name="isEnter">Flag if the event is called for an entering or leaving staff member</param>
 /// <param name="staff">The staff member that is entering or leaving</param>
 /// <param name="del">Delegate resposnible for the staff movement</param>
 /// <param name="staffArea">Possible waiting area the staff members waits in after arrival</param>
 public EventControlUnitStaffEnterLeave(ControlUnit parentControlUnit,
                                        bool isEnter, EntityStaff staff, IDelegate del, EntityWaitingArea staffArea = null)
     : base(EventType.Standalone, parentControlUnit)
 {
     _isEnter          = isEnter;
     _staff            = staff;
     _incomingDelegate = del;
     _staffWaitingArea = staffArea;
 } // end of EventInpatientStaffEnterLeave
예제 #26
0
 public Graph(IDelegate _del, Stroke b)
 {
     del = _del;
     box = b;
     bounds = box.GetBounds();
     box.StylusPoints = InkUtils.xkcd(InkUtils.box(bounds));
     box.DrawingAttributes.Color = Colors.Blue;
     analyzer = new InkAnalyzer();
     analyzer.ContextNodeCreated += ContextNodeCreated;
 }
예제 #27
0
        public ChordDrawingStrategy(Chord c, ChordBar b, ChordTuple t, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info  = v_info;
            chord = c;
            bar   = b;
            tuple = t;
        }
예제 #28
0
        protected override void OnPresent(IDelegate coordinatorDelegate = null)
        {
            _parentDelegate   = coordinatorDelegate as GameDelegate;
            _delegate.OnPlay += OnPlay;

            var go = ViewProvider.Instance.MainScreen;

            go.SetActive(true);
            go.GetComponent <MainScreenView>().Delegate = _delegate;
        }
예제 #29
0
 public Graph(IDelegate _del, Stroke b)
 {
     del                          = _del;
     box                          = b;
     bounds                       = box.GetBounds();
     box.StylusPoints             = InkUtils.xkcd(InkUtils.box(bounds));
     box.DrawingAttributes.Color  = Colors.Blue;
     analyzer                     = new InkAnalyzer();
     analyzer.ContextNodeCreated += ContextNodeCreated;
 }
예제 #30
0
 /// <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="parentControlUnit">The control unit that hosts the move</param>
 /// <param name="affectedEntity">The moving entity</param>
 /// <param name="origin">Origin control unit</param>
 /// <param name="destination">Destination control unit</param>
 /// <param name="del">A delegate that is associated with move, e.g. a resource or service request</param>
 /// <param name="duration">Duration of move</param>
 public ActivityMove(ControlUnit parentControlUnit,
                     Entity affectedEntity,
                     ControlUnit origin,
                     ControlUnit destination,
                     IDelegate del,
                     TimeSpan duration)
     : base(parentControlUnit, "ActivityMove", true)
 {
     _movingEntity   = affectedEntity;
     _orgigin        = origin;
     _destination    = destination;
     _delegateOrigin = del;
     _duration       = duration;
 } // end of Activity
예제 #31
0
        } // end of HandleMoveInpatient

        #endregion

        #region ForwardServiceRequestSpecialTreatmentModel

        /// <summary>
        /// Looks for a control unit to handle a special service requests and forwards the request to the
        /// special service model, as a booking maybe required
        /// </summary>
        /// <param name="del">The original requests</param>
        /// <param name="controlUnit">The control unit that filed the request</param>
        /// <param name="time">Time the request is filed</param>
        /// <param name="simEngine">SimEngine responsible for simulation execution</param>
        /// <returns>True if request has been handled</returns>
        static public bool ForwardServiceRequestSpecialTreatmentModel(IDelegate del, ControlUnit controlUnit, DateTime time, ISimulationEngine simEngine)
        {
            ControlUnit controlForAction = ((ControlUnitHealthCare)controlUnit).FindControlUnitForSpecialFacitlityService((RequestSpecialFacilitiyService)del);

            if (controlForAction == null)
            {
                controlUnit.SendDelegateTo(controlUnit.ParentControlUnit, del);
                return(true);
            }
            else
            {
                controlUnit.SendDelegateTo(controlForAction, del);
                return(true);
            }
        } // end of HandleServiceRequestSpecialTreatmentModel
예제 #32
0
 public void SetLabelEventHandler(IDelegate.LabelEventHandler labelEventHandler)
 {
     _dishesSite.LabelEventHandler += labelEventHandler;
 }
예제 #33
0
 public XYGraph(IDelegate del, Stroke b) : base(del, b) {
     curves = new StrokeCollection();
     colGen = new ColorGen();
 }
 public IDomainSpecificSearcher CreateMethodsReferencedByDelegateSearcher(IDelegate @delegate)
 {
   return null;
 }
 public void SetLabelEventHandler(IDelegate.LabelEventHandler labelEventHandler)
 {
     _pictureSite.LabelEventHandler += labelEventHandler;
 }
예제 #36
0
 public ILanguageSpecificSearcher CreateMethodsReferencedByDelegateSearcher(IDelegate @delegate,
     FindResultConsumer consumer)
 {
     return null;
 }
 public void CataloEventHandler(IDelegate.CatalogueEventHandler cataloEventHandler)
 {
     _catalogueSite.CataloEventHandler += cataloEventHandler;
 }