Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Update heartbeat effect to work properly on all motherboards (aas a t…
Browse files Browse the repository at this point in the history
…emp. workaround, perhaps)
  • Loading branch information
ixjf committed Dec 8, 2020
1 parent 9360e21 commit 688518d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 30 deletions.
9 changes: 4 additions & 5 deletions MSIRGB.GUI/Controls/Styles.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
xmlns:localutils="clr-namespace:MSIRGB.Utils"
xmlns:System="clr-namespace:System;assembly=mscorlib">
Expand Down Expand Up @@ -653,7 +652,7 @@
<Rectangle Fill="Transparent">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseDown">
<ei:CallMethodAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
<i:CallMethodAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
MethodName="DragWindowEvent" />
</i:EventTrigger>
</i:Interaction.Triggers>
Expand All @@ -668,7 +667,7 @@
<Button>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:CallMethodAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
<i:CallMethodAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
MethodName="MinimizeWindowCommand" />
</i:EventTrigger>
</i:Interaction.Triggers>
Expand Down Expand Up @@ -706,7 +705,7 @@
<Button>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:CallMethodAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
<i:CallMethodAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
MethodName="CloseWindowCommand" />
</i:EventTrigger>
</i:Interaction.Triggers>
Expand Down
25 changes: 2 additions & 23 deletions MSIRGB.GUI/MSIRGB.GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,8 @@
<Reference Include="CommonServiceLocator, Version=2.0.5.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.5\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Controls, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.Expression.Controls.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Drawing, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.Expression.Drawing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Effects, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.Expression.Effects.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Interactions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Prototyping.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.Expression.Prototyping.Interactivity.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Prototyping.SketchControls, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.Expression.Prototyping.SketchControls.dll</HintPath>
</Reference>
<Reference Include="Microsoft.SDK.Expression.Blend, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SDK.Expression.Blend.1.0.0\lib\net45\Microsoft.SDK.Expression.Blend.dll</HintPath>
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.19\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero2" />
<Reference Include="Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
Expand All @@ -99,9 +81,6 @@
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Wpf.7.2.0.1422\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
Expand Down
2 changes: 1 addition & 1 deletion MSIRGB.GUI/MainWindowView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:customcontrols="clr-namespace:MSIRGB.Controls"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:MSIRGB"
mc:Ignorable="d"
Title="MSIRGB"
Expand Down
2 changes: 1 addition & 1 deletion MSIRGB.GUI/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="2.0.5" targetFramework="net461" />
<package id="Microsoft.SDK.Expression.Blend" version="1.0.0" targetFramework="net461" />
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.19" targetFramework="net461" />
<package id="Prism.Core" version="7.2.0.1422" targetFramework="net461" />
<package id="Prism.Wpf" version="7.2.0.1422" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
Expand Down
28 changes: 28 additions & 0 deletions Scripts/Heartbeat.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-- User-changeable variables
local speed = 130 -- seconds between each iteration of 'colours'
local colours = {
{0x6, 0x2, 0xa},
{0x6, 0x3, 0xa},
{0x6, 0x4, 0xa},
{0x7, 0x6, 0x9},
{0x7, 0x6, 0x8},
{0x6, 0x6, 0x6},
{0x5, 0x5, 0x5},
{0x3, 0x3, 0x3}}

--
local n = 1

Lighting.SetBreathingModeEnabled(false)
Lighting.SetFlashingSpeed(0)
Lighting.SetStepDuration(511)

while true do
Lighting.BatchBegin()
for i = 1, 8 do
Lighting.SetColour(i, colours[n][1], colours[n][2], colours[n][3])
end
Lighting.BatchEnd()
n = (n % #colours) + 1
os.sleep(130)
end

0 comments on commit 688518d

Please sign in to comment.