22
22
using Orientation = System . Windows . Controls . Orientation ;
23
23
using TextBox = System . Windows . Controls . TextBox ;
24
24
using UserControl = System . Windows . Controls . UserControl ;
25
+ using System . Windows . Documents ;
26
+ using static System . Windows . Forms . LinkLabel ;
27
+ using Droplex ;
25
28
26
29
namespace Flow . Launcher . Core . Plugin
27
30
{
@@ -33,7 +36,6 @@ internal abstract class JsonRPCPlugin : IAsyncPlugin, IContextMenu, ISettingProv
33
36
{
34
37
protected PluginInitContext context ;
35
38
public const string JsonRPC = "JsonRPC" ;
36
-
37
39
/// <summary>
38
40
/// The language this JsonRPCPlugin support
39
41
/// </summary>
@@ -552,6 +554,28 @@ public Control CreateSettingPanel()
552
554
Grid . SetColumn ( sep , 0 ) ;
553
555
Grid . SetColumnSpan ( sep , 2 ) ;
554
556
break ;
557
+ case "hyperlink" :
558
+ var hyperlink = new Hyperlink
559
+ {
560
+ ToolTip = attribute . Description ,
561
+ NavigateUri = attribute . url
562
+ } ;
563
+ var linkbtn = new Button
564
+ {
565
+ HorizontalAlignment = HorizontalAlignment . Right ,
566
+ Margin = settingControlMargin
567
+ } ;
568
+ linkbtn . Content = attribute . urlLabel ;
569
+
570
+ contentControl = linkbtn ;
571
+ Grid . SetColumn ( contentControl , 1 ) ;
572
+ Grid . SetRow ( contentControl , rowCount ) ;
573
+ if ( rowCount != 0 )
574
+ mainPanel . Children . Add ( sep ) ;
575
+ Grid . SetRow ( sep , rowCount ) ;
576
+ Grid . SetColumn ( sep , 0 ) ;
577
+ Grid . SetColumnSpan ( sep , 2 ) ;
578
+ break ;
555
579
default :
556
580
continue ;
557
581
}
0 commit comments