Exemplo n.º 1
0
            public BrainAwareness(BrainModule owner)
            {
                Owner = owner;

                GameObject obj = new GameObject();

                Controller = obj.AddComponent <AwarenessController>();

                Controller.Initialize(Owner, Add, Remove);
            }
        public AwarenessNotifyIconController(AbstractPlatform platform, AwarenessController controller)
        {
            Platform = platform;
            Platform.ApplicationWillQuit += ApplicationWillQuit;

            Controller = controller;
            Controller.BreakTimer.BreakChecked   += BreakChecked;
            Controller.BreakTimer.BreakSuggested += BreakSuggested;

            Icon = new NotifyIcon {
                Visible     = true,
                ContextMenu = BuildContextMenu(),
                Icon        = new Icon(Platform.ResourceNamed("bowl.ico"))
            };

            Icon.DoubleClick       += (sender, args) => DoubleClick.Raise(this);
            Icon.BalloonTipClicked += BalloonTipClicked;
        }
Exemplo n.º 3
0
        public override void AwakeFromNib()
        {
            Platform = Runtime.Initialize(new MacPlatform());
            // Do this before we start listening for notifications.
            Platform.Preferences.StartAtLogin = AppStartAtLogin;
            Platform.Preferences.Changed     += PreferencesChanged;

            Controller                            = new AwarenessController(Platform);
            Controller.FirstRun                  += FirstRun;
            Controller.BowlPlayer.WillPlay       += BowlPlayerWillPlay;
            Controller.BowlPlayer.StartedPlaying += BowlPlayerStartedPlaying;
            Controller.BreakTimer.BreakChecked   += HandleBreakChecked;

            iTunes = new iTunes(Platform);

            if (Platform.MacPreferences.ShowInMenuBar)
            {
                CreateAndDisplayStatusItem();
            }

            base.AwakeFromNib();
        }
Exemplo n.º 4
0
        public AwarenessForm()
        {
            InitializeComponent();

            Platform = new WindowsPlatform(this);

            BackgroundImage = Image.FromFile(Platform.ResourceNamed("splash.jpg"));
            Height          = BackgroundImage.Height + 35;
            Width           = BackgroundImage.Width + 12;

            Controller = new AwarenessController(Platform);
            Controller.BreakTimer.BreakChecked += BreakChecked;

            NotifyIconController              = new AwarenessNotifyIconController(Platform, Controller);
            NotifyIconController.DoubleClick += NotifyIcon_DoubleClicked;

            // Want to get form *not* to show, but best we can do is minimize.
            if (!Platform.Preferences.IsFirstRun)
            {
                WindowState = FormWindowState.Minimized;
            }
        }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     ViewFieldTransform   = this.gameObject.transform;
     _awarenessController = EventController.Instance.GetComponent <AwarenessController>();
 }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     eventController     = EventController.Instance.GetComponent <EventController>();
     awarenessController = EventController.Instance.GetComponent <AwarenessController>();
 }
Exemplo n.º 7
0
    public float increaseAmount; //how much the detection amount shall be increased per second

    public virtual void Start()
    {
        awarenessController = EventController.Instance.GetComponent <AwarenessController>();
        Debug.Assert(awarenessController != null, "DetectionController has no AwarenessController?");
    }
Exemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     detectionBar.fillAmount = 0.0f;
     awarenessController     = EventController.Instance.GetComponent <AwarenessController>();
 }