упорядочил папки с кодом.

This commit is contained in:
2023-11-19 01:53:56 +03:00
parent 4883b4af51
commit 44c6daffa3
596 changed files with 2140 additions and 1569 deletions

View File

@@ -1,57 +0,0 @@
package Repository.Component;
import Common.Global;
import Common.Utils.Utils;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;
public class Instruction extends Component {
@Override
public String getFileName() {
return "Instruction.pdf";
}
@Override
public String getNewFileName() {
return "Instruction_new.pdf";
}
@Override
public boolean isNecessary() {
return false;
}
@Override
public ComponentType getComponentType() {
return ComponentType.Instruction;
}
public void Update() throws Exception {
ReplaceOldFile();
GetVersionInfo();
actual_version = 1;
}
@Override
public String getVersionText() {
return code;
}
//вызывается в первую очередь
@Override
public void unpackActualVersion(String v_string) {
actual_code = v_string;
actual_version = code.isEmpty() ? 1 : ((code.equals(actual_code)) ? 1 : 2);
if (CanBeUpdated())
CheckIfNeedsUpdateOrPublish();
}
@Override
public void unpackMinimalVersion(String v_string) {
//--
}
@Override
public void GetVersionInfo() {
try {
version = 1;
code = Utils.md5Custom(Utils.ReadAllText(getFile()));
DateFormat df = new SimpleDateFormat("MMM dd yyyy HH:mm:ss", Locale.ENGLISH);
date_text = df.format(getFile().lastModified());
} catch (Exception e) {
Global.Log.PrintException(e);
}
}
}