Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
li9633 committed Oct 25, 2023
1 parent e19238c commit ab4fb8c
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vs/
debug/
release/
4 changes: 3 additions & 1 deletion DisableLGhubAutoUpdate.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<ClInclude Include="include\LGhubJson.hpp" />
<ClInclude Include="include\LGServices.hpp" />
<ClInclude Include="include\ChangeLGServices.hpp" />
<ClInclude Include="include\Main.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp" />
Expand Down Expand Up @@ -96,9 +97,10 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>$(ProjectName).$(PlatformTarget)-0.1.0</TargetName>
<OutDir>$(SolutionDir)$(Configuration)\$(PlatformTarget)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)$(Configuration)\$(PlatformTarget)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<TargetName>$(ProjectName).$(PlatformTarget)-0.1.0</TargetName>
</PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions DisableLGhubAutoUpdate.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<ClInclude Include="include\ChangeLGServices.hpp">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="include\Main.hpp">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\AddLGFWRule.cpp">
Expand Down
76 changes: 43 additions & 33 deletions Main.cpp
Original file line number Diff line number Diff line change
@@ -1,40 +1,9 @@
#include "include/ChangeLGServices.hpp"

void ProgramStart()
{
LGServices* LGS = new LGServices;

Change_LG_service(LGS);//更改服务类型为手动

ReBoot_LG_Services(LGS);//重启动LG服务

Get_LGHub_Services_Directory(LGS);//获取服务所在目录

Format_LGhub_Directory(LGS);//通过服务所在路径格式化

AddLGFWRule(LGS);//添加防火墙规则

ChangeLGhubJson(LGS);//更改罗技配置文件


delete(LGS);
system("pause");

}

void AboutThis()
{
std::cout << "->关于此项目<-" << std::endl;
std::cout << "项目地址:-> https://github.com/li9633/DisableLGhubAutoUpdate" << std::endl;
std::cout << "遇到问题请向本项目提交issue!" << std::endl;
system("pause");
system("cls");
}
#include "include/Main.hpp"

int main(void)
{
int Index = NULL;
while (true)
while (!std::cin.fail())
{
std::cout << "-----------------------------------------" << std::endl;
std::cout << "请输入特定选项后按Enter" << std::endl;
Expand All @@ -53,13 +22,54 @@ int main(void)
case 2:
{
AboutThis();
break;
}

default:
{
std::cout << "输入不正确,请重新输入!" << std::endl;
std::cin.clear();
std::cin.ignore(INT_MAX, '\n');
system("pause");
system("cls");
break;
}
}
}


return 0;
}



void ProgramStart()
{
LGServices* LGS = new LGServices;

Change_LG_service(LGS);//更改服务类型为手动

ReBoot_LG_Services(LGS);//重启动LG服务

Get_LGHub_Services_Directory(LGS);//获取服务所在目录

Format_LGhub_Directory(LGS);//通过服务所在路径格式化

AddLGFWRule(LGS);//添加防火墙规则

ChangeLGhubJson(LGS);//更改罗技配置文件


delete(LGS);
system("pause");

}

void AboutThis()
{
std::cout << "->关于此项目<-" << std::endl;
std::cout << "项目地址:-> https://github.com/li9633/DisableLGhubAutoUpdate" << std::endl;
std::cout << "遇到问题请向本项目提交issue!" << std::endl;
system("pause");
system("cls");
}
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@


- fifo_map | -> [Github](https://github.com/nlohmann/fifo_map)



5 changes: 5 additions & 0 deletions include/Main.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "ChangeLGServices.hpp"


void AboutThis();
void ProgramStart();

0 comments on commit ab4fb8c

Please sign in to comment.