mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-18 05:34:16 +00:00
Cleanup
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Acr.UserDialogs;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
public partial class App : Application
|
||||
@@ -14,6 +15,7 @@ namespace qController
|
||||
public static double Width;
|
||||
public static double HeightUnit;
|
||||
public static double WidthUnit;
|
||||
|
||||
public static bool MenuIsPresented
|
||||
{
|
||||
get
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
@@ -76,7 +74,7 @@ namespace qController
|
||||
});
|
||||
|
||||
}
|
||||
public void ChangeToWorkspace(QWorkSpace workspace)
|
||||
public void ChangeToWorkspace(QWorkspace workspace)
|
||||
{
|
||||
for(int i = 0; i < workspace.data.Count; i++)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" Text=""/>
|
||||
</Grid>
|
||||
<ListView x:Name="listView" HasUnevenRows="true" BackgroundColor="#4A4A4A"></ListView>
|
||||
<ListView x:Name="listView" HasUnevenRows="true" BackgroundColor="#4A4A4A" SeparatorVisibility="None"></ListView>
|
||||
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
@@ -1,11 +1,8 @@
|
||||
using Xamarin.Forms;
|
||||
using System.Net;
|
||||
using System;
|
||||
using Acr.UserDialogs;
|
||||
using Acr.Settings;
|
||||
using Zeroconf;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
@@ -52,10 +49,10 @@ namespace qController
|
||||
private void InitGUI()
|
||||
{
|
||||
NavigationPage.SetHasNavigationBar(this, false);
|
||||
listView.ItemsSource = QStorage.qInstances;
|
||||
|
||||
//ListView Setup
|
||||
listView.ItemsSource = QStorage.qInstances;
|
||||
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
|
||||
@@ -64,12 +61,11 @@ namespace qController
|
||||
((ListView)sender).SelectedItem = null; // de-select the row
|
||||
};
|
||||
|
||||
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
||||
|
||||
//Platform Specific Setup
|
||||
switch (Device.RuntimePlatform)
|
||||
{
|
||||
case Device.iOS:
|
||||
topBar.HeightRequest = Math.Max(App.Height * .09, 65);
|
||||
topBar.HeightRequest = App.Height * .09;
|
||||
menuButton.FontSize = App.Height * .04;
|
||||
break;
|
||||
case Device.Android:
|
||||
@@ -78,10 +74,13 @@ namespace qController
|
||||
break;
|
||||
}
|
||||
|
||||
BackgroundColor = Color.FromHex("4A4A4A");
|
||||
BackgroundColor = Color.FromHex("4A4A4A");
|
||||
|
||||
//MenuButton Setup
|
||||
var menuButtonGesture = new TapGestureRecognizer();
|
||||
menuButtonGesture.Tapped += showMenu;
|
||||
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
||||
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user