예제 #1
0
파일: MyBox.cs 프로젝트: martindale/nestk
        public MyBox(System.Windows.Forms.Panel box, string name) :
            base()
        {
            this.name = name;
            this.box  = box;

            pushDetector   = new PushDetector();
            swipeDetector  = new SwipeDetector();
            steadyDetector = new SteadyDetector();
            flowRouter     = new FlowRouter();
            broadcaster    = new Broadcaster();

            broadcaster.AddListener(pushDetector);
            broadcaster.AddListener(flowRouter);

            pushDetector.Push          += new PushDetector.PushHandler(pushDetector_Push);
            steadyDetector.Steady      += new SteadyDetector.SteadyHandler(steadyDetector_Steady);
            swipeDetector.GeneralSwipe += new SwipeDetector.GeneralSwipeHandler(swipeDetector_GeneralSwipe);

            PrimaryPointCreate  += new PrimaryPointCreateHandler(MyBox_PrimaryPointCreate);
            PrimaryPointDestroy += new PrimaryPointDestroyHandler(MyBox_PrimaryPointDestroy);
            OnUpdate            += new UpdateHandler(MyBox_OnUpdate);
        }
예제 #2
0
        public MyBox(System.Windows.Forms.Panel box, string name)
            : base()
        {
            this.name = name;
            this.box = box;

            pushDetector = new PushDetector();
            swipeDetector = new SwipeDetector();
            steadyDetector = new SteadyDetector();
            flowRouter = new FlowRouter();
            broadcaster = new Broadcaster();

            broadcaster.AddListener(pushDetector);
            broadcaster.AddListener(flowRouter);

            pushDetector.Push += new PushDetector.PushHandler(pushDetector_Push);
            steadyDetector.Steady += new SteadyDetector.SteadyHandler(steadyDetector_Steady);
            swipeDetector.GeneralSwipe += new SwipeDetector.GeneralSwipeHandler(swipeDetector_GeneralSwipe);

            PrimaryPointCreate += new PrimaryPointCreateHandler(MyBox_PrimaryPointCreate);
            PrimaryPointDestroy += new PrimaryPointDestroyHandler(MyBox_PrimaryPointDestroy);
            OnUpdate += new UpdateHandler(MyBox_OnUpdate);
        }