* ControlPage.xaml.cs:

* QLevelsCell.cs: Add more levels sliders

* QBrowserPage.xaml.cs:
* QBrowserViewModel.cs: Switch off browser updating when connected
This commit is contained in:
2021-01-09 09:43:37 -06:00
parent 9cf241f9c8
commit 3ba1b81304
4 changed files with 127 additions and 56 deletions
@@ -179,14 +179,26 @@ namespace qController
{
qController.qClient.sendTCP(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/0", (float)args.NewValue);
};
qLevelsCell.leftSlider.ValueChanged += (sender, args) =>
for(int i = 0; i < qLevelsCell.sliders.Count; i++)
{
qController.qClient.sendTCP(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/1", (float)args.NewValue);
};
qLevelsCell.rightSlider.ValueChanged += (sender, args) =>
{
qController.qClient.sendTCP(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/2", (float)args.NewValue);
};
var channel = i + 1;
Log.Debug("Setting value changed for channel: " + channel);
qLevelsCell.sliders[i].ValueChanged += (sender, args) =>
{
qLevelsCell.sliderLabels[channel-1].Text = $"{args.NewValue}";
qController.qClient.sendTCP(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/" + channel, (float)args.NewValue);
};
}
//qLevelsCell.leftSlider.ValueChanged += (sender, args) =>
//{
// qController.qClient.sendTCP(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/1", (float)args.NewValue);
//};
//qLevelsCell.rightSlider.ValueChanged += (sender, args) =>
//{
// qController.qClient.sendTCP(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/2", (float)args.NewValue);
//};
showLevelsButton = new QLevelsButton();
@@ -203,12 +215,12 @@ namespace qController
{
case Device.iOS:
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.53, 1, 0.25));
AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0.9, 0.40, 0.8, 0.25));
AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0, 0.53, 1, 0.25));
AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.02, 0.34, App.HeightUnit * 8, App.HeightUnit * 8));
break;
case Device.Android:
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.58, 1, 0.25));
AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0.9, 0.45, 0.8, 0.25));
AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0, 0.58, 1, 0.25));
AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.02, 0.39, App.HeightUnit * 8, App.HeightUnit * 8));
break;
}