Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Commit

Permalink
Update readme & username/passwd.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed Sep 7, 2018
1 parent 2e47f4c commit ffee9e0
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 27 deletions.
9 changes: 2 additions & 7 deletions JLUDrcomServiceInstaller/JLUDrcomServiceInstaller.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_49A6BA713FBE47BDBFE02B801EFF81C7"
"OwnerKey" = "8:_5960C884FA0967596E9A023B1938990D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_5960C884FA0967596E9A023B1938990D"
"OwnerKey" = "8:_49A6BA713FBE47BDBFE02B801EFF81C7"
"MsmSig" = "8:_UNDEFINED"
}
}
Expand Down Expand Up @@ -205,11 +205,6 @@
"AssemblyAsmDisplayName" = "8:System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ScatterAssemblies"
{
"_5960C884FA0967596E9A023B1938990D"
{
"Name" = "8:System.Net.Http.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:System.Net.Http.dll"
"TargetName" = "8:"
Expand Down
20 changes: 10 additions & 10 deletions JLUDrcomUtils/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
Title="JLUDrcomService配置工具" Height="181.6" Width="600" ResizeMode="NoResize">
<Grid>
<TabControl x:Name="tabControl" Margin="0,0,-0.4,0.2">
<TabItem Header="服务启动">
<Grid Background="#FFE5E5E5">
<Button x:Name="btn_Start" Content="启动服务" Margin="20,20,0,0" Height="34" VerticalAlignment="Top" HorizontalAlignment="Left" Width="102" Click="btn_Start_Click"/>
<Button x:Name="btn_Stop" Content="停止服务" Margin="148,20,0,0" Height="34" VerticalAlignment="Top" HorizontalAlignment="Left" Width="284" Click="btn_Stop_Click"/>
<Button x:Name="btn_Start_Copy" Content="重启服务" Margin="457,20,0,0" Height="34" VerticalAlignment="Top" HorizontalAlignment="Left" Width="102" Click="btn_Start_Copy_Click"/>
<Button x:Name="btn_uninstall" Content="卸载服务" HorizontalAlignment="Left" Height="34" Margin="20,69,0,0" VerticalAlignment="Top" Width="539" Click="btn_uninstall_Click"/>
</Grid>
</TabItem>
<TabItem Header="服务配置">
<Grid Background="#FFE5E5E5">
<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="72" Margin="10,26,0,0" VerticalAlignment="Top" Width="568" Grid.ColumnSpan="2">
Expand All @@ -25,8 +17,16 @@
<Label x:Name="lbl_password" Content=" 密码:" HorizontalAlignment="Left" Height="28" Margin="10,62,0,0" VerticalAlignment="Top" Width="54"/>
<PasswordBox x:Name="txt_password" HorizontalAlignment="Left" Height="19" Margin="69,62,0,0" VerticalAlignment="Top" Width="185" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.ColumnSpan="2"/>
<TextBox x:Name="txt_username" HorizontalAlignment="Left" Height="19" Margin="69,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="185" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.ColumnSpan="2"/>
<TextBox x:Name="txt_username_Copy" HorizontalAlignment="Left" Height="19" Margin="334,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="226" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
<Button x:Name="btn_save" Content="保存修改" HorizontalAlignment="Left" Height="25" Margin="265,62,0,0" VerticalAlignment="Top" Width="295"/>
<TextBox x:Name="txt_mac" HorizontalAlignment="Left" Height="19" Margin="334,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="226" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
<Button x:Name="btn_save" Content="保存修改" HorizontalAlignment="Left" Height="25" Margin="265,62,0,0" VerticalAlignment="Top" Width="295" Click="btn_save_Click"/>
</Grid>
</TabItem>
<TabItem Header="服务启动">
<Grid Background="#FFE5E5E5">
<Button x:Name="btn_Start" Content="启动服务" Margin="20,20,0,0" Height="34" VerticalAlignment="Top" HorizontalAlignment="Left" Width="102" Click="btn_Start_Click"/>
<Button x:Name="btn_Stop" Content="停止服务" Margin="148,20,0,0" Height="34" VerticalAlignment="Top" HorizontalAlignment="Left" Width="284" Click="btn_Stop_Click"/>
<Button x:Name="btn_Start_Copy" Content="重启服务" Margin="457,20,0,0" Height="34" VerticalAlignment="Top" HorizontalAlignment="Left" Width="102" Click="btn_Start_Copy_Click"/>
<Button x:Name="btn_uninstall" Content="卸载服务" HorizontalAlignment="Left" Height="34" Margin="20,69,0,0" VerticalAlignment="Top" Width="539" Click="btn_uninstall_Click"/>
</Grid>
</TabItem>
</TabControl>
Expand Down
28 changes: 27 additions & 1 deletion JLUDrcomUtils/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Microsoft.Win32;
using System;
using System.Configuration.Install;
using System.ServiceProcess;
using System.Windows;
Expand All @@ -11,6 +12,7 @@ namespace JLUDrcomUtils
public partial class MainWindow : Window
{
ServiceController service;
RegistryKey jlu;

public void StartService(bool msg = true)
{
Expand Down Expand Up @@ -92,9 +94,28 @@ public void UninstallService(bool msg = true)
if (msg) MessageBox.Show("服务卸载成功!", "JLUDrcomUtils");
}

public void UpdateSetting()
{
try
{
jlu.SetValue("username", this.txt_username.Text);
jlu.GetValue("password", this.txt_username.Text);
jlu.Flush();
MessageBox.Show("配置成功!MAC地址暂不支持修改。", "JLUDrcomUtils");
}
catch (Exception e)
{
MessageBox.Show(e.Message, "JLUDrcomUtils");
}
}

public MainWindow()
{
InitializeComponent();
jlu = Registry.CurrentConfig.CreateSubKey(@"SOFTWARE\JLUDrcomService", true);
this.txt_username.Text = jlu.GetValue("username", "").ToString();
this.txt_password.Password = jlu.GetValue("password", "").ToString();
this.txt_mac.Text = jlu.GetValue("MAC", "").ToString();
}

private void btn_Start_Click(object sender, RoutedEventArgs e)
Expand All @@ -116,5 +137,10 @@ private void btn_Start_Copy_Click(object sender, RoutedEventArgs e)
{
RestartService();
}

private void btn_save_Click(object sender, RoutedEventArgs e)
{
UpdateSetting();
}
}
}
4 changes: 2 additions & 2 deletions JLUDrcomUtils/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
10 changes: 3 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
## 安装
本程序的安装分为四步:
1.[https://github.com/Yesterday17/JLUDrcomService/releases](https://github.com/Yesterday17/JLUDrcomService/releases)下载最新版本的 `JLUDrcomService`,并且通过安装包引导安装。
2.`服务`列表中找到 `JLUDrcomService``吉林大学校园网登录服务`,选择启动。
3. 在发现服务自动停止后,打开注册表编辑器(`regedit`),找到 `HKEY_CURRENT_CONFIG\Software\JLUDrcomService` ,修改其中的 `username``password`
4. 重新启动服务。当服务处于`正在运行`状态时,应该就可以正常浏览了。
2. 启动`吉大校园网登录服务配置工具`,填写用户名、密码等信息。MAC地址可手动指定,非必须项。
3.`吉大校园网登录服务配置工具`中启动服务。

## 卸载
本程序的卸载分为三步:
1.`服务`列表中停止该服务。
2. 以管理员权限运行安装目录下的 `Remove.bat`
3. 正常卸载。
本程序的卸载流畅经过简化,直接卸载即可。

## 鸣谢
- [Wireshark](https://www.wireshark.org/)
Expand Down

0 comments on commit ffee9e0

Please sign in to comment.