コード例 #1
0
 public ModeButton()
     : base()
 {
     ActiveModes.Add(ActiveModeType.Design);
     ActiveModes.Add(ActiveModeType.Html);
     ActiveModes.Add(ActiveModeType.Preview);
 }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: golf1052/TheBox
 private void speedRainbowButton_Click(object sender, RoutedEventArgs e)
 {
     cube.SetSpeedStripLedColors(LedColorLists.rainbowColors);
     currentMode = ActiveModes.SpeedRainbow;
     cube.SetColor(Colors.Black);
     cube.Update();
     Brightness = 127;
     UpdateSliderBrightness();
 }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: golf1052/TheBox
 private void volumesButton_Click(object sender, RoutedEventArgs e)
 {
     ResetLevels();
     currentMode = ActiveModes.Volumes;
     cube.SetColor(Colors.Black);
     cube.Update();
     Brightness = 30;
     UpdateSliderBrightness();
 }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: golf1052/TheBox
 private void speedAlternatingButton_Click(object sender, RoutedEventArgs e)
 {
     cube.bottomZone.SetSpeedStripLedColors(LedColorLists.redAlternating);
     cube.midZone.SetSpeedStripLedColors(LedColorLists.greenAlternating);
     cube.topZone.SetSpeedStripLedColors(LedColorLists.blueAlternating);
     currentMode = ActiveModes.SpeedAlternating;
     cube.SetColor(Colors.Black);
     cube.Update();
     Brightness = 127;
     UpdateSliderBrightness();
 }
コード例 #5
0
ファイル: MainPage.xaml.cs プロジェクト: golf1052/TheBox
 public MainPage()
 {
     this.InitializeComponent();
     leftStrip            = new DotStarStrip(78, "SPI0");
     rightStrip           = new DotStarStrip(78, "SPI1");
     cube                 = new Cube(leftStrip, rightStrip);
     AutoCycle            = true;
     Reverse              = false;
     random               = new Random();
     currentMode          = ActiveModes.SpeedRainbow;
     idleMode             = IdleModes.Rainbow;
     lastChange           = DateTime.UtcNow;
     quietTime            = DateTime.UtcNow;
     changeTime           = TimeSpan.FromSeconds(15);
     idleChangeTime       = TimeSpan.FromSeconds(30);
     Idle                 = false;
     runningIdleAnimation = false;
 }
コード例 #6
0
 protected DesignModeSelectButton()
     : base()
 {
     ActiveModes.Add(ActiveModeType.Design);
 }
コード例 #7
0
 public DesignModeBoxButton()
     : base()
 {
     ActiveModes.Add(ActiveModeType.Design);
 }