-
Notifications
You must be signed in to change notification settings - Fork 2
/
Options.xaml
2194 lines (2045 loc) · 115 KB
/
Options.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
Copyright Dale Ghent <[email protected]>
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/-->
<ResourceDictionary
x:Class="DaleGhent.NINA.GroundStation.Options"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ninactrl="clr-namespace:NINA.CustomControlLibrary;assembly=NINA.CustomControlLibrary"
xmlns:rules="clr-namespace:NINA.Core.Utility.ValidationRules;assembly=NINA.Core">
<GeometryGroup x:Key="TTS_SVG">
<PathGeometry Figures="M 11.36,16.9693C 11.36,17.5213 10.912,17.9693 10.36,17.9693C 9.808,17.9693 9.36,17.5213 9.36,16.9693C 9.36,16.4173 9.808,15.9693 10.36,15.9693C 10.912,15.9693 11.36,16.4173 11.36,16.9693 Z M 14.36,15.9693C 13.808,15.9693 13.36,16.4173 13.36,16.9693C 13.36,17.5213 13.808,17.9693 14.36,17.9693C 14.912,17.9693 15.36,17.5213 15.36,16.9693C 15.36,16.4173 14.912,15.9693 14.36,15.9693 Z M 6.36,15.9693C 5.808,15.9693 5.36,16.4173 5.36,16.9693C 5.36,17.5213 5.808,17.9693 6.36,17.9693C 6.912,17.9693 7.36,17.5213 7.36,16.9693C 7.36,16.4173 6.912,15.9693 6.36,15.9693 Z M 12.0627,30.6667L 8.16667,24.8293L 2.36,24.8293C 1.05733,24.8293 5.96046e-007,23.772 5.96046e-007,22.4693L 5.96046e-007,11.4693C 5.96046e-007,10.1667 1.05733,9.10933 2.36,9.10933L 18,9.10933L 18,0.469334C 18,0.271997 18.1627,0.109333 18.36,0.109333L 30.36,0.109333C 30.5573,0.109333 30.72,0.271997 30.72,0.469334L 30.72,14.4693C 30.72,14.6667 30.5573,14.8293 30.36,14.8293L 20.72,14.8293L 20.72,22.4693C 20.72,23.772 19.6627,24.8293 18.36,24.8293L 12.36,24.8293L 12.36,24.1093L 18.36,24.1093C 19.2667,24.1093 20,23.376 20,22.4693L 20,11.4693C 20,10.5627 19.2667,9.82933 18.36,9.82933L 2.36,9.82933C 1.45333,9.82933 0.720001,10.5627 0.720001,11.4693L 0.720001,22.4693C 0.720001,23.376 1.45333,24.1093 2.36,24.1093L 8.36,24.1093C 8.48,24.1093 8.59467,24.172 8.65733,24.272L 12.6573,30.272M 20.72,14.1093L 30,14.1093L 30,0.829334L 18.72,0.829334L 18.72,9.136C 19.4067,9.24533 20,9.652 20.36,10.22L 20.36,10.1093L 28.36,10.1093L 28.36,10.8333L 20.6307,10.8293C 20.688,11.032 20.72,11.2453 20.72,11.4693M 24.9333,27.5533L 22.1053,24.724C 21.964,24.584 21.964,24.3547 22.1053,24.2147L 24.9333,21.3867L 25.444,21.896L 23.2293,24.1093L 26.36,24.1093C 27.2667,24.1093 28,23.376 28,22.4693L 28,18.4693L 28.72,18.4693L 28.72,22.4693C 28.72,23.772 27.6627,24.8293 26.36,24.8293L 23.2293,24.8293L 25.444,27.0427M 28.36,7.82933L 20.36,7.82933L 20.36,7.10933L 28.36,7.10933M 28.36,4.82933L 20.36,4.82933L 20.36,4.10933L 28.36,4.10933" />
</GeometryGroup>
<DataTemplate x:Key="Ground Station_Options">
<TabControl TabStripPlacement="Top">
<TabItem Name="Pushover" Header="Pushover">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Margin="0,5,0,5" VerticalAlignment="Center">
Website: <Hyperlink NavigateUri="https://pushover.net/" RequestNavigate="Hyperlink_RequestNavigate">https://pushover.net/</Hyperlink>
</TextBlock>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>User key</TextBlock.Text>
<TextBlock.ToolTip>The user key for your Pushover account</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="PushoverUserKey" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>App API token/key</TextBlock.Text>
<TextBlock.ToolTip>The application API token or key assigned for NINA</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="PushoverAppKey" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="160"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default notification sound</TextBlock.Text>
<TextBlock.ToolTip>The sound that new instances of the Send to Pushover sequence item will default to</TextBlock.ToolTip>
</TextBlock>
<ComboBox
MinWidth="100"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
ItemsSource="{Binding PushoverNotificationSounds}"
SelectedItem="{Binding PushoverDefaultNotificationSound}" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="160"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default notification priority</TextBlock.Text>
<TextBlock.ToolTip>The message priority that new instances of the Send to Pushover sequence item will default to</TextBlock.ToolTip>
</TextBlock>
<ComboBox
MinWidth="100"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
ItemsSource="{Binding PushoverPriorities}"
SelectedItem="{Binding PushoverDefaultNotificationPriority}" />
</StackPanel>
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="160"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default failure sound</TextBlock.Text>
<TextBlock.ToolTip>The sound that new instances of the Failures to Pushover sequence trigger will default to</TextBlock.ToolTip>
</TextBlock>
<ComboBox
MinWidth="100"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
ItemsSource="{Binding PushoverNotificationSounds}"
SelectedItem="{Binding PushoverDefaultFailureSound}" />
</StackPanel>
<StackPanel Margin="0,0,0,15" Orientation="Horizontal">
<TextBlock
Width="160"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default failure priority</TextBlock.Text>
<TextBlock.ToolTip>The message priority that new instances of the Failures to Pushover sequence trigger will default to</TextBlock.ToolTip>
</TextBlock>
<ComboBox
MinWidth="100"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
ItemsSource="{Binding PushoverPriorities}"
SelectedItem="{Binding PushoverDefaultFailurePriority}" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="160"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Emergency retry interval</TextBlock.Text>
<TextBlock.ToolTip>The interval in which a message with an Emergency prioity will alert in the Pushover client until it is acknowledged. Minimum = 30 seconds. Maximum = 86400 seconds (24 hours)</TextBlock.ToolTip>
</TextBlock>
<ninactrl:UnitTextBox
Width="75"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Unit="s">
<TextBox.Text>
<Binding Mode="TwoWay" Path="PushoverEmergRetryInterval">
<Binding.ValidationRules>
<rules:IntRangeRuleWithDefault>
<rules:IntRangeRuleWithDefault.ValidRange>
<rules:IntRangeChecker Minimum="30" Maximum="86400" />
</rules:IntRangeRuleWithDefault.ValidRange>
</rules:IntRangeRuleWithDefault>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</ninactrl:UnitTextBox>
</StackPanel>
<StackPanel Margin="0,0,0,15" Orientation="Horizontal">
<TextBlock
Width="160"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Emergency retry limit</TextBlock.Text>
<TextBlock.ToolTip>The time limit for which Emergency priority messages will alert for after being received. Minimum = 30 seconds. Maximum = 86400 seconds (24 hours)</TextBlock.ToolTip>
</TextBlock>
<ninactrl:UnitTextBox
Width="75"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Unit="s">
<TextBox.Text>
<Binding Mode="TwoWay" Path="PushoverEmergExpireAfter">
<Binding.ValidationRules>
<rules:IntRangeRuleWithDefault>
<rules:IntRangeRuleWithDefault.ValidRange>
<rules:IntRangeChecker Minimum="30" Maximum="86400" />
</rules:IntRangeRuleWithDefault.ValidRange>
</rules:IntRangeRuleWithDefault>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</ninactrl:UnitTextBox>
</StackPanel>
<ninactrl:AsyncProcessButton
Width="515"
Height="25"
Margin="0,0,0,5"
HorizontalAlignment="Left"
ButtonForegroundBrush="{StaticResource ButtonForegroundBrush}"
ButtonText="Send Test Message"
Command="{Binding PushoverTestCommand}"
LoadingImageBrush="{StaticResource PrimaryBrush}" />
<GroupBox Margin="0,10,0,0" Header="Failure message template">
<StackPanel Orientation="Vertical">
<StackPanel Margin="0,5,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Title</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding PushoverFailureTitleText}" />
</StackPanel>
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<TextBlock Width="110" HorizontalAlignment="Left">
<TextBlock.Text>Body</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding PushoverFailureBodyText}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Name="Telegram" Header="Telegram">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Margin="0,5,0,5" VerticalAlignment="Center">
Website: <Hyperlink NavigateUri="https://telegram.org/" RequestNavigate="Hyperlink_RequestNavigate">https://telegram.org/</Hyperlink>
</TextBlock>
<TextBlock Margin="0,5,0,5" VerticalAlignment="Center">
Bot info: <Hyperlink NavigateUri="https://core.telegram.org/bots" RequestNavigate="Hyperlink_RequestNavigate">https://core.telegram.org/bots</Hyperlink>
</TextBlock>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Bot access token</TextBlock.Text>
<TextBlock.ToolTip>The assigned to your Telegram bot</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="TelegramAccessToken" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,15" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Chat ID</TextBlock.Text>
<TextBlock.ToolTip>The chat ID that messages should be sent to</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="TelegramChatId" />
</TextBox.Text>
</TextBox>
</StackPanel>
<ninactrl:AsyncProcessButton
Width="515"
Height="25"
Margin="0,0,0,5"
HorizontalAlignment="Left"
ButtonForegroundBrush="{StaticResource ButtonForegroundBrush}"
ButtonText="Send Test Message"
Command="{Binding TelegramTestCommand}"
LoadingImageBrush="{StaticResource PrimaryBrush}" />
<GroupBox Margin="0,10,0,0" Header="Failure message template">
<StackPanel Orientation="Vertical">
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding TelegramFailureBodyText}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Name="Email" Header="Email">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>From address</TextBlock.Text>
<TextBlock.ToolTip>The email address which will be used as the From address of the email being sent</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="SmtpFromAddress" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default recipient(s)</TextBlock.Text>
<TextBlock.ToolTip>The default email address that email will be addressed to. Multiple addresses may be specified, separated by a comma</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="SmtpDefaultRecipients" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>SMTP host</TextBlock.Text>
<TextBlock.ToolTip>SMTP/outgoing mail server hostname or IP address</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="SmtpHostName" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>SMTP port</TextBlock.Text>
<TextBlock.ToolTip>SMTP/outgoing mail server service port. Commmonly 25 or 587. Sometimes 465. Default: 587</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="75"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="SmtpHostPort" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Username</TextBlock.Text>
<TextBlock.ToolTip>SMTP service username</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="SmtpUsername" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,15" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Password</TextBlock.Text>
<TextBlock.ToolTip>SMTP service password</TextBlock.ToolTip>
</TextBlock>
<PasswordBox
Width="400"
Height="20"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="0"
CaretBrush="{StaticResource PrimaryBrush}"
Foreground="{StaticResource PrimaryBrush}"
Loaded="PasswordBox_Smtp_Loaded"
PasswordChanged="PasswordBox_Smtp_PasswordChanged">
<PasswordBox.Background>
<SolidColorBrush Opacity="0.05" Color="{Binding Color, Source={StaticResource PrimaryBrush}}" />
</PasswordBox.Background>
</PasswordBox>
</StackPanel>
<ninactrl:AsyncProcessButton
Width="515"
Height="25"
Margin="0,0,0,5"
HorizontalAlignment="Left"
ButtonForegroundBrush="{StaticResource ButtonForegroundBrush}"
ButtonText="Send Test Message"
Command="{Binding EmailTestCommand}"
LoadingImageBrush="{StaticResource PrimaryBrush}" />
<GroupBox Margin="0,10,0,0" Header="Failure message template">
<StackPanel Orientation="Vertical">
<StackPanel Margin="0,5,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Subject</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding EmailFailureSubjectText}" />
</StackPanel>
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<TextBlock Width="110" HorizontalAlignment="Left">
<TextBlock.Text>Body</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding EmailFailureBodyText}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Name="IFTTT_Webhooks" Header="IFTTT Webhooks">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Margin="0,5,0,5" VerticalAlignment="Center">
Website: <Hyperlink NavigateUri="https://ifttt.com/maker_webhooks" RequestNavigate="Hyperlink_RequestNavigate">https://ifttt.com/maker_webhooks</Hyperlink>
</TextBlock>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>IFTTT Webhooks key</TextBlock.Text>
<TextBlock.ToolTip>Your IFTTT Webhooks API key</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding IFTTTWebhookKey}" />
</StackPanel>
<GroupBox Margin="0,10,0,0" Header="Failure message template">
<StackPanel Orientation="Vertical">
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Value 1</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding IftttFailureValue1}" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Value 2</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding IftttFailureValue2}" />
</StackPanel>
<StackPanel Margin="0,0,0,15" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Value 3</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding IftttFailureValue3}" />
</StackPanel>
<ninactrl:AsyncProcessButton
Width="515"
Height="25"
Margin="0,0,0,5"
HorizontalAlignment="Left"
ButtonForegroundBrush="{StaticResource ButtonForegroundBrush}"
ButtonText="Send Test Message"
Command="{Binding IFTTTTestCommand}"
LoadingImageBrush="{StaticResource PrimaryBrush}" />
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Name="MQTT" Header="MQTT">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Margin="0,5,0,5" VerticalAlignment="Center">
Website: <Hyperlink NavigateUri="https://mqtt.org/" RequestNavigate="Hyperlink_RequestNavigate">https://mqtt.org/</Hyperlink>
</TextBlock>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Broker host</TextBlock.Text>
<TextBlock.ToolTip>MQTT broker hostname or IP</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="MqttBrokerHost" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Broker port</TextBlock.Text>
<TextBlock.ToolTip>MQTT broker port</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="75"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="MqttBrokerPort" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default topic</TextBlock.Text>
<TextBlock.ToolTip>The default topic to publish to</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="MqttDefaultTopic" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Client ID prefix</TextBlock.Text>
<TextBlock.ToolTip>
If left blank, the client ID will be auto-generated by the broker. If one is specified here, the text will be used as a prefix to a randomized client ID string in the format of
[text].[random string]
</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="MqttClientId" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default QoS</TextBlock.Text>
<TextBlock.ToolTip>The default QoS level that message payloads are assigned</TextBlock.ToolTip>
</TextBlock>
<ComboBox
MinWidth="40"
Margin="5,0,0,0"
VerticalAlignment="Center"
ItemsSource="{Binding QoSLevels}"
SelectedIndex="{Binding MqttDefaultQoSLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default failure QoS</TextBlock.Text>
<TextBlock.ToolTip>The default QoS level that failure payloads are assigned</TextBlock.ToolTip>
</TextBlock>
<ComboBox
MinWidth="40"
Margin="5,0,0,0"
VerticalAlignment="Center"
ItemsSource="{Binding QoSLevels}"
SelectedIndex="{Binding MqttDefaultFailureQoSLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Username</TextBlock.Text>
<TextBlock.ToolTip>MQTT broker username</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="MqttUsername" />
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Password</TextBlock.Text>
<TextBlock.ToolTip>MQTT broker password</TextBlock.ToolTip>
</TextBlock>
<PasswordBox
Width="400"
Height="20"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="0"
CaretBrush="{StaticResource PrimaryBrush}"
Foreground="{StaticResource PrimaryBrush}"
Loaded="PasswordBox_Mqtt_Loaded"
PasswordChanged="PasswordBox_Mqtt_PasswordChanged">
<PasswordBox.Background>
<SolidColorBrush Opacity="0.05" Color="{Binding Color, Source={StaticResource PrimaryBrush}}" />
</PasswordBox.Background>
</PasswordBox>
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Use TLS</TextBlock.Text>
<TextBlock.ToolTip>Use TLS on broker connections</TextBlock.ToolTip>
</TextBlock>
<CheckBox
Margin="5,0,0,0"
VerticalAlignment="Center"
IsChecked="{Binding MqttBrokerUseTls, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Margin="0,0,0,15" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Reconnect attempts</TextBlock.Text>
<TextBlock.ToolTip>The maximum number of reconnect attempts that will be made if a session is interrupted</TextBlock.ToolTip>
</TextBlock>
<TextBox
Width="75"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="MqttMaxReconnectAttempts" UpdateSourceTrigger="LostFocus">
<Binding.ValidationRules>
<rules:GreaterThanZeroRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<ninactrl:AsyncProcessButton
Width="515"
Height="25"
Margin="0,0,0,5"
HorizontalAlignment="Left"
ButtonForegroundBrush="{StaticResource ButtonForegroundBrush}"
ButtonText="Send Test Message"
Command="{Binding MQTTTestCommand}"
LoadingImageBrush="{StaticResource PrimaryBrush}" />
<GroupBox Margin="0,5,0,0" Header="Last Will & Testament">
<StackPanel Orientation="Vertical">
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Enable</TextBlock.Text>
<TextBlock.ToolTip>Starts the Last Will & Testament connection with the broker when NINA starts</TextBlock.ToolTip>
</TextBlock>
<CheckBox
Margin="5,0,0,0"
VerticalAlignment="Center"
IsChecked="{Binding MqttLwtEnable, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Margin="0,5,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Topic</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Text="{Binding MqttLwtTopic}" />
</StackPanel>
<TabControl>
<TabItem Name="Birth_payload" Header="Birth payload">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Width="110" HorizontalAlignment="Left">
<TextBlock.Text>Payload text</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding MqttLwtBirthPayload}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</TabItem>
<TabItem Name="Last_will_payload" Header="Last will payload">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Width="110" HorizontalAlignment="Left">
<TextBlock.Text>Payload text</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding MqttLwtLastWillPayload}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</TabItem>
<TabItem Name="Close_payload" Header="Close payload">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<TextBlock Width="110" HorizontalAlignment="Left">
<TextBlock.Text>Payload text</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding MqttLwtClosePayload}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Name="TTS" Header="Text-to-Speech">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<!--
<TextBlock Margin="0,5,0,5" VerticalAlignment="Center">
<Hyperlink NavigateUri="ms-settings:speech" RequestNavigate="Hyperlink_RequestNavigate">
<Run Text="Open Windows Text-to-speech settings" />
</Hyperlink>
</TextBlock>
-->
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Test messaage</TextBlock.Text>
</TextBlock>
<TextBox
Width="400"
Margin="5,0,0,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center">
<TextBox.Text>
<Binding Path="TtsTestMessage" />
</TextBox.Text>
</TextBox>
</StackPanel>
<ninactrl:AsyncProcessButton
Width="515"
Height="25"
Margin="0,0,0,5"
HorizontalAlignment="Left"
ButtonForegroundBrush="{StaticResource ButtonForegroundBrush}"
ButtonText="Speak Test Message"
Command="{Binding TtsTestCommand}"
LoadingImageBrush="{StaticResource PrimaryBrush}" />
<GroupBox Margin="0,10,0,0" Header="Failure message template">
<StackPanel Orientation="Vertical">
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<TextBox
MinWidth="515"
MinHeight="400"
MaxWidth="515"
MaxHeight="400"
Margin="0,5,0,0"
HorizontalAlignment="Left"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Visible"
Text="{Binding TTSFailureMessage}"
VerticalScrollBarVisibility="Visible" />
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Name="PlaySound" Header="Sounds">
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default sound</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="300"
MaxWidth="500"
MaxHeight="150"
Margin="5,3,0,3"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
TextAlignment="Left"
TextWrapping="Wrap"
Text="{Binding PlaySoundDefaultFile}" />
<Button
Width="25"
Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Command="{Binding OpenSelectDefaultSoundFileDialogCommand}">
<Button.Content>
<TextBlock Foreground="{StaticResource ButtonForegroundBrush}" Text="..." />
</Button.Content>
</Button>
</StackPanel>
<StackPanel Margin="0,10,0,5" Orientation="Horizontal">
<TextBlock
Width="110"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock.Text>Default failure sound</TextBlock.Text>
</TextBlock>
<TextBox
MinWidth="300"
MaxWidth="500"
MaxHeight="150"
Margin="5,3,0,3"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
TextAlignment="Left"
TextWrapping="Wrap"
Text="{Binding PlaySoundDefaultFailureFile}" />
<Button
Width="25"
Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Command="{Binding OpenSelectDefaultFailureSoundFileDialogCommand}">
<Button.Content>
<TextBlock Foreground="{StaticResource ButtonForegroundBrush}" Text="..." />
</Button.Content>
</Button>
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Name="Token_Help" Header="Message Token Help">