コード例 #1
0
        public MainWindow()
        {
            try
            {
                InitializeComponent();
            }
            catch (Exception ex)
            {
            }


            AddScaleListItems();

            AudioChest.spawnChest();

            InstrumentChest.getChest().Instrument = new FingeredInstrument();
            InstrumentChest.getChest().NoteAndPlayListeners.Add(this);

            GraphicsChest.getChest().NetytarDrawer = new NetytarDrawer(this.scrlNetytar);
            GraphicsChest.getChest().NetytarDrawer.generateNetytar();
            GraphicsChest.getChest().NetytarDrawer.drawLines(Scales.Cmaj, Colors.Red);
            GraphicsChest.getChest().NetytarDrawer.drawEllipses(Scales.Cmaj);

            GraphicsChest.getChest().WickiEyedenDrawer = new WickiEyedenDrawer(this.scrlWickiEyeden);
            GraphicsChest.getChest().WickiEyedenDrawer.generateWickiEyeden();

            InstrumentChest.getChest().WickiEyedenPlayMode = new WickiEyedenPlayWithGaze();

            GraphicsChest.getChest().RhythmFlasher = new RhythmFlasher(this.scrlNetytar, Colors.Bisque);

            // WpfEyeXChest.getChest().getBlinkProcessor().Listeners.Add(new ScaleBlinker("min", "maj"));
            WpfEyeXChest.getChest().getBlinkProcessor().Listeners.Add(new RepeatNoteWithDouble());
            //WpfEyeXChest.getChest().getBlinkProcessor().Listeners.Add(new PauseWithOneEye(Eyes.Left));
            lblBpm.Text = GraphicsChest.getChest().RhythmFlasher.Bpm.ToString();
        }
コード例 #2
0
        public NetytarButton() : base()
        {
            occluder                 = new Polygon();
            occluder.Stroke          = Brushes.Black;
            occluder.Fill            = Brushes.LightBlue;
            occluder.StrokeThickness = 1;

            Behavior.SetGazeAware(Occluder, true);
            Behavior.SetGazeAwareDelay(Occluder, WpfEyeXChest.getChest().GazeDelay);
            Behavior.AddHasGazeChangedHandler(Occluder, OnGaze);
        }
コード例 #3
0
ファイル: NetytarButton.cs プロジェクト: Neeqstock/Eyerpheus
        public void setBehavior()
        {
            Behavior.SetGazeAware(Occluder, true);
            Behavior.SetGazeAwareDelay(Occluder, WpfEyeXChest.getChest().GazeDelay);
            Behavior.AddHasGazeChangedHandler(Occluder, OnGaze);

            if (WpfEyeXChest.getChest().MouseEmulation)
            {
                Occluder.MouseEnter += Occluder_MouseEnter;
            }
        }
コード例 #4
0
        private void ListenMouse(object sender, EventArgs e)
        {
            if (WpfEyeXChest.getChest().MouseEmulation&& isOn)
            {
                lastGazePoint.X = GetMousePos().X - basePosition.X;
                lastGazePoint.Y = GetMousePos().Y - basePosition.Y;

                filter.push(lastGazePoint);

                lastMean = filter.getMean();

                Scroll();
            }
        }
コード例 #5
0
        public void activate()
        {
            WickiEyedenButton[,] buttons = GraphicsChest.getChest().WickiEyedenDrawer.Buttons;

            foreach (WickiEyedenButton button in buttons)
            {
                if (button != null)
                {
                    #region Behavior
                    Behavior.SetGazeAware(button, true);
                    Behavior.SetGazeAwareDelay(button, WpfEyeXChest.getChest().GazeDelay);
                    Behavior.AddHasGazeChangedHandler(button, button_OnGaze);
                    #endregion
                }
            }
        }
コード例 #6
0
ファイル: AutoScroller.cs プロジェクト: Neeqstock/Eyerpheus
        public AutoScroller(ScrollViewer scrollViewer, IFilter filter, int proportional)
        {
            this.proportional = proportional;
            this.filter       = filter;
            this.scrollViewer = scrollViewer;

            lastGazePoint = new Point();

            WpfEyeXChest.getChest().GazePointListener = this;
            basePosition = scrollViewer.PointToScreen(new Point(0, 0));

            viewerDimX = scrollViewer.ActualWidth;
            viewerDimY = scrollViewer.ActualHeight;
            areaDimX   = scrollViewer.ScrollableWidth;
            areaDimY   = scrollViewer.ScrollableHeight;

            Xratio = viewerDimX / areaDimX;
            Yratio = viewerDimY / areaDimY;
        }
コード例 #7
0
        public AutoScrollerCentered(int radiusThreshold, ScrollViewer scrollViewer, IFilter filter, int proportional)
        {
            this.radiusThreshold = radiusThreshold;
            this.filter          = filter;
            this.scrollViewer    = scrollViewer;
            this.proportional    = proportional;

            lastGazePoint = new Point();

            WpfEyeXChest.getChest().GazePointListener = this;
            basePosition = scrollViewer.PointToScreen(new Point(0, 0));

            scrollCenter = new Point(scrollViewer.ActualWidth / 2, scrollViewer.ActualHeight / 2);

            Timer timer = new Timer();

            timer.Interval = 1;
            timer.Tick    += ListenMouse;
            timer.Enabled  = true;
        }
コード例 #8
0
 protected override void OnExit(ExitEventArgs e)
 {
     base.OnExit(e);
     WpfEyeXChest.getChest().getEyeXHost().Dispose();
 }
コード例 #9
0
 public App()
 {
     WpfEyeXChest.getChest().getEyeXHost().Start();
 }