mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-12 19:03:53 +00:00
Start work towards manually added servers
This commit is contained in:
@@ -134,12 +134,13 @@
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
|
||||
<Button Text="Manually Add..."
|
||||
<!--TODO: Manually add "servers" -->
|
||||
<!--<Button Text="Manually Add..."
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
Clicked="AddInstance"
|
||||
BackgroundColor="White"
|
||||
StyleClass="PrimaryButton"/>
|
||||
StyleClass="PrimaryButton"/>-->
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
|
||||
@@ -19,22 +19,9 @@ namespace qController.Pages
|
||||
|
||||
SetupTopBar();
|
||||
qBrowserViewModel = new QBrowserViewModel(new QBrowser());
|
||||
qBrowserViewModel.autoUpdate = true;
|
||||
serverListView.BindingContext = qBrowserViewModel;
|
||||
serverListView.ItemSelected += QWorkspaceSelected;
|
||||
|
||||
|
||||
//Old way of displaying "QInstances"
|
||||
//storageListView.ItemsSource = QStorage.qInstances;
|
||||
//storageListView.ItemTemplate = new DataTemplate(typeof(QInstanceCell));
|
||||
//storageListView.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
|
||||
//};
|
||||
|
||||
}
|
||||
|
||||
private void SetupTopBar()
|
||||
@@ -96,6 +83,10 @@ namespace qController.Pages
|
||||
else if (args.Command == "support")
|
||||
{
|
||||
UserDialogs.Instance.Confirm(new DonatePrompt());
|
||||
}else if(args.Command == "scan")
|
||||
{
|
||||
qBrowserViewModel.InitiateScan();
|
||||
App.showToast("Scan Initiated.........");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="200"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="75"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Ordering is based on the order last is on top seems pretty backwards to me-->
|
||||
@@ -35,5 +36,60 @@
|
||||
|
||||
<qui:QNavBar x:Name="qNavBar"
|
||||
Grid.Row="0"/>
|
||||
|
||||
|
||||
|
||||
<Grid Grid.Row="3"
|
||||
RowSpacing="0"
|
||||
ColumnSpacing="0"
|
||||
BackgroundColor="#808080">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Clicked="GoButtonClicked"
|
||||
BackgroundColor="SeaGreen"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
TextColor="Black"
|
||||
Text="Go"/>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Clicked="PauseButtonClicked"
|
||||
BackgroundColor="LightYellow"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
TextColor="Black"
|
||||
Text="Pause"/>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Clicked="ResumeButtonClicked"
|
||||
BackgroundColor="DarkSlateGray"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
TextColor="Black"
|
||||
Text="Resume"/>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
Clicked="PanicButtonClicked"
|
||||
BackgroundColor="IndianRed"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
TextColor="Black"
|
||||
Text="Panic"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
@@ -200,5 +200,51 @@ namespace qController
|
||||
await Task.Delay(milisec);
|
||||
actionToExecute();
|
||||
}
|
||||
|
||||
void GoButtonClicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
if(this.connectedWorkspace != null)
|
||||
{
|
||||
if (this.connectedWorkspace.connected)
|
||||
{
|
||||
this.connectedWorkspace.go();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PauseButtonClicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
if (this.connectedWorkspace != null)
|
||||
{
|
||||
if (this.connectedWorkspace.connected)
|
||||
{
|
||||
QCue selectedCue = ((QCueViewModel)this.selectedCueFrame.BindingContext).cue;
|
||||
selectedCue.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ResumeButtonClicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
if (this.connectedWorkspace != null)
|
||||
{
|
||||
if (this.connectedWorkspace.connected)
|
||||
{
|
||||
QCue selectedCue = ((QCueViewModel)this.selectedCueFrame.BindingContext).cue;
|
||||
selectedCue.resume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PanicButtonClicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
if (this.connectedWorkspace != null)
|
||||
{
|
||||
if (this.connectedWorkspace.connected)
|
||||
{
|
||||
this.connectedWorkspace.panicAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user