mirror of
https://github.com/TriM-Organization/Linglun-Converter.git
synced 2025-12-21 03:46:59 +00:00
Compare commits
27 Commits
LLC_GUI_v0
...
v1.2.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59f5615a80 | ||
|
|
0d7a91904d | ||
|
|
1e56902bcc | ||
|
|
883ffbb10b | ||
|
|
4b6d922421 | ||
|
|
279c9c271e | ||
|
|
f0ca189938 | ||
|
|
1c66e5b174 | ||
|
|
f712965b70 | ||
|
|
c8aada96c2 | ||
|
|
319be8bbc0 | ||
|
|
4791dcd63d | ||
|
|
67ca76f408 | ||
|
|
a56e85a043 | ||
|
|
bccfd1841d | ||
|
|
9ec33845f4 | ||
|
|
d18e636278 | ||
|
|
2f08ef99f9 | ||
|
|
3d3213363c | ||
|
|
c64d9c440f | ||
|
|
28ec743b86 | ||
|
|
0139d0f130 | ||
|
|
24cf054cf0 | ||
|
|
81b824feed | ||
|
|
cb3c84d4ef | ||
|
|
264d1ec11c | ||
|
|
eaefb6f987 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -13,6 +13,11 @@ __pycache__/
|
||||
/Musicreater
|
||||
/TrimLog
|
||||
/logs
|
||||
*.llc.config
|
||||
/MSCT
|
||||
/fcwslib
|
||||
|
||||
salt.py
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
565
LICENSE.md
565
LICENSE.md
@@ -1,219 +1,346 @@
|
||||
**注意,以下条款或版权声明应当且必须是高于此仓库中任何其他声明的**
|
||||
|
||||
1. 伶伦的全部开发者享有其完整版权,其开发者可以在任一时刻终止以后伶伦源代码开放,若经由其开发者授予特殊权利,则授权对象可以将源代码进行特定的被特殊授权的操作
|
||||
2. 伶伦或(及)其代码允许在 Apache2.0 协议的条款与说明下进行非商业使用
|
||||
3. 除部分代码特殊声明外,伶伦允许对其或(及)其代码进行商业化使用,但是需要经过伶伦主要开发者(诸葛亮与八卦阵、金羿)的一致授权,同时,授权对象在商业化授权的使用过程中必须依照 Apache2.0 协议的条款与说明
|
||||
4. 若存在对于伶伦包含的部分代码的特殊开源声明,则此部分代码依照其特定的开源方式授权,但若此部分代码经由此部分代码的主要开发者一致特殊授权后商用,则授权对象在商用时依照此部分的开发者所准许的方式(或条款)进行商用,或默认依照 Apache2.0 协议进行商业化使用
|
||||
5. Apache2.0 协议的英文原文副本可见下文
|
||||
|
||||
> The English Translation of the TERMS AND CONDITIONS above is listed below
|
||||
>
|
||||
> This translated version is for reference only and has no legal effect.
|
||||
>
|
||||
> The version with legal effect is the Chinese version above.
|
||||
|
||||
**Note, The TERMS AND CONDITIONS below should and must be above all others in this repository**
|
||||
|
||||
1. *Linglun Studio* is fully copyrighted by all its developers, the developers have the right to make *Linglun Studio* close sourced at any time. Operations are permitted under specific terms instructed by its developer(s).
|
||||
2. Non-commercial use of *Linglun Studio* and(or) its source code is permitted under Apache License 2.0.
|
||||
3. Commercial use of *Linglun Studio* is permitted under Apache License 2.0 with the unanimous permission of the steering developers of *Linglun Studio* (*bgArray*诸葛亮与八卦阵 and *Eilles*金羿).
|
||||
4. *Linglun Studio* is open sourced under priority given:
|
||||
1. License granted by the core developer(s) of a section after negotiation.
|
||||
2. Explicitly stated license.
|
||||
3. Apache 2.0 License.
|
||||
5. A copy of the original Apache Lisence 2.0 can be found below.
|
||||
|
||||
|
||||
```text
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
Copyright 2022 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
<h1 align="center"><b><i>在 Gitee Push #4791dcd(不含)之后本仓库使用</i>《汉钰律许可协议 第一版》<i>开源</i></b></h1>
|
||||
|
||||
# 汉钰律许可协议
|
||||
|
||||
**总第一版 · 二〇二四年七月七日编**
|
||||
|
||||
## 一、重要须知
|
||||
|
||||
1. 为保护采用本协议的作品在开源过程中,其著作权人所应有的权益,根据**中华人民共和国著作权法和相关法律法规**,制定本协议。
|
||||
|
||||
2. 本协议履行过程中,请注意本协议中**免除或限制**民事主体**责任或权利**的条款、法律适用和争议解决条款(尤其是加有特殊标记的条款),这些条款应在中国法律所允许的范围内最大程度地适用。
|
||||
|
||||
3. 若本协议所涉及的自然人**未满 18 周岁**,该自然人应在监护人的陪同下阅读本协议及有关本协议的条款内容,并在取得其监护人同意后开始或继续应用本协议所授权的行为。
|
||||
|
||||
4. 由于互联网服务、互联网内容的特殊性,若本协议以电子协议形式分发并签订,其依然有效。您一旦开始对本协议所授权之作品进行本协议所授权的行为,即视为您已经阅读、理解并同意并已经接受本协议的全部条款。
|
||||
|
||||
5. 本协议的订立、履行、解释及争议的解决均**适用中华人民共和国法律并排除其他一切冲突法的适用**。_本协议订立于许可证最初的颁发者的地址。若其为自然人,则订立于该自然人户籍所在地;若为法人或非法人组织,则订立于其注册地_。本协议的订立各方应友好协商解决于协议所规定之行为的履行相关的争议;如协商不成,任何一方均可向合同签订地有管辖权的人民法院提起诉讼。
|
||||
|
||||
6. 本协议的原本仅为现代汉语,书写于简体中文。若存在其他语言的翻译或其他同等语言但非简体中文文本的版本,应当无法律效力。
|
||||
|
||||
## 二、术语定义
|
||||
|
||||
1. “**许可证**”、“**协议**”(后文称“本协议”)是指根据本文档中所列举的全部术语、定义、条款、限制等文本,是本合同的简称称谓。本合同全称是“汉钰律许可协议”。
|
||||
|
||||
2. “**协议颁发者**”(后文称“颁发者”)是将条款或协议应用于其拥有著作财产权的作品的民事主体,或由其指定从而拥有颁发者身份的民事主体。
|
||||
|
||||
3. “**源**”形式是指对包括但不限于 软件、硬件、文档、配置项 等种类的作品进行修改、编辑的首选形式;若不存在首选形式,则初次编辑该作品所需的形式即为源形式。
|
||||
|
||||
4. “**目标**”形式是指对源形式进行机械转换、翻译、打印、制造、加工等同类型活动后形成的结果形式,包括但不限于源代码编译后的目标软件、生成的文件、转换出的媒体、制造出的机械、打印出的实体文本、加工后的零件。
|
||||
|
||||
5. “**采用本协议的作品**”(后文称“此作品”)是指经颁发者授权而使用本协议进行授权的任何作品,该作品应在自然人可见处明确附加一个自然人可读的版权通知(可以参考文末附录中提供的示例);若在一个可分割的作品中,部分地采用本协议进行授权,则该部分应当视为一个独立的采用本协议的作品,该作品应当在自然人可见处明确附加一个自然人可读的范围限定和版权通知(同样可以参考文末附录中提供的示例)。
|
||||
|
||||
6. “**贡献**”是指对作品进行的,意在提交给此作品颁发者以让著作权人包含在其作品中的任何修订或补充,该修订或补充同样属于一种作品。依据此定义,“提交”一词表示经由此作品颁发者所指定的形式,将其所进行的修改发送给此作品颁发者。该形式应当包括在此作品颁发者指定的平台内发送易于编辑的修改信息、在此作品颁发者指定的电子邮箱中发送易于编辑的修改信息、在此作品颁发者指定的源码控制系统或发布跟踪系统上提交的易于编辑的修改信息,但由著作权人以明显标注或指定为“非贡献”的活动除外。颁发者自己对作品进行的修改同样视作对作品的贡献。
|
||||
|
||||
7. “**贡献者**”是指此作品颁发者接受的贡献的提交者,或包含在作品的贡献清单中的民事主体。贡献者在提交贡献并经此作品颁发者通过且该贡献已经被应用于此作品中后,该贡献者应当视为此作品的著作权人之一,但不应视为此作品非其贡献的部分的著作权人。一个作品的颁发者同样属于其贡献者。**请注意**,针对贡献者提交的贡献,该贡献者应被视为该贡献的协议颁发者,但不应视作本作品的颁发者。
|
||||
|
||||
8. “**用户**”、“**使用者**”是指行使本协议所授权之行为的民事主体。据此,贡献者亦属于用户。
|
||||
|
||||
9. “**商业性使用**”、“**商用**”是指任何以谋取利益为目的的使用,包括但不限于以贩卖、出租的形式对作品进行使用;但若将该牟利活动明确指示为“捐赠”,且在牟利者进行本协议所授权的活动时不以捐赠数额为标准,则此种的获取利益的“捐赠”行为不属于商业性使用。
|
||||
|
||||
## 三、权利授予
|
||||
|
||||
1. 任何由颁发者所进行的特殊声明、特别注意等此类内容,应当在法律效力上高于本协议的条款或声明;这些声明若与本协议冲突,本协议的该冲突部分无效;本协议与这些声明共同构成颁发者与用户之间的合同。
|
||||
|
||||
2. 此作品的贡献者享有其贡献的完整著作权。
|
||||
|
||||
3. 此作品的贡献者将自己的贡献的全部著作财产权,免费、公开、不可撤销、无限期、非专有地授予此作品的全部著作权人,并准许其在全世界范围内使用上述权利;若无明确的标识,贡献者允许此作品的颁发者对其贡献进行免费、公开、不可撤销、无限期、非专有、世界范围内的商业性使用。
|
||||
|
||||
4. 此作品的著作权人及贡献者授予用户**免费、公开、不可撤销、非专有、非商用**地以任意形式**复制、发行、展览、表演、放映、广播、信息网络传播、摄制、改编、翻译、汇编、二次授权**的权利,准许其在此作品颁发者所指定的区域与时间内行使上述权利;若此作品颁发者未特别指定的,则视作在全世界范围内无限期地授权;若此作品颁发者特别指定在特定情况下可以商用,则应当按照其所指定的条件进行商业性使用,商用的过程中,应当明确标识此作品的著作权人。
|
||||
|
||||
5. 一旦此作品有任意由非贡献形式而产生的更改,更改的部分将不视为此作品的一部分,除非该部分不可离开此作品单独存在;若该部分必须依赖此作品而不可与此作品分离从而单独存在,则更改后的作品不视作此作品,在这种情况下,除非此更改后的作品已获得此作品颁发者的特殊许可、或更改者即为此作品颁发者本人,否则对该作品进行的任何活动都应当遵守本协议。
|
||||
|
||||
6. 经贡献而产生的对此作品的更改,属于此作品的一部分;在此情况下,更改后的作品,依旧视作此作品。
|
||||
|
||||
7. 依据本款的第 4 条,若用户在本协议的授权下,将此作品授予他人进行任何形式的活动(即“二次授权”、“二次分发”),则应确保其使用的协议或授权内容,与本协议的条款不冲突;当存在与本协议条款的冲突时,则该冲突内容无效,被授权的第三方应依照本协议的条款进行活动;除非该用户获得了此作品颁发者的特殊许可、或该用户即为此作品颁发者本人。
|
||||
|
||||
8. 依据本款的第 5 条,若由非贡献形式而产生更改的部分是可分割而不需依赖此作品即可单独存在的,若该部分明确注明不使用本协议进行授权或明确声明了其他授权条款,则该部分不视作采用本协议;但未更改的部分仍应视作原此作品的一部分,需要采用本协议进行授权,除非此更改后的作品已获得此作品颁发者的特殊许可、或更改者即为此作品颁发者本人。
|
||||
|
||||
9. 若此作品或所提交的贡献包含其著作权人的专利,则该专利所有人即此作品的著作权人应准许此作品全体著作权人**免费、公开、不可撤销、非专有、无版权费的专利许可**,以便贡献者对作品进行本协议所授权进行的活动。
|
||||
|
||||
10. 上述专利许可的授予,仅适用于在所提交的贡献中,可由专利所有者授予的,且在对此作品进行本协议所授权的活动中,必须使用的专利。
|
||||
|
||||
11. 如果用户对任何民事主体,因其在进行本协议所授权进行的活动中侵犯该用户的专利而提起诉讼,那么根据本协议授予该用户的所有关于此作品的任何其他专利许可将在提起上述诉讼之日起终止。
|
||||
|
||||
12. 如果本作品作为用户的其他作品的不可分割的一部分进行任何民事活动,本协议依旧对本作品(即该用户的其他作品的一部分)生效;若本作品完全融入该用户的其他作品之中而不可独立存在,则该用户需要保证其作品存在与本协议冲突的条款;除非该作品已获得此作品颁发者的特殊许可、或该用户即为此作品颁发者本人。
|
||||
|
||||
## 四、使用条件
|
||||
|
||||
在对此作品进行本协议所授权的民事活动中,应当同时满足以下条款:
|
||||
|
||||
1. 用户必须为此作品的任何其他接收者提供本协议的副本,在不得已无法提供副本的情况下,也应明确指示其他接收者可查阅本协议的位置。
|
||||
|
||||
2. 用户必须在修改后的作品中附带明显的通知,声明用户已更改文件,并注明更改位置。
|
||||
|
||||
3. 若用户二次分发此作品,可以选择向此作品的接收者提供无偿或有偿的担保维修、支持服务或其他责任、义务。但是,该用户只可以其自己的名义提供上述内容,不得以任何其他贡献者的名义。且该用户必须明确表明任何此类责任或义务是由其个人独立提供,且其同意并应当承担赔偿此作品的全体贡献者因其个人承担上述责任义务而产生的任何赔偿责任。
|
||||
|
||||
4. 用户不得删除或更改此作品中包含的任何许可声明(包括版权声明,专利声明,免责声明,或赔偿责任限制),除非该更改是对已知事实错误的修补、或其已获得此作品颁发者的特殊许可、或更改者即为此作品颁发者本人。
|
||||
|
||||
5. 若此作品将权益的声明通知作为一部分,那么由用户分发的任何版本的作品中须至少在下列三处之一包含该声明通知的自然人可读副本:
|
||||
|
||||
- 该作品的权益声明通知中
|
||||
- 在源形式的文件中(当且仅当该作品开放源代码)
|
||||
- 在惯例中作为第三方通知出现之处(当且仅当该作品会产生画面,且该画面可被自然人详细观察)
|
||||
|
||||
该通知的内容仅供信息提供,不应对许可证进行任何文字上的修改。用户可在其分发的作品中,在不构成修改本协议的前提下,在作品自身的声明通知或属性描述后或作为附录添加。
|
||||
|
||||
6. 依据本款第 3 条,若用户二次分发此作品时,选择向作品的接收者提供收费的担保服务,则必须明确告知该接收者本协议全部内容与此作品原出处,并确保其知悉上述内容;但若用户在二次分发此作品是,不选择提供任何服务,则该用户不允许向作品的接收者收取任何费用,除非该用户获得了此作品颁发者的特殊许可、或该用户即为此作品颁发者本人。
|
||||
|
||||
## 五、提交贡献
|
||||
|
||||
除非贡献者明确声明,在本作品中由该贡献者向颁发者的提供的提交,必须符合本协议的条款,并与本协议的条款不存在冲突;除非此贡献中与本协议冲突的附加条款已获得颁发者的特殊许可、或贡献者即为此作品颁发者本人。
|
||||
|
||||
## 六、商标相关
|
||||
|
||||
本协议并未授予用户,将颁发者的商标、专属标记或特定产品名称,用于合理的或惯例性的描述或此类声明之外其他任何位置的权利。
|
||||
|
||||
## 七、免责声明
|
||||
|
||||
1. 若非因法律要求或经过了特殊准许,此作品在根据本协议“原样”提供的基础上,**不予提供任何形式的担保、任何明示、任何暗示或类似承诺**,此类包括但不限于担保此作品毫无缺陷、担保此作品适于贩卖、担保此作品适于特定目的、担保使用此作品绝不侵权。用户将自行承担因此作品的质量或性能问题而产生的全部风险。若此作品在任何方面欠妥,将由用户(而非任何贡献者、而非任何颁发者)承担所有必要的服务、维修或除错的任何成本。本免责声明本许可的重要组成部分。当且仅当遵守本免责声明时,本协议的其他条款中对本作品的使用授权方可生效。
|
||||
|
||||
2. 无论是因何种原因,如果不是在法律规定的特殊情况(如,确为贡献者的故意或重大过失)下或者经过了特殊准许,即使贡献者事先已知发生损害的可能,在使用本作品时,用户产生的任何直接、间接、特殊、偶然或必然造成的损失(包括但不限于商誉损失、工作延误、计算机系统故障等),**均不由任一贡献者承担**。
|
||||
|
||||
**以上是本许可协议的全部条款**
|
||||
|
||||
---
|
||||
|
||||
附录
|
||||
|
||||
**如何在自己的作品中应用 汉钰律许可协议**
|
||||
|
||||
若要在自己源形式的作品应用本协议,请在其中附加下面的通知模板,并将六角括号“〔〕”中的字段替换成自身的实际信息来替换(不包括括号本身)。这些文本必须以对应文件格式适当的注释句法包含在其中,可以是实体的纸质文档、也可以是网络公告或者计算机文件;或者脱离该源之外,另起一个新的文件,使之指向要应用本协议的那个作品。同时也建议将作品名或类别名以及目的说明之类的声明囊括在同一个可被打印的页面上作为版权通知的整体,这样更加容易的区分出第三方内容。
|
||||
|
||||
若需要在自己以目标形式存在的作品中应用本协议,同样需要附加下面的通知模板并更改六角括号中的字样。但是,这些文本可以是位于作品的标签上、位于作品的用户可见且能被自然人详细观察的画面之中、或者按照惯例中许可协议应该出现的位置;同时,这些文本的所处位置应当能够明确指示到本协议应用的那个作品。另外,建议将作品名或类别名以及目的说明之类的声明囊括在同一个可被打印的位置上作为版权通知的整体,这样更加容易的区分出第三方内容。
|
||||
|
||||
**通知模板**
|
||||
|
||||
```
|
||||
版权所有 © 〔年份〕 〔著作权人〕
|
||||
〔或者:版权所有 (C) 〔年份〕 〔著作权人〕〕
|
||||
|
||||
〔该作品〕根据 第一版 汉钰律许可协议(“本协议”)授权。
|
||||
任何人皆可从以下地址获得本协议副本:〔本协议副本所在地址〕。
|
||||
若非因法律要求或经过了特殊准许,此作品在根据本协议“原样”提供的基础上,不予提供任何形式的担保、任何明示、任何暗示或类似承诺。也就是说,用户将自行承担因此作品的质量或性能问题而产生的全部风险。
|
||||
详细的准许和限制条款请见原协议文本。
|
||||
```
|
||||
|
||||
<h1 align="center"><b><i>以下是旧版本(Gitee Push #4791dcd(含)之前)的协议声明</i></b></h1>
|
||||
|
||||
**注意,以下条款或版权声明应当且必须是高于此仓库中任何其他声明的**
|
||||
|
||||
1. 伶伦的全部开发者享有其完整版权,其开发者可以在任一时刻终止以后伶伦源代码开放,若经由其开发者授予特殊权利,则授权对象可以将源代码进行特定的被特殊授权的操作
|
||||
2. 伶伦或(及)其代码允许在 Apache2.0 协议的条款与说明下进行非商业使用
|
||||
3. 除部分代码特殊声明外,伶伦允许对其或(及)其代码进行商业化使用,但是需要经过伶伦主要开发者(诸葛亮与八卦阵、金羿)的一致授权,同时,授权对象在商业化授权的使用过程中必须依照 Apache2.0 协议的条款与说明
|
||||
4. 若存在对于伶伦包含的部分代码的特殊开源声明,则此部分代码依照其特定的开源方式授权,但若此部分代码经由此部分代码的主要开发者一致特殊授权后商用,则授权对象在商用时依照此部分的开发者所准许的方式(或条款)进行商用,在开发者未明确指定商用授权方式但已经许可进行商用时,则依照 Apache2.0 协议进行商业化使用
|
||||
5. Apache2.0 协议的英文原文副本可见下文
|
||||
|
||||
> The English Translation of the TERMS AND CONDITIONS above is listed below
|
||||
>
|
||||
> This translated version is for reference only and has no legal effect.
|
||||
>
|
||||
> The version with legal effect is the Chinese version above.
|
||||
|
||||
**Note, The TERMS AND CONDITIONS below should and must be above all others in this repository**
|
||||
|
||||
1. _Linglun Studio_ is fully copyrighted by all its developers, the developers have the right to make _Linglun Studio_ close sourced at any time. Operations are permitted under specific terms instructed by its developer(s).
|
||||
2. Non-commercial use of _Linglun Studio_ and(or) its source code is permitted under Apache License 2.0.
|
||||
3. Commercial use of _Linglun Studio_ is permitted under Apache License 2.0 with the unanimous permission of the steering developers of _Linglun Studio_ (*bgArray*诸葛亮与八卦阵 and *Eilles*金羿).
|
||||
4. _Linglun Studio_ is open sourced under priority given:
|
||||
1. License granted by the core developer(s) of a section after negotiation.
|
||||
2. Explicitly stated license.
|
||||
3. Apache 2.0 License.
|
||||
5. A copy of the original Apache Lisence 2.0 can be found below.
|
||||
|
||||
```text
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
Copyright © 2024 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
||||
22
README.md
22
README.md
@@ -1,6 +1,5 @@
|
||||
<h1 align="center">伶伦转换器</h1>
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img width="128" height="128" src="https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/LLC_LOGO_OK_PLAIN_BANNER.png">
|
||||
</img>
|
||||
@@ -12,19 +11,17 @@
|
||||
<img src="https://img.shields.io/badge/BUILD%20WITH%20LOVE-FF3432?style=for-the-badge">
|
||||
<p>
|
||||
|
||||
|
||||
[![][Bilibili: 金羿ELS]](https://space.bilibili.com/397369002/)
|
||||
[![][Bilibili: 诸葛亮与八卦阵]](https://space.bilibili.com/604072474)
|
||||
[![][Bilibili: 诸葛亮与八卦阵]](https://space.bilibili.com/604072474)
|
||||
[![CodeStyle: black]](https://github.com/psf/black)
|
||||
[![][python]](https://www.python.org/)
|
||||
[![][license]](LICENSE)
|
||||
[![][release]](../../releases)
|
||||
|
||||
<!-- [![][release]](../../releases) -->
|
||||
|
||||
<!-- 简体中文 | [English](README_EN.md) -->
|
||||
|
||||
|
||||
## 介绍🚀
|
||||
## 介绍 🚀
|
||||
|
||||
**伶伦** 是一款免费开源的 **《我的世界》** 数字音频工作站
|
||||
|
||||
@@ -32,7 +29,7 @@
|
||||
|
||||
欢迎加群:[861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
|
||||
|
||||
## 教程📕
|
||||
## 教程 📕
|
||||
|
||||
[转换器的使用与安装](./docs/功能使用说明.md)
|
||||
|
||||
@@ -46,20 +43,21 @@
|
||||
|
||||
[转换乐器对照参考表](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E8%BD%AC%E6%8D%A2%E4%B9%90%E5%99%A8%E5%AF%B9%E7%85%A7%E8%A1%A8.md)
|
||||
|
||||
## 致谢🙏
|
||||
## 致谢 🙏
|
||||
|
||||
> 感谢广大群友为此软件提供的测试和建议
|
||||
|
||||
## 联系📞
|
||||
## 联系 📞
|
||||
|
||||
QQ群 [861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
|
||||
QQ 群 [861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
|
||||
|
||||
电邮 [TriM-Organization@hotmail.com](mailto:TriM-Organization@hotmail.com)
|
||||
|
||||
|
||||
[Bilibili: 金羿ELS]: https://img.shields.io/badge/Bilibili-%E9%87%91%E7%BE%BFELS-00A1E7?style=for-the-badge
|
||||
[Bilibili: 诸葛亮与八卦阵]: https://img.shields.io/badge/Bilibili-%E8%AF%B8%E8%91%9B%E4%BA%AE%E4%B8%8E%E5%85%AB%E5%8D%A6%E9%98%B5-00A1E7?style=for-the-badge
|
||||
[CodeStyle: black]: https://img.shields.io/badge/code%20style-black-121110.svg?style=for-the-badge
|
||||
[python]: https://img.shields.io/badge/python-3.6-AB70FF?style=for-the-badge
|
||||
[release]: https://img.shields.io/github/v/release/EillesWan/Musicreater?style=for-the-badge
|
||||
|
||||
<!-- [release]: https://img.shields.io//TriM-Organization/Linglun-Converter?style=for-the-badge -->
|
||||
|
||||
[license]: https://img.shields.io/badge/Licence-Apache-228B22?style=for-the-badge
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
### [林纳克斯(Linux)与其衍生操作系统](./download%26start/Linux.md)
|
||||
### [安卓(Android)与其衍生操作系统](./download%26start/Android.md)
|
||||
|
||||
## 使用教程
|
||||
## 命令行版本的使用教程
|
||||
|
||||
> 注意,图形用户界面版本无需查看此内容。
|
||||
|
||||
1. 参数说明
|
||||
|
||||
|
||||
321
llc_cli.py
321
llc_cli.py
@@ -7,87 +7,99 @@
|
||||
伶伦转换器 命令行
|
||||
Linglun Converter CLI
|
||||
|
||||
版权所有 © 2023 金羿 & 睿穆开发组
|
||||
Copyright © 2023 EillesWan & TriM Org.
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 ./License.md
|
||||
Terms & Conditions: ./Lisense.md
|
||||
伶伦转换器命令行版本(“本项目”)的协议颁发者为 金羿
|
||||
The Licensor of _Linglun Converter CLI_("this project") is Eilles Wan.
|
||||
|
||||
本项目根据 第一版 汉钰律许可协议(“本协议”)授权。
|
||||
任何人皆可从以下地址获得本协议副本:https://gitee.com/EillesWan/YulvLicenses。
|
||||
若非因法律要求或经过了特殊准许,此作品在根据本协议“原样”提供的基础上,不予提供任何形式的担保、任何明示、任何暗示或类似承诺。也就是说,用户将自行承担因此作品的质量或性能问题而产生的全部风险。
|
||||
详细的准许和限制条款请见原协议文本。
|
||||
"""
|
||||
|
||||
__version__ = "0.0.6"
|
||||
__version__ = "0.0.8"
|
||||
|
||||
|
||||
import datetime
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
|
||||
# import sys
|
||||
|
||||
import Musicreater
|
||||
from Musicreater.constants import DEFAULT_PROGRESSBAR_STYLE
|
||||
from Musicreater.plugin import ConvertConfig
|
||||
from Musicreater import DEFAULT_PROGRESSBAR_STYLE
|
||||
from Musicreater.plugin.addonpack import (
|
||||
to_addon_pack_in_delay,
|
||||
to_addon_pack_in_repeater,
|
||||
to_addon_pack_in_score,
|
||||
)
|
||||
|
||||
from Musicreater.plugin.mcstructfile import (
|
||||
to_mcstructure_file_in_delay,
|
||||
to_mcstructure_file_in_repeater,
|
||||
to_mcstructure_file_in_score,
|
||||
)
|
||||
from Musicreater.plugin.bdxfile import to_BDX_file_in_delay, to_BDX_file_in_score
|
||||
from utils.io import *
|
||||
from utils.io import logger, int_str, prt, ipt, isin, bool_str, float_str
|
||||
from utils.yanlun import yanlun_texts, solar_date
|
||||
|
||||
# from Musicreater.plugin.mcstructure import commands_to_structure, commands_to_redstone_delay_structure
|
||||
|
||||
|
||||
MainConsole.print(
|
||||
logger.console.print(
|
||||
"[#121110 on #F0F2F4] ",
|
||||
style="#121110 on #F0F2F4",
|
||||
justify="center",
|
||||
)
|
||||
|
||||
osc.project_name = "伶伦转换器"
|
||||
osc.version = __version__
|
||||
# osc.project_name = "伶伦转换器"
|
||||
# osc.version = __version__
|
||||
|
||||
|
||||
if len(sys.argv) > 0:
|
||||
# if len(sys.argv) > 0:
|
||||
|
||||
def go_for_args(debugMode: str = "False", logfile: str = "True"):
|
||||
global logger
|
||||
osc.isRelease = False if debugMode.lower() in ("true", "1") else True
|
||||
logger.printing = not osc.isRelease
|
||||
logger.writing = True if logfile.lower() in ("true", "1") else False
|
||||
# def go_for_args(debugMode: str = "False", logfile: str = "True"):
|
||||
# global logger
|
||||
# osc.isRelease = False if debugMode.lower() in ("true", "1") else True
|
||||
# logger.printing = not osc.isRelease
|
||||
# logger.writing = True if logfile.lower() in ("true", "1") else False
|
||||
|
||||
go_for_args(*sys.argv)
|
||||
# go_for_args(*sys.argv)
|
||||
|
||||
|
||||
# 显示大标题
|
||||
MainConsole.rule(title="[bold #AB70FF]欢迎使用伶伦独立转换器", characters="=", style="#26E2FF")
|
||||
logger.console.rule(
|
||||
title="[bold #AB70FF]欢迎使用伶伦独立转换器", characters="=", style="#26E2FF"
|
||||
)
|
||||
# MainConsole.rule(title="[bold #AB70FF]Welcome to Linglun Converter", characters="-")
|
||||
MainConsole.rule(
|
||||
title="[#AB70FF]版本{} | 音·创内核版本{}".format(__version__, Musicreater.__version__),
|
||||
logger.console.rule(
|
||||
title="[#AB70FF]版本{} | 音·创内核版本{}".format(
|
||||
__version__, Musicreater.__version__
|
||||
),
|
||||
characters="-",
|
||||
style="#26E2FF",
|
||||
)
|
||||
|
||||
nowYang = datetime.datetime.now()
|
||||
|
||||
if nowYang.month == 8 and nowYang.day == 6:
|
||||
if solar_date == (4, 3):
|
||||
# 诸葛八卦生日
|
||||
MainConsole.print(
|
||||
"[#7DB5F0 on #121110]今天可不是催更的日子!\n诸葛亮与八卦阵{}岁生日快乐!".format(nowYang.year - 2008),
|
||||
style="#7DB5F0 on #121110",
|
||||
justify="center",
|
||||
)
|
||||
elif nowYang.month == 4 and nowYang.day == 3:
|
||||
style_ = "#7DB5F0 on #121110"
|
||||
elif solar_date == (8, 6):
|
||||
# 金羿生日快乐
|
||||
MainConsole.print(
|
||||
"[#0089F2 on #F0F2F4]今天就不要催更啦!\n金羿{}岁生日快乐!".format(nowYang.year - 2006),
|
||||
style="#0089F2 on #F0F2F4",
|
||||
justify="center",
|
||||
)
|
||||
style_ = "#0089F2 on #F0F2F4"
|
||||
elif solar_date == (8, 16):
|
||||
# 旧梦生日快乐
|
||||
style_ = "#F0F2F4 on #0089F2" # TODO
|
||||
else:
|
||||
# 显示箴言部分
|
||||
MainConsole.print(
|
||||
"[#121110 on #F0F2F4]{}".format(random.choice(myWords)),
|
||||
style="#121110 on #F0F2F4",
|
||||
justify="center",
|
||||
)
|
||||
style_ = "#121110 on #F0F2F4"
|
||||
# 显示箴言部分
|
||||
logger.console.print(
|
||||
"[{}]{}".format(style_, random.choice(yanlun_texts)),
|
||||
style=style_,
|
||||
justify="center",
|
||||
)
|
||||
del style_
|
||||
|
||||
# prt(f"{_('LangChd')}{_(':')}{_(currentLang)}")
|
||||
|
||||
@@ -155,41 +167,65 @@ while True:
|
||||
|
||||
|
||||
def is_in_bdx_mcpack(sth: str):
|
||||
return isin(sth, {1: ("bdx", "1", "币帝查", "币帝·艾克斯"), 0: ("mcpack", "0", "唉姆西·派克")})
|
||||
|
||||
|
||||
def is_in_player(sth: str):
|
||||
return isin(
|
||||
sth,
|
||||
sth.lower(),
|
||||
{
|
||||
0: ("delay", "0", "延迟", "帝蕾"),
|
||||
1: ("score", "1", "计分板", "积分", "积分板", "计分", "斯阔尔"),
|
||||
2: ("repeater", "2", "中继器", "瑞皮特"),
|
||||
1: ("bdx", "1", "币帝查", "币帝·艾克斯", "一", "幺"),
|
||||
0: ("mcpack", "0", "唉姆西·派克", "零", "〇"),
|
||||
2: ("MCSTRUCTURE", "2", "二", "麦块结构", "MC结构", "两", "我的世界结构"),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def is_in_player(sth: str, in_ok: tuple = (0, 1, 2)):
|
||||
return isin(
|
||||
sth.lower(),
|
||||
dict(
|
||||
[
|
||||
(i, v)
|
||||
for i, v in [
|
||||
(
|
||||
0,
|
||||
("delay", "0", "延迟", "帝蕾"),
|
||||
),
|
||||
(
|
||||
1,
|
||||
("score", "1", "计分板", "积分", "积分板", "计分", "斯阔尔"),
|
||||
),
|
||||
(
|
||||
2,
|
||||
("repeater", "2", "中继器", "瑞皮特"),
|
||||
),
|
||||
]
|
||||
if i in in_ok
|
||||
]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
output_file_format = format_ipt(
|
||||
"输出文件类型 (mcpack/0|bdx/1)",
|
||||
"输出文件类型 (mcpack/0|bdx/1|mcstructure/2)",
|
||||
is_in_bdx_mcpack,
|
||||
"输入内容有误,请重新输入。",
|
||||
)[1]
|
||||
|
||||
if output_file_format == 0:
|
||||
if output_file_format == 1:
|
||||
player_format = format_ipt(
|
||||
"播放器类型 (延迟/0|计分板/1|中继器/2)",
|
||||
is_in_player,
|
||||
"播放器类型 (延迟/0|计分板/1):",
|
||||
lambda a: is_in_player(a, (0, 1)),
|
||||
"输入内容有误,请重新输入。",
|
||||
)[1]
|
||||
else:
|
||||
player_format = format_ipt(
|
||||
"播放器类型 (延迟/0|计分板/1)",
|
||||
"播放器类型 (延迟/0|计分板/1|中继器/2):",
|
||||
is_in_player,
|
||||
"输入内容有误,请重新输入。",
|
||||
)[1]
|
||||
|
||||
old_exe_enabled = not format_ipt(
|
||||
"启用新版代执行指令 (否/0|是/1):", bool_str, "输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n"
|
||||
old_exe_enabled = format_ipt(
|
||||
"启用旧版代行指令 (否/0|是/1):",
|
||||
bool_str,
|
||||
"输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n",
|
||||
)[1]
|
||||
|
||||
|
||||
@@ -203,93 +239,158 @@ else:
|
||||
prompts = []
|
||||
# 提示语 检测函数 错误提示语
|
||||
for args in [
|
||||
(
|
||||
"音量大小 (0,1]:",
|
||||
float_str,
|
||||
),
|
||||
(
|
||||
"速度倍率 (0,+∞):",
|
||||
float_str,
|
||||
),
|
||||
(
|
||||
"自动生成进度条 (否/0|是/1):",
|
||||
bool_str,
|
||||
"最小音量 (0,1]:",
|
||||
float_str,
|
||||
),
|
||||
(
|
||||
"计分板名称:",
|
||||
str,
|
||||
)
|
||||
if player_format == 1
|
||||
else (
|
||||
"受播放玩家的选择器:",
|
||||
str,
|
||||
(
|
||||
"自动生成进度条 (否/0|是/1):",
|
||||
bool_str,
|
||||
)
|
||||
if output_file_format != 2
|
||||
else ()
|
||||
),
|
||||
(
|
||||
"自动重置计分板 (否/0|是/1):",
|
||||
bool_str,
|
||||
)
|
||||
if player_format == 1
|
||||
else (),
|
||||
(
|
||||
"计分板名称:",
|
||||
str,
|
||||
)
|
||||
if player_format == 1
|
||||
else (
|
||||
"受播放玩家的选择器:",
|
||||
str,
|
||||
)
|
||||
),
|
||||
(
|
||||
"BDX作者署名:",
|
||||
str,
|
||||
)
|
||||
if output_file_format == 1
|
||||
else (),
|
||||
(
|
||||
"自动重置计分板 (否/0|是/1):",
|
||||
bool_str,
|
||||
)
|
||||
if player_format == 1
|
||||
else ()
|
||||
),
|
||||
(
|
||||
"结构生成最大高度 (0,+∞):",
|
||||
int,
|
||||
)
|
||||
if player_format == 0
|
||||
else (),
|
||||
(
|
||||
"BDX作者署名:",
|
||||
str,
|
||||
)
|
||||
if output_file_format == 1
|
||||
else (
|
||||
(
|
||||
"结构延展方向 (x+|z+|x-|z-):",
|
||||
lambda a: isin(
|
||||
a,
|
||||
{
|
||||
"z+": ["z+", "Z+"],
|
||||
"x+": ["X+", "x+"],
|
||||
"z-": ["Z-", "z-"],
|
||||
"x-": ["x-", "X-"],
|
||||
},
|
||||
),
|
||||
)
|
||||
if (player_format == 2 and output_file_format == 2)
|
||||
else ()
|
||||
)
|
||||
),
|
||||
(
|
||||
(
|
||||
"基础底部方块 (例:concrete):",
|
||||
str,
|
||||
)
|
||||
if (player_format == 2 and output_file_format == 2)
|
||||
else (
|
||||
(
|
||||
"结构生成最大高度 (0,+∞):",
|
||||
int_str,
|
||||
)
|
||||
if player_format == 0 or output_file_format != 0
|
||||
else ()
|
||||
)
|
||||
),
|
||||
]:
|
||||
if args:
|
||||
prompts.append(
|
||||
format_ipt(*args, err_note="输入内容格式错误,应符合 {}".format(args[1]))[1]
|
||||
format_ipt(
|
||||
*args, err_note="输入内容格式错误,应符合 {}".format(args[1])
|
||||
)[1]
|
||||
)
|
||||
|
||||
if prompts[2]:
|
||||
if output_file_format != 2 and prompts[2]:
|
||||
style = DEFAULT_PROGRESSBAR_STYLE
|
||||
costom_pgb_enabled = format_ipt(
|
||||
"自定义进度条样式 (否/0|是/1):", bool_str, "输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n"
|
||||
"自定义进度条样式 (否/0|是/1):",
|
||||
bool_str,
|
||||
"输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n",
|
||||
)[1]
|
||||
if costom_pgb_enabled:
|
||||
style = ipt("基本样式组 (回车默认):")
|
||||
if not style:
|
||||
style = DEFAULT_PROGRESSBAR_STYLE[0]
|
||||
yet_part = ipt("未播放样式 (回车默认):")
|
||||
if not yet_part:
|
||||
yet_part = DEFAULT_PROGRESSBAR_STYLE[1][1]
|
||||
done_part = ipt("已播放样式 (回车默认):")
|
||||
if not done_part:
|
||||
done_part = DEFAULT_PROGRESSBAR_STYLE[1][0]
|
||||
|
||||
if player_format == 1:
|
||||
cvt_method = to_addon_pack_in_score
|
||||
elif player_format == 0:
|
||||
cvt_method = to_addon_pack_in_delay
|
||||
elif player_format == 2:
|
||||
cvt_method = to_addon_pack_in_repeater
|
||||
base_style = ipt("基本样式组 (留空默认):")
|
||||
if base_style:
|
||||
style.set_base_style(base_style)
|
||||
yet_part = ipt("未播放样式 (留空默认):")
|
||||
if yet_part:
|
||||
style.set_to_play_style(yet_part)
|
||||
done_part = ipt("已播放样式 (留空默认):")
|
||||
if done_part:
|
||||
style.set_played_style(done_part)
|
||||
else:
|
||||
style = None
|
||||
|
||||
if output_file_format == 0:
|
||||
if player_format == 1:
|
||||
cvt_method = to_addon_pack_in_score
|
||||
elif player_format == 0:
|
||||
cvt_method = to_addon_pack_in_delay
|
||||
elif player_format == 2:
|
||||
cvt_method = to_addon_pack_in_repeater
|
||||
elif output_file_format == 2:
|
||||
if player_format == 1:
|
||||
cvt_method = to_mcstructure_file_in_score
|
||||
if player_format == 0:
|
||||
cvt_method = to_mcstructure_file_in_delay
|
||||
elif player_format == 2:
|
||||
cvt_method = to_mcstructure_file_in_repeater
|
||||
|
||||
|
||||
for singleMidi in midis:
|
||||
prt("\n" f"正在处理 {singleMidi}")
|
||||
cvt_mid = Musicreater.MidiConvert.from_midi_file(
|
||||
singleMidi, old_exe_format=old_exe_enabled
|
||||
midi_file_path=singleMidi,
|
||||
play_speed=prompts[0],
|
||||
old_exe_format=old_exe_enabled,
|
||||
min_volume=prompts[1],
|
||||
)
|
||||
cvt_cfg = ConvertConfig(out_path, *prompts[:2], progressbar=((style, (done_part, yet_part)) if costom_pgb_enabled else True) if prompts[2] else False) # type: ignore
|
||||
|
||||
conversion_result = (
|
||||
(cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
|
||||
(cvt_method(cvt_mid, out_path, style, *prompts[3:])) # type: ignore
|
||||
if output_file_format == 0
|
||||
else (
|
||||
to_BDX_file_in_score(cvt_mid, cvt_cfg, *prompts[3:])
|
||||
if player_format == 1
|
||||
else to_BDX_file_in_delay(cvt_mid, cvt_cfg, *prompts[3:])
|
||||
(
|
||||
to_BDX_file_in_score(cvt_mid, out_path, style, *prompts[3:])
|
||||
if player_format == 1
|
||||
else to_BDX_file_in_delay(cvt_mid, out_path, style, *prompts[3:])
|
||||
)
|
||||
if output_file_format == 1
|
||||
else (cvt_method(cvt_mid, out_path, *prompts[2:]))
|
||||
)
|
||||
)
|
||||
|
||||
prt(
|
||||
f" 指令总长:{conversion_result[0]},播放刻数:{conversion_result[1]}{f''',结构大小:{conversion_result[2]},末点坐标:{conversion_result[3]}''' if output_file_format == 1 else ''}" # type: ignore
|
||||
"\t{}:{},播放刻数:{}{}".format(
|
||||
"结构大小" if output_file_format == 2 else "指令总长",
|
||||
conversion_result[0],
|
||||
conversion_result[1],
|
||||
(
|
||||
",结构大小:{},末点坐标:{}".format(*conversion_result[2:])
|
||||
if output_file_format == 1
|
||||
else ""
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
exitSth = ipt("结束。换行以退出程序。")
|
||||
|
||||
@@ -7,11 +7,16 @@
|
||||
伶伦转换器暨模组特用奇巧
|
||||
Linglun Converter for Special Use with addons
|
||||
|
||||
版权所有 © 2023 金羿 & 睿穆开发组
|
||||
Copyright © 2023 EillesWan & TriM Org.
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 ./License.md
|
||||
Terms & Conditions: ./Lisense.md
|
||||
伶伦转换器暨模组特用奇巧版本(“本项目”)的协议颁发者为 金羿
|
||||
The Licensor of _Linglun Converter for Special Use with addons_("this project") is Eilles Wan.
|
||||
|
||||
本项目根据 第一版 汉钰律许可协议(“本协议”)授权。
|
||||
任何人皆可从以下地址获得本协议副本:https://gitee.com/EillesWan/YulvLicenses。
|
||||
若非因法律要求或经过了特殊准许,此作品在根据本协议“原样”提供的基础上,不予提供任何形式的担保、任何明示、任何暗示或类似承诺。也就是说,用户将自行承担因此作品的质量或性能问题而产生的全部风险。
|
||||
详细的准许和限制条款请见原协议文本。
|
||||
"""
|
||||
|
||||
__version__ = "0.0.1"
|
||||
@@ -55,7 +60,9 @@ MainConsole.rule(
|
||||
)
|
||||
# MainConsole.rule(title="[bold #AB70FF]Welcome to Linglun Converter", characters="-")
|
||||
MainConsole.rule(
|
||||
title="[#AB70FF]版本{} | 音·创内核版本{}".format(__version__, Musicreater.__version__),
|
||||
title="[#AB70FF]版本{} | 音·创内核版本{}".format(
|
||||
__version__, Musicreater.__version__
|
||||
),
|
||||
characters="-",
|
||||
style="#26E2FF",
|
||||
)
|
||||
@@ -95,7 +102,9 @@ while True:
|
||||
# "仅处理打击乐器 (否/0|是/1):", bool_str, "输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n"
|
||||
# )[1]
|
||||
|
||||
speed: float = format_ipt("播放速度", float_str, "错误,需要浮点型数据;请重新输入。")[1]
|
||||
speed: float = format_ipt("播放速度", float_str, "错误,需要浮点型数据;请重新输入。")[
|
||||
1
|
||||
]
|
||||
|
||||
|
||||
final_result: Dict[str, Dict[int, List[Tuple[str, int, str]]]] = {}
|
||||
|
||||
1726
llc_win_wxPython.py
1726
llc_win_wxPython.py
File diff suppressed because it is too large
Load Diff
1
pyinstaller_build.bat
Normal file
1
pyinstaller_build.bat
Normal file
@@ -0,0 +1 @@
|
||||
pyinstaller -D ./llc_win_wxPython.py -i ./resources/LLC_LOGO_OK_PLAIN_BANNER.ico --hide-console minimize-late --clean -n 伶伦转换器
|
||||
@@ -1,2 +1,10 @@
|
||||
Musicreater>=1.0.0
|
||||
TrimLog>=0.7.2
|
||||
Musicreater>=2.1.0.1
|
||||
TrimLog>=0.8.3
|
||||
requests>=2.0.0
|
||||
TrimMCStruct>=1.0.0
|
||||
rich
|
||||
wxPython
|
||||
dill
|
||||
brotli
|
||||
fcwslib=3.0.1
|
||||
zhDateTime>=1.0.3
|
||||
BIN
resources/TriMO_LOGO.png
Normal file
BIN
resources/TriMO_LOGO.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 144 KiB |
BIN
resources/TriMO_Theme.mp4
Normal file
BIN
resources/TriMO_Theme.mp4
Normal file
Binary file not shown.
29
resources/资源版权声明.md
Normal file
29
resources/资源版权声明.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 资源文件权益声明
|
||||
|
||||
请注意,本仓库中 resource 目录、res 目录等一众可以明显觉知的资源目录内所含之文件应遵循以下之版权声明。
|
||||
|
||||
### 商业标记及专有标记
|
||||
|
||||
**睿乐组织**、**睿乐**、**TriMO**、**TriM**、**TriM-Org.**、**TriM-Orgnization**等一众组织名称皆为专用商业标记,未经该组织允许不得擅自使用。
|
||||
|
||||
**金羿ELS**、**金羿**、**Eilles Wan**、**丌幂**、**诸葛亮与八卦阵**、**诸葛八卦**、**BgArray**、**鸣凤鸽子**、**鱼旧梦**、**ElapsingDreams**等一众具有显著特征的自然人网名、自然人姓名、自然人专有名称之类之辞皆为专有标记,未经其本人允许不得擅自使用。
|
||||
|
||||
**伶伦工作站**、**伶伦转换器**、**LingLun Studio**、**LingLun Converter**、**音·创**、**Musicreater**等一众项目、软件、需求库之名称皆为专用之商业标记,未经其所有者允许不得擅自使用。
|
||||
|
||||
睿乐组织的徽标[**【木制展框上的惊异媒体】(睿思乐发)**](https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/TriMO_Theme.mp4)之图案及相关动画是**丌幂**所作的、**睿乐组织**的共同标志,其著作权归属**丌幂**所有,并授权给**睿乐组织**使用。其相关声像信息、睿乐组织的主题音[**【悦搏音符之回响】(睿思乐发)**](https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/TriMO_Theme.mp4)是**诸葛亮与八卦阵**所制作的、**睿乐组织**的共同标记,其著作权归属**诸葛亮与八卦阵**所有,并授权给**睿乐组织**使用。上述之图形、动画、声音等相关媒体信息皆为**睿乐组织**所专用的商业标记,未经**睿乐组织**之允许不得使用。
|
||||
|
||||
[**木制框架中的乐灵**](https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/LLC_LOGO_OK_PLAIN_BANNER.png)之图案及相关动画、声音均为**伶伦工作站**之专用标记,未经**睿乐组织**之允许不得使用。
|
||||
|
||||
[**瓷板上的方块音符**](https://gitee.com/TriM-Organization/Musicreater/raw/master/resources/msctIcon.png)之图案及相关动画、声音均为**音·创库**之专用标记,未经**睿乐组织**之允许不得使用。
|
||||
|
||||
### 图片、视讯与声像信息
|
||||
|
||||
若无特殊注明,一众本仓库内公开的图片、视频、影视、声音等媒体信息
|
||||
皆系本项目所用之连带软件
|
||||
禁止在本项目之外传播
|
||||
不允许独立发行、独立副本
|
||||
不允许未经允许的二次使用与创作
|
||||
不允许脱离于本项目而独立存在
|
||||
不得随任何其他非本项目之内的软件连带发布
|
||||
不得用于商业用途
|
||||
若本项目之源码被用于商业用途,应当将其从中剔除
|
||||
BIN
resources/金羿ELSV4.png
Normal file
BIN
resources/金羿ELSV4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 230 KiB |
279
utils/authorp.py
Normal file
279
utils/authorp.py
Normal file
@@ -0,0 +1,279 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
伶伦转换器 作者信息组件
|
||||
Linglun Converter Author Page Component
|
||||
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
|
||||
import wx
|
||||
import wx.xrc
|
||||
import wx.media
|
||||
|
||||
|
||||
###########################################################################
|
||||
## Class LingLunAuthorPageFrame
|
||||
###########################################################################
|
||||
|
||||
|
||||
class LingLunAuthorPageFrame(wx.Frame):
|
||||
|
||||
def __init__(self, parent, trim_vdo, trim_pic, eilles_pic):
|
||||
wx.Frame.__init__(
|
||||
self,
|
||||
parent,
|
||||
id=wx.ID_ANY,
|
||||
title="伶伦作者页",
|
||||
pos=wx.DefaultPosition,
|
||||
size=wx.Size(610, 560),
|
||||
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL | wx.STAY_ON_TOP,
|
||||
)
|
||||
|
||||
self.trim_pic = trim_pic
|
||||
|
||||
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
||||
|
||||
mian_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
self.m_listbook1 = wx.Listbook(
|
||||
self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LB_RIGHT
|
||||
)
|
||||
self.trim_pannel = wx.Panel(
|
||||
self.m_listbook1,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TAB_TRAVERSAL,
|
||||
)
|
||||
what_we_called_trim_org = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
bSizer2 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
self.m_TriMO_Theme_mediaCtrl1 = wx.media.MediaCtrl(
|
||||
self.trim_pannel,
|
||||
wx.ID_ANY,
|
||||
wx.EmptyString,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
)
|
||||
# self.m_TriMO_Theme_mediaCtrl1.Hide()
|
||||
self.m_TriMO_Theme_mediaCtrl1.Load(trim_vdo)
|
||||
self.m_TriMO_Theme_mediaCtrl1.SetPlaybackRate(1)
|
||||
self.m_TriMO_Theme_mediaCtrl1.SetVolume(1)
|
||||
self.m_TriMO_Theme_mediaCtrl1.ShowPlayerControls(
|
||||
wx.media.MEDIACTRLPLAYERCONTROLS_NONE
|
||||
)
|
||||
|
||||
bSizer2.Add(self.m_TriMO_Theme_mediaCtrl1, 1, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
# self.m_bitmap1k = wx.StaticBitmap(
|
||||
# self.trim_pannel,
|
||||
# wx.ID_ANY,
|
||||
# wx.Bitmap(trim_pic, wx.BITMAP_TYPE_ANY),
|
||||
# wx.DefaultPosition,
|
||||
# wx.DefaultSize,
|
||||
# 0,
|
||||
# )
|
||||
# bSizer2.Add(self.m_bitmap1k, 1, wx.ALL, 5)
|
||||
|
||||
self.m_staticText1 = wx.StaticText(
|
||||
self.trim_pannel, wx.ID_ANY, "™", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
self.m_staticText1.Wrap(-1)
|
||||
|
||||
bSizer2.Add(self.m_staticText1, 0, wx.ALL, 5)
|
||||
|
||||
what_we_called_trim_org.Add(bSizer2, 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText2 = wx.StaticText(
|
||||
self.trim_pannel,
|
||||
wx.ID_ANY,
|
||||
"睿乐 - 我的世界多媒体组织\nTriM Org - Minecraft Muti-Media Organization ",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText2.Wrap(-1)
|
||||
|
||||
what_we_called_trim_org.Add(self.m_staticText2, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_textCtrl1 = wx.TextCtrl(
|
||||
self.trim_pannel,
|
||||
wx.ID_ANY,
|
||||
"\t嗨~\n\t我们是 睿乐组织(TriMO, 全称 Minecraft Muti-Media Organization),意为“我的世界多媒体组织”。\n\t我们组织的主要活动是一些有关我的世界与多媒体相关的程序项目,例如伶伦(我的世界数字音频工作站),我的世界视频播放制作器(MVP)等。\n\t我们组织也会尝试开发一些跟人工智能、音乐、数字音频工作站(DAW)等相关的内容,不仅限于我的世界相关内容的开发。\n\t我们欢迎任何有相关兴趣的同志加入组织或者提交你的PR、创建你的issues、提出意见和建议!\n\n电邮:mailto:TriM-Organization@hotmail.com\nQ群:861684859 https://jq.qq.com/?_wv=1027&k=hpeRxrYr",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TE_AUTO_URL | wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY,
|
||||
)
|
||||
what_we_called_trim_org.Add(self.m_textCtrl1, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.trim_pannel.SetSizer(what_we_called_trim_org)
|
||||
self.trim_pannel.Layout()
|
||||
what_we_called_trim_org.Fit(self.trim_pannel)
|
||||
self.m_listbook1.AddPage(self.trim_pannel, "睿乐组织", True)
|
||||
self.eilles_pannel = wx.Panel(
|
||||
self.m_listbook1,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TAB_TRAVERSAL,
|
||||
)
|
||||
bSizer3 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
bSizer4 = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
self.m_bitmap1 = wx.StaticBitmap(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
wx.Bitmap(eilles_pic, wx.BITMAP_TYPE_ANY),
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
0,
|
||||
)
|
||||
bSizer4.Add(self.m_bitmap1, 1, wx.ALL, 5)
|
||||
|
||||
self.m_staticText21 = wx.StaticText(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
"金羿ELS\nEilles ",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText21.Wrap(-1)
|
||||
|
||||
bSizer4.Add(self.m_staticText21, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_textCtrl11 = wx.TextCtrl(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
"我的世界基岩版指令作者,个人开发者,B 站不知名 UP 主……",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TE_AUTO_URL | wx.TE_BESTWRAP | wx.TE_READONLY,
|
||||
)
|
||||
bSizer4.Add(self.m_textCtrl11, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
bSizer3.Add(bSizer4, 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText11 = wx.StaticText(
|
||||
self.eilles_pannel, wx.ID_ANY, "™", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
self.m_staticText11.Wrap(-1)
|
||||
|
||||
bSizer3.Add(self.m_staticText11, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.eilles_pannel.SetSizer(bSizer3)
|
||||
self.eilles_pannel.Layout()
|
||||
bSizer3.Fit(self.eilles_pannel)
|
||||
self.m_listbook1.AddPage(self.eilles_pannel, "金羿ELS", False)
|
||||
self.bgarray_pannel = wx.Panel(
|
||||
self.m_listbook1,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TAB_TRAVERSAL,
|
||||
)
|
||||
bSizer31 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
bSizer41 = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
bSizer41.Add((0, 0), 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText211 = wx.StaticText(
|
||||
self.bgarray_pannel,
|
||||
wx.ID_ANY,
|
||||
"诸葛亮与八卦阵\nBgArray",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText211.Wrap(-1)
|
||||
|
||||
bSizer41.Add(self.m_staticText211, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_textCtrl111 = wx.TextCtrl(
|
||||
self.bgarray_pannel,
|
||||
wx.ID_ANY,
|
||||
"我的世界基岩版玩家,喜欢编程和音乐。",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TE_AUTO_URL | wx.TE_BESTWRAP | wx.TE_READONLY,
|
||||
)
|
||||
bSizer41.Add(self.m_textCtrl111, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
bSizer31.Add(bSizer41, 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText111 = wx.StaticText(
|
||||
self.bgarray_pannel, wx.ID_ANY, "™", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
self.m_staticText111.Wrap(-1)
|
||||
|
||||
bSizer31.Add(self.m_staticText111, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.bgarray_pannel.SetSizer(bSizer31)
|
||||
self.bgarray_pannel.Layout()
|
||||
bSizer31.Fit(self.bgarray_pannel)
|
||||
self.m_listbook1.AddPage(self.bgarray_pannel, "诸葛八卦", False)
|
||||
|
||||
mian_sizer.Add(self.m_listbook1, 1, wx.EXPAND | wx.ALL, 5)
|
||||
|
||||
self.SetSizer(mian_sizer)
|
||||
self.Layout()
|
||||
|
||||
self.Centre(wx.BOTH)
|
||||
|
||||
# Connect Events
|
||||
self.m_listbook1.Bind(wx.EVT_LISTBOOK_PAGE_CHANGED, self.book_changed)
|
||||
|
||||
def __del__(self):
|
||||
self.Destroy()
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def book_changed(self, event):
|
||||
if event.GetSelection() == 0:
|
||||
# self.m_bitmap1k.HideWithEffect(wx.SHOW_EFFECT_BLEND,)
|
||||
# self.m_bitmap1k.SetBitmap(wx.Bitmap())
|
||||
# self.m_bitmap1k.Update()
|
||||
# self.trim_pannel.Update()
|
||||
# self.m_TriMO_Theme_mediaCtrl1.Show()
|
||||
# self.m_TriMO_Theme_mediaCtrl1.SetMinSize(wx.DefaultSize)
|
||||
# self.trim_pannel.SetFocus()
|
||||
# self.trim_pannel.Update()
|
||||
self.m_TriMO_Theme_mediaCtrl1.Play()
|
||||
# self.m_TriMO_Theme_mediaCtrl1.HideWithEffect(wx.SHOW_EFFECT_BLEND)
|
||||
# self.m_bitmap1k.ShowWithEffect(wx.SHOW_EFFECT_BLEND)
|
||||
# self.m_bitmap1k.Update()
|
||||
# self.trim_pannel.SetFocus()
|
||||
# self.trim_pannel.Update()
|
||||
else:
|
||||
self.m_TriMO_Theme_mediaCtrl1.Stop()
|
||||
|
||||
|
||||
def go_author_page(
|
||||
res_list: list = [
|
||||
"./resources/TriMO_Theme.mp4",
|
||||
"./resources/TriMO_LOGO.png",
|
||||
"./resources/金羿ELSV4.png",
|
||||
]
|
||||
):
|
||||
app = wx.App()
|
||||
frame = LingLunAuthorPageFrame(None, *res_list)
|
||||
frame.Show()
|
||||
|
||||
# frame.m_TriMO_Theme_mediaCtrl1.Load("./resources/TriMO_Theme.mp4")
|
||||
# frame.m_TriMO_Theme_mediaCtrl1.Play()
|
||||
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
# 启动应用程序
|
||||
if __name__ == "__main__":
|
||||
|
||||
go_author_page()
|
||||
139
utils/io.py
139
utils/io.py
@@ -4,50 +4,39 @@
|
||||
伶伦转换器 命令行组件
|
||||
Linglun Converter Command Line IO Component
|
||||
|
||||
版权所有 © 2023 金羿 & 睿穆开发组
|
||||
Copyright © 2023 EillesWan & TriM Org.
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 ./License.md
|
||||
Terms & Conditions: ./Lisense.md
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from typing import Any, Callable, Dict, List, Literal, Optional, Set, TextIO, Tuple, Iterable, Sequence
|
||||
|
||||
import TrimLog
|
||||
from TrimLog import Console, object_constants
|
||||
|
||||
is_logging: bool = True
|
||||
|
||||
MainConsole = Console()
|
||||
osc = object_constants.ObjectStateConstant()
|
||||
logger = TrimLog.Logger(
|
||||
is_logging=is_logging,
|
||||
# printing=not osc.is_release,
|
||||
in_suffix=".llc",
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
List,
|
||||
Literal,
|
||||
Optional,
|
||||
Set,
|
||||
TextIO,
|
||||
Tuple,
|
||||
Iterable,
|
||||
Sequence,
|
||||
Union,
|
||||
)
|
||||
|
||||
import TrimLog
|
||||
from TrimLog import object_constants, logger, log__init__
|
||||
|
||||
try:
|
||||
myWords = (
|
||||
urllib.request.urlopen(
|
||||
"https://gitee.com/TriM-Organization/LinglunStudio/raw/master/resources/myWords.txt"
|
||||
)
|
||||
.read()
|
||||
.decode("utf-8")
|
||||
.strip("\n")
|
||||
.split("\n")
|
||||
)
|
||||
except (ConnectionError, urllib.error.HTTPError) as E:
|
||||
logger.warning(f"读取言·论信息发生 互联网连接 错误:\n{E}")
|
||||
myWords = ["以梦想为驱使 创造属于自己的未来"]
|
||||
# noinspection PyBroadException
|
||||
except BaseException as E:
|
||||
logger.warning(f"读取言·论信息发生 未知 错误:\n{E}")
|
||||
myWords = ["灵光焕发 深艺献心"]
|
||||
|
||||
logger.is_logging = True
|
||||
logger.suffix = ".llc"
|
||||
logger.is_tips = True
|
||||
|
||||
|
||||
logger.info("注册出入方法……")
|
||||
|
||||
JustifyMethod = Literal["default", "left", "center", "right", "full"]
|
||||
OverflowMethod = Literal["fold", "crop", "ellipsis", "ignore"]
|
||||
@@ -88,7 +77,7 @@ def prt(
|
||||
soft_wrap (bool, 可选): 启用软包装模式,禁止文字包装和裁剪,或`None``用于 控制台默认值。默认为`None`。
|
||||
new_line_start (bool, False): 如果输出包含多行,在开始时插入一个新行。默认值为`False`。
|
||||
"""
|
||||
MainConsole.print(
|
||||
logger.console.print(
|
||||
*objects,
|
||||
sep=sep,
|
||||
end=end,
|
||||
@@ -149,7 +138,7 @@ def ipt(
|
||||
Returns:
|
||||
str: 从stdin读取的字符串
|
||||
"""
|
||||
MainConsole.print(
|
||||
logger.console.print(
|
||||
*objects,
|
||||
sep=sep,
|
||||
end="",
|
||||
@@ -167,7 +156,7 @@ def ipt(
|
||||
new_line_start=new_line_start,
|
||||
)
|
||||
|
||||
return MainConsole.input(password=password, stream=stream)
|
||||
return logger.console.input(password=password, stream=stream)
|
||||
|
||||
|
||||
def format_ipt(
|
||||
@@ -203,61 +192,57 @@ def isin(sth: str, range_list: dict):
|
||||
for bool_value, res_list in range_list.items():
|
||||
if sth in res_list:
|
||||
return bool_value
|
||||
raise ValueError
|
||||
raise ValueError(
|
||||
"不在可选范围内:{}".format([j for i in range_list.values() for j in i])
|
||||
)
|
||||
|
||||
|
||||
# 真假字符串判断
|
||||
def bool_str(sth: str):
|
||||
try:
|
||||
return bool(float(sth))
|
||||
except:
|
||||
except ValueError:
|
||||
if str(sth).lower() in ("true", "真", "是", "y", "t"):
|
||||
return True
|
||||
elif str(sth).lower() in ("false", "假", "否", "f", "n"):
|
||||
return False
|
||||
else:
|
||||
raise ValueError
|
||||
raise ValueError("非法逻辑字串")
|
||||
|
||||
|
||||
def float_str(sth: str):
|
||||
try:
|
||||
return float(sth)
|
||||
except ValueError:
|
||||
try:
|
||||
return float(
|
||||
sth.replace("壹", "1")
|
||||
.replace("贰", "2")
|
||||
.replace("叁", "3")
|
||||
.replace("肆", "4")
|
||||
.replace("伍", "5")
|
||||
.replace("陆", "6")
|
||||
.replace("柒", "7")
|
||||
.replace("捌", "8")
|
||||
.replace("玖", "9")
|
||||
.replace("零", "0")
|
||||
.replace("一", "1")
|
||||
.replace("二", "2")
|
||||
.replace("三", "3")
|
||||
.replace("四", "4")
|
||||
.replace("五", "5")
|
||||
.replace("六", "6")
|
||||
.replace("七", "7")
|
||||
.replace("八", "8")
|
||||
.replace("九", "9")
|
||||
.replace("〇", "0")
|
||||
.replace("洞", "0")
|
||||
.replace("幺", "1")
|
||||
.replace("俩", "2")
|
||||
.replace("两", "2")
|
||||
.replace("拐", "7")
|
||||
.replace("点", ".")
|
||||
)
|
||||
except:
|
||||
raise ValueError
|
||||
return float(
|
||||
sth.replace("壹", "1")
|
||||
.replace("贰", "2")
|
||||
.replace("叁", "3")
|
||||
.replace("肆", "4")
|
||||
.replace("伍", "5")
|
||||
.replace("陆", "6")
|
||||
.replace("柒", "7")
|
||||
.replace("捌", "8")
|
||||
.replace("玖", "9")
|
||||
.replace("零", "0")
|
||||
.replace("一", "1")
|
||||
.replace("二", "2")
|
||||
.replace("三", "3")
|
||||
.replace("四", "4")
|
||||
.replace("五", "5")
|
||||
.replace("六", "6")
|
||||
.replace("七", "7")
|
||||
.replace("八", "8")
|
||||
.replace("九", "9")
|
||||
.replace("〇", "0")
|
||||
.replace("洞", "0")
|
||||
.replace("幺", "1")
|
||||
.replace("俩", "2")
|
||||
.replace("两", "2")
|
||||
.replace("拐", "7")
|
||||
.replace("点", ".")
|
||||
)
|
||||
|
||||
|
||||
def int_str(sth: str):
|
||||
try:
|
||||
return int(float_str(sth))
|
||||
except ValueError:
|
||||
raise ValueError
|
||||
return int(float_str(sth))
|
||||
|
||||
27
utils/localize.py
Normal file
27
utils/localize.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
伶伦转换器 本地化组件
|
||||
Linglun Converter Language Localization Component
|
||||
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
|
||||
from .io import logger, Any
|
||||
|
||||
|
||||
def _() -> str:
|
||||
return ""
|
||||
|
||||
|
||||
def main():
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
120
utils/packdata.py
Normal file
120
utils/packdata.py
Normal file
@@ -0,0 +1,120 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
伶伦转换器 打包存档组件
|
||||
Linglun Converter Data Package Component
|
||||
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
|
||||
import hashlib
|
||||
|
||||
import dill
|
||||
import brotli
|
||||
|
||||
from .salt import salt
|
||||
from .io import Any
|
||||
|
||||
|
||||
def unpack_llc_pack(from_dist: str, raise_error: bool = True):
|
||||
with open(from_dist, "rb") as f:
|
||||
salty_sha256_value, md5_value, packed_bytes = f.read().split(b" | \n", 2)
|
||||
|
||||
if (md5_value == hashlib.md5(packed_bytes).digest()) and (
|
||||
salty_sha256_value
|
||||
== hashlib.pbkdf2_hmac("sha256", md5_value + packed_bytes, salt, 16)
|
||||
):
|
||||
return dill.loads(
|
||||
brotli.decompress(packed_bytes),
|
||||
)
|
||||
else:
|
||||
if raise_error:
|
||||
raise ValueError("文件读取失败:签名不一致,可能存在注入风险。")
|
||||
else:
|
||||
return ValueError("文件读取失败:签名不一致,可能存在注入风险。")
|
||||
|
||||
|
||||
def enpack_llc_pack(sth: Any, to_dist: str):
|
||||
packing_bytes = brotli.compress(
|
||||
dill.dumps(
|
||||
sth,
|
||||
)
|
||||
)
|
||||
|
||||
md5_value = hashlib.md5(packing_bytes).digest() # 长度 16
|
||||
|
||||
salty_sha256_value = hashlib.pbkdf2_hmac(
|
||||
"sha256", md5_value + packing_bytes, salt, 16
|
||||
) # 长度 32
|
||||
|
||||
with open(
|
||||
to_dist,
|
||||
"wb",
|
||||
) as f:
|
||||
f.write(salty_sha256_value)
|
||||
f.write(b" | \n")
|
||||
f.write(md5_value)
|
||||
f.write(b" | \n")
|
||||
f.write(packing_bytes)
|
||||
|
||||
|
||||
def enpack_msct_pack(sth, to_dist: str):
|
||||
packing_bytes = brotli.compress(
|
||||
dill.dumps(
|
||||
sth,
|
||||
)
|
||||
)
|
||||
with open(
|
||||
to_dist,
|
||||
"wb",
|
||||
) as f:
|
||||
f.write(packing_bytes)
|
||||
|
||||
return hashlib.sha256(packing_bytes)
|
||||
|
||||
|
||||
def unpack_msct_pack(from_dist: str, hash_value: str, raise_error: bool = True):
|
||||
with open(from_dist, "rb") as f:
|
||||
packed_data = f.read()
|
||||
now_hash = hashlib.sha256(packed_data).hexdigest()
|
||||
if now_hash == hash_value:
|
||||
return dill.loads(brotli.decompress(packed_data))
|
||||
else:
|
||||
if raise_error:
|
||||
raise ValueError(
|
||||
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
|
||||
now_hash, hash_value
|
||||
)
|
||||
)
|
||||
else:
|
||||
return ValueError(
|
||||
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
|
||||
now_hash, hash_value
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def load_msct_packed_data(
|
||||
packed_data: bytes, hash_value: str, raise_error: bool = True
|
||||
):
|
||||
now_hash = hashlib.sha256(packed_data).hexdigest()
|
||||
if now_hash == hash_value:
|
||||
return dill.loads(brotli.decompress(packed_data))
|
||||
else:
|
||||
if raise_error:
|
||||
raise ValueError(
|
||||
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
|
||||
now_hash, hash_value
|
||||
)
|
||||
)
|
||||
else:
|
||||
return ValueError(
|
||||
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
|
||||
now_hash, hash_value
|
||||
)
|
||||
)
|
||||
@@ -4,18 +4,20 @@
|
||||
伶伦转换器 版本检查组件
|
||||
Linglun Converter Version Checking Component
|
||||
|
||||
版权所有 © 2023 金羿 & 睿穆开发组
|
||||
Copyright © 2023 EillesWan & TriM Org.
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 ./License.md
|
||||
Terms & Conditions: ./Lisense.md
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
from .io import TrimLog, urllib, Sequence, Iterable, Callable, Optional
|
||||
import requests
|
||||
|
||||
from .io import TrimLog, Sequence, Iterable, Callable, Optional, Dict, Union
|
||||
|
||||
|
||||
def is_ver_char(text: str) -> bool:
|
||||
return text.isnumeric() or text == "."
|
||||
return text.isnumeric() or text in ".-"
|
||||
|
||||
|
||||
def cut_ver_str(text: str) -> str:
|
||||
@@ -28,8 +30,12 @@ def cut_ver_str(text: str) -> str:
|
||||
while is_ver_char(text[j]) and j < len_of_text:
|
||||
j += 1
|
||||
temp_str = text[i:j].strip()
|
||||
if ("." in temp_str) and (temp_str[0] != ".") and (temp_str[-1] != "."):
|
||||
return temp_str
|
||||
if (
|
||||
("." in temp_str or "-" in temp_str)
|
||||
and (temp_str[0] not in ".-")
|
||||
and (temp_str[-1] not in ".-")
|
||||
):
|
||||
return temp_str.replace("-", ".")
|
||||
i = j
|
||||
i += 1
|
||||
return ""
|
||||
@@ -46,8 +52,12 @@ def get_ver_str(text: str) -> Iterable[str]:
|
||||
while is_ver_char(text[j]) and j < len_of_text:
|
||||
j += 1
|
||||
temp_str = text[i:j].strip()
|
||||
if ("." in temp_str) and (temp_str[0] != ".") and (temp_str[-1] != "."):
|
||||
all_ver_str.append(temp_str)
|
||||
if (
|
||||
("." in temp_str or "-" in temp_str)
|
||||
and (temp_str[0] not in ".-")
|
||||
and (temp_str[-1] not in ".-")
|
||||
):
|
||||
all_ver_str.append(temp_str.replace("-", "."))
|
||||
i = j
|
||||
i += 1
|
||||
return all_ver_str
|
||||
@@ -64,20 +74,21 @@ def is_ver_bigger(ver_1: Sequence[int], ver_2: Sequence[int]) -> bool:
|
||||
return len_v1 > len_v2
|
||||
|
||||
|
||||
def check_update(
|
||||
def check_update_repo(
|
||||
appname: str,
|
||||
get_text_url: str,
|
||||
version_now: str,
|
||||
message_show_fun: Callable,
|
||||
logger: TrimLog.Logger,
|
||||
version_disp: Optional[str] = None,
|
||||
version_renew_tip: str = "!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,您可以前往下载地址更新。",
|
||||
):
|
||||
if not version_disp:
|
||||
version_disp = version_now
|
||||
|
||||
logger.info("当前版本信息:{}".format(version_now))
|
||||
logger.info("当前 {} 版本:{}".format(appname, version_now))
|
||||
try:
|
||||
code_content: str = urllib.request.urlopen(get_text_url).read().decode("utf-8")
|
||||
code_content: str = requests.get(get_text_url).text
|
||||
except Exception as E: # noinspection PyBroadException
|
||||
logger.warning("无法获取更新版本信息:{}".format(E))
|
||||
return
|
||||
@@ -86,7 +97,7 @@ def check_update(
|
||||
code_content = code_content[code_content.find('"') + 1 :]
|
||||
version_content = code_content[: code_content.find('"')]
|
||||
|
||||
logger.info("已获取更新版本信息:{}".format(version_content))
|
||||
logger.info("已获取 {} 新版本信息:{}".format(appname, version_content))
|
||||
|
||||
if is_ver_bigger(
|
||||
[int(v) for v in cut_ver_str(version_content).split(".")],
|
||||
@@ -98,7 +109,7 @@ def check_update(
|
||||
version_content = code_content[: code_content.find('"')]
|
||||
|
||||
message_show_fun(
|
||||
"!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,您可以前往下载地址更新。".format(
|
||||
version_renew_tip.format(
|
||||
app=appname, latest=version_content, current=version_disp
|
||||
)
|
||||
)
|
||||
@@ -116,3 +127,42 @@ def check_update(
|
||||
# return version_content[i:j]
|
||||
|
||||
# "".join([version_content[i] for i in range(version_content.__len__()) if is_ver_char(version_content[i]) and ((version_content[i-1] if i > 0 else False) or (version_content[i+1] if i < version_content.__len__() else False))]).split('.')
|
||||
|
||||
|
||||
def check_update_release(
|
||||
appname: str,
|
||||
get_release_url: str,
|
||||
version_now: str,
|
||||
notice_fun: Callable[[str, str], bool],
|
||||
logger: TrimLog.Logger,
|
||||
version_renew_tip: str = "!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,是否更新?",
|
||||
) -> Union[None, Dict[str, str]]:
|
||||
|
||||
logger.info("当前 {} 版本:{}".format(appname, version_now))
|
||||
try:
|
||||
code_content: Dict = requests.get(get_release_url).json()
|
||||
except Exception as E: # noinspection PyBroadException
|
||||
logger.warning("无法获取更新版本信息:{}".format(E))
|
||||
return
|
||||
|
||||
version_content = code_content["release"]["tag"]["name"]
|
||||
|
||||
logger.info("已获取 {} 新版本信息:{}".format(appname, version_content))
|
||||
|
||||
if is_ver_bigger(
|
||||
[int(v) for v in cut_ver_str(version_content).split(".")],
|
||||
[int(v) for v in cut_ver_str(version_now).split(".")],
|
||||
):
|
||||
|
||||
if notice_fun(
|
||||
version_renew_tip.format(
|
||||
app=appname, latest=version_content, current=version_now
|
||||
),
|
||||
code_content["release"]["release"]["description"],
|
||||
):
|
||||
return dict(
|
||||
[
|
||||
(d["name"], d["download_url"])
|
||||
for d in code_content["release"]["release"]["attach_files"]
|
||||
]
|
||||
)
|
||||
|
||||
161
utils/webview.py
Normal file
161
utils/webview.py
Normal file
@@ -0,0 +1,161 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
伶伦转换器 HTML页组件
|
||||
Linglun Converter HTML Component
|
||||
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
|
||||
import wx
|
||||
import wx.html
|
||||
|
||||
|
||||
class HTMLFrame(wx.Frame):
|
||||
"""桌面程序主窗口类"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
parent,
|
||||
tip_text,
|
||||
web_text,
|
||||
window_title: str = "新版本已发布",
|
||||
bg_colour: tuple = (0, 0, 0),
|
||||
window_size: tuple = (800, 480),
|
||||
):
|
||||
"""构造函数"""
|
||||
|
||||
wx.Frame.__init__(
|
||||
self,
|
||||
parent,
|
||||
id=wx.ID_ANY,
|
||||
title=window_title,
|
||||
pos=wx.DefaultPosition,
|
||||
size=window_size,
|
||||
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
|
||||
)
|
||||
|
||||
# self.SetIcon(wx.Icon('', wx.BITMAP_TYPE_ICO))
|
||||
self.SetBackgroundColour(bg_colour)
|
||||
self.Center()
|
||||
|
||||
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
||||
|
||||
bSizer1 = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
self.m_staticText1 = wx.StaticText(
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
tip_text,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText1.Wrap(-1)
|
||||
|
||||
self.m_staticText1.SetFont(
|
||||
wx.Font(
|
||||
wx.NORMAL_FONT.GetPointSize() * 2,
|
||||
wx.FONTFAMILY_DEFAULT,
|
||||
wx.FONTSTYLE_NORMAL,
|
||||
wx.FONTWEIGHT_NORMAL,
|
||||
False,
|
||||
"OPPOSans M",
|
||||
)
|
||||
)
|
||||
|
||||
bSizer1.Add(self.m_staticText1, 3, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5)
|
||||
|
||||
self.m_htmlWin1 = wx.html.HtmlWindow(
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.html.HW_SCROLLBAR_AUTO,
|
||||
)
|
||||
self.m_htmlWin1.SetFont(
|
||||
wx.Font(
|
||||
wx.NORMAL_FONT.GetPointSize(),
|
||||
wx.FONTFAMILY_DEFAULT,
|
||||
wx.FONTSTYLE_NORMAL,
|
||||
wx.FONTWEIGHT_NORMAL,
|
||||
False,
|
||||
"OPPOSans R",
|
||||
)
|
||||
)
|
||||
self.m_htmlWin1.SetStandardFonts(normal_face="OPPOSans R")
|
||||
|
||||
bSizer1.Add(self.m_htmlWin1, 5, wx.EXPAND | wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5)
|
||||
|
||||
bSizer2 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
self.m_button1 = wx.Button(
|
||||
self, wx.ID_ANY, "取消", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
bSizer2.Add(self.m_button1, 0, wx.ALL, 5)
|
||||
|
||||
self.m_button2 = wx.Button(
|
||||
self, wx.ID_ANY, "更新", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
bSizer2.Add(self.m_button2, 0, wx.ALL, 5)
|
||||
|
||||
bSizer1.Add(bSizer2, 0, wx.ALIGN_RIGHT, 5)
|
||||
|
||||
self.SetSizer(bSizer1)
|
||||
self.Layout()
|
||||
|
||||
self.Centre(wx.BOTH)
|
||||
|
||||
self.m_htmlWin1.SetPage(web_text)
|
||||
|
||||
# Connect Events
|
||||
self.m_button1.Bind(wx.EVT_BUTTON, self.on_Cancel_Click)
|
||||
self.m_button2.Bind(wx.EVT_BUTTON, self.on_Update_Click)
|
||||
|
||||
self.ok = False
|
||||
|
||||
def __del__(self):
|
||||
# return self.ok
|
||||
pass
|
||||
|
||||
def getok(self) -> bool:
|
||||
return self.ok
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def on_Cancel_Click(self, event):
|
||||
self.ok = False
|
||||
self.Destroy()
|
||||
|
||||
def on_Update_Click(self, event):
|
||||
self.ok = True
|
||||
self.Destroy()
|
||||
|
||||
|
||||
def go_update_tip(tip_text: str, html_context: str) -> bool:
|
||||
app = wx.App()
|
||||
frame = HTMLFrame(
|
||||
None,
|
||||
tip_text,
|
||||
html_context,
|
||||
bg_colour=wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENU),
|
||||
)
|
||||
frame.Show()
|
||||
app.MainLoop()
|
||||
return frame.getok()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
go_update_tip(
|
||||
"!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,是否更新?",
|
||||
'<ol>\n<li>\n<strong>[修复]</strong> 完成<ahref="https://gitee.com/TriM-Organization/Linglun-Converter/issues/I8YN22" rel="nofollow noreferrer noopener"target="_blank">#I8YN22</a>问题的修复,解决转换错误的问题</li>\n<li>\n<strong>[新增]</strong>支持选择自定的乐器对照表</li>\n<li>\n<strong>[新增]</strong>支持自选距离音量算法</li>\n<li>\n<strong>[新增]</strong>使用Packer以打包发行版(详情如下方说明)</li>\n<li>\n<strong>[优化]</strong>提高调用效率,优化代码结构</li>\n<li>\n<strong>[优化]</strong>提升部分注释可读性</li>\n</ol>\n',
|
||||
)
|
||||
|
||||
go_update_tip(
|
||||
"!有新版本!\n最新的 音·创 已经是 1.7.3 版本,当前您正在使用的仍是 1.7.0 版本,是否更新?",
|
||||
'<ol>\n<li>\n<strong>[修复]</strong> 完成<a href="https://gitee.com/TriM-Organization/Linglun-Converter/issues/I8YN22" rel="nofollow noreferrer noopener" target="_blank">#I8YN22</a>问题的修复,解决转换错误的问题</li>\n<li>\n<strong>[新增]</strong> 支持选择自定的乐器对照表</li>\n<li>\n<strong>[新增]</strong> 支持自选距离音量算法</li>\n<li>\n<strong>[新增]</strong> 使用Packer以打包发行版(详情如下方说明)</li>\n<li>\n<strong>[优化]</strong> 提高调用效率,优 化代码结构</li>\n<li>\n<strong>[优化]</strong> 提升部分注释可读性</li>\n</ol>\n<h2>打包文件结构</h2>\n<p>我们使用Python库 <code>dill</code> 和 <code>Brotli</code> 对整个库的包体进行打包,方式如下:</p>\n<div class="markdown-code-block">\n<pre lang="python" class="python"><code>packing_bytes = brotli.compress(dill.dumps(sth,))\n</code></pre>\n<div class="markdown-code-block-copy-btn"></div>\n</div>\n<p>每个包中的内容为:</p>\n<div class="markdown-code-block">\n<pre lang="python" class="python"><code>MSCT_MAIN = (\n Musicreater,\n Musicreater.experiment,\n Musicreater.previous,\n)\n\nMSCT_PLUGIN = (Musicreater.plugin,)\n\nMSCT_PLUGIN_FUNCTION = (\n to_addon_pack_in_delay,\n to_addon_pack_in_repeater,\n to_addon_pack_in_score,\n to_mcstructure_file_in_delay,\n to_mcstructure_file_in_repeater,\n to_mcstructure_file_in_score,\n to_BDX_file_in_delay,\n to_BDX_file_in_score,\n)\n</code></pre>\n<div class="markdown-code-block-copy-btn"></div>\n</div>',
|
||||
)
|
||||
54
utils/yanlun.py
Normal file
54
utils/yanlun.py
Normal file
@@ -0,0 +1,54 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
伶伦转换器 言论版组件
|
||||
Linglun Converter Yan Lun Component
|
||||
|
||||
版权所有 © 2024 金羿
|
||||
Copyright © 2024 EillesWan
|
||||
|
||||
开源相关声明请见 仓库根目录下的 License.md
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
import requests
|
||||
import zhDateTime
|
||||
|
||||
from .io import logger, prt
|
||||
|
||||
STANDARD_WHITE = (242, 244, 246)
|
||||
STANDART_BLACK = (18, 17, 16)
|
||||
|
||||
yanlun_fg_colour = STANDARD_WHITE
|
||||
yanlun_bg_colour = STANDART_BLACK
|
||||
|
||||
logger.info("获取 言·论 信息……")
|
||||
|
||||
solar_datetime = zhDateTime.DateTime.now()
|
||||
lunar_datetime = solar_datetime.to_lunar()
|
||||
solar_date = (solar_datetime.month, solar_datetime.day)
|
||||
lunar_date = (lunar_datetime.lunar_month, lunar_datetime.lunar_day)
|
||||
|
||||
if solar_date == (4, 3):
|
||||
yanlun_texts = ["金羿ELS 生日快乐~!", "Happy Birthday, Eilles!"]
|
||||
elif solar_date == (8, 6):
|
||||
yanlun_texts = ["诸葛亮与八卦阵 生日快乐~!", "Happy Birthday, bgArray~!"]
|
||||
elif solar_date == (8, 16):
|
||||
yanlun_texts = ["鱼旧梦 生日快乐~!", "Happy Birthday, ElapsingDreams~!"]
|
||||
|
||||
else:
|
||||
try:
|
||||
yanlun_texts = (
|
||||
requests.get(
|
||||
"https://nd.liteyuki.icu/api/v3/share/content/Xpue?path=null",
|
||||
)
|
||||
.text.strip("\n")
|
||||
.split("\n")
|
||||
)
|
||||
except (ConnectionError, requests.HTTPError, requests.RequestException) as E:
|
||||
logger.warning(f"读取言·论信息发生 互联网连接 错误:\n{E}")
|
||||
yanlun_texts = ["以梦想为驱使 创造属于自己的未来"]
|
||||
# noinspection PyBroadException
|
||||
except BaseException as E:
|
||||
logger.warning(f"读取言·论信息发生 未知 错误:\n{E}")
|
||||
yanlun_texts = ["灵光焕发 深艺献心"]
|
||||
1038
wxFB_Project/LingLunAuthorPage.fbp
Normal file
1038
wxFB_Project/LingLunAuthorPage.fbp
Normal file
File diff suppressed because it is too large
Load Diff
3131
wxFB_Project/LingLunConverter1.fbp
Normal file
3131
wxFB_Project/LingLunConverter1.fbp
Normal file
File diff suppressed because it is too large
Load Diff
3567
wxFB_Project/LingLunConverter1_1.fbp
Normal file
3567
wxFB_Project/LingLunConverter1_1.fbp
Normal file
File diff suppressed because it is too large
Load Diff
3605
wxFB_Project/LingLunConverter2.fbp
Normal file
3605
wxFB_Project/LingLunConverter2.fbp
Normal file
File diff suppressed because it is too large
Load Diff
478
wxFB_Project/generated1.py
Normal file
478
wxFB_Project/generated1.py
Normal file
@@ -0,0 +1,478 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
###########################################################################
|
||||
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
## http://www.wxformbuilder.org/
|
||||
##
|
||||
## PLEASE DO *NOT* EDIT THIS FILE!
|
||||
###########################################################################
|
||||
|
||||
import wx
|
||||
import wx.xrc
|
||||
import wx.propgrid as pg
|
||||
|
||||
###########################################################################
|
||||
## Class LingLunMainFrame
|
||||
###########################################################################
|
||||
|
||||
class LingLunMainFrame ( wx.Frame ):
|
||||
|
||||
def __init__( self, parent ):
|
||||
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 660,723 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
|
||||
|
||||
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
|
||||
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
|
||||
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
|
||||
self.m_statusBar2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_menubar1 = wx.MenuBar( 0 )
|
||||
self.m_menubar1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.FileMenu = wx.Menu()
|
||||
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
|
||||
self.FileMenu.Append( self.m_Exit_menuItem1 )
|
||||
|
||||
self.m_menubar1.Append( self.FileMenu, u"文件" )
|
||||
|
||||
self.SetMenuBar( self.m_menubar1 )
|
||||
|
||||
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
|
||||
|
||||
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
|
||||
self.m_LinglunWords_staticText1.Wrap( -1 )
|
||||
|
||||
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
|
||||
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
|
||||
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
|
||||
|
||||
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
m_mainBoxSizer.Add( s_yanLunbarSizer, 0, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
|
||||
|
||||
self.mian_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.mian_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.convert_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
main_page_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self.convert_page, wx.ID_ANY, u"选择MIDI文件\n(双击移除)", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
|
||||
|
||||
s_midiChooseSizer.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_midiFilesList_listBox2Choices = []
|
||||
self.m_midiFilesList_listBox2 = wx.ListBox( self.convert_page, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_midiFilesList_listBox2Choices, wx.LB_HSCROLL|wx.LB_SORT )
|
||||
ss_MidiChooserSizer_bSizer9.Add( self.m_midiFilesList_listBox2, 0, wx.EXPAND, 0 )
|
||||
|
||||
|
||||
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
|
||||
|
||||
self.m_midiBroseButton_button21 = wx.Button( self.convert_page, wx.ID_ANY, u"打开…", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
s_midiChooseSizer.Add( self.m_midiBroseButton_button21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_midiChooseSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
|
||||
|
||||
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
|
||||
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, 0 )
|
||||
self.m_outformatChoice_choice1.SetSelection( 0 )
|
||||
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
|
||||
|
||||
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
|
||||
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
|
||||
self.m_playerChoice_choice2.SetSelection( 2 )
|
||||
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_formatChooseSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
|
||||
|
||||
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
|
||||
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
|
||||
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0.01, 10, 1, 0.1 )
|
||||
self.m_speed_spinCtrlDouble.SetDigits( 2 )
|
||||
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
|
||||
|
||||
ss_commandCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"指令设置" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
ss_commandCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_oldExeFormatChecker_checkBox3 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用旧版执行指令格式", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
ss_commandCheckingSizer.Add( self.m_oldExeFormatChecker_checkBox3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_commandCheckingSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
|
||||
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
|
||||
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
|
||||
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
|
||||
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.StructureMaxHeoghtTips_.Wrap( -1 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_enteringStructureMaxHeight_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_enteringStructureMaxHeight_spinCtrl1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
|
||||
|
||||
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_promptSizer, 0, wx.SHAPED|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
|
||||
|
||||
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
|
||||
|
||||
s_StartSizer_sbSizer18.Add( ( 0, 0), 1, wx.EXPAND, 5 )
|
||||
|
||||
self.m_start_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"开始转换", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
s_StartSizer_sbSizer18.Add( self.m_start_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5 )
|
||||
|
||||
|
||||
self.convert_page.SetSizer( main_page_sizer )
|
||||
self.convert_page.Layout()
|
||||
main_page_sizer.Fit( self.convert_page )
|
||||
self.mian_notebook.AddPage( self.convert_page, u"开始转换", False )
|
||||
self.setting_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
setting_page_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
self.setting_notebook = wx.Notebook( self.setting_page, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_FIXEDWIDTH|wx.NB_MULTILINE|wx.NB_RIGHT )
|
||||
self.setting_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "@OPPOSans R" ) )
|
||||
self.setting_notebook.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
self.setting_page1 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.setting_page1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page1_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
|
||||
|
||||
setting_page1_progressbar_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
|
||||
|
||||
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
|
||||
|
||||
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"▶ %%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
|
||||
|
||||
self.m_unplayedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
|
||||
|
||||
self.m_playedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
sss_customProgressBarSizer_wSizer6.Add( setting_page1_progressbar_style, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
setting_page1_experiment_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"实验性功能" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_enable_experiment_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"启用实验性功能", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
setting_page1_experiment_style.Add( self.m_enable_experiment_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
experiment_type_choiceChoices = [ u"常规转换", u"长音插值", u"同刻偏移" ]
|
||||
self.experiment_type_choice = wx.Choice( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, experiment_type_choiceChoices, 0 )
|
||||
self.experiment_type_choice.SetSelection( 0 )
|
||||
setting_page1_experiment_style.Add( self.experiment_type_choice, 2, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_ignore_midi_error_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"忽略MIDI错误", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ignore_midi_error_checkBox.SetValue(True)
|
||||
setting_page1_experiment_style.Add( self.m_ignore_midi_error_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
|
||||
|
||||
|
||||
sss_customProgressBarSizer_wSizer6.Add( setting_page1_experiment_style, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
setting_page1_box_sizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
self.setting_page1.SetSizer( setting_page1_box_sizer )
|
||||
self.setting_page1.Layout()
|
||||
setting_page1_box_sizer.Fit( self.setting_page1 )
|
||||
self.setting_notebook.AddPage( self.setting_page1, u"基本信息", True )
|
||||
self.setting_page2 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.setting_page2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
|
||||
|
||||
setting_page2_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_pitched_instrument_table_choiceChoices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
|
||||
self.m_pitched_instrument_table_choice = wx.Choice( self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_pitched_instrument_table_choiceChoices, 0 )
|
||||
self.m_pitched_instrument_table_choice.SetSelection( 0 )
|
||||
self.m_pitched_instrument_table_choice.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page2_box_sizer.Add( self.m_pitched_instrument_table_choice, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_pitched_notes_table_propertyGrid1 = pg.PropertyGrid(self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
|
||||
self.m_pitched_notes_table_propertyGrid1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_propertyGridItem1 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器1", u"乐音乐器1" ) )
|
||||
self.m_propertyGridItem2 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器2", u"乐音乐器2" ) )
|
||||
setting_page2_box_sizer.Add( self.m_pitched_notes_table_propertyGrid1, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
|
||||
self.setting_page2.SetSizer( setting_page2_box_sizer )
|
||||
self.setting_page2.Layout()
|
||||
setting_page2_box_sizer.Fit( self.setting_page2 )
|
||||
self.setting_notebook.AddPage( self.setting_page2, u"乐音乐器对照表", False )
|
||||
self.setting_page3 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
setting_page3_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_percussion_instrument_table_choice1Choices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
|
||||
self.m_percussion_instrument_table_choice1 = wx.Choice( self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_percussion_instrument_table_choice1Choices, 0 )
|
||||
self.m_percussion_instrument_table_choice1.SetSelection( 0 )
|
||||
self.m_percussion_instrument_table_choice1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page3_box_sizer.Add( self.m_percussion_instrument_table_choice1, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
self.m_percussion_notes_table_propertyGrid11 = pg.PropertyGrid(self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
|
||||
self.m_percussion_notes_table_propertyGrid11.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_propertyGridItem11 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器1", u"打击乐器1" ) )
|
||||
self.m_propertyGridItem21 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器2", u"打击乐器2" ) )
|
||||
setting_page3_box_sizer.Add( self.m_percussion_notes_table_propertyGrid11, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
|
||||
self.setting_page3.SetSizer( setting_page3_box_sizer )
|
||||
self.setting_page3.Layout()
|
||||
setting_page3_box_sizer.Fit( self.setting_page3 )
|
||||
self.setting_notebook.AddPage( self.setting_page3, u"打击乐器对照表", False )
|
||||
|
||||
setting_page_sizer.Add( self.setting_notebook, 1, wx.EXPAND |wx.ALL, 5 )
|
||||
|
||||
|
||||
self.setting_page.SetSizer( setting_page_sizer )
|
||||
self.setting_page.Layout()
|
||||
setting_page_sizer.Fit( self.setting_page )
|
||||
self.mian_notebook.AddPage( self.setting_page, u"数据设置", True )
|
||||
|
||||
m_mainBoxSizer.Add( self.mian_notebook, 1, wx.EXPAND |wx.ALL, 5 )
|
||||
|
||||
|
||||
self.SetSizer( m_mainBoxSizer )
|
||||
self.Layout()
|
||||
|
||||
self.Centre( wx.BOTH )
|
||||
|
||||
# Connect Events
|
||||
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
|
||||
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
|
||||
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
|
||||
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
|
||||
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX, self.onFileListUpdated )
|
||||
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX_DCLICK, self.onFileDoubleClicked )
|
||||
self.m_midiBroseButton_button21.Bind( wx.EVT_BUTTON, self.openFile )
|
||||
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
|
||||
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
|
||||
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
|
||||
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
|
||||
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
|
||||
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
|
||||
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
|
||||
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
|
||||
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
|
||||
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
|
||||
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
|
||||
self.m_enteringStructureMaxHeight_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
|
||||
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
|
||||
self.m_start_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
|
||||
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
|
||||
self.m_unplayedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
|
||||
self.m_playedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def onExitButtonPressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onYanlunDClicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onYanlunWheeled( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def MidiEasterEgg( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onFileListUpdated( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onFileDoubleClicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def openFile( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onOutputFormatChosen( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPlayerChosen( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onVolumeScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onVolumeSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onSpeedScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onSpeedSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarChecked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onScoreboredNameUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onAutoResetScoreboardChecked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPlayerSelectorUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStructureMaxHeightScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStructureMaxHeightSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onBDXfileSignNameUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStartButtonPressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarBasicStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarUnplayedStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarPlayedStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
514
wxFB_Project/generated1_1.py
Normal file
514
wxFB_Project/generated1_1.py
Normal file
@@ -0,0 +1,514 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
###########################################################################
|
||||
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
## http://www.wxformbuilder.org/
|
||||
##
|
||||
## PLEASE DO *NOT* EDIT THIS FILE!
|
||||
###########################################################################
|
||||
|
||||
import wx
|
||||
import wx.xrc
|
||||
import wx.propgrid as pg
|
||||
|
||||
###########################################################################
|
||||
## Class LingLunMainFrame
|
||||
###########################################################################
|
||||
|
||||
class LingLunMainFrame ( wx.Frame ):
|
||||
|
||||
def __init__( self, parent ):
|
||||
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 660,723 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
|
||||
|
||||
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
|
||||
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
|
||||
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
|
||||
self.m_statusBar2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_menubar1 = wx.MenuBar( 0 )
|
||||
self.m_menubar1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.FileMenu = wx.Menu()
|
||||
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
|
||||
self.FileMenu.Append( self.m_Exit_menuItem1 )
|
||||
|
||||
self.m_menubar1.Append( self.FileMenu, u"文件" )
|
||||
|
||||
self.SetMenuBar( self.m_menubar1 )
|
||||
|
||||
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
|
||||
|
||||
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
|
||||
self.m_LinglunWords_staticText1.Wrap( -1 )
|
||||
|
||||
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
|
||||
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
|
||||
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
|
||||
|
||||
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
m_mainBoxSizer.Add( s_yanLunbarSizer, 0, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
|
||||
|
||||
self.mian_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.mian_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.convert_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.mian_notebook.AddPage( self.convert_page, u"开始转换", False )
|
||||
self.setting_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.mian_notebook.AddPage( self.setting_page, u"数据设置", True )
|
||||
|
||||
m_mainBoxSizer.Add( self.mian_notebook, 1, wx.EXPAND |wx.ALL, 5 )
|
||||
|
||||
|
||||
self.SetSizer( m_mainBoxSizer )
|
||||
self.Layout()
|
||||
|
||||
self.Centre( wx.BOTH )
|
||||
|
||||
# Connect Events
|
||||
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
|
||||
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
|
||||
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def onExitButtonPressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onYanlunDClicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onYanlunWheeled( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
###########################################################################
|
||||
## Class convert_page_panel
|
||||
###########################################################################
|
||||
|
||||
class convert_page_panel ( wx.Panel ):
|
||||
|
||||
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 565,540 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
|
||||
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
|
||||
|
||||
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
main_page_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self, wx.ID_ANY, u"选择MIDI文件\n(双击移除)", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
|
||||
|
||||
s_midiChooseSizer.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_midiFilesList_listBox2Choices = []
|
||||
self.m_midiFilesList_listBox2 = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_midiFilesList_listBox2Choices, wx.LB_HSCROLL|wx.LB_SORT )
|
||||
ss_MidiChooserSizer_bSizer9.Add( self.m_midiFilesList_listBox2, 0, wx.EXPAND, 0 )
|
||||
|
||||
|
||||
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
|
||||
|
||||
self.m_midiBroseButton_button21 = wx.Button( self, wx.ID_ANY, u"打开…", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
s_midiChooseSizer.Add( self.m_midiBroseButton_button21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_midiChooseSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
|
||||
|
||||
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
|
||||
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, 0 )
|
||||
self.m_outformatChoice_choice1.SetSelection( 0 )
|
||||
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
|
||||
|
||||
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
|
||||
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
|
||||
self.m_playerChoice_choice2.SetSelection( 2 )
|
||||
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_formatChooseSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
|
||||
|
||||
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
|
||||
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
|
||||
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0.01, 10, 1, 0.1 )
|
||||
self.m_speed_spinCtrlDouble.SetDigits( 2 )
|
||||
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 0, wx.EXPAND, 5 )
|
||||
|
||||
ss_commandCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"指令设置" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
ss_commandCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_oldExeFormatChecker_checkBox3 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用旧版执行指令格式", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
ss_commandCheckingSizer.Add( self.m_oldExeFormatChecker_checkBox3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_commandCheckingSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
|
||||
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
|
||||
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
|
||||
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
|
||||
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.StructureMaxHeoghtTips_.Wrap( -1 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_enteringStructureMaxHeight_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_enteringStructureMaxHeight_spinCtrl1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
|
||||
|
||||
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_promptSizer, 0, wx.SHAPED|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
|
||||
|
||||
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
|
||||
|
||||
s_StartSizer_sbSizer18.Add( ( 0, 0), 1, wx.EXPAND, 5 )
|
||||
|
||||
self.m_start_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"开始转换", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
s_StartSizer_sbSizer18.Add( self.m_start_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5 )
|
||||
|
||||
|
||||
self.SetSizer( main_page_sizer )
|
||||
self.Layout()
|
||||
|
||||
# Connect Events
|
||||
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
|
||||
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX, self.onFileListUpdated )
|
||||
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX_DCLICK, self.onFileDoubleClicked )
|
||||
self.m_midiBroseButton_button21.Bind( wx.EVT_BUTTON, self.openFile )
|
||||
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
|
||||
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
|
||||
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
|
||||
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
|
||||
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
|
||||
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
|
||||
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
|
||||
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
|
||||
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
|
||||
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
|
||||
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
|
||||
self.m_enteringStructureMaxHeight_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
|
||||
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
|
||||
self.m_start_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def MidiEasterEgg( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onFileListUpdated( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onFileDoubleClicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def openFile( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onOutputFormatChosen( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPlayerChosen( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onVolumeScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onVolumeSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onSpeedScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onSpeedSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarChecked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onScoreboredNameUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onAutoResetScoreboardChecked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPlayerSelectorUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStructureMaxHeightScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStructureMaxHeightSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onBDXfileSignNameUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStartButtonPressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
###########################################################################
|
||||
## Class setting_page_pannel
|
||||
###########################################################################
|
||||
|
||||
class setting_page_pannel ( wx.Panel ):
|
||||
|
||||
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 565,540 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
|
||||
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
|
||||
|
||||
setting_page_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
self.setting_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_FIXEDWIDTH|wx.NB_MULTILINE|wx.NB_RIGHT )
|
||||
self.setting_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "@OPPOSans R" ) )
|
||||
self.setting_notebook.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
self.setting_page1 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.setting_page1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page1_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
|
||||
|
||||
setting_page1_progressbar_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
|
||||
|
||||
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
|
||||
|
||||
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"▶ %%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
|
||||
|
||||
self.m_unplayedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
|
||||
|
||||
self.m_playedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
sss_customProgressBarSizer_wSizer6.Add( setting_page1_progressbar_style, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
setting_page1_experiment_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"实验性功能" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_enable_experiment_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"启用实验性功能", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
setting_page1_experiment_style.Add( self.m_enable_experiment_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
experiment_type_choiceChoices = [ u"常规转换", u"长音插值", u"同刻偏移" ]
|
||||
self.experiment_type_choice = wx.Choice( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, experiment_type_choiceChoices, 0 )
|
||||
self.experiment_type_choice.SetSelection( 0 )
|
||||
setting_page1_experiment_style.Add( self.experiment_type_choice, 2, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_ignore_midi_error_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"忽略MIDI错误", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ignore_midi_error_checkBox.SetValue(True)
|
||||
setting_page1_experiment_style.Add( self.m_ignore_midi_error_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
|
||||
|
||||
|
||||
sss_customProgressBarSizer_wSizer6.Add( setting_page1_experiment_style, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
setting_page1_box_sizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
self.setting_page1.SetSizer( setting_page1_box_sizer )
|
||||
self.setting_page1.Layout()
|
||||
setting_page1_box_sizer.Fit( self.setting_page1 )
|
||||
self.setting_notebook.AddPage( self.setting_page1, u"基本信息", True )
|
||||
self.setting_page2 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.setting_page2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
|
||||
|
||||
setting_page2_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_pitched_instrument_table_choiceChoices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
|
||||
self.m_pitched_instrument_table_choice = wx.Choice( self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_pitched_instrument_table_choiceChoices, 0 )
|
||||
self.m_pitched_instrument_table_choice.SetSelection( 0 )
|
||||
self.m_pitched_instrument_table_choice.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page2_box_sizer.Add( self.m_pitched_instrument_table_choice, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_pitched_notes_table_propertyGrid1 = pg.PropertyGrid(self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
|
||||
self.m_pitched_notes_table_propertyGrid1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_propertyGridItem1 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器1", u"乐音乐器1" ) )
|
||||
self.m_propertyGridItem2 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器2", u"乐音乐器2" ) )
|
||||
setting_page2_box_sizer.Add( self.m_pitched_notes_table_propertyGrid1, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
|
||||
self.setting_page2.SetSizer( setting_page2_box_sizer )
|
||||
self.setting_page2.Layout()
|
||||
setting_page2_box_sizer.Fit( self.setting_page2 )
|
||||
self.setting_notebook.AddPage( self.setting_page2, u"乐音乐器对照表", False )
|
||||
self.setting_page3 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
setting_page3_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_percussion_instrument_table_choice1Choices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
|
||||
self.m_percussion_instrument_table_choice1 = wx.Choice( self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_percussion_instrument_table_choice1Choices, 0 )
|
||||
self.m_percussion_instrument_table_choice1.SetSelection( 0 )
|
||||
self.m_percussion_instrument_table_choice1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page3_box_sizer.Add( self.m_percussion_instrument_table_choice1, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
self.m_percussion_notes_table_propertyGrid11 = pg.PropertyGrid(self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
|
||||
self.m_percussion_notes_table_propertyGrid11.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_propertyGridItem11 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器1", u"打击乐器1" ) )
|
||||
self.m_propertyGridItem21 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器2", u"打击乐器2" ) )
|
||||
setting_page3_box_sizer.Add( self.m_percussion_notes_table_propertyGrid11, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
|
||||
self.setting_page3.SetSizer( setting_page3_box_sizer )
|
||||
self.setting_page3.Layout()
|
||||
setting_page3_box_sizer.Fit( self.setting_page3 )
|
||||
self.setting_notebook.AddPage( self.setting_page3, u"打击乐器对照表", False )
|
||||
|
||||
setting_page_sizer.Add( self.setting_notebook, 1, wx.EXPAND |wx.ALL, 5 )
|
||||
|
||||
|
||||
self.SetSizer( setting_page_sizer )
|
||||
self.Layout()
|
||||
|
||||
# Connect Events
|
||||
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
|
||||
self.m_unplayedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
|
||||
self.m_playedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def onProgressbarBasicStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarUnplayedStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarPlayedStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
612
wxFB_Project/generated1_2.py
Normal file
612
wxFB_Project/generated1_2.py
Normal file
@@ -0,0 +1,612 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
###########################################################################
|
||||
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
## http://www.wxformbuilder.org/
|
||||
##
|
||||
## PLEASE DO *NOT* EDIT THIS FILE!
|
||||
###########################################################################
|
||||
|
||||
import wx
|
||||
import wx.xrc
|
||||
import wx.propgrid as pg
|
||||
|
||||
###########################################################################
|
||||
## Class LingLunMainFrame
|
||||
###########################################################################
|
||||
|
||||
class LingLunMainFrame ( wx.Frame ):
|
||||
|
||||
def __init__( self, parent ):
|
||||
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 660,723 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
|
||||
|
||||
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
|
||||
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
|
||||
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
|
||||
self.m_statusBar2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_menubar1 = wx.MenuBar( 0 )
|
||||
self.m_menubar1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.FileMenu = wx.Menu()
|
||||
self.m_ClearSetting_menuItem2 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"重置设置", u"将全部数据设置重置为默认值(下次启动时生效)", wx.ITEM_CHECK )
|
||||
self.FileMenu.Append( self.m_ClearSetting_menuItem2 )
|
||||
|
||||
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
|
||||
self.FileMenu.Append( self.m_Exit_menuItem1 )
|
||||
|
||||
self.m_menubar1.Append( self.FileMenu, u"文件" )
|
||||
|
||||
self.SetMenuBar( self.m_menubar1 )
|
||||
|
||||
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
|
||||
|
||||
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
|
||||
self.m_LinglunWords_staticText1.Wrap( -1 )
|
||||
|
||||
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
|
||||
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
|
||||
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
|
||||
|
||||
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
m_mainBoxSizer.Add( s_yanLunbarSizer, 0, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
|
||||
|
||||
self.mian_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.mian_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.convert_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.mian_notebook.AddPage( self.convert_page, u"开始转换", True )
|
||||
self.setting_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.mian_notebook.AddPage( self.setting_page, u"数据设置", False )
|
||||
|
||||
m_mainBoxSizer.Add( self.mian_notebook, 1, wx.EXPAND |wx.ALL, 5 )
|
||||
|
||||
|
||||
self.SetSizer( m_mainBoxSizer )
|
||||
self.Layout()
|
||||
|
||||
self.Centre( wx.BOTH )
|
||||
|
||||
# Connect Events
|
||||
self.Bind( wx.EVT_MENU, self.onResetSettingButtonSelection, id = self.m_ClearSetting_menuItem2.GetId() )
|
||||
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
|
||||
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
|
||||
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def onResetSettingButtonSelection( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onExitButtonPressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onYanlunDClicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onYanlunWheeled( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
###########################################################################
|
||||
## Class ConvertPagePanel
|
||||
###########################################################################
|
||||
|
||||
class ConvertPagePanel ( wx.Panel ):
|
||||
|
||||
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 652,588 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
|
||||
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
|
||||
|
||||
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
main_page_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
MidiChooser_Delete_and_Tips_bSizer15 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self, wx.ID_ANY, u"选择MIDI文件\n(双击移除)", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
|
||||
|
||||
MidiChooser_Delete_and_Tips_bSizer15.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
|
||||
|
||||
self.m_done_then_remove_checkBox6 = wx.CheckBox( self, wx.ID_ANY, u"完成后移除", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
MidiChooser_Delete_and_Tips_bSizer15.Add( self.m_done_then_remove_checkBox6, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
s_midiChooseSizer.Add( MidiChooser_Delete_and_Tips_bSizer15, 0, wx.SHAPED|wx.EXPAND, 0 )
|
||||
|
||||
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_midiFilesList_listBox2Choices = []
|
||||
self.m_midiFilesList_listBox2 = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_midiFilesList_listBox2Choices, wx.LB_HSCROLL|wx.LB_SORT )
|
||||
ss_MidiChooserSizer_bSizer9.Add( self.m_midiFilesList_listBox2, 1, wx.EXPAND, 0 )
|
||||
|
||||
|
||||
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
|
||||
|
||||
MidiChooser_Open_and_Clear_Buttons_bSizer16 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
self.m_midiBroseButton_button21 = wx.Button( self, wx.ID_ANY, u"打开…", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
MidiChooser_Open_and_Clear_Buttons_bSizer16.Add( self.m_midiBroseButton_button21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_midiChooser_Clear_button3 = wx.Button( self, wx.ID_ANY, u"清空文件", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
MidiChooser_Open_and_Clear_Buttons_bSizer16.Add( self.m_midiChooser_Clear_button3, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
s_midiChooseSizer.Add( MidiChooser_Open_and_Clear_Buttons_bSizer16, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_midiChooseSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
|
||||
|
||||
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
|
||||
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, 0 )
|
||||
self.m_outformatChoice_choice1.SetSelection( 0 )
|
||||
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
|
||||
|
||||
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
|
||||
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
|
||||
self.m_playerChoice_choice2.SetSelection( 2 )
|
||||
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_formatChooseSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
|
||||
|
||||
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
|
||||
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
|
||||
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0.01, 10, 1, 0.1 )
|
||||
self.m_speed_spinCtrlDouble.SetDigits( 2 )
|
||||
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 0, wx.EXPAND, 5 )
|
||||
|
||||
ss_commandCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"指令设置" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
ss_commandCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_oldExeFormatChecker_checkBox3 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用旧版执行指令格式", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
ss_commandCheckingSizer.Add( self.m_oldExeFormatChecker_checkBox3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_commandCheckingSizer, 0, wx.EXPAND, 5 )
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
|
||||
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
|
||||
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
|
||||
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
|
||||
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
|
||||
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
|
||||
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.StructureMaxHeoghtTips_.Wrap( -1 )
|
||||
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
|
||||
|
||||
self.m_enteringStructureMaxHeight_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
|
||||
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_enteringStructureMaxHeight_spinCtrl1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
|
||||
|
||||
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 0, wx.SHAPED|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 0, wx.EXPAND, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_promptSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED, 5 )
|
||||
|
||||
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
|
||||
|
||||
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
|
||||
ss_Midi_Convert_distPath_bSizer17 = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
ss_Dest_chooser_Sizer_in_bSizer18 = wx.BoxSizer( wx.HORIZONTAL )
|
||||
|
||||
self.m_tip_Change_Dest_staticText7 = wx.StaticText( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"指定输出路径", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_tip_Change_Dest_staticText7.Wrap( -1 )
|
||||
|
||||
ss_Dest_chooser_Sizer_in_bSizer18.Add( self.m_tip_Change_Dest_staticText7, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
|
||||
|
||||
self.m_Convertion_Destination_Picker_dirPicker1 = wx.DirPickerCtrl( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"./", u"选择目标目录", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
|
||||
ss_Dest_chooser_Sizer_in_bSizer18.Add( self.m_Convertion_Destination_Picker_dirPicker1, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
ss_Midi_Convert_distPath_bSizer17.Add( ss_Dest_chooser_Sizer_in_bSizer18, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_Check_Every_Their_Path_checkBox7 = wx.CheckBox( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"输出到每个文件所在目录", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_Check_Every_Their_Path_checkBox7.SetValue(True)
|
||||
ss_Midi_Convert_distPath_bSizer17.Add( self.m_Check_Every_Their_Path_checkBox7, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
s_StartSizer_sbSizer18.Add( ss_Midi_Convert_distPath_bSizer17, 1, wx.EXPAND, 5 )
|
||||
|
||||
self.m_start_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"开始转换", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
s_StartSizer_sbSizer18.Add( self.m_start_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
|
||||
|
||||
|
||||
main_page_sizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
self.SetSizer( main_page_sizer )
|
||||
self.Layout()
|
||||
|
||||
# Connect Events
|
||||
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
|
||||
self.m_done_then_remove_checkBox6.Bind( wx.EVT_CHECKBOX, self.on_Done_Then_Remove_Clicked )
|
||||
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX, self.onFileListUpdated )
|
||||
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX_DCLICK, self.onFileDoubleClicked )
|
||||
self.m_midiBroseButton_button21.Bind( wx.EVT_BUTTON, self.openFile )
|
||||
self.m_midiChooser_Clear_button3.Bind( wx.EVT_BUTTON, self.on_Chooer_Clear_Button_Pressed )
|
||||
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
|
||||
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
|
||||
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
|
||||
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
|
||||
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
|
||||
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
|
||||
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
|
||||
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
|
||||
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
|
||||
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
|
||||
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
|
||||
self.m_enteringStructureMaxHeight_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
|
||||
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
|
||||
self.m_tip_Change_Dest_staticText7.Bind( wx.EVT_LEFT_DCLICK, self.on_Change_to_Default_Path )
|
||||
self.m_Convertion_Destination_Picker_dirPicker1.Bind( wx.EVT_DIRPICKER_CHANGED, self.on_Convert_Dest_Changed )
|
||||
self.m_Check_Every_Their_Path_checkBox7.Bind( wx.EVT_CHECKBOX, self.On_Their_Path_Checked )
|
||||
self.m_start_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def MidiEasterEgg( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def on_Done_Then_Remove_Clicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onFileListUpdated( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onFileDoubleClicked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def openFile( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def on_Chooer_Clear_Button_Pressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onOutputFormatChosen( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPlayerChosen( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onVolumeScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onVolumeSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onSpeedScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onSpeedSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarChecked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onScoreboredNameUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onAutoResetScoreboardChecked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPlayerSelectorUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStructureMaxHeightScrolling( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStructureMaxHeightSpinChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onBDXfileSignNameUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def on_Change_to_Default_Path( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def on_Convert_Dest_Changed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def On_Their_Path_Checked( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onStartButtonPressed( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
###########################################################################
|
||||
## Class SettingPagePannel
|
||||
###########################################################################
|
||||
|
||||
class SettingPagePannel ( wx.Panel ):
|
||||
|
||||
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 565,540 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
|
||||
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
|
||||
|
||||
setting_page_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
self.setting_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_FIXEDWIDTH|wx.NB_MULTILINE|wx.NB_RIGHT )
|
||||
self.setting_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "@OPPOSans R" ) )
|
||||
self.setting_notebook.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
||||
|
||||
self.setting_page1 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.setting_page1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page1_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
|
||||
|
||||
setting_page1_progressbar_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
|
||||
|
||||
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
|
||||
|
||||
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"▶ %%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
|
||||
|
||||
self.m_unplayedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
|
||||
|
||||
self.m_playedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
|
||||
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
|
||||
|
||||
|
||||
setting_page1_progressbar_style.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
sss_customProgressBarSizer_wSizer6.Add( setting_page1_progressbar_style, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
setting_page1_experiment_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"实验性功能" ), wx.HORIZONTAL )
|
||||
|
||||
self.m_enable_experiment_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"启用实验性功能", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
setting_page1_experiment_style.Add( self.m_enable_experiment_checkBox, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
experiment_type_choiceChoices = [ u"常规转换", u"长音插值", u"同刻偏移" ]
|
||||
self.experiment_type_choice = wx.Choice( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, experiment_type_choiceChoices, 0 )
|
||||
self.experiment_type_choice.SetSelection( 0 )
|
||||
setting_page1_experiment_style.Add( self.experiment_type_choice, 2, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_ignore_midi_error_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"忽略MIDI错误", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
self.m_ignore_midi_error_checkBox.SetValue(True)
|
||||
setting_page1_experiment_style.Add( self.m_ignore_midi_error_checkBox, 1, wx.ALL, 5 )
|
||||
|
||||
|
||||
sss_customProgressBarSizer_wSizer6.Add( setting_page1_experiment_style, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
setting_page1_box_sizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
self.setting_page1.SetSizer( setting_page1_box_sizer )
|
||||
self.setting_page1.Layout()
|
||||
setting_page1_box_sizer.Fit( self.setting_page1 )
|
||||
self.setting_notebook.AddPage( self.setting_page1, u"基本信息", True )
|
||||
self.setting_page2 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
self.setting_page2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
|
||||
|
||||
setting_page2_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_pitched_instrument_table_choiceChoices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
|
||||
self.m_pitched_instrument_table_choice = wx.Choice( self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_pitched_instrument_table_choiceChoices, 0 )
|
||||
self.m_pitched_instrument_table_choice.SetSelection( 0 )
|
||||
self.m_pitched_instrument_table_choice.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page2_box_sizer.Add( self.m_pitched_instrument_table_choice, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_pitched_notes_table_propertyGrid1 = pg.PropertyGrid(self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
|
||||
self.m_pitched_notes_table_propertyGrid1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_propertyGridItem1 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器1", u"乐音乐器1" ) )
|
||||
self.m_propertyGridItem2 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器2", u"乐音乐器2" ) )
|
||||
setting_page2_box_sizer.Add( self.m_pitched_notes_table_propertyGrid1, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
self.setting_page2.SetSizer( setting_page2_box_sizer )
|
||||
self.setting_page2.Layout()
|
||||
setting_page2_box_sizer.Fit( self.setting_page2 )
|
||||
self.setting_notebook.AddPage( self.setting_page2, u"乐音乐器对照表", False )
|
||||
self.setting_page3 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
|
||||
setting_page3_box_sizer = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
m_percussion_instrument_table_choice1Choices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
|
||||
self.m_percussion_instrument_table_choice1 = wx.Choice( self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_percussion_instrument_table_choice1Choices, 0 )
|
||||
self.m_percussion_instrument_table_choice1.SetSelection( 0 )
|
||||
self.m_percussion_instrument_table_choice1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
setting_page3_box_sizer.Add( self.m_percussion_instrument_table_choice1, 0, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
self.m_percussion_notes_table_propertyGrid11 = pg.PropertyGrid(self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
|
||||
self.m_percussion_notes_table_propertyGrid11.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
|
||||
|
||||
self.m_propertyGridItem11 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器1", u"打击乐器1" ) )
|
||||
self.m_propertyGridItem21 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器2", u"打击乐器2" ) )
|
||||
setting_page3_box_sizer.Add( self.m_percussion_notes_table_propertyGrid11, 1, wx.ALL|wx.EXPAND, 5 )
|
||||
|
||||
|
||||
self.setting_page3.SetSizer( setting_page3_box_sizer )
|
||||
self.setting_page3.Layout()
|
||||
setting_page3_box_sizer.Fit( self.setting_page3 )
|
||||
self.setting_notebook.AddPage( self.setting_page3, u"打击乐器对照表", False )
|
||||
|
||||
setting_page_sizer.Add( self.setting_notebook, 1, wx.EXPAND |wx.ALL, 5 )
|
||||
|
||||
|
||||
self.SetSizer( setting_page_sizer )
|
||||
self.Layout()
|
||||
|
||||
# Connect Events
|
||||
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
|
||||
self.m_unplayedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
|
||||
self.m_playedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
|
||||
self.m_enable_experiment_checkBox.Bind( wx.EVT_CHECKBOX, self.onExperimentEnableUpdating )
|
||||
self.experiment_type_choice.Bind( wx.EVT_CHOICE, self.onConvertMethodUpdating )
|
||||
self.m_ignore_midi_error_checkBox.Bind( wx.EVT_CHECKBOX, self.onMidiFaultIgnoranceChecking )
|
||||
self.m_pitched_instrument_table_choice.Bind( wx.EVT_CHOICE, self.onPitchedInstListChanging )
|
||||
self.m_pitched_notes_table_propertyGrid1.Bind( pg.EVT_PG_CHANGED, self.onPitchedInstTableChanged )
|
||||
self.m_pitched_notes_table_propertyGrid1.Bind( pg.EVT_PG_CHANGING, self.onPitchedInstTableChanging )
|
||||
self.m_percussion_instrument_table_choice1.Bind( wx.EVT_CHOICE, self.onPercussionInstListChanging )
|
||||
self.m_percussion_notes_table_propertyGrid11.Bind( pg.EVT_PG_CHANGED, self.onPercussionInstTableChanged )
|
||||
self.m_percussion_notes_table_propertyGrid11.Bind( pg.EVT_PG_CHANGING, self.onPercussionInstTableChanging )
|
||||
|
||||
def __del__( self ):
|
||||
pass
|
||||
|
||||
|
||||
# Virtual event handlers, override them in your derived class
|
||||
def onProgressbarBasicStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarUnplayedStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onProgressbarPlayedStyleUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onExperimentEnableUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onConvertMethodUpdating( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onMidiFaultIgnoranceChecking( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPitchedInstListChanging( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPitchedInstTableChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPitchedInstTableChanging( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPercussionInstListChanging( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPercussionInstTableChanged( self, event ):
|
||||
event.Skip()
|
||||
|
||||
def onPercussionInstTableChanging( self, event ):
|
||||
event.Skip()
|
||||
|
||||
|
||||
215
wxFB_Project/noname-ap.py
Normal file
215
wxFB_Project/noname-ap.py
Normal file
@@ -0,0 +1,215 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
###########################################################################
|
||||
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
## http://www.wxformbuilder.org/
|
||||
##
|
||||
## PLEASE DO *NOT* EDIT THIS FILE!
|
||||
###########################################################################
|
||||
|
||||
import wx
|
||||
import wx.xrc
|
||||
import wx.media
|
||||
|
||||
###########################################################################
|
||||
## Class LingLunAuthorPageFrame
|
||||
###########################################################################
|
||||
|
||||
|
||||
class LingLunAuthorPageFrame(wx.Frame):
|
||||
|
||||
def __init__(self, parent):
|
||||
wx.Frame.__init__(
|
||||
self,
|
||||
parent,
|
||||
id=wx.ID_ANY,
|
||||
title=wx.EmptyString,
|
||||
pos=wx.DefaultPosition,
|
||||
size=wx.Size(610, 560),
|
||||
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
|
||||
)
|
||||
|
||||
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
||||
|
||||
mian_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
self.m_listbook1 = wx.Listbook(
|
||||
self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LB_RIGHT
|
||||
)
|
||||
self.trim_pannel = wx.Panel(
|
||||
self.m_listbook1,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TAB_TRAVERSAL,
|
||||
)
|
||||
what_we_called_trim_org = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
bSizer2 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
self.m_TriMO_Theme_mediaCtrl1 = wx.media.MediaCtrl(
|
||||
self.trim_pannel,
|
||||
wx.ID_ANY,
|
||||
wx.EmptyString,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
)
|
||||
self.m_TriMO_Theme_mediaCtrl1.Load("TriMO_Theme.mp4")
|
||||
self.m_TriMO_Theme_mediaCtrl1.SetPlaybackRate(1)
|
||||
self.m_TriMO_Theme_mediaCtrl1.SetVolume(1)
|
||||
self.m_TriMO_Theme_mediaCtrl1.ShowPlayerControls(
|
||||
wx.media.MEDIACTRLPLAYERCONTROLS_VOLUME
|
||||
)
|
||||
|
||||
self.m_TriMO_Theme_mediaCtrl1.Play()
|
||||
bSizer2.Add(self.m_TriMO_Theme_mediaCtrl1, 1, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText1 = wx.StaticText(
|
||||
self.trim_pannel, wx.ID_ANY, "™", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
self.m_staticText1.Wrap(-1)
|
||||
|
||||
bSizer2.Add(self.m_staticText1, 0, wx.ALL, 5)
|
||||
|
||||
what_we_called_trim_org.Add(bSizer2, 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText2 = wx.StaticText(
|
||||
self.trim_pannel,
|
||||
wx.ID_ANY,
|
||||
"睿乐 - 我的世界多媒体组织\nTriM Org - Minecraft Muti-Media Organization ",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText2.Wrap(-1)
|
||||
|
||||
what_we_called_trim_org.Add(self.m_staticText2, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_textCtrl1 = wx.TextCtrl(
|
||||
self.trim_pannel,
|
||||
wx.ID_ANY,
|
||||
"\t嗨~\n\t我们是 睿乐组织(TriMO, 全称 Minecraft Muti-Media Organization),意为“我的世界多媒体组织”。\n\t我们组织的主要活动是一些有关我的世界与多媒体相关的程序项目,例如伶伦(我的世界数字音频工作站),我的世界视频播放制作器(MVP)等。\n\t我们组织也会尝试开发一些跟人工智能、音乐、数字音频工作站(DAW)等相关的内容,不仅限于我的世界相关内容的开发。\n\t我们欢迎任何有相关兴趣的同志加入组织或者提交你的PR、创建你的issues、提出意见和建议!\n\n电邮:mailto:TriM-Organization@hotmail.com\nQ群:861684859 https://jq.qq.com/?_wv=1027&k=hpeRxrYr",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TE_AUTO_URL | wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY,
|
||||
)
|
||||
what_we_called_trim_org.Add(self.m_textCtrl1, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.trim_pannel.SetSizer(what_we_called_trim_org)
|
||||
self.trim_pannel.Layout()
|
||||
what_we_called_trim_org.Fit(self.trim_pannel)
|
||||
self.m_listbook1.AddPage(self.trim_pannel, "睿乐组织", True)
|
||||
self.eilles_pannel = wx.Panel(
|
||||
self.m_listbook1,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TAB_TRAVERSAL,
|
||||
)
|
||||
bSizer3 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
bSizer4 = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
self.m_bitmap1 = wx.StaticBitmap(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
wx.Bitmap("../resources/金羿ELSV4.png", wx.BITMAP_TYPE_ANY),
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
0,
|
||||
)
|
||||
bSizer4.Add(self.m_bitmap1, 1, wx.ALL, 5)
|
||||
|
||||
self.m_staticText21 = wx.StaticText(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
"金羿ELS\nEilles ",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText21.Wrap(-1)
|
||||
|
||||
bSizer4.Add(self.m_staticText21, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_textCtrl11 = wx.TextCtrl(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
"我的世界基岩版指令作者,个人开发者,B 站不知名 UP 主……",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TE_AUTO_URL | wx.TE_BESTWRAP | wx.TE_READONLY,
|
||||
)
|
||||
bSizer4.Add(self.m_textCtrl11, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
bSizer3.Add(bSizer4, 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText11 = wx.StaticText(
|
||||
self.eilles_pannel, wx.ID_ANY, "™", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
self.m_staticText11.Wrap(-1)
|
||||
|
||||
bSizer3.Add(self.m_staticText11, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.eilles_pannel.SetSizer(bSizer3)
|
||||
self.eilles_pannel.Layout()
|
||||
bSizer3.Fit(self.eilles_pannel)
|
||||
self.m_listbook1.AddPage(self.eilles_pannel, "金羿ELS", False)
|
||||
self.bgarray_pannel = wx.Panel(
|
||||
self.m_listbook1,
|
||||
wx.ID_ANY,
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TAB_TRAVERSAL,
|
||||
)
|
||||
bSizer31 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
bSizer41 = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
bSizer41.Add((0, 0), 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText211 = wx.StaticText(
|
||||
self.bgarray_pannel,
|
||||
wx.ID_ANY,
|
||||
"诸葛亮与八卦阵\nBgArray",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.ALIGN_CENTER_HORIZONTAL,
|
||||
)
|
||||
self.m_staticText211.Wrap(-1)
|
||||
|
||||
bSizer41.Add(self.m_staticText211, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.m_textCtrl111 = wx.TextCtrl(
|
||||
self.bgarray_pannel,
|
||||
wx.ID_ANY,
|
||||
"我的世界基岩版玩家,喜欢编程和音乐。",
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
wx.TE_AUTO_URL | wx.TE_BESTWRAP | wx.TE_READONLY,
|
||||
)
|
||||
bSizer41.Add(self.m_textCtrl111, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
bSizer31.Add(bSizer41, 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText111 = wx.StaticText(
|
||||
self.bgarray_pannel, wx.ID_ANY, "™", wx.DefaultPosition, wx.DefaultSize, 0
|
||||
)
|
||||
self.m_staticText111.Wrap(-1)
|
||||
|
||||
bSizer31.Add(self.m_staticText111, 0, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
self.bgarray_pannel.SetSizer(bSizer31)
|
||||
self.bgarray_pannel.Layout()
|
||||
bSizer31.Fit(self.bgarray_pannel)
|
||||
self.m_listbook1.AddPage(self.bgarray_pannel, "诸葛八卦", False)
|
||||
|
||||
mian_sizer.Add(self.m_listbook1, 1, wx.EXPAND | wx.ALL, 5)
|
||||
|
||||
self.SetSizer(mian_sizer)
|
||||
self.Layout()
|
||||
|
||||
self.Centre(wx.BOTH)
|
||||
|
||||
def __del__(self):
|
||||
pass
|
||||
1318
wxFB_Project/noname.py
Normal file
1318
wxFB_Project/noname.py
Normal file
File diff suppressed because it is too large
Load Diff
25
自我陶醉.py
Normal file
25
自我陶醉.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- conding: utf8 -*-
|
||||
|
||||
import os
|
||||
|
||||
m = 0
|
||||
|
||||
for path, dir_list, file_list in os.walk(r"./"):
|
||||
if (r".venv" in path) or (r"wxFB_Project" in path):
|
||||
continue
|
||||
for file_name in file_list:
|
||||
if file_name.endswith(".py"):
|
||||
file = os.path.join(path, file_name)
|
||||
print("得到文件名:" + str(file))
|
||||
for i in open(file, "r", encoding="utf-8"):
|
||||
code = i.strip()
|
||||
|
||||
if code.startswith("#"):
|
||||
pass
|
||||
elif code:
|
||||
print("\t" + code)
|
||||
m += 1
|
||||
else:
|
||||
pass
|
||||
|
||||
input("\n最终代码行数为:" + str(m))
|
||||
Reference in New Issue
Block a user