This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed some translation issues - Implemented the PelcoD-Protocol
- Loading branch information
Showing
16 changed files
with
567 additions
and
19 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<plugins:SettingsControl x:TypeArguments="local:PelcoSettings" x:Class="ObsMultiview.Plugins.PelcoD.GlobalSettings" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:ObsMultiview.Plugins.PelcoD" | ||
xmlns:plugins="clr-namespace:ObsMultiview.Plugins" | ||
xmlns:lex="http://wpflocalizeextension.codeplex.com" | ||
lex:LocalizeDictionary.DesignCulture="en" | ||
lex:ResxLocalizationProvider.DefaultAssembly="ObsMultiview.Plugins" | ||
lex:ResxLocalizationProvider.DefaultDictionary="PelcoD" | ||
mc:Ignorable="d" | ||
DataContext="{Binding RelativeSource={RelativeSource Self}}" | ||
Background="White" | ||
Height="350" Width="500"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition /> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition /> | ||
</Grid.RowDefinitions> | ||
|
||
<TextBlock Text="{lex:Loc Port}" Margin="5" VerticalAlignment="Center" /> | ||
<ComboBox Grid.Column="1" Margin="5" SelectedItem="{Binding Settings.ComPort}" ItemsSource="{Binding AvailablePorts}"/> | ||
<TextBlock Text="{lex:Loc Baudrate}" Grid.Column="2" VerticalAlignment="Center" Margin="5" /> | ||
<TextBox Grid.Column="4" Margin="5" Text="{Binding Settings.BaudRate}"/> | ||
|
||
<DataGrid Grid.Row="1" Grid.ColumnSpan="4" AutoGenerateColumns="False" ItemsSource="{Binding Settings.Presets}"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Binding="{Binding CameraID}" Header="{lex:Loc CameraID}" Width="100"></DataGridTextColumn> | ||
<DataGridTextColumn Binding="{Binding PresetID}" Header="{lex:Loc PresetID}" Width="100"></DataGridTextColumn> | ||
<DataGridTextColumn Binding="{Binding Name}" Header="{lex:Loc Name}" Width="*"></DataGridTextColumn> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
</Grid> | ||
</plugins:SettingsControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO.Ports; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace ObsMultiview.Plugins.PelcoD { | ||
/// <summary> | ||
/// Interaktionslogik für GlobalSettings.xaml | ||
/// </summary> | ||
public partial class GlobalSettings : SettingsControl<PelcoSettings> { | ||
public static readonly DependencyProperty AvailablePortsProperty = DependencyProperty.Register( | ||
nameof(AvailablePorts), typeof(List<string>), typeof(GlobalSettings), new PropertyMetadata(default(List<string>))); | ||
|
||
public List<string> AvailablePorts { | ||
get { return (List<string>) GetValue(AvailablePortsProperty); } | ||
set { SetValue(AvailablePortsProperty, value); } | ||
} | ||
|
||
public GlobalSettings(CommandFacade management) : base(management) { | ||
AvailablePorts = SerialPort.GetPortNames().ToList(); | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<plugins:SlotSettingsControl x:TypeArguments="local:PelcoSlotSettings" | ||
x:Class="ObsMultiview.Plugins.PelcoD.SlotSettings" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:ObsMultiview.Plugins.PelcoD" | ||
xmlns:plugins="clr-namespace:ObsMultiview.Plugins" | ||
xmlns:lex="http://wpflocalizeextension.codeplex.com" | ||
DataContext="{Binding RelativeSource={RelativeSource Self}}" | ||
mc:Ignorable="d" | ||
lex:LocalizeDictionary.DesignCulture="en" | ||
lex:ResxLocalizationProvider.DefaultAssembly="ObsMultiview.Plugins" | ||
lex:ResxLocalizationProvider.DefaultDictionary="PelcoD" | ||
Height="26" d:DesignWidth="800"> | ||
<Grid> | ||
<ComboBox ItemsSource="{Binding Presets}" SelectedItem="{Binding Settings.Preset}" > | ||
<ComboBox.ItemTemplate> | ||
<DataTemplate DataType="local:Preset"> | ||
<TextBlock Text="{Binding Name}"></TextBlock> | ||
</DataTemplate> | ||
</ComboBox.ItemTemplate> | ||
</ComboBox> | ||
</Grid> | ||
</plugins:SlotSettingsControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
using ObsMultiview.Plugins.Extensions; | ||
|
||
namespace ObsMultiview.Plugins.PelcoD { | ||
/// <summary> | ||
/// Interaktionslogik für SlotSettings.xaml | ||
/// </summary> | ||
public partial class SlotSettings : SlotSettingsControl<PelcoSlotSettings> { | ||
public static readonly DependencyProperty PresetsProperty = DependencyProperty.Register( | ||
nameof(Presets), typeof(List<Preset>), typeof(SlotSettings), new PropertyMetadata(default(List<Preset>))); | ||
|
||
public List<Preset> Presets { | ||
get { return (List<Preset>) GetValue(PresetsProperty); } | ||
set { SetValue(PresetsProperty, value); } | ||
} | ||
|
||
public SlotSettings(CommandFacade commandFacade, Guid slotID) : base(commandFacade, slotID) { | ||
var settings = commandFacade.RequestSettings<PelcoSettings>(); | ||
Presets = settings.Presets; | ||
Presets.Insert(0, | ||
new Preset {CameraID = 0, PresetID = 0, Name = Localizer.Localize<string>("PelcoD", "NoCamera")}); | ||
InitializeComponent(); | ||
} | ||
|
||
public override void WriteSettings() { | ||
if (Settings.Preset.CameraID == 0) { | ||
Settings.Preset = null; | ||
} | ||
base.WriteSettings(); | ||
} | ||
} | ||
} |
Oops, something went wrong.