Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit c7e8858

Browse files
committed
update
1 parent d0ab27f commit c7e8858

File tree

5 files changed

+46
-15
lines changed

5 files changed

+46
-15
lines changed

Diff for: CopyPlusPlus.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<ItemGroup>
1111
<None Remove="image\AliPay.png" />
12+
<None Remove="image\GitHub.png" />
1213
<None Remove="image\Wechat.png" />
1314
</ItemGroup>
1415

@@ -20,6 +21,9 @@
2021
<Resource Include="image\AliPay.png">
2122
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2223
</Resource>
24+
<Resource Include="image\GitHub.png">
25+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
26+
</Resource>
2327
<Resource Include="image\Wechat.png">
2428
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2529
</Resource>

Diff for: MainWindow.xaml

+21-11
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,36 @@
77
mc:Ignorable="d"
88
Title="Copy++" Height="550" Width="400" ResizeMode="CanMinimize">
99
<Grid Height="530" Width="400" VerticalAlignment="Bottom">
10-
<TextBlock x:Name="text_abstract" HorizontalAlignment="Center" Margin="0,5,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="60" Width="380" Padding="0,10,0,0" FontSize="16"><Run Text=" 该软件会自动处理复制的文字段落,并将处理后的文字更新到粘贴板,直接粘贴即可。祝写作顺利!"/></TextBlock>
11-
<StackPanel Margin="0,70,0,334" HorizontalAlignment="Center" Width="380">
10+
<TextBlock x:Name="text_abstract" HorizontalAlignment="Center" Margin="0,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="86" Width="380" Padding="0,10,0,0" FontSize="14"><Run Text="该软件会自动处理复制的文字段落,并将处理后的文字更新到粘贴板,直接粘贴即可。祝写作顺利!"/><LineBreak/><Run/><LineBreak/><Run Text="注:"/><Run Text=" 多段复制时"/><Run Language="zh-cn" Text=""/><Run Text="小概率出现误识别"/><Run Text=""/><Run Text="推荐每次"/><Run Text="复制一段。"/></TextBlock>
11+
<Line X1="0" Y1="10" X2="400" Y2="10" Stroke="#FF3A4FEE" StrokeThickness="2" Margin="0,90,0,424" />
12+
<StackPanel Margin="0,106,0,327" HorizontalAlignment="Center" Width="380">
1213
<Label FontWeight="Bold">To do list</Label>
1314
<CheckBox x:Name="checkBox1" Content="翻译" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Checked="Todolist_Checked"/>
1415
<CheckBox x:Name="checkBox2" Content="论文去重" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Checked="Todolist_Checked"/>
1516
<CheckBox x:Name="checkBox3" Content="OCR文字识别" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Checked="Todolist_Checked"/>
1617
</StackPanel>
1718

18-
<TextBlock x:Name="textBlock1" HorizontalAlignment="Center" Margin="0,201,0,0" Text="如果您在使用过程中遇到问题,或者有好的想法或建议,欢迎联系我" TextWrapping="Wrap" VerticalAlignment="Top"/>
19-
<TextBlock x:Name="textBlock2" HorizontalAlignment="Left" Margin="20,232,0,0" Text="[email protected]" TextWrapping="Wrap" VerticalAlignment="Top"/>
20-
21-
<TextBlock x:Name="textBlock3" HorizontalAlignment="Left" Margin="20,330,0,0" Text="如果您觉得好用,欢迎捐助" TextWrapping="Wrap" VerticalAlignment="Top"/>
22-
<Image Source="/image/Wechat.png" Margin="30,325,220,10" Width="150" Height="150" VerticalAlignment="Bottom" />
23-
<Image Source="/image/AliPay.png" Margin="220,325,30,10" Width="150" Height="150" VerticalAlignment="Bottom" />
24-
<Label x:Name="label1" Content="微 信 支 付" HorizontalAlignment="Left" Margin="71,350,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold"/>
25-
<Label x:Name="label2" Content="支 付 宝" HorizontalAlignment="Left" Margin="268,353,0,0" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold"/>
26-
19+
<Line X1="0" Y1="10" X2="400" Y2="10" Stroke="#FF3A4FEE" StrokeThickness="2" Margin="0,192,0,322" />
20+
<TextBlock x:Name="textBlock1" HorizontalAlignment="Left" Margin="10,208,0,0" Text="如果您在使用过程中遇到问题,或者有好的想法或建议,欢迎联系我" TextWrapping="Wrap" VerticalAlignment="Top"/>
21+
<TextBlock x:Name="textBlock2" HorizontalAlignment="Left" Margin="10,242,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="144"><Run Text="[email protected]"/></TextBlock>
2722

23+
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="10,270,0,0" Text="项目已开源,欢迎Star" TextWrapping="Wrap" VerticalAlignment="Top"/>
24+
<Button Margin="135,268,246,242" Click="Button_Click" Cursor="Hand">
25+
<Button.Template>
26+
<ControlTemplate>
27+
<Image Source="/image/GitHub.png"/>
28+
</ControlTemplate>
29+
</Button.Template>
30+
</Button>
2831

32+
<Image Source="/image/wechat-gzh.jpg" Margin="241,234,84,229" />
33+
<TextBlock x:Name="textBlock4" HorizontalAlignment="Left" Margin="212,301,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="10"><Run Language="zh-cn" Text="欢迎"/><Run Text="关注我的公众号,获取更新"/></TextBlock>
2934

35+
<TextBlock x:Name="textBlock3" HorizontalAlignment="Center" Margin="0,330,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="380" Text="如果您觉得好用,欢迎捐助"/>
36+
<Image Source="/image/Wechat.png" Margin="30,325,220,10" Width="150" Height="150" VerticalAlignment="Bottom" />
37+
<Image Source="/image/AliPay.png" Margin="218,0,28,10" Width="154" Height="154" VerticalAlignment="Bottom" />
38+
<Label x:Name="label1" Content="微 信 支 付" HorizontalAlignment="Left" Margin="71,350,0,155" VerticalAlignment="Bottom" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold"/>
39+
<Label x:Name="label2" Content="支 付 宝" HorizontalAlignment="Left" Margin="268,0,0,155" VerticalAlignment="Bottom" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold"/>
3040

3141
</Grid>
3242
</Window>

Diff for: MainWindow.xaml.cs

+21-4
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,33 @@ public MainWindow()
3434
private void ClipboardChanged(Object sender, SharpClipboard.ClipboardChangedEventArgs e)
3535
{
3636
string text = e.Content.ToString();
37-
string text_after = text.Replace("\n","").Replace("\r","");
38-
Clipboard.SetText(text_after);
37+
//string text_after = "";
3938

40-
Debug.WriteLine(text);
41-
Debug.WriteLine(text_after);
39+
for (int counter = 0; counter < text.Length-1; counter++)
40+
{
41+
Console.WriteLine(text[counter]);
42+
if(text[counter+1].ToString() == "\r" && text[counter].ToString() != "。")
43+
{
44+
text = text.Remove(counter+1, 2);
45+
}
46+
}
47+
48+
//string text_after = text.Replace("\n","").Replace("\r","");
49+
50+
Clipboard.SetText(text);
51+
52+
//Debug.WriteLine(text);
53+
//Debug.WriteLine(text_after);
4254
}
4355

4456
private void Todolist_Checked(object sender, RoutedEventArgs e)
4557
{
4658
MessageBox.Show("你是想帮我完成这个功能吗?");
4759
}
60+
61+
private void Button_Click(object sender, RoutedEventArgs e)
62+
{
63+
Process.Start("explorer.exe","https://github.com/CopyPlusPlus/CopyPlusPlus");
64+
}
4865
}
4966
}

Diff for: image/GitHub.png

2.56 KB
Loading

Diff for: image/wechat-gzh.jpg

27.2 KB
Loading

0 commit comments

Comments
 (0)