void SynthDidPlayNoteForColor(NSColor color)
 {
     BeginInvokeOnMainThread(() =>
     {
         ColorIndicator.SetBackgroundColor(color);
         ProgressIndicator.IncrementBy(1);
     });
 }
 void SetImage(NSImage image)
 {
     ChosenImage = image;
     BeginInvokeOnMainThread(() =>
     {
         PausePlayButton.Image = NSImage.ImageNamed("Play");
         ColorIndicator.SetBackgroundColor(NSColor.Clear);
     });
 }
 void StopSynth()
 {
     ImageCell.Enabled         = true;
     ImageCell.Editable        = true;
     RandomImageButton.Enabled = true;
     NodeEditorButton.Enabled  = true;
     Synth.Stop();
     BeginInvokeOnMainThread(() =>
     {
         PausePlayButton.Image = NSImage.ImageNamed("Play");
         ColorIndicator.SetBackgroundColor(NSColor.Clear);
     });
     ProgressIndicator.DoubleValue = 0;
 }
예제 #4
0
 public void SetColor(Color color)
 {
     ActiveColor = color; ColorIndicator.GetComponent <MeshRenderer>().material.color = color;
 }
예제 #5
0
        void ReleaseDesignerOutlets()
        {
            if (ColorIndicator != null)
            {
                ColorIndicator.Dispose();
                ColorIndicator = null;
            }

            if (ErrorLabel != null)
            {
                ErrorLabel.Dispose();
                ErrorLabel = null;
            }

            if (ImageCell != null)
            {
                ImageCell.Dispose();
                ImageCell = null;
            }

            if (NodeEditorButton != null)
            {
                NodeEditorButton.Dispose();
                NodeEditorButton = null;
            }

            if (PausePlayButton != null)
            {
                PausePlayButton.Dispose();
                PausePlayButton = null;
            }

            if (ProgressIndicator != null)
            {
                ProgressIndicator.Dispose();
                ProgressIndicator = null;
            }

            if (RandomImageButton != null)
            {
                RandomImageButton.Dispose();
                RandomImageButton = null;
            }

            if (RandomImageSpinner != null)
            {
                RandomImageSpinner.Dispose();
                RandomImageSpinner = null;
            }

            if (ScaleChooser != null)
            {
                ScaleChooser.Dispose();
                ScaleChooser = null;
            }

            if (StopButton != null)
            {
                StopButton.Dispose();
                StopButton = null;
            }
        }
 public TrafficLightState(ColorIndicator color, float switchTime, Icon icon = Icon.NO_ICON)
 {
     this.color      = color;
     this.switchTime = switchTime;
     this.icon       = icon;
 }