支持WebSocket播放……

This commit is contained in:
EillesWan 2024-05-02 00:29:21 +08:00
parent 2f08ef99f9
commit a56e85a043
23 changed files with 7293 additions and 645 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ __pycache__/
/logs
*.llc.config
/MSCT
/fcwslib
salt.py

View File

@ -6,24 +6,23 @@
4. 若存在对于伶伦包含的部分代码的特殊开源声明,则此部分代码依照其特定的开源方式授权,但若此部分代码经由此部分代码的主要开发者一致特殊授权后商用,则授权对象在商用时依照此部分的开发者所准许的方式(或条款)进行商用,或默认依照 Apache2.0 协议进行商业化使用
5. Apache2.0 协议的英文原文副本可见下文
> The English Translation of the TERMS AND CONDITIONS above is listed below
> The English Translation of the TERMS AND CONDITIONS above is listed below
>
> This translated version is for reference only and has no legal effect.
> This translated version is for reference only and has no legal effect.
>
> The version with legal effect is the Chinese version above.
> 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. _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
@ -216,4 +215,4 @@
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.
```
```

View File

@ -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//TriM-Organization/Linglun-Converter?style=for-the-badge -->
[license]: https://img.shields.io/badge/Licence-Apache-228B22?style=for-the-badge

View File

@ -361,14 +361,14 @@ for singleMidi in midis:
out_path,
*prompts[:2],
progressbar=(
((style, (done_part, yet_part)) if costom_pgb_enabled else True) # type: ignore
((style, (done_part, yet_part)) if costom_pgb_enabled else True) # type: ignore
if prompts[2]
else False
),
)
conversion_result = (
(cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
(cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
if output_file_format == 0
else (
(
@ -377,14 +377,14 @@ for singleMidi in midis:
else to_BDX_file_in_delay(cvt_mid, cvt_cfg, *prompts[3:])
)
if output_file_format == 1
else (cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
else (cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
)
)
prt(
f" 结构大小:{conversion_result[0]},播放刻数:{conversion_result[1]}"
if output_file_format == 2
else f" 指令总长:{conversion_result[0]},播放刻数:{conversion_result[1]}{f''',结构大小:{conversion_result[2]},末点坐标:{conversion_result[3]}''' if output_file_format == 1 else ''}" # type: ignore
else f" 指令总长:{conversion_result[0]},播放刻数:{conversion_result[1]}{f''',结构大小:{conversion_result[2]},末点坐标:{conversion_result[3]}''' if output_file_format == 1 else ''}" # type: ignore
)
exitSth = ipt("结束。换行以退出程序。")

View File

@ -55,7 +55,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 +97,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]]]] = {}

View File

@ -16,9 +16,12 @@ Terms & Conditions: ./Lisense.md
import os
import random
import sys
import threading
# from types import ModuleType
import requests
# import requests
if sys.argv:
if "-l" in sys.argv:
@ -31,37 +34,32 @@ if sys.argv:
import Musicreater
import Musicreater.experiment as Musicreater_experiment
import Musicreater.plugin as Musicreater_plugin
from Musicreater.plugin import ConvertConfig
import Musicreater.plugin
from Musicreater.plugin.addonpack import (
to_addon_pack_in_delay,
to_addon_pack_in_repeater,
to_addon_pack_in_score,
)
from Musicreater.plugin.websocket import to_websocket_server
from Musicreater.plugin.bdxfile import to_BDX_file_in_delay, to_BDX_file_in_score
import wx
import wx.xrc
import wx.propgrid as pg
from utils.io import (
myWords,
logger,
object_constants,
log__init__,
TrimLog
)
from utils.io import logger, object_constants, log__init__, TrimLog
from utils.yanlun import yanlun_texts, yanlun_fg_colour, yanlun_bg_colour
from utils.authorp import go_author_page
from utils.update_check import check_update_release
from utils.packdata import enpack_llc_pack, unpack_llc_pack, load_msct_packed_data
from utils.webview import go_update_tip
WHITE = (242, 244, 246) # F2F4F6
WHITE2 = (248, 252, 255)
# WHITE2 = (248, 252, 255)
# WHITE3 = (233, 236, 240)
BLACK = (18, 17, 16) # 121110
BLACK2 = (9, 12, 14)
# BLACK2 = (9, 12, 14)
# BLACK3 = (0, 2, 6)
# WHITE = (18, 17, 16) # F2F4F6
@ -71,8 +69,8 @@ BLACK2 = (9, 12, 14)
__appname__ = "伶伦转换器"
__version__ = "WXGUI 1.1.1"
__zhver__ = "WX图形界面 初代首版第一次修订"
__version__ = "WXGUI 1.2.0"
__zhver__ = "WX图形界面 初代次版"
logger.info("检查更新")
@ -88,11 +86,15 @@ down_paths = check_update_release(
if down_paths:
wx.LaunchDefaultBrowser("https://gitee.com{}".format([v for i,v in down_paths.items() if sys.platform in i][0]))
wx.LaunchDefaultBrowser(
"https://gitee.com{}".format(
[v for i, v in down_paths.items() if sys.platform in i][0]
)
)
exit()
# go_update_tip("点击下方链接下载更新:",'<a href="https://gitee.com{}">点击此处下载</a>'.format(list(down_paths.values())[0]))
"""
msct_main = msct_plugin = msct_plugin_function = None
if os.path.exists("./MSCT/Musicreater.llc.pack"):
@ -267,11 +269,11 @@ if down_paths:
to_BDX_file_in_delay,
to_BDX_file_in_score,
) = msct_plugin_function
"""
logger.info("注册变量并读取内容……")
pgb_style: Musicreater.ProgressBarStyle = Musicreater.DEFAULT_PROGRESSBAR_STYLE.copy() # type: ignore
on_exit_saving: bool = True
ignore_midi_mismatch_error: bool = True
@ -328,7 +330,7 @@ logger.is_tips = True
logger.printing = not osc.is_release
yanlun_length = len(myWords)
yanlun_length = len(yanlun_texts)
logger.info("加载窗口布局……")
@ -374,6 +376,7 @@ class LingLunMainFrame(wx.Frame):
)
self.SetForegroundColour(BLACK)
self.SetBackgroundColour(WHITE)
self.m_statusBar2 = self.CreateStatusBar(1, wx.STB_SIZEGRIP, wx.ID_ANY)
self.m_statusBar2.SetFont(
wx.Font(
@ -415,6 +418,26 @@ class LingLunMainFrame(wx.Frame):
self.m_menubar1.Append(self.FileMenu, "文件")
self.EditMenu = wx.Menu()
self.play_via_websocket = wx.MenuItem(
self.EditMenu,
wx.ID_ANY,
"以WebSocket服务播放",
"在指定端口上开启WebSocket播放服务器",
wx.ITEM_NORMAL,
)
self.EditMenu.Append(self.play_via_websocket)
self.m_menubar1.Append(self.EditMenu, "编辑")
self.AboutMenu = wx.Menu()
self.m_author_info_menuItem4 = wx.MenuItem(
self.AboutMenu, wx.ID_ANY, "作者信息", "查看关于信息", wx.ITEM_NORMAL
)
self.AboutMenu.Append(self.m_author_info_menuItem4)
self.m_menubar1.Append(self.AboutMenu, "关于")
self.SetMenuBar(self.m_menubar1)
m_mainBoxSizer = wx.BoxSizer(wx.VERTICAL)
@ -443,11 +466,12 @@ class LingLunMainFrame(wx.Frame):
"OPPOSans B",
)
)
# 设立言论颜色
self.m_LinglunWords_staticText1.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)
yanlun_fg_colour,
)
self.m_LinglunWords_staticText1.SetBackgroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
yanlun_bg_colour,
)
s_yanLunbarSizer.Add(self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5)
@ -509,6 +533,16 @@ class LingLunMainFrame(wx.Frame):
self.Bind(
wx.EVT_MENU, self.onExitButtonPressed, id=self.m_Exit_menuItem1.GetId()
)
self.Bind(
wx.EVT_MENU,
self.onWebSocketPlayButtonPressed,
id=self.play_via_websocket.GetId(),
)
self.Bind(
wx.EVT_MENU,
self.on_author_button_pressed,
id=self.m_author_info_menuItem4.GetId(),
)
self.m_LinglunWords_staticText1.Bind(wx.EVT_LEFT_DCLICK, self.onYanlunDClicked)
self.m_LinglunWords_staticText1.Bind(wx.EVT_MOUSEWHEEL, self.onYanlunWheeled)
@ -526,9 +560,72 @@ class LingLunMainFrame(wx.Frame):
def onExitButtonPressed(self, event):
self.Destroy()
def onWebSocketPlayButtonPressed(self, event):
_th = threading.Thread(
target=to_websocket_server,
args=(
[
(
ConvertClass[0].from_mido_obj(
midi_obj=None,
midi_name="山水千年",
ignore_mismatch_error=ignore_midi_mismatch_error,
playment_speed=self.convert_page.m_speed_spinCtrlDouble.GetValue(),
pitched_note_rtable=convert_tables["PITCHED"][
convert_table_selection["PITCHED"]
],
percussion_note_rtable=convert_tables["PERCUSSION"][
convert_table_selection["PERCUSSION"]
],
enable_old_exe_format=self.convert_page.m_oldExeFormatChecker_checkBox3.GetValue(),
minimum_volume=self.convert_page.m_volumn_spinCtrlDouble1.GetValue()
/ 100,
)
if file_name == "诸葛亮与八卦阵-山水千年"
else ConvertClass[0].from_midi_file(
midi_file_path=file_name,
mismatch_error_ignorance=ignore_midi_mismatch_error,
pitched_note_table=convert_tables["PITCHED"][
convert_table_selection["PITCHED"]
],
percussion_note_table=convert_tables["PERCUSSION"][
convert_table_selection["PERCUSSION"]
],
old_exe_format=self.convert_page.m_oldExeFormatChecker_checkBox3.GetValue(),
)
)
for file_name in self.convert_page.m_midiFilesList_listBox2.GetStrings()
],
"127.0.0.1",
8001,
pgb_style,
),
)
_th.start()
while (
wx.MessageDialog(
None,
"已在本地端口 8001 开启WebSocket播放服务器。\n在游戏内输入 /connect 127.0.0.1:8001 以连接之\n游戏内发送文本 .play乐曲名 以播放指定乐曲\n发送文本 .stopplay 以结束当前播放。\n发送文本 .terminate 以终止连接\n\n本功能尚处试验阶段,有所问题很正常。",
caption="提示信息",
style=wx.OK | wx.CANCEL,
).ShowModal()
== wx.ID_OK
):
pass
# _th.setDaemon(True)
del _th
def on_author_button_pressed(self, event):
go_author_page()
def onYanlunDClicked(self, event):
self.yanlun_now = random.randrange(0, yanlun_length)
self.m_LinglunWords_staticText1.SetLabelText(myWords[self.yanlun_now] + "\r")
self.m_LinglunWords_staticText1.SetLabelText(
yanlun_texts[self.yanlun_now] + "\r"
)
def onYanlunWheeled(self, event):
if event.GetWheelRotation() < 0:
@ -540,7 +637,9 @@ class LingLunMainFrame(wx.Frame):
if self.yanlun_now >= yanlun_length
else (yanlun_length if self.yanlun_now < 0 else 0)
)
self.m_LinglunWords_staticText1.SetLabelText(myWords[self.yanlun_now] + "\r")
self.m_LinglunWords_staticText1.SetLabelText(
yanlun_texts[self.yanlun_now] + "\r"
)
logger.info("加载分页……")
@ -565,8 +664,8 @@ class ConvertPagePanel(wx.Panel):
self, parent, id=id, pos=pos, size=size, style=style, name=name
)
self.SetBackgroundColour(WHITE2)
self.SetForegroundColour(BLACK2)
self.SetBackgroundColour(WHITE)
self.SetForegroundColour(BLACK)
main_page_sizer = wx.BoxSizer(wx.VERTICAL)
@ -577,10 +676,10 @@ class ConvertPagePanel(wx.Panel):
self.m_ChooseMidiTips_staticText3 = wx.StaticText(
self,
wx.ID_ANY,
"选择MIDI文件\n(双击移除)",
"MIDI文件\n(双击移除)",
wx.DefaultPosition,
wx.DefaultSize,
0,
wx.ALIGN_CENTER_HORIZONTAL,
)
self.m_ChooseMidiTips_staticText3.Wrap(-1)
@ -589,7 +688,7 @@ class ConvertPagePanel(wx.Panel):
)
self.m_done_then_remove_checkBox6 = wx.CheckBox(
self, wx.ID_ANY, "完成后移", wx.DefaultPosition, wx.DefaultSize, 0
self, wx.ID_ANY, "完成后移", wx.DefaultPosition, wx.DefaultSize, 0
)
MidiChooser_Delete_and_Tips_bSizer15.Add(
self.m_done_then_remove_checkBox6, 0, wx.ALL, 5
@ -624,7 +723,7 @@ class ConvertPagePanel(wx.Panel):
)
self.m_midiChooser_Clear_button3 = wx.Button(
self, wx.ID_ANY, "清空文件", wx.DefaultPosition, wx.DefaultSize, 0
self, wx.ID_ANY, "清空列表", wx.DefaultPosition, wx.DefaultSize, 0
)
MidiChooser_Open_and_Clear_Buttons_bSizer16.Add(
self.m_midiChooser_Clear_button3, 0, wx.ALL | wx.EXPAND, 5
@ -660,7 +759,7 @@ class ConvertPagePanel(wx.Panel):
wx.StaticBox(self, wx.ID_ANY, "选择播放器"), wx.VERTICAL
)
m_playerChoice_choice2Choices = ["计分", "延时", "中继"]
m_playerChoice_choice2Choices = ["计分控制", "命令延时", "红石中继"]
self.m_playerChoice_choice2 = wx.Choice(
ss_playerChooseSizer.GetStaticBox(),
wx.ID_ANY,
@ -683,14 +782,14 @@ class ConvertPagePanel(wx.Panel):
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer(wx.HORIZONTAL)
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer(
wx.StaticBox(s_promptSizer.GetStaticBox(), wx.ID_ANY, "音量大小"),
wx.StaticBox(s_promptSizer.GetStaticBox(), wx.ID_ANY, "最小音量"),
wx.HORIZONTAL,
)
self.m_volumn_slider = wx.Slider(
sss_VolumnPersentageEnteringSizer.GetStaticBox(),
wx.ID_ANY,
1000,
100,
0,
1000,
wx.DefaultPosition,
@ -702,16 +801,16 @@ class ConvertPagePanel(wx.Panel):
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble(
sss_VolumnPersentageEnteringSizer.GetStaticBox(),
wx.ID_ANY,
"100",
"0.1",
wx.DefaultPosition,
wx.DefaultSize,
wx.ALIGN_CENTER_HORIZONTAL | wx.SP_ARROW_KEYS | wx.TE_PROCESS_ENTER,
0,
100,
100.000000,
0.5,
1,
0.100000,
0.001,
)
self.m_volumn_spinCtrlDouble1.SetDigits(2)
self.m_volumn_spinCtrlDouble1.SetDigits(3)
sss_VolumnPersentageEnteringSizer.Add(
self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5
)
@ -980,7 +1079,7 @@ class ConvertPagePanel(wx.Panel):
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl(
s_promptSizer.GetStaticBox(),
wx.ID_ANY,
"UserYou",
"Yourself",
wx.DefaultPosition,
wx.DefaultSize,
0,
@ -1205,11 +1304,11 @@ class ConvertPagePanel(wx.Panel):
def onVolumeScrolling(self, event):
# prt(self.m_volumn_slider.Value)
self.m_volumn_spinCtrlDouble1.SetValue(self.m_volumn_slider.Value / 10)
self.m_volumn_spinCtrlDouble1.SetValue(self.m_volumn_slider.Value / 1000)
def onVolumeSpinChanged(self, event):
# prt(self.m_volumn_spinCtrlDouble1.Value)
self.m_volumn_slider.SetValue(int(self.m_volumn_spinCtrlDouble1.Value * 10))
self.m_volumn_slider.SetValue(int(self.m_volumn_spinCtrlDouble1.Value * 1000))
def onSpeedScrolling(self, event):
# prt(self.m_speed_slider.Value)
@ -1281,30 +1380,37 @@ class ConvertPagePanel(wx.Panel):
global pgb_style
for file_name in self.m_midiFilesList_listBox2.GetStrings():
if file_name == "诸葛亮与八卦阵-山水千年":
mid_cvt = ConvertClass[0](
None,
"山水千年",
self.m_oldExeFormatChecker_checkBox3.GetValue(),
convert_tables["PITCHED"][convert_table_selection["PITCHED"]],
convert_tables["PERCUSSION"][convert_table_selection["PERCUSSION"]],
mid_cvt = ConvertClass[0].from_mido_obj(
midi_obj=None,
midi_name="山水千年",
ignore_mismatch_error=ignore_midi_mismatch_error,
playment_speed=self.m_speed_spinCtrlDouble.GetValue(),
pitched_note_rtable=convert_tables["PITCHED"][
convert_table_selection["PITCHED"]
],
percussion_note_rtable=convert_tables["PERCUSSION"][
convert_table_selection["PERCUSSION"]
],
enable_old_exe_format=self.m_oldExeFormatChecker_checkBox3.GetValue(),
minimum_volume=self.m_volumn_spinCtrlDouble1.GetValue() / 100,
)
else:
mid_cvt = ConvertClass[0].from_midi_file(
file_name,
self.m_oldExeFormatChecker_checkBox3.GetValue(),
convert_tables["PITCHED"][convert_table_selection["PITCHED"]],
convert_tables["PERCUSSION"][convert_table_selection["PERCUSSION"]],
midi_file_path=file_name,
mismatch_error_ignorance=ignore_midi_mismatch_error,
pitched_note_table=convert_tables["PITCHED"][
convert_table_selection["PITCHED"]
],
percussion_note_table=convert_tables["PERCUSSION"][
convert_table_selection["PERCUSSION"]
],
old_exe_format=self.m_oldExeFormatChecker_checkBox3.GetValue(),
)
cvt_cfg = ConvertConfig(
(
os.path.split(file_name)[0]
if self.m_Check_Every_Their_Path_checkBox7.GetValue()
else self.m_Convertion_Destination_Picker_dirPicker1.GetTextCtrl().GetValue()
),
self.m_volumn_spinCtrlDouble1.GetValue() / 100,
self.m_speed_spinCtrlDouble.GetValue(),
progressbar=pgb_style,
cvt_dist = (
os.path.split(file_name)[0]
if self.m_Check_Every_Their_Path_checkBox7.GetValue()
else self.m_Convertion_Destination_Picker_dirPicker1.GetTextCtrl().GetValue()
)
# 0: 附加包
@ -1314,24 +1420,27 @@ class ConvertPagePanel(wx.Panel):
if self.m_outformatChoice_choice1.GetSelection() == 0:
if self.m_playerChoice_choice2.GetSelection() == 0:
cmd_num, total_delay = to_addon_pack_in_score(
mid_cvt,
cvt_cfg,
self.m_ScoreboardNameEntering_textCtrl9.GetValue(),
self.m_IsAutoResetScoreboard_checkBox2.GetValue(),
midi_cvt=mid_cvt,
dist_path=cvt_dist,
progressbar_style=pgb_style,
scoreboard_name=self.m_ScoreboardNameEntering_textCtrl9.GetValue(),
auto_reset=self.m_IsAutoResetScoreboard_checkBox2.GetValue(),
)
elif self.m_playerChoice_choice2.GetSelection() == 1:
cmd_num, total_delay = to_addon_pack_in_delay(
mid_cvt,
cvt_cfg,
self.m_PlayerSelectorEntering_comboBox1.GetValue(),
self.m_enteringStructureMaxHeight_spinCtrl1.GetValue(),
midi_cvt=mid_cvt,
dist_path=cvt_dist,
progressbar_style=pgb_style,
player=self.m_PlayerSelectorEntering_comboBox1.GetValue(),
max_height=self.m_enteringStructureMaxHeight_spinCtrl1.GetValue(),
)
elif self.m_playerChoice_choice2.GetSelection() == 2:
cmd_num, total_delay = to_addon_pack_in_repeater(
mid_cvt,
cvt_cfg,
self.m_PlayerSelectorEntering_comboBox1.GetValue(),
self.m_enteringStructureMaxHeight_spinCtrl1.GetValue(),
midi_cvt=mid_cvt,
dist_path=cvt_dist,
progressbar_style=pgb_style,
player=self.m_PlayerSelectorEntering_comboBox1.GetValue(),
max_height=self.m_enteringStructureMaxHeight_spinCtrl1.GetValue(),
)
else:
wx.MessageDialog(
@ -1351,7 +1460,8 @@ class ConvertPagePanel(wx.Panel):
if self.m_playerChoice_choice2.GetSelection() == 0:
cmd_num, total_delay, size, final_pos = to_BDX_file_in_score(
midi_cvt=mid_cvt,
data_cfg=cvt_cfg,
dist_path=cvt_dist,
progressbar_style=pgb_style,
scoreboard_name=self.m_ScoreboardNameEntering_textCtrl9.GetValue(),
auto_reset=self.m_IsAutoResetScoreboard_checkBox2.GetValue(),
author=self.m_EnteringBDXfileSignName_textCtrl12.GetValue(),
@ -1360,7 +1470,8 @@ class ConvertPagePanel(wx.Panel):
elif self.m_playerChoice_choice2.GetSelection() == 1:
cmd_num, total_delay, size, final_pos = to_BDX_file_in_delay(
midi_cvt=mid_cvt,
data_cfg=cvt_cfg,
dist_path=cvt_dist,
progressbar_style=pgb_style,
player=self.m_PlayerSelectorEntering_comboBox1.GetValue(),
author=self.m_EnteringBDXfileSignName_textCtrl12.GetValue(),
max_height=self.m_enteringStructureMaxHeight_spinCtrl1.GetValue(),
@ -1415,8 +1526,8 @@ class SettingPagePannel(wx.Panel):
self, parent, id=id, pos=pos, size=size, style=style, name=name
)
self.SetBackgroundColour(WHITE2)
self.SetForegroundColour(BLACK2)
self.SetBackgroundColour(WHITE)
self.SetForegroundColour(BLACK)
setting_page_sizer = wx.BoxSizer(wx.VERTICAL)
@ -1437,8 +1548,8 @@ class SettingPagePannel(wx.Panel):
"@OPPOSans R",
)
)
self.setting_notebook.SetBackgroundColour(WHITE2)
self.setting_notebook.SetForegroundColour(BLACK2)
self.setting_notebook.SetBackgroundColour(WHITE)
self.setting_notebook.SetForegroundColour(BLACK)
self.setting_page1 = wx.Panel(
self.setting_notebook,
@ -1900,10 +2011,10 @@ class SettingPagePannel(wx.Panel):
convert_table_selection["PITCHED"] = "自定义对照表"
to_change_id = int(event.GetProperty().GetName().split("_")[-1])
to_change_value = (
event.GetProperty().GetValue(),
Musicreater.MM_INSTRUMENT_DEVIATION_TABLE.get(
event.GetProperty().GetValue(), -1
),
event.GetProperty().GetValue()
# Musicreater.MM_INSTRUMENT_DEVIATION_TABLE.get(
# event.GetProperty().GetValue(), -1
# ),
)
convert_tables["PITCHED"]["自定义对照表"][to_change_id] = to_change_value
logger.info(
@ -1949,10 +2060,10 @@ class SettingPagePannel(wx.Panel):
convert_table_selection["PERCUSSION"] = "自定义对照表"
to_change_id = int(event.GetProperty().GetName().split("_")[-1])
to_change_value = (
event.GetProperty().GetValue(),
Musicreater.MM_INSTRUMENT_DEVIATION_TABLE.get(
event.GetProperty().GetValue(), -1
),
event.GetProperty().GetValue()
# Musicreater.MM_INSTRUMENT_DEVIATION_TABLE.get(
# event.GetProperty().GetValue(), -1
# ),
)
convert_tables["PERCUSSION"]["自定义对照表"][to_change_id] = to_change_value
logger.info(

View File

@ -1,3 +1,10 @@
Musicreater>=1.7.2.1
Musicreater>=2.1.0.1
TrimLog>=0.8.3
requests>=2.0.0
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
resources/TriMO_Theme.mp4 Normal file

Binary file not shown.

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

279
utils/authorp.py Normal file
View File

@ -0,0 +1,279 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 作者信息组件
Linglun Converter Author Page Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
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()

View File

@ -12,7 +12,6 @@ Terms & Conditions: ./Lisense.md
"""
import requests
from typing import (
Any,
Callable,
@ -36,25 +35,6 @@ logger.is_logging = True
logger.suffix = ".llc"
logger.is_tips = True
logger.info("读取 言·论 信息……")
try:
myWords = (
requests.get(
"https://gitee.com/TriM-Organization/LinglunStudio/raw/master/resources/myWords.txt",
).text
.strip("\n")
.split("\n")
)
except (ConnectionError, requests.HTTPError, requests.RequestException) as E:
logger.warning(f"读取言·论信息发生 互联网连接 错误:\n{E}")
myWords = ["以梦想为驱使 创造属于自己的未来"]
# noinspection PyBroadException
except BaseException as E:
logger.warning(f"读取言·论信息发生 未知 错误:\n{E}")
myWords = ["灵光焕发 深艺献心"]
logger.info("注册出入方法……")

View File

@ -12,18 +12,16 @@ Terms & Conditions: ./Lisense.md
"""
from .io import logger, Any
def _() -> str:
return ""
def main():
pass
if __name__ == "__main__":
main()

View File

@ -11,7 +11,9 @@ Copyright © 2024 EillesWan & TriM Org.
Terms & Conditions: ./Lisense.md
"""
from .io import TrimLog, requests, Sequence, Iterable, Callable, Optional, Dict, Union
import requests
from .io import TrimLog, Sequence, Iterable, Callable, Optional, Dict, Union
def is_ver_char(text: str) -> bool:

View File

@ -1,3 +1,17 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 HTML页组件
Linglun Converter HTML Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
import wx
import wx.html

52
utils/yanlun.py Normal file
View File

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 言论版组件
Linglun Converter Yan Lun Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
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 生日快乐~"]
elif solar_date == (8, 6):
yanlun_texts = ["诸葛八卦 生日快乐~"]
else:
try:
yanlun_texts = (
requests.get(
"https://gitee.com/TriM-Organization/LinglunStudio/raw/master/resources/myWords.txt",
)
.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 = ["灵光焕发 深艺献心"]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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
View 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

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,20 @@
# -*- conding: utf8 -*-
# -*- 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'):
if file_name.endswith(".py"):
file = os.path.join(path, file_name)
print("得到文件名:" + str(file))
for i in open(file, 'r', encoding="utf-8"):
for i in open(file, "r", encoding="utf-8"):
code = i.strip()
if code.startswith('#'):
if code.startswith("#"):
pass
elif code:
print("\t" + code)