diff --git a/Droid/Assets/qfont.ttf b/Droid/Assets/qfont.ttf old mode 100644 new mode 100755 index b0fa4cd..bffb24c Binary files a/Droid/Assets/qfont.ttf and b/Droid/Assets/qfont.ttf differ diff --git a/iOS/Resources/qfont.ttf b/iOS/Resources/qfont.ttf old mode 100644 new mode 100755 index b0fa4cd..bffb24c Binary files a/iOS/Resources/qfont.ttf and b/iOS/Resources/qfont.ttf differ diff --git a/qController.Standard/Classes/Cell/QButton.cs b/qController.Standard/Classes/Cell/QButton.cs index bc60bd9..3bc08b3 100644 --- a/qController.Standard/Classes/Cell/QButton.cs +++ b/qController.Standard/Classes/Cell/QButton.cs @@ -15,7 +15,7 @@ namespace qController qCommand = command; Text = qCommand.text; TextColor = Color.Black; - + FontSize = App.HeightUnit * 2.5; if (qCommand.osc.Contains("go")) { BackgroundColor = Color.SeaGreen; diff --git a/qController.Standard/Classes/Cell/QControlsBlock.cs b/qController.Standard/Classes/Cell/QControlsBlock.cs index e32686a..c76f7d9 100644 --- a/qController.Standard/Classes/Cell/QControlsBlock.cs +++ b/qController.Standard/Classes/Cell/QControlsBlock.cs @@ -23,7 +23,7 @@ namespace qController BackgroundColor = Color.Transparent; //highlight Button Grid - BackgroundColor = Color.FromHex("FF0000"); + //BackgroundColor = Color.FromHex("FF0000"); List commands = new List(); commands.Add(QCommands.PREVIOUS); diff --git a/qController.Standard/Classes/Cell/QInstanceCell.cs b/qController.Standard/Classes/Cell/QInstanceCell.cs index ca71f96..b5dae8f 100644 --- a/qController.Standard/Classes/Cell/QInstanceCell.cs +++ b/qController.Standard/Classes/Cell/QInstanceCell.cs @@ -57,14 +57,14 @@ namespace qController Frame f = new Frame { Content = mainG, - OutlineColor = Color.Black, + BorderColor = Color.Black, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, Padding = 30, Margin = new Thickness(10,10,10,10), CornerRadius=20, + BackgroundColor = Color.FromHex("D8D8D8") }; - f.BackgroundColor = Color.FromHex("D8D8D8"); View = f; void InitItems() @@ -106,9 +106,7 @@ namespace qController void Connect(object sender, EventArgs e) { App.NavigationPage.Navigation.PushAsync(new ControlPage(nameLabel.Text,addressLabel.Text)); - Console.WriteLine("Connect To " + nameLabel.Text + " Pressed"); - } } } diff --git a/qController.Standard/Classes/Cell/QSelectedCueOptionsCell.cs b/qController.Standard/Classes/Cell/QLevelsCell.cs similarity index 89% rename from qController.Standard/Classes/Cell/QSelectedCueOptionsCell.cs rename to qController.Standard/Classes/Cell/QLevelsCell.cs index 7a8e8d9..26d906d 100644 --- a/qController.Standard/Classes/Cell/QSelectedCueOptionsCell.cs +++ b/qController.Standard/Classes/Cell/QLevelsCell.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; -using Newtonsoft.Json.Linq; using Xamarin.Forms; namespace qController { - public class QSelectedCueOptionsCell : Frame + public class QLevelsCell : Frame { public List levels; @@ -16,14 +15,16 @@ namespace qController public Label mainLabel; public Label rightLabel; public Label leftLabel; - public QSelectedCueOptionsCell() + public QLevelsCell() { Padding = new Thickness(5); CornerRadius = 20; - BackgroundColor = Color.Transparent; - + BorderColor = Color.Black; + HasShadow = true; + BackgroundColor = Color.FromHex("D8D8D8"); + IsVisible = false; //highlight for testing - BackgroundColor = Color.Red; + //BackgroundColor = Color.Red; Grid mainG = new Grid @@ -63,14 +64,9 @@ namespace qController Maximum = 12 }; - mainG.Children.Add(mainSlider, 1, 0); - mainG.Children.Add(leftSlider, 1, 1); - mainG.Children.Add(rightSlider, 1, 2); - - Grid.SetColumnSpan(mainSlider, 4); - Grid.SetColumnSpan(leftSlider, 4); - Grid.SetColumnSpan(rightSlider, 4); - mainLabel = new Label { + + mainLabel = new Label + { Text = "MAIN:", VerticalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Center @@ -78,18 +74,26 @@ namespace qController leftLabel = new Label { - Text = "LEFT:", + Text = "0:", VerticalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Center }; rightLabel = new Label { - Text = "RIGHT:", + Text = "1:", VerticalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Center }; + mainG.Children.Add(mainSlider, 1, 0); + mainG.Children.Add(leftSlider, 1, 1); + mainG.Children.Add(rightSlider, 1, 2); + + Grid.SetColumnSpan(mainSlider, 4); + Grid.SetColumnSpan(leftSlider, 4); + Grid.SetColumnSpan(rightSlider, 4); + mainG.Children.Add(mainLabel, 0, 0); mainG.Children.Add(leftLabel, 0, 1); mainG.Children.Add(rightLabel, 0, 2); diff --git a/qController.Standard/Classes/Cell/QSelectedCueCell.cs b/qController.Standard/Classes/Cell/QSelectedCueCell.cs index 2bc0093..197faf6 100644 --- a/qController.Standard/Classes/Cell/QSelectedCueCell.cs +++ b/qController.Standard/Classes/Cell/QSelectedCueCell.cs @@ -116,7 +116,6 @@ namespace qController VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; - //BACKGROUND COLORS FOR TESTING ONLY //notes.BackgroundColor = Color.Red; diff --git a/qController.Standard/Classes/Settings/QIcon.cs b/qController.Standard/Classes/Settings/QIcon.cs index 2d8e55a..3d82604 100644 --- a/qController.Standard/Classes/Settings/QIcon.cs +++ b/qController.Standard/Classes/Settings/QIcon.cs @@ -47,6 +47,9 @@ namespace qController public const string COMMENTING_O = "\uF27B"; + public const string DOLLAR = "\uF155"; + public const string MAIL = "\uE812"; + public static string GetIconFromType(string type) { diff --git a/qController.Standard/Pages/ControlPage.xaml b/qController.Standard/Pages/ControlPage.xaml index b0db741..1b04f29 100644 --- a/qController.Standard/Pages/ControlPage.xaml +++ b/qController.Standard/Pages/ControlPage.xaml @@ -2,11 +2,7 @@ - - - - - + @@ -14,10 +10,9 @@ - - diff --git a/qController.Standard/Pages/ControlPage.xaml.cs b/qController.Standard/Pages/ControlPage.xaml.cs index e70df17..f6016b6 100644 --- a/qController.Standard/Pages/ControlPage.xaml.cs +++ b/qController.Standard/Pages/ControlPage.xaml.cs @@ -9,7 +9,7 @@ namespace qController { QController qController; QSelectedCueCell qCell; - QSelectedCueOptionsCell qSelectedCueOptions; + QLevelsCell qLevelsCell; ShadowButton showLevelsButton; Grid mainG; QControlsBlock qControlsBlock; @@ -74,19 +74,13 @@ namespace qController App.rootPage.MenuPage.ChangeToControl(); NavigationPage.SetHasNavigationBar(this, false); - topBar.BackgroundColor = Color.FromHex("71AEFF"); - - BackgroundColor = Color.FromHex("4A4A4A"); - menuButton.Text = QIcon.MENU; qCell = new QSelectedCueCell(); - qCell.SelectedCueEdited += OnSelectedCueEdited; + AbsoluteLayout.SetLayoutFlags(qCell, AbsoluteLayoutFlags.All); - - switch (Device.RuntimePlatform) { case Device.iOS: @@ -107,8 +101,6 @@ namespace qController menuButtonGesture.Tapped += ShowMenu; menuButton.GestureRecognizers.Add(menuButtonGesture); - - sLayout.Children.Add(qCell); } @@ -117,80 +109,67 @@ namespace qController string address = "/workspace/" + qController.qWorkspace.workspace_id + "/cue_id/" + args.CueID + "/" + args.Property; qController.qClient.sendArgsUDP(address, args.NewValue); } + void FinishUI() { string workspace_prefix = "/workspace/" + qController.qWorkspace.workspace_id; - qSelectedCueOptions = new QSelectedCueOptionsCell(); + qLevelsCell = new QLevelsCell(); - qSelectedCueOptions.mainSlider.ValueChanged += (sender, args) => + qLevelsCell.mainSlider.ValueChanged += (sender, args) => { - qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qSelectedCueOptions.activeCue + "/sliderLevel/0", (float)args.NewValue); + qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/0", (float)args.NewValue); }; - qSelectedCueOptions.leftSlider.ValueChanged += (sender, args) => + qLevelsCell.leftSlider.ValueChanged += (sender, args) => { - qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qSelectedCueOptions.activeCue + "/sliderLevel/1", (float)args.NewValue); + qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/1", (float)args.NewValue); }; - qSelectedCueOptions.rightSlider.ValueChanged += (sender, args) => + qLevelsCell.rightSlider.ValueChanged += (sender, args) => { - qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qSelectedCueOptions.activeCue + "/sliderLevel/2", (float)args.NewValue); + qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/2", (float)args.NewValue); }; - - qControlsBlock = new QControlsBlock(qController); - - switch (Device.RuntimePlatform) + Button showLevelsInnerButton = new Button { - case Device.iOS: - AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.53, 1, 0.25)); - AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All); - AbsoluteLayout.SetLayoutBounds(qSelectedCueOptions, new Rectangle(0,0.50,1,0.25)); - AbsoluteLayout.SetLayoutFlags(qSelectedCueOptions, AbsoluteLayoutFlags.All); - break; - case Device.Android: - AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.58, 1, 0.25)); - AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All); - AbsoluteLayout.SetLayoutBounds(qSelectedCueOptions, new Rectangle(0,0.70,1,0.25)); - AbsoluteLayout.SetLayoutFlags(qSelectedCueOptions, AbsoluteLayoutFlags.All); - break; - } - sLayout.Children.Add(qControlsBlock); - - sLayout.Children.Add(qSelectedCueOptions); - - - Button b = new Button{ Text = QIcon.SLIDERS, TextColor = Color.Black, FontFamily = App.QFont, FontSize = App.HeightUnit * 4, VerticalOptions = LayoutOptions.FillAndExpand, - HorizontalOptions =LayoutOptions.FillAndExpand, + HorizontalOptions = LayoutOptions.FillAndExpand, HeightRequest = App.HeightUnit * 8, WidthRequest = App.HeightUnit * 8, CornerRadius = (int)(App.HeightUnit * 4), BackgroundColor = Color.LightBlue }; - b.Clicked += (s, e) => + showLevelsInnerButton.Clicked += (s, e) => { - qSelectedCueOptions.IsVisible = !qSelectedCueOptions.IsVisible; + qLevelsCell.IsVisible = !qLevelsCell.IsVisible; }; - showLevelsButton = new ShadowButton(b); + showLevelsButton = new ShadowButton(showLevelsInnerButton); + qControlsBlock = new QControlsBlock(qController); + + AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All); + AbsoluteLayout.SetLayoutFlags(qLevelsCell, AbsoluteLayoutFlags.All); + AbsoluteLayout.SetLayoutFlags(showLevelsButton, AbsoluteLayoutFlags.PositionProportional); switch (Device.RuntimePlatform) { 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(showLevelsButton, new Rectangle(0.04, 0.34, App.HeightUnit * 8, App.HeightUnit * 8)); - AbsoluteLayout.SetLayoutFlags(showLevelsButton, AbsoluteLayoutFlags.PositionProportional); break; case Device.Android: + AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.58, 1, 0.25)); + AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0.9, 0.40, 0.8, 0.25)); AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.04, 0.39, App.HeightUnit * 8, App.HeightUnit * 8)); - AbsoluteLayout.SetLayoutFlags(showLevelsButton, AbsoluteLayoutFlags.PositionProportional); break; } - - + + sLayout.Children.Add(qControlsBlock); + sLayout.Children.Add(qLevelsCell); sLayout.Children.Add(showLevelsButton); } @@ -221,7 +200,7 @@ namespace qController Device.BeginInvokeOnMainThread(() => { App.rootPage.MenuPage.ChangeToWorkspace(e.UpdatedWorkspace); - }); + }); if (qCell.activeCue == null) { Device.BeginInvokeOnMainThread(() => { @@ -278,14 +257,12 @@ namespace qController else showLevelsButton.IsVisible = false; qCell.UpdateSelectedCue(args.Cue); - //if (!mainG.IsVisible) - // mainG.IsVisible = true; - if(qSelectedCueOptions != null) + if(qLevelsCell != null) { - qSelectedCueOptions.activeCue = args.Cue.uniqueID; + qLevelsCell.activeCue = args.Cue.uniqueID; if (args.Cue.levels != null) { - qSelectedCueOptions.UpdateLevels(args.Cue.levels[0]); + qLevelsCell.UpdateLevels(args.Cue.levels[0]); } } }); diff --git a/qController.Standard/Pages/MenuPage.xaml.cs b/qController.Standard/Pages/MenuPage.xaml.cs index 6e94add..335b5d7 100644 --- a/qController.Standard/Pages/MenuPage.xaml.cs +++ b/qController.Standard/Pages/MenuPage.xaml.cs @@ -18,24 +18,8 @@ namespace qController InitializeComponent(); items = new ObservableCollection(); - items.Add(new MenuPageItem - { - Title = "Scan Network", - Icon = "\uE800", - Command = "scan" - }); - items.Add(new MenuPageItem - { - Title = "Add Manually", - Icon = "\uE801", - Command = "add" - }); - /*items.Add(new MenuPageItem - { - Title = "Open Link", - Icon = "\uF0C9", - Command = "open_link" - });*/ + ChangeToHome(); + listView = new ListView { ItemsSource = items, @@ -90,6 +74,7 @@ namespace qController Icon = QIcon.CANCEL, Command = "disconnect" }); + } public void ChangeToWorkspace(QWorkSpace workspace) { @@ -184,6 +169,18 @@ namespace qController Title = "Add Manually", Icon = "\uE801", Command = "add" + }); + items.Add(new MenuPageItem + { + Title = "Send Feedback", + Icon = QIcon.MAIL, + Command = "feedback" + }); + items.Add(new MenuPageItem + { + Title = "Support Project", + Icon = QIcon.DOLLAR, + Command = "support" }); } } diff --git a/qController.Standard/Pages/qConnectionPage.xaml b/qController.Standard/Pages/qConnectionPage.xaml index a202508..136f985 100644 --- a/qController.Standard/Pages/qConnectionPage.xaml +++ b/qController.Standard/Pages/qConnectionPage.xaml @@ -1,8 +1,8 @@ - + - + @@ -10,10 +10,9 @@ - - - + \ No newline at end of file diff --git a/qController.Standard/Pages/qConnectionPage.xaml.cs b/qController.Standard/Pages/qConnectionPage.xaml.cs index d3cfd4b..f211b9f 100644 --- a/qController.Standard/Pages/qConnectionPage.xaml.cs +++ b/qController.Standard/Pages/qConnectionPage.xaml.cs @@ -28,48 +28,58 @@ namespace qController else if(args.Command == "add") { AddWorkspace(); - }else if(args.Command == "open_link") + } + else if (args.Command == "feedback") { - Device.OpenUri(new Uri("http://www.jwetzell.com")); + Console.WriteLine("Give Feedback selected"); + } + else if(args.Command == "support") + { + UserDialogs.Instance.Confirm(new ConfirmConfig + { + Title = "Support the Project", + Message = "This application will never be a paid app or contain any sort of ads, but if you choose to show your support you may do so by clicking the Donate button below. Thank you!", + OkText = "Donate", + OnAction = (response) => + { + if (response) + Device.OpenUri(new Uri("https://linktr.ee/JoelWetzell")); + } + }); } } private void InitGUI() { NavigationPage.SetHasNavigationBar(this, false); - lstView.ItemsSource = QStorage.qInstances; + listView.ItemsSource = QStorage.qInstances; - lstView.ItemTemplate = new DataTemplate(typeof(QInstanceCell)); - lstView.SeparatorVisibility = SeparatorVisibility.None; - lstView.ItemTapped += (object sender, ItemTappedEventArgs e) => + listView.ItemTemplate = new DataTemplate(typeof(QInstanceCell)); + listView.SeparatorVisibility = SeparatorVisibility.None; + listView.ItemTapped += (object sender, ItemTappedEventArgs e) => { // don't do anything if we just de-selected the row if (e.Item == null) return; // do something with e.SelectedItem ((ListView)sender).SelectedItem = null; // de-select the row }; - topBar.BackgroundColor = Color.FromHex("71AEFF"); + + menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2); switch (Device.RuntimePlatform) { case Device.iOS: topBar.HeightRequest = Math.Max(App.Height * .09, 65); - menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2); menuButton.FontSize = App.Height * .04; break; case Device.Android: topBar.HeightRequest = App.Height * .08; - menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2); menuButton.FontSize = App.Height * .05; break; } - menuButton.Text = "\uF0C9"; - - lstView.BackgroundColor = Color.FromHex("4A4A4A"); BackgroundColor = Color.FromHex("4A4A4A"); var menuButtonGesture = new TapGestureRecognizer(); - menuButtonGesture.Tapped += showMenu; menuButton.GestureRecognizers.Add(menuButtonGesture); @@ -109,7 +119,6 @@ namespace qController }); } - async void Scan(){ bool workspacesFound = false; App.showToast("Scanning for Instances..."); @@ -141,14 +150,5 @@ namespace qController { App.MenuIsPresented = true; } - - void showToast(string message) - { - var toastConfig = new ToastConfig(message); - toastConfig.SetDuration(3000); - toastConfig.SetPosition(ToastPosition.Bottom); - UserDialogs.Instance.Toast(toastConfig); - } - } }