Skip to content

Commit

Permalink
Slider values were not updated - only the slider position
Browse files Browse the repository at this point in the history
Version Bump to 0.0.2.1
  • Loading branch information
ashupp committed May 5, 2020
1 parent a92823f commit c3e3acc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions sfx-100-streamdeck-pipecontract/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.2.0")]
[assembly: AssemblyFileVersion("0.0.2.0")]
[assembly: AssemblyVersion("0.0.2.1")]
[assembly: AssemblyFileVersion("0.0.2.1")]
4 changes: 2 additions & 2 deletions sfx-100-streamdeck-plugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.2.0")]
[assembly: AssemblyFileVersion("0.0.2.0")]
[assembly: AssemblyVersion("0.0.2.1")]
[assembly: AssemblyFileVersion("0.0.2.1")]
2 changes: 1 addition & 1 deletion sfx-100-streamdeck-plugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"Description": "Plugin to control SimFeedback via Streamdeck",
"Icon": "Images/pluginIcon",
"URL": "http://ashnet.de",
"Version": "0.0.2.0",
"Version": "0.0.2.1",
"CodePath": "sfx-100-streamdeck-plugin",
"Category": "SFX-100 SimFeedback",
"CategoryIcon": "Images/categoryIcon",
Expand Down
7 changes: 7 additions & 0 deletions sfx-100-streamdeck-sfb-extension/AutomationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ public static string GetText(this AutomationElement element)
: element.TryGetCurrentPattern(TextPattern.Pattern, out object patternText) ? ((TextPattern)patternText).DocumentRange.GetText(-1).TrimEnd('\r') // often there is an extra '\r' hanging off the end.
: element.Current.Name;

// Does not notify...
public static void SetSliderValue(AutomationElement element, double theValue)
{
element.SetFocus();
var range = element.GetCurrentPattern(RangeValuePattern.Pattern) as RangeValuePattern;
range.SetValue(theValue);
}

public static bool IsElementToggledOn(AutomationElement element)
{
Expand Down
4 changes: 2 additions & 2 deletions sfx-100-streamdeck-sfb-extension/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.2.0")]
[assembly: AssemblyFileVersion("0.0.2.0")]
[assembly: AssemblyVersion("0.0.2.1")]
[assembly: AssemblyFileVersion("0.0.2.1")]
9 changes: 6 additions & 3 deletions sfx-100-streamdeck-sfb-extension/SimFeedbackInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ public enum WMessages : uint
TBM_GETRANGEMAX = 0x0402, // Get max range
TBM_GETRANGEMIN = 0x0401, // Get min range
TBM_GETPOS = 0x0400, // Trackbar get position
TBM_SETPOS = 0x0405 // Trackbar set position
}
TBM_SETPOS = 0x0405, // Trackbar set position
TBM_SETPOSNOTIFY = 0x0422,
WM_NOTIFY = 0x004E,
WM_NOTIFYFORMAT = 0x0055
}


public void ClickElement(IntPtr hwndChild)
Expand Down Expand Up @@ -115,7 +118,7 @@ public int GetCurrentSliderValue(IntPtr hwndChild)
public void SetCurrentSliderValue(IntPtr hwndChild, int valueToSet)
{
GuiLoggerProvider.Instance.Log("Try set value: " + valueToSet + " for id: " + hwndChild);
var val = SendMessage(hwndChild, (uint)WMessages.TBM_SETPOS, 1, valueToSet);
var val = SendMessage(hwndChild, (uint)WMessages.TBM_SETPOSNOTIFY, 1, valueToSet);
GuiLoggerProvider.Instance.Log("Value set!");
}

Expand Down

0 comments on commit c3e3acc

Please sign in to comment.