Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
修复整理功能的默认模式
Browse files Browse the repository at this point in the history
  • Loading branch information
chenpuhao committed Dec 26, 2022
1 parent 314b316 commit 5538db5
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ It helps you organize your desktop and find files, especially for school teacher
The project is licensed under the GPL-3.0 license, see [LICENSE](LICENSE)
### Known issues
**If you find a bug during use, please list it in the table below or send it to [email protected], thank you**
1. The default type is not available in the Organize desktop, use a custom type
1. ~~The default type is not available in the Organize desktop, use a custom type~~
### note
1. If you can help me modify the code, please use IntelliJ IDEA, thanks! No IDEA?[Click me to download](https://www.jetbrains.com/zh-cn/idea/download/)
2. The Java development front-end will be abandoned, and C# ~~(as long as the author remembers)~~ will be used
Expand Down Expand Up @@ -128,7 +128,7 @@ public class Find extends JDialog {
```
### Future plans
- [x] Completion of the third edition of the procedure (completion date: 2022/12/01)
- [ ] Fix default mode for grooming (completion date:)
- [x] Fix default mode for grooming (completion date: 2022/12/26)
- [ ] Complete the new UI for the Organize Desktop feature (Completion date:)
- [ ] ~~Development with C# (Completion date: )~~

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DeskAide是一款开源的基于Windows系统的桌面程序
该项目签署了GPL-3.0 授权许可,详情请参阅[LICENSE](LICENSE)
### 已知问题
**如果您在使用过程中发现了Bug,请在下表列出或者发送给[email protected],谢谢**
1. 整理桌面中默认类型不可用,请使用自定义类型
1. ~~整理桌面中默认类型不可用,请使用自定义类型~~
### 注意
1. 如果您可以帮助我修改代码,请使用IntelliJ IDEA,谢谢!没有IDEA?[点我去下载](https://www.jetbrains.com/zh-cn/idea/download/)
2. 后续将会放弃Java开发前端,将使用C#~~(只要作者想起来)~~
Expand Down Expand Up @@ -134,7 +134,7 @@ public class Find extends JDialog {
```
### 未来计划
- [x] 完成第三版程序(完成日期:2022/12/01)
- [ ] 修复整理功能的默认模式(完成日期:)
- [x] 修复整理功能的默认模式(完成日期:2022/12/26)
- [ ] 完成整理桌面功能新UI(完成日期:)
- [ ] ~~使用C#进行开发(完成日期:)~~

Expand Down
4 changes: 2 additions & 2 deletions data/MainUI/MainUI.data
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
781
484
362
433
4 changes: 2 additions & 2 deletions data/collation/collation.data
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
C:\Users\高21级12班\OneDrive\Desktop
false
false
true
true
1 change: 1 addition & 0 deletions data/collation/collationUI.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pdf pdf
43 changes: 35 additions & 8 deletions src/main/java/cn/Function/Collation.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,22 @@ public void run() {
String stxt = ".txt";
String spdf = ".pdf";
//调用查找XXX.后缀结尾的所有文件
findEndsWith(file, sword);
findEndsWith(file, sppt);
findEndsWith(file, ssppt);
findEndsWith(file, sexcel);
findEndsWith(file, ssexcel);
findEndsWith(file, ssword);
findEndsWith(file, stxt);
findEndsWith(file, spdf);
name = "word";
findEndsWith(file, sword);
name = "powerpoint";
findEndsWith(file, sppt);
name = "powerpoint";
findEndsWith(file, ssppt);
name = "excel";
findEndsWith(file, sexcel);
name = "excel";
findEndsWith(file, ssexcel);
name = "word";
findEndsWith(file, ssword);
name = "txt";
findEndsWith(file, stxt);
name = "pdf";
findEndsWith(file, spdf);
}else{
lineNumber = 1;
try {
Expand Down Expand Up @@ -159,9 +167,28 @@ public void findEndsWith(File file, String sword) {
//是文件,判断是否是以.后缀名结尾
if(i.getPath().endsWith(sword)) {
File doc;
int lineNumber = 3;
File sourceFile = new File("data/collation/collation.data");
try {
readAppointedLineNumber(sourceFile, lineNumber);
} catch (IOException e) {
throw new RuntimeException(e);
}
if (data.equals("false")) {
lineNumber = 1;
try {
readAppointedLineNumber(sourceFile, lineNumber);
} catch (IOException e) {
throw new RuntimeException(e);
}
doc = new File(data + "\\" + name + "文件\\" + i.getName());
}else{
lineNumber = 1;
try {
readAppointedLineNumber(sourceFile, lineNumber);
} catch (IOException e) {
throw new RuntimeException(e);
}
doc = new File(data + "\\" + result + "\\" + i.getName());
}
File docp = new File(i.getPath());
Expand Down

0 comments on commit 5538db5

Please sign in to comment.