Skip to content

Commit f397a8a

Browse files
committed
v3.6.6.6 alpha
Frp隧道创建界面新UI(一定要先进行试点工作!)
1 parent 29542e6 commit f397a8a

File tree

10 files changed

+449
-173
lines changed

10 files changed

+449
-173
lines changed

MSL/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@
4949
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
5050
//通过使用 "*",如下所示:
5151
// [assembly: AssemblyVersion("1.0.*")]
52-
[assembly: AssemblyVersion("3.6.6.5")]
53-
[assembly: AssemblyFileVersion("3.6.6.5")]
52+
[assembly: AssemblyVersion("3.6.6.6")]
53+
[assembly: AssemblyFileVersion("3.6.6.6")]

MSL/controls/Styles.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@
5252
<Setter Property="FontSize" Value="16"/>
5353
</Style>
5454

55+
<Style x:Key="MagicText" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
56+
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
57+
</Style>
58+
59+
<Style x:Key="MagicText14" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
60+
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
61+
<Setter Property="FontSize" Value="14"/>
62+
</Style>
63+
64+
<Style x:Key="MagicText16" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
65+
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
66+
<Setter Property="FontSize" Value="16"/>
67+
</Style>
68+
5569
<!-- MagicGrowlPanel 用处不多不大,暂时弃用
5670
<Style TargetType="local:MagicGrowlPanel">
5771
<Setter Property="Template">

MSL/pages/frpProviders/ChmlFrp.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<hc:Card>
127127
<StackPanel Margin="3" HorizontalAlignment="Left">
128128
<Label Content="节点信息" BorderThickness="0" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left"/>
129-
<TextBlock x:Name="NodeTips" LineHeight="20" Foreground="{DynamicResource PrimaryTextBrush}" Text="选择一个节点才知道呀~" FontSize="14" HorizontalAlignment="Left" Margin="10,0,0,0"/>
129+
<TextBlock x:Name="NodeTips" TextWrapping="Wrap" Foreground="{DynamicResource PrimaryTextBrush}" Text="选择一个节点才知道呀~" FontSize="14" HorizontalAlignment="Left" Margin="10,0,0,5"/>
130130
</StackPanel>
131131
</hc:Card>
132132
<hc:Card Margin="0,3,0,0">

MSL/pages/frpProviders/MSLFrp/MSLFrp.xaml

Lines changed: 138 additions & 55 deletions
Large diffs are not rendered by default.

MSL/pages/frpProviders/MSLFrp/MSLFrp.xaml.cs

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
using MSL.utils;
22
using Newtonsoft.Json.Linq;
33
using System;
4+
using System.Globalization;
45
using System.Threading.Tasks;
56
using System.Windows;
67
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using Windows.Data.Xml.Dom;
710

811
namespace MSL.pages.frpProviders.MSLFrp
912
{
@@ -249,12 +252,13 @@ private async void Del_Tunnel_Click(object sender, RoutedEventArgs e)
249252

250253
}
251254

255+
/*
252256
private void NodeList_SelectionChanged(object sender, SelectionChangedEventArgs e)
253257
{
254258
var listBox = NodeList;
255259
if (listBox.SelectedItem is MSLFrpApi.NodeInfo selectedNode)
256260
{
257-
NodeTips.Content = (string.IsNullOrEmpty(selectedNode.Remark) ? "节点没有备注" : selectedNode.Remark) +
261+
NodeTips.Text = (string.IsNullOrEmpty(selectedNode.Remark) ? "节点没有备注" : selectedNode.Remark) +
258262
"\n宽带:" + selectedNode.Band + "\tUDP:" + (selectedNode.UDP == 1 ? "支持" : "不支持");
259263
switch (selectedNode.Status)
260264
{
@@ -270,6 +274,14 @@ private void NodeList_SelectionChanged(object sender, SelectionChangedEventArgs
270274
Create_RemotePort.Text = Functions.GenerateRandomNumber(selectedNode.MinPort, selectedNode.MaxPort).ToString();
271275
}
272276
}
277+
*/
278+
private void NodeList_SelectionChanged(object sender, SelectionChangedEventArgs e)
279+
{
280+
if (NodeList.SelectedItem is MSLFrpApi.NodeInfo selectedNode)
281+
{
282+
Create_RemotePort.Text = Functions.GenerateRandomNumber(selectedNode.MinPort, selectedNode.MaxPort).ToString();
283+
}
284+
}
273285

274286
private async void Create_OKBtn_Click(object sender, RoutedEventArgs e)
275287
{
@@ -319,4 +331,38 @@ private void ExitBtn_Click(object sender, RoutedEventArgs e)
319331
FrpProfile = new MSLFrpProfile(close: ChangeTab);
320332
}
321333
}
334+
335+
internal class MSLStatusConverter : IValueConverter
336+
{
337+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
338+
{
339+
return (int)value switch
340+
{
341+
1 => "在线",
342+
_ => "离线"
343+
};
344+
}
345+
346+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
347+
{
348+
throw new NotImplementedException();
349+
}
350+
}
351+
352+
internal class MSLUDPConverter : IValueConverter
353+
{
354+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
355+
{
356+
return (int)value switch
357+
{
358+
1 => "UDP:支持",
359+
_ => "UDP:不支持"
360+
};
361+
}
362+
363+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
364+
{
365+
throw new NotImplementedException();
366+
}
367+
}
322368
}

MSL/pages/frpProviders/MeFrp.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
<hc:Card>
130130
<StackPanel Margin="3" HorizontalAlignment="Left">
131131
<Label Content="节点信息" BorderThickness="0" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left"/>
132-
<TextBlock x:Name="NodeTips" LineHeight="20" Foreground="{DynamicResource PrimaryTextBrush}" Text="选择一个节点才知道呀~" FontSize="14" HorizontalAlignment="Left" Margin="10,0,0,0"/>
133-
<TextBlock x:Name="RealNameTips" LineHeight="20" Foreground="{DynamicResource PrimaryTextBrush}" Text="可爱落雪提醒您: 实名才可以使用全部节点哦~" FontSize="14" HorizontalAlignment="Left" Margin="10,3,0,0"/>
132+
<TextBlock x:Name="NodeTips" TextWrapping="Wrap" Foreground="{DynamicResource PrimaryTextBrush}" Text="选择一个节点才知道呀~" FontSize="14" HorizontalAlignment="Left" Margin="10,0,0,5"/>
133+
<TextBlock x:Name="RealNameTips" Foreground="{DynamicResource PrimaryTextBrush}" Text="可爱落雪提醒您: 实名才可以使用全部节点哦~" FontSize="14" HorizontalAlignment="Left" Margin="10,0,0,5"/>
134134
</StackPanel>
135135
</hc:Card>
136136
<hc:Card Margin="0,3,0,0">

0 commit comments

Comments
 (0)